How can i know a point is on a line or edge?

i mean,i have a point and an edge. what function i can use to distinguish whether the point is on the edge?

Alexander Luger's picture

You can try to determine the minimum distance between the point and the edge by using BRepExtrema_DistShapeShape. If the distance is very small, the point might be considered to lie on the edge.

WuXuan's picture

thanks,i have solved it,use line.Contains function can solve this problem