PR #3794 - pad in any direction

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

PR #3794 - pad in any direction

Post by uwestoehr »

It is one of the things I missed the most with PartDesign: Once can only pad and pocket in z-direction. Im many real-life uses cases one needs however an angle (e.g. drafts for molds, 3D-printed parts).

This PR adds the functionality to define with 2 angles the padding direction.
Here are 2 screencasts to see the feature in action:
Image


Image


For now I only added this to the padding feature. If you find this feature useful, I will add it to pocket as well.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3794 - pad in any direction

Post by chrisb »

Something like this was missing in PartDesign. However, it could be sensible to have the same possibilities as in Part workbench.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #3794 - pad in any direction

Post by uwestoehr »

chrisb wrote: Sun Aug 09, 2020 4:37 pm However, it could be sensible to have the same possibilities as in Part workbench.
Sure, but step by step.
For the prisms however, I already took care of the Part WB: https://github.com/FreeCAD/FreeCAD/pull/3793
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: PR #3794 - pad in any direction

Post by openBrain »

I find it really cool.
But IMO this would be ideal if direction could be define by an edge (from sketch, solid, datum line,...)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #3794 - pad in any direction

Post by uwestoehr »

openBrain wrote: Sun Aug 09, 2020 5:21 pm I find it really cool.
But IMO this would be ideal if direction could be define by an edge (from sketch, solid, datum line,...)
How would that work? I mean I start with a new file, create a sketch and want to pad it with 30° incline. There are no edges yet. I would then first have to create a datum line. Then the step is not large to make directly a loft.
I think we have to find a compromise. I choose angles because in my real-life documents drafts/tapers are defined by angles, so I can directly use this info without any further actions.
Being forced to select an edge or axis as direction slows down the workflow for the applications I have while it might speed it up for others.

I propose to stay with the angles for now. If there is demand on using either an edge or by specifying directly the direction vector components, then this can be changed accordingly. I think for now people need to test and use it for real-life documents. I mean I came to this PR _after_ intensively using FC for more than one year because first now I had real-life documents where this feature is necessary. So there is no good than working with this. I hope it can be merged within the next week and then more users could try it out and give feedback.
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PR #3794 - pad in any direction

Post by wmayer »

uwestoehr wrote: Sun Aug 09, 2020 5:34 pm How would that work? I mean I start with a new file, create a sketch and want to pad it with 30° incline. There are no edges yet. I would then first have to create a datum line. Then the step is not large to make directly a loft.
I think we have to find a compromise. I choose angles because in my real-life documents drafts/tapers are defined by angles, so I can directly use this info without any further actions.
Being forced to select an edge or axis as direction slows down the workflow for the applications I have while it might speed it up for others.
IMO, the compromise would be to use an expression. I think most of the time people will just enter a fix number and don't need/want to use an edge. Now if someone has an edge he can use an expression by using the direction vector of the underlying geometry:

Code: Select all

DatumLine.Shape.Curve.Direction.y
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: PR #3794 - pad in any direction

Post by DeepSOIC »

what do x and y angles mean when one pads in a strange direction? for example, one defined by face normal, when padding a face?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: PR #3794 - pad in any direction

Post by DeepSOIC »

uwestoehr wrote: Sun Aug 09, 2020 5:20 pm
chrisb wrote: Sun Aug 09, 2020 4:37 pm However, it could be sensible to have the same possibilities as in Part workbench.
Sure, but step by step.
But Part does not support these angles, it has a completely different way of defining pad direction. This change looks more like a step away. It is different. Likely useful. But Part and PartDesign diverge even further.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #3794 - pad in any direction

Post by uwestoehr »

uwestoehr wrote: Sun Aug 09, 2020 5:34 pm I propose to stay with the angles for now.
That turned out to be a no go, depending on the placement of your sketch. Thanks to Travis' tests I realized this. I mean one can pad from everywhere and then the angle is not yet clear.

So I implemented now this dialog:
FreeCAD_IYPeXVCSLu.png
FreeCAD_IYPeXVCSLu.png (11.49 KiB) Viewed 10728 times

There you can choose between using the normal vector as usual, of a custom vector. Since one has always the global coordinate system visible it shouldn't be too hard to understand the padding direction when using a custom vector.

However, I am open of having the possibility to use an existing edge. But I have the feeling I am doing too many steps at once.
Post Reply