How do I know a gp_Pnt is in a Bnd_Box?

I wonder is there any method to verify a given point is in a Bnd_Box?


Jerome Dufaure's picture

To compute the state of a point you can use the BRepClass3d_SolidClassifier. Your box must be TopoDS_Solid type.
BRepClass3d_SolidClassifier::Load method to load solid.
BRepClass3d_SolidClassifier::Perform to compute the state of the point.
BRepClass3d_SolidClassifier::State to get the TopAbs_State.

TopAbs_State can be IN,OUT,ON or UNKNOWN.