
Fri, 12/06/2002 - 17:24
Forums:
Hello!
Is there a standard way to determine if point belongs to line segment bounded by 2 points?
Currently I project point to segment, calculate distance from initial point to projection point and compare it with Precision::Confusion().
Thu, 12/12/2002 - 07:31
Let's say your segment is between P1 and P2, and P is your point.
compute
gp_Vec V1(P,P1);
gp_Vec V2(P,P2);
Standard_Boolean PBelongToSeg = V1.IsParallel(V2,Precision::Angular());
HTH
compute the 2 gp_Vec from