EM_surface trajectory generator

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s