For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages


Jane Hu's picture


I am trying to use following code:
TopoDS_Shape cut_shape = BRepAlgoAPI_Cut(*from_shape, *tool_shape);

After that, I want to compare if cut_shape and *from_shape are the same, meaning, from_shape didn't get cut. In the case of not cutting case, both TopoDS_Shape::IsSame() and TopoDS_Shape::IsEqual() gives false, which indicates these shapes are different.

BRepAlgoAPI_BooleanOperation::HasModified() or HasGenerated() don't same to give the corresponding answer either.

Is there any other ways to tell if the cutting is actually performed or not?

Thanks in advance!


Rob Bachrach's picture

The IsSame and IsEqual comparisons look to see if the shapes use the same handle. They wouldn't since the result of the cut is always a new shape. I have done this by using BRepGProp to compute the mass of the shape. If the mass after the cut is not less than that before the cut, the cut had no effect.


Jane Hu's picture

Thanks, Rob! This IS a great idea to compare the mass!

Have a nice day!


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.