I'm experiening unexpected BRepAlgoAPI_Cut failures on very simple shapes. The shapes involved are all extrusions of flat faces. The wires used to build the faces are 2D outlines from a Visio like 2D canvas and consist of simple lines and bezier curves segments. The extruded shapes (components) are arranged into a 3D assembly and where one component intersects another, the user may specify one solid shape can "cut" into another.
These simple boolean operations succeed 99% of the time. However, 99% isn't good enough -- especially when small, seemingly insignficant, changes to the outline of the extruded shape make the difference between cut success and failure. Changes on either the cutting or cut shape can make the difference.
When the cut fails, a call to ShapeAnalysis_Shell::HasBadEdges() returns true. I've tried various "stab in the dark" attempts at discovering the underlying problem and using ShapeFix_* classes. I'm pretty sure there must be a more step-wise approach than what I've been doing. It's important to realized that the solids involved in the cut operations are built in OCC -- they are not being imported from another application.
Can anyone share general thoughts on the best way to approach an analysis of boolean cuts failure on simple shapes? Is there a good example anywhere of error analysis and remediation of shapes when boolean operations fail? Is there a top ten list of things to try when boolean operations fail?
The public OCC docs and examples are incomplete and too brief to be of help to someone doing anything more than "playing" with the library. I have read every post in this forum having anything to do with Boolean operations - thanks to all who have contributed as there is a lot of good material here but there is very little on this subject. I have also read Roman's excellent blog but he has not gotten into boolean operations in any detail.
Has anyone succeeded in building a generalized commercial grade application that depends on succesfull boolean cut operations (using the open source library)?
Anyone wishing to see the application I am building, that uses OCC, can see a quick movie demo of it here:
or soon on
BTW, I using 6.3.0 on Windows.