We develop 3D modeler that allows to hollow one shape by several shapes. The shapes are designed thanks to BRepPrimAPI (box, cylinder, sphere,...) and the cut performed thanks to BRepAlgoAPI_Cut
We encounter sometimes some issue during the cut operation, the resulting shape does not match what we expect.
For example, it can result several shapes in the compound shape while only one shape should be produced, or sometimes the cut operation may totally fail (BRepAlgoAPI_Cut::BuilderCanWork() or IsDone() return 'false')
We would like to be able to detect theses wrong cases in order to solve the issue before performing the cut operation: More user friendly than tell to the user that the "hollowing is impossible"...
The cut process is a loop on the hollowing shapes with successive cut between the previous resulting shape and the current hollowing shape.
We have noticed in particular that the order of the hollowing shapes seems to be decisive : When we get a wrong result shape, sometimes we just have to change the order of the hollowing shapes to get the good result shape.
Do someone have some advise to get more robust and professional this cut operation with OCC ? Is there some rules to follow to insure the success of the cut operation (cutting with cube before cutting with cylinder i.e.) ?
Thank you in advance for your help