Boolean operations, numerical precision, and object scale

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
gwicke
Posts: 4
Joined: Sun Oct 13, 2019 3:16 am
Location: California

Boolean operations, numerical precision, and object scale

Postby gwicke » Sat Oct 19, 2019 4:15 am

Hi,

while working on molds for hydrofoil wings I ran into repeated issues with boolean operation failures when cutting a wing loft out of a cube. I think much of it has to do with the fine shapes involved, especially near the trailing edge of the wing. So after pretty much exhausting my ideas on a 300x100mm wing, I tried to simply scale up the design. Amazingly, this made the boolean cut work! At 10x the size (3x1m), I was able to reliably cut the foil out of a solid block. Cuts with the foil partially immersed into the block (creating very sharp slices) still failed, but scaling everything up another 100x made those work as well.
wing.jpeg
wing.jpeg (219.71 KiB) Viewed 205 times
I was a bit surprised that these precision effects would kick in at fairly typical workpiece sizes. Reading through the OpenCascade docs & the forum, I found some discussion of tolerances, but not so much on precision. I played a bit with the OpenScad WB "Increase tolerance" tool, but at first sight it seems to do the opposite of what I am looking for, which seems to be more about increasing the "signal / noise" ratio between numerical precision and feature size.

So now I am wondering if better boolean operation reliability could be achieved without the scale-up hack. https://opencascade.blogspot.com/2009/0 ... de_09.html mentions the Precision::Confusion default tolerance at 1e-7, and I see this referenced in quite a few places in the freecad codebase as well. This already seems fairly low. So is the issue here basic numerical precision, especially for more complex shapes like lofted splines?
Attachments
wing2.FCStd
(281.58 KiB) Downloaded 4 times
User avatar
hammax
Posts: 866
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: Boolean operations, numerical precision, and object scale

Postby hammax » Sat Oct 19, 2019 7:36 am

… I'm also playing with foils a.s.o.
First I substitute the profile-data of wire/bspline by a sketcher BSpline.
(have a look at your trailing edge!)
With my profiles it is possible to do the foil and upper and lower mold by loft.
You will have no problem with precision by changing parameters in VisualTab.

Foil_2.PNG
Foil_2.PNG (37.64 KiB) Viewed 187 times
Foil_3.PNG
Foil_3.PNG (35.49 KiB) Viewed 167 times
Attachments
Foil_Wing_2.FCStd
scale 1:1 ???
(81.9 KiB) Downloaded 1 time
Foil_Wing.FCStd
(101.93 KiB) Downloaded 16 times