
Wed, 06/12/2019 - 10:20
Hi everyone,
I'm using BRepAlgoAPI_Common to compute the common part of two TopoDS_Solids, which consists of some B-Spline-, planar and cylindrical surfaces created at runtime.
In a specific case, the Boolean operation fails although the geometries are well prepared (as in other cases which work well).
I tried to analyze it in DRAW with bop and bopcommon commands, but the Boolean operation doesn't fail there. So I tried the code of bop and bopcommon (they use BOPAlgo_PaveFiller and BOPAlgo_BOP) in my application, ending again in a failing Boolean operation (resulting shape is an empty TopoDS_Compound).
Now the strange part comes. When I save and load one of the TopoDS_Solids (using BRepTools::Write and BRepTools::Read) before the Boolean operation, the computation works as expected.
Why does it work after I/O the shape into/from a BREP-file?
My suggestion is, that some shape parameters are slightly different after I/O causing the Boolean operation not to fail anymore.
Does anybody has some thoughts on that?
Thu, 06/13/2019 - 05:03
Use BOPAlgo_CheckerSI to check the shape has self intersection sub tem
Thu, 06/13/2019 - 09:17
Hello Matthias,
Your suggestion is correct, this is caused by the loss of precision during writing/reading the shape. Try saving the shape with BinTools::Write method, which saves the shape into binary format without loss of precision. Use binrestore to load the shape in Draw.
Regards, Eugeny.
Fri, 06/14/2019 - 09:25
Hi liuhuiwei, Eugeny,
I could reproduce the failing Boolean Operation in DRAW when transfering the shapes with BinTools.
Neither of the input shapes has a self-intersection, but the Boolean Operation leads to creation of small edges and self-intersections.
Thank you both!
Fri, 06/14/2019 - 11:12
Hello Matthias, you can create an issue in https://tracker.dev.opencascade.org/bug_report_page.php attaching the dumped shapes.
Thu, 12/19/2019 - 12:27
I have to come back to this topic again.
I perform a boolean operation resulting in an empty compound.
If I save and load one particular input shape with BinTools::Write and BinTools::Read before the boolean operation the result is okay.
How is this possible, if BinTools saves/loads shapes without loss of precision?