Good day!
Help please to find a solution to the problem:
How to check whether a point with coordinates XYZ faces TopoDS_Face? Or whether a point lies within a volume TopoDS_Solid?
In advance thanks for your help
Alexander Luger Mon, 10/06/2014 - 16:31
Check BRepClass3d_SolidClassifier and BRepClass_FaceClassifier.
Mon, 10/06/2014 - 16:31
Check BRepClass3d_SolidClassifier and BRepClass_FaceClassifier.
Regards,
Alex
Mon, 10/06/2014 - 18:02
Thank you, Alex!
But still need to apply BRepExtrema_DistShapeShape. This code work:
bool IsPointOnFace(TopoDS_Face aFace, gp_Pnt aPoint, double aTolerance)
{
TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex (aPoint);
BRepExtrema_DistShapeShape anExtrema(aFace, aVertex);
if ((anExtrema.IsDone() == Standard_True) && (anExtrema.Value() <= aTolerance))
{
BRepClass_FaceClassifier classifier = BRepClass_FaceClassifier(aFace, aPoint, aTolerance);
return ((classifier.State() == TopAbs_ON) || (classifier.State() == TopAbs_IN));
}
else return false;
};