Page 3 of 7

Re: #4828 PartDesign: inverse for pocket

Posted: Thu Sep 16, 2021 8:08 pm
by user1234
At least you know some opinions, but yes, more would be useful.

Thanks!

Greetings
user1234

Re: #4828 PartDesign: inverse for pocket

Posted: Thu Sep 16, 2021 9:29 pm
by openBrain
adrianinsaval wrote: Thu Sep 16, 2021 7:51 pm Actually I've been thinking about changing the implementation so it isn't actually a boolean common but a pocket using the complement of the selected face but still haven't found the time to do it. What are the thoughts of others, should this PR be put on hold so that it doesn't become a breaking change in the future?
Using OCC common for implementation is correct and probably more reliable than trying to use some other computations. IIRC pocket is implemented with an OCC cut actually.

Re: #4828 PartDesign: inverse for pocket

Posted: Thu Sep 16, 2021 10:22 pm
by chrisb
As you can see on the first page of this topic, I was in favor of "Common" too, because that's what it is from a rather mathematical point of view. However, I was convinced, that this name is not appropriate for PartDesign. I see every now and then questions asking about this function, but nobody ever asked for a common operation. Instead people want to know how the can remove what is outside of their sketch.

I have personally the view of a pocket of being something dynamic, like a mill that takes the material away. And indeed was the notion "pocket" used for milling before CAD systems were easily available. And I find it quite natural to ask for a function taking the outside away and not the inside.

Re: #4828 PartDesign: inverse for pocket

Posted: Thu Sep 16, 2021 10:29 pm
by adrianinsaval
openBrain wrote: Thu Sep 16, 2021 9:29 pm Using OCC common for implementation is correct and probably more reliable than trying to use some other computations. IIRC pocket is implemented with an OCC cut actually.
kinda, it's a single occ function tha does the extruding and cuting away. Anyway, look at the following example drawn on mspaint :lol:
Sin título.png
Sin título.png (6.19 KiB) Viewed 6914 times
if you have a cube and you draw a narrower rectangle in a face then do a pocket "outside" that is not through all the geyed part of the cube on the rigth will be removed, my idea is to make it behave as the cube on the left. This is in my opinion more inline with how one expects pocket to behave. Not that FreeCAD has to copy it but I think CATIA has that behavior.

Not sure if that would be possible for all operations (or even pocket itself ot be honest). Anyway, this PR causes problems with patterns that use these features, not sure how to solve them, probably needs major changes on how pattern handles stuff, this issue should be already present in master with helix outside I think.

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 12:10 am
by chrisb
adrianinsaval wrote: Thu Sep 16, 2021 10:29 pm Anyway, look at the following example drawn on mspaint
I don't understand this. Which are the sketches in these examples?

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 2:39 am
by adrianinsaval
sorry, guess I rushed too much, the sketches would be on the XZ plane, their projections highlighted in orange
drawing.png
drawing.png (4.14 KiB) Viewed 6812 times
Also, here's a file showcasing this, you should be able to open it in regular FreeCAD but recomputing the pocket in the first body would turn it into a regular pocket just like the second body.

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 5:56 am
by openBrain
adrianinsaval wrote: Fri Sep 17, 2021 2:39 am sorry, guess I rushed too much, the sketches would be on the XZ plane, their projections highlighted in orange
drawing.png
That's really a point. I agree that correct behavior is the left one. Not so simple actually. I have enough check the PR again, but probably it indeed need to be reworked.

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 7:41 am
by chrisb
adrianinsaval wrote: Fri Sep 17, 2021 2:39 am sorry, guess I rushed too much, the sketches would be on the XZ plane, their projections highlighted in orange
Thanks, it's clear now. For ease of understanding I add a picture here (rearranged the positions in your file to meet the previous image)

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 8:29 am
by rynn
Current and Regular are the exakt same.<
Current is wrong.

Edit:
No longer. OP fixed the image.

Re: #4828 PartDesign: inverse for pocket

Posted: Fri Sep 17, 2021 8:59 am
by chrisb
Oops, will fix it. Thought I had just used the transform tool.