Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
townkat
Posts: 10
Joined: Mon Sep 09, 2019 10:42 pm

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby townkat » Sat Sep 14, 2019 9:56 pm

chrisb wrote:
Sat Sep 14, 2019 1:22 am
doesn't work anymore if you have already nested geometry:
I tried your example and it showed the multiple solids error. I think nested geometry in pocket always results in multiple solids. It must first work as pocket to be able to use the rectangle trick I think.

openBrain wrote:
Sat Sep 14, 2019 8:13 am
Just want to remember that for robustness purpose, you can bind the dimensions of the outer rectangle with latest Pad shape,
Pad063.Shape.BoundBox.XLength
another useful info, thank you :)
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby chrisb » Sun Sep 15, 2019 2:12 am

townkat wrote:
Sat Sep 14, 2019 9:56 pm
chrisb wrote:
Sat Sep 14, 2019 1:22 am
doesn't work anymore if you have already nested geometry:
I tried your example and it showed the multiple solids error. I think nested geometry in pocket always results in multiple solids. It must first work as pocket to be able to use the rectangle trick I think.
That's not the cause. If you limit the depth so that it does not go through all, then the pocket works while it doesn't with an additional outer rectangle.
Attachments
Bildschirmfoto 2019-09-15 um 10.12.49.png
Bildschirmfoto 2019-09-15 um 10.12.49.png (19.07 KiB) Viewed 170 times
kisolre
Posts: 1359
Joined: Wed Nov 21, 2018 1:13 pm

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby kisolre » Sun Sep 15, 2019 5:44 am

townkat wrote:
Sat Sep 14, 2019 9:56 pm
I tried your example and it showed the multiple solids error. I think nested geometry in pocket always results in multiple solids.
If I understood correctly it was more of an example where inverse pocket/common could be used. Leave everything betwhhen the circles and remove everytning else. and in that case just adding extra big rectangle will not work because this gives 3 contours and what is inside and what outside is not determined properly.
townkat
Posts: 10
Joined: Mon Sep 09, 2019 10:42 pm

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby townkat » Mon Sep 16, 2019 1:54 am

kisolre wrote:
Sun Sep 15, 2019 5:44 am
and in that case just adding extra big rectangle will not work because this gives 3 contours and what is inside and what outside is not determined properly.
chrisb wrote:
Sat Sep 14, 2019 1:22 am
If you limit the depth so that it does not go through all, then the pocket works while it doesn't with an additional outer rectangle.
Thnx, i could reproduce it now, so it seems like a bug in pocket function. This will probably be fixed sometime, but i will still want our PartDesign common function :).
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby chrisb » Mon Sep 16, 2019 4:03 am

townkat wrote:
Mon Sep 16, 2019 1:54 am
Thnx, i could reproduce it now, so it seems like a bug in pocket function. This will probably be fixed sometime, but i will still want our PartDesign common function :).
PartDesign common is a sensible extension as ickby pointed out in the topic linked above. Check the tracker if a corresponding feature request exists, and if not you may create one and crossreference it to this and the old topic.

The restriction to one single solid only seems like bug, but isn't. That's how a PartDesign body is specified.
freecad-heini-1
Posts: 5783
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby freecad-heini-1 » Mon Sep 16, 2019 5:44 am

chrisb wrote:
Mon Sep 16, 2019 4:03 am
The restriction to one single solid only seems like bug, but isn't. That's how a PartDesign body is specified.
Realthunder has eliminated the one solid rule in his branch. Hopefully we'll see that soon in Master, as well as the topo-naming improvements.
townkat
Posts: 10
Joined: Mon Sep 09, 2019 10:42 pm

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby townkat » Mon Sep 16, 2019 11:41 pm

chrisb wrote:
Mon Sep 16, 2019 4:03 am
The restriction to one single solid only seems like bug, but isn't. That's how a PartDesign body is specified.
Even with 3 nested shapes (like our example, rectangle included) it still remains a single solid, even more if pocket is not 100% depth, that's why I said it is a bug. It should start from outside and count object, empty, object, empty and so on trough the nested shapes to the center, but it only works up to 2 levels. Maybe not a bug, but a limitation of pocket tool, and maybe it will be improved in the future.
chrisb
Posts: 18223
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby chrisb » Tue Sep 17, 2019 1:42 am

It is indeed a (known) limitation, not a bug.
townkat
Posts: 10
Joined: Mon Sep 09, 2019 10:42 pm

Re: Feature Request: PartDesign Pocket, add intersect option in addition to subtract

Postby townkat » Tue Sep 17, 2019 11:52 pm

"Add PartDesign Common operations" feature request created.
https://www.freecadweb.org/tracker/view.php?id=4135