Option Explicit
Call Main()
Sub Main()
Dim arrCurves : arrCurves = Rhino.GetObjects(“Pick Curves”, 4)
Dim Curve
For Each Curve In arrCurves
Dim CurveLng : CurveLng = Rhino.CurveLength (Curve)
If CurveLng > 1000 Then
Call Rhino.DivideCurve (Curve, 20, True)
Else
Call Rhino.DivideCurve (Curve, 5, True)
End If
Next
Dim arrPts : arrPts = Rhino.GetPointCoordinates(“Pick Points”, 1)
Dim i, j
Rhino.AddLayer(“Lines”)
Rhino.CurrentLayer(“Lines”)
For i = 0 To UBound(arrPts)
For j =0 To UBound(arrPts)
Dim DistPts : DistPts = Rhino.Distance(arrPts(i),arrPts(j))
If DistPts > 100 And DistPts 200 And DistPts < 500 Then
Dim MLines : MLines = Rhino.AddLine(arrPts(i),arrPts(j))
End If
End If
Next
Next
Dim ELines : ELines = Rhino.Command(“_SelDup”)
Rhino.DeleteObjects(ELines)
Call Worm(SLines,MLines,CurveLng)
End Sub