BRepAlgoAPI_Cut gives union result and BRepAlgoAPI_Fuse gives cut result


I am having two solid bodies, Solid1 is created by using 'BRepBuilderAPI_MakeSolid' and
Solid2 is created by using 'BRepPrimAPI_MakePrism'.

I want to cut Solid2 from Solid1 but here api 'BRepAlgoAPI_Cut' gives wrong result which is union body(Combined Solid1 & 2). Then i have tried by using api 'BRepAlgoAPI_Fuse' and here result is cut body.
Please check attached images for reference.

Is any one faced this problem.
Please help me to get correct cut body.


Sebastian Hoogen's picture

Hello Sagar,
Usually this happens when one shapes has the wrong orientation. Please check in the sprops if one of the shapes has a negative mass.

sagar shankar patil's picture

Hello Sebastian,

Thank you for your reply.
Here Both Solids have forward orientations but if i change the orientation of Solid1 then i got expected result.
For me it is difficult to know, when to change orientation of Solids and for which solid. Because if both solids are created with Prism api then also orientations are forward but result is correct.

Please tell me is their any way to know negative mass properties of shape to manage orientation.