How to judge if a point is belong to a surface?

Hi, guys!

I read s step file and obtain the faces. Now I want to judge if some generated points are on the surface. Could somebody help?

Best regards,
Qingsong

Eugene Zaliznyak's picture

I would use something like - BRepClass_FaceClassifier

Qingsong Wang's picture

Thanks for your reply!

Mikhail Sazonov's picture

The simplest way is to create vertex from the point and call BRepExtrema_DistShapeShape algorithm. Then check if the distance is less than some tolerance.

Qingsong Wang's picture

Thanks for your reply, I 'll try it.