- ip = Intersect(Vector(face[0]), Vector(face[1]), Vector(face[2]),
- Vector(face.no), Vector(point), 0)
+ if d1 < EPS or d2 < EPS or d3 < EPS or d4 < EPS:
+ continue
+
+ # TODO: Replace with LineIntersect2D in newer API
+ ret = LineIntersect(v1, v2, v3, v4)
+
+ # if line v1-v2 and v3-v4 intersect both return
+ # values are the same.
+ if ret and ret[0] == ret[1] and isOnSegment(v1, v2, ret[0], True) and isOnSegment(v3, v4, ret[1], True):