BRepAlgoAPI_Cut Fails when the seams on two objects are at exactly the same place


I'm having some problems with the boolean operation between two solids, when the seams of these objects are at exactly the same place, especially when the solids are extruded along a path that isn't orthogonal to the surface to be extruded!

Instead, if I extrude the same face along an orthogonal path, the boolean operation between these solids works fine! Also when I build the second solid a bit larger than the first one, the boolean operation succeeds. 

Attached you'll find the step files containing the two solids.

Is there a solution to this kind of problem? Any help will be appreciated!








jelle's picture

hi Giovanni,

tangential surfaces are tricky for bool ops, the recent Fuzzy Bool Ops effort addresses this issue. possible this is of interest for you?

Giovanni Pennisi's picture

Hi Jelle,

Thank you so much for your reply. I've already read about this fuzzy parameter in the documentation, and I spent all the morning trying to find the one that fit for me, but unfortunately I didn't find  a suitable value. The strange thing is that when I set the fuzzy value to 1e-5 and also I set parameter to run the operation in parallel mode, sometimes it works even if I got an exception: Geom_TrimmedCurve::parameters out of range! When this exception is raised in debug mode, I'm able to continue the execution of the program and I get the expected result, instead in release mode the application crashes! Using the sequential mode, I always get the error status 391, when the same exception is raised! Is it a bug in opencascade code? Or Am I doing something wrong?

These are the lines of codes used to do the cut operation between the two solid.

BRepAlgoAPI_Cut cut
TopTools_ListOfShape aLS;
TopTools_ListOfShape aLT;

if (cut.ErrorStatus())
   return -1;



jelle's picture

probably best to file a bub report indeed...

Giovanni Pennisi's picture

What should I do to submit a bug report? 

Thanks in advance.

Anatoly Vivchar's picture

The same problem... error 391, if set Fuzzy value - just freeze forever :(

Forum supervisor's picture

Dear Giovanni,

Thank you for your analysis, provided test data and message, sorry for delay with response. The bug is reproduced using your test data.

Please register the correspondent issue in OCCT Mantis BugTracker which is available via our Collaborative Development Portal. Please use the category OCCT:Modeling Algorithms for this issue.

The registered issues are arranging and processing with usual priority in accordance with OCCT production plans. Our flexible support programs adapt to your project needs and radically speed up the processing of all your requests and the issues.

We shall be also glad to offer you our professional assistance within our support programs to provide you with the best expertise in integrating our technology in your projects and thus secure your investment.

Please do not hesitate to communicate via our Contact Form.

Best regards,
Forum Supervisor

Forum supervisor's picture

Dear Anatoly,

You can also use any way (mentioned above - issue registering and contact) preferable for you. For registering OCCT related issue please provide a description of the steps for issue reproducing and complete test data.

Best regards,

Forum Supervisor