column or hole?

Please help me,How can find whether the cylinder is column or hole?
thanks

Evgeny Lodyzhehsky's picture

I suppose you deal with the cylinder as a solid.
Otherwise make solid from cylinder using the class BRepPrimAPI_MakeCylinder.

Use the class BRepClass3d_SolidClassifier.
The method BRepClass3d_SolidClassifier::PerformInfinitePoint() gives the state of an infinite 3D point.
If the state is TopAbs_IN, so your cylinder is hole.
If the state is TopAbs_OUT, so your cylinder is growth solid.