[merged] PR #5357 - add feature to create tapered Pads / Pockets

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
User avatar
uwestoehr
Veteran
Posts: 4320
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by uwestoehr »

jonasb wrote: Sun Jan 09, 2022 11:50 am Another wish: Please extend the existing test suite
Sure this will be added, but at first I must get the CI to compile the PR, then listen here for further feedback. Once the implementation is done, I can write a test.
TheMarkster
Veteran
Posts: 4517
Joined: Thu Apr 05, 2018 1:53 am

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by TheMarkster »

I'm just tossing out ideas. How about an enumeration of different taper types? Some options could be:

Taper outer wire only, inner wires not extruded.
Taper all wires at taper angle.
Taper all wires, but inner wires are inverted. Example: outer wire is tapered 2 degrees, inner wires -2 degrees.
Taper outer wire only, inner wires extruded without taper.
Taper inner wires only, outer wire extruded without taper.
davidosterberg
Posts: 529
Joined: Fri Sep 18, 2020 5:40 pm

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by davidosterberg »

uwestoehr wrote: Sun Jan 09, 2022 1:47 pm This is on purpose because I took purposely the Part Extrude code. If there is a taper angle, it only takes the outer wire of the sketch to extrude.

- for example if you have a circular hole in your sketch, you probably don't want to have it a taper angle, only for the outer sketch wire
- if you have an inner wire, you might want to have a different taper angle. For example when molding plastics the shrinkage is volume-dependent and then the inner taper angles might indeed have different values
Uh, this is not a very satisfying explanation. If the user didn’t want the inner wires to be part of the pad, then he/she would not have included it in their sketch. I vote for the following behavior: If outer contour grows then inner contour should shrink.

Many use cases for this. I am thinking casting design where we always want to ensure draft angles.
chrisb
Veteran
Posts: 43723
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by chrisb »

davidosterberg wrote: Sun Jan 09, 2022 3:56 pm Uh, this is not a very satisfying explanation. If the user didn’t want the inner wires to be part of the pad, then he/she would not have included it in their sketch. I vote for the following behavior: If outer contour grows then inner contour should shrink.
+1

But I understand Uwe, who just took the code from Part. Preferably this should be improved for both workbenches, so they can continue sharing the code.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
jonasb
Posts: 126
Joined: Tue Dec 22, 2020 7:57 pm

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by jonasb »

uwestoehr wrote: Sun Jan 09, 2022 1:47 pm This is on purpose because I took purposely the Part Extrude code. If there is a taper angle, it only takes the outer wire of the sketch to extrude.
...
Part's Extrude feature is there for ages and obviously people can live that inner wires are not extruded when there is a taper angle.
My guess is rather that it takes extra work to make it handle multiple wires, and that work just has not been done yet. Just like PartDesign's Pad/Pocket have been around for ages without tapered flanks...
uwestoehr wrote: Sun Jan 09, 2022 1:47 pm One could also take the inner wires as PartDesign Loft does so there must be a reason. And when thinking on how to implement the tapered option for inner wires I can imagine why these are not handled:
- for example if you have a circular hole in your sketch, you probably don't want to have it a taper angle, only for the outer sketch wire
- if you have an inner wire, you might want to have a different taper angle. For example when molding plastics the shrinkage is volume-dependent and then the inner taper angles might indeed have different values
True, but I'd consider those as special cases. If you really need them, you just use two consecutive pad/pocket operations. But as a user, if I pad/pocket a sketch with nested wires, I'd consider it a bug if all but the outer most wire are just ignored.
TheMarkster wrote: Sun Jan 09, 2022 3:47 pm ...
Taper all wires, but inner wires are inverted. Example: outer wire is tapered 2 degrees, inner wires -2 degrees
...
This is exactly what I'd expect to happen -- without any enumeration.
User avatar
uwestoehr
Veteran
Posts: 4320
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by uwestoehr »

davidosterberg wrote: Sun Jan 09, 2022 3:56 pm Uh, this is not a very satisfying explanation.
For ages the Extrude feature behaves as it does. Now I just transferred tits functionality to Pad/Pocket. So I add a feature, all existing functionalities are preserved.

Of course the Extrude feature can be changed. I am currently trying out if I can use the Loft code for Extrude. However, in every case, this would be a second PR that in the first step changes the Extrude feature.

So I provide here a feature that would help people in many situations but you say, better not add this because it does in the first step not cover all possible cases?
I say no, I will do it step by step. First step is this PR to make Pad/Pocket in sync with Part Extrude. Next step is to modify the Extrude code.
TheMarkster
Veteran
Posts: 4517
Joined: Thu Apr 05, 2018 1:53 am

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by TheMarkster »

With Part workbench extrude, if you extrude a sketch with one circle inside another circle on a taper, and then use compound explode on the extrude object and cut the inner solid from the outer you can see that both wires have been tapered at the same angle.
Snip macro screenshot-245228.png
Snip macro screenshot-245228.png (64.61 KiB) Viewed 1391 times
Extrude is managing to taper both wires, it's just failing to boolean cut the inner from the outer.
User avatar
uwestoehr
Veteran
Posts: 4320
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by uwestoehr »

TheMarkster wrote: Sun Jan 09, 2022 4:21 pm Extrude is managing to taper both wires, it's just failing to boolean cut the inner from the outer.
I know. It is not "failing" it purposely doesn't handle them. As said, this will be stage 2 and I am already trying to make Extrude take care of inner wires in sketches.
TheMarkster
Veteran
Posts: 4517
Joined: Thu Apr 05, 2018 1:53 am

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by TheMarkster »

uwestoehr wrote: Sun Jan 09, 2022 4:23 pm
TheMarkster wrote: Sun Jan 09, 2022 4:21 pm Extrude is managing to taper both wires, it's just failing to boolean cut the inner from the outer.
I know. It is not "failing" it purposely doesn't handle them. As said, this will be stage 2 and I am already trying to make Extrude take care of inner wires in sketches.
Ah, good. I think there was cross-posting and I didn't notice the bit about doing this in stages. I think there are also related issues with Part Loft and Sweep not managing inner wires. In fact, such profiles do not even appear in the dialog as options. By the way, if a student refuses to take an exam he still gets a failing grade even if he knew the material and purposely did not answer the questions.
User avatar
uwestoehr
Veteran
Posts: 4320
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: PR #5357 - add feature to create tapered Pads / Pockets

Post by uwestoehr »

TheMarkster wrote: Sun Jan 09, 2022 4:39 pm By the way, if a student refuses to take an exam he still gets a failing grade
What? Are you my professor?

professor: "can you please make the window our your car change that they can be opened"
student: "here is is"
professor: "That is not OK, the two back windows should be moveable simultaneously and different than the front windows"
student: "can we not just keep the moving windows for now, I mean it is better than having no movable windows at all?"
professor: "Sorry, you are not taking the exam. I'll give you a failing grade"
student: "but then the windows keep static as they are"
professor: "yes, better not to do anything than doing it not right"

Over and Out
Post Reply