Option Explicit Call SplitCurveWithGap() Sub SplitCurveWithGap() 'gap distance Dim d: d = Rhino.GetReal("Gap distance?", 1, 0.000001) If isnull(d) Then Exit Sub 'pick points / split Do 'get curves only Dim N : N = Rhino.NormalObjects() Dim arrC : arrC = Rhino.FilterObjects(N, 4) If isnull(arrC) Then Exit Sub 'get point Dim p : p = Rhino.GetPoint("Point?") If isnull(p) Then Exit Do Dim o : o = Rhino.PointClosestObject(p, arrC) 'check if point is on any curve If Rhino.Distance(p, o(1)) < Rhino.UnitAbsoluteTolerance() * 5 Then Rhino.EnableRedraw False 'add cutting sphere with radius = 1/2 of gap discance Dim s : s = Rhino.AddSphere(o(1), d / 2) 'intersect sphere with curve Dim arrI : arrI = Rhino.CurveBrepIntersect(o(0), s) Call Rhino.DeleteObject(s) If Not isnull(arrI) Then If Ubound(arrI) = 1 Then 'proceed if 2 intersection points found If Rhino.IsPoint(arrI(0)) And Rhino.IsPoint(arrI(1)) Then 'split curve by intersection points Dim T: T = Rhino.SplitCurve(o(0), array(Rhino.CurveClosestPoint(o(0), Rhino.PointCoordinates(arrI(0))), Rhino.CurveClosestPoint(o(0), Rhino.PointCoordinates(arrI(1)))), True) If Not isnull(T) Then Dim i For i=0 To Ubound(T) 'delete segment with picked point on If Rhino.IsPointOnCurve(T(i), o(1),, Rhino.UnitAbsoluteTolerance() * 2) Then Call Rhino.DeleteObject(T(i)) End If Next End If End If End If Call Rhino.DeleteObjects(arrI) End If End If Rhino.EnableRedraw True Loop End Sub