Hi @pascal shouldn’t self overlapping curves flag as selfintersecting?
If I dra a polyline that goes “back and forth” over it self then it isn’t recognized as a selfintersecting curve.
The overlap is illustrated with the exaggerated red line:
Just make one and test it with this script:
import rhinoscriptsyntax as rs import Rhino polyline_id = rs.GetObject() newPoly = rs.coercegeometry(polyline_id) interEvent = Rhino.Geometry.Intersect.Intersection.CurveSelf(newPoly.ToNurbsCurve(), 0.001); if interEvent: print "Number of intersections: "+str(len(interEvent)) dots= rs.EnableRedraw(False) for i in range(len(interEvent)): point = interEvent[i].PointA dots.append(rs.AddTextDot(str(i+1),point) ) rs.EnableRedraw(True) rs.GetString("Press Enter when Done") rs.DeleteObjects(dots) else: print "no intersections"