+/** compute edge1^(firstPnt1,point) and edge2^(firstPnt2,point):
+ * if the z values are opposite, the point is between the edges.
+ * We must also check if the point is near the edges
+ * (inside the circle defined by the edges: approximation)
+ * to discriminate false positives in sinuous cases
+ */
+bool IsPointBetweenEdges2( const gp_Pnt& aFirstPnt1, const gp_Pnt& aLastPnt1,
+ const gp_Pnt& aFirstPnt2, const gp_Pnt& aLastPnt2,
+ const gp_Pnt& thePoint) {
+ double x1 = aLastPnt1.X() - aFirstPnt1.X(); // v1
+ double y1 = aLastPnt1.Y() - aFirstPnt1.Y();
+ double x2 = aLastPnt2.X() - aFirstPnt2.X(); // v2
+ double y2 = aLastPnt2.Y() - aFirstPnt2.Y();
+ double xa = thePoint.X() - aFirstPnt1.X(); // va
+ double ya = thePoint.Y() - aFirstPnt1.Y();
+ double xb = thePoint.X() - aFirstPnt2.X(); // vb
+ double yb = thePoint.Y() - aFirstPnt2.Y();
+ double z1 = x1*ya -xa*y1; // v1^va: z component
+ double z2 = x2*yb -xb*y2; // v2^vb: z component
+ bool isBetween = true;
+ if (((z1<0) && (z2<0)) || ((z1>=0) && (z2>=0)))