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
Posts: 2170
Joined: Sun Jan 27, 2019 3:21 am

PR #3794 - pad in any direction

Postby uwestoehr » Sun Aug 09, 2020 4:31 pm

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
Posts: 30786
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3794 - pad in any direction

Postby chrisb » Sun Aug 09, 2020 4:37 pm

Something like this was missing in PartDesign. However, it could be sensible to have the same possibilities as in Part workbench.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Posts: 2170
Joined: Sun Jan 27, 2019 3:21 am

Re: PR #3794 - pad in any direction

Postby uwestoehr » 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.
For the prisms however, I already took care of the Part WB: https://github.com/FreeCAD/FreeCAD/pull/3793
openBrain
Posts: 5202
Joined: Fri Nov 09, 2018 5:38 pm

Re: PR #3794 - pad in any direction

Postby openBrain » 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,...)
User avatar
uwestoehr
Posts: 2170
Joined: Sun Jan 27, 2019 3:21 am

Re: PR #3794 - pad in any direction

Postby uwestoehr » Sun Aug 09, 2020 5:34 pm

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
Site Admin
Posts: 16866
Joined: Thu Feb 19, 2009 10:32 am

Re: PR #3794 - pad in any direction

Postby wmayer » Sun Aug 09, 2020 5:53 pm

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
Posts: 7832
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: PR #3794 - pad in any direction

Postby DeepSOIC » Sun Aug 09, 2020 6:30 pm

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
Posts: 7832
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: PR #3794 - pad in any direction

Postby DeepSOIC » Sun Aug 09, 2020 6:33 pm

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
Posts: 2170
Joined: Sun Jan 27, 2019 3:21 am

Re: PR #3794 - pad in any direction

Postby uwestoehr » Mon Aug 10, 2020 2:35 am

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 892 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.