algorithmic modeling for Rhino
I updated the formatting code in this forum. If you wrap the codeblocks in the CODE style the code should standout. You can use spaces for indenting.
Private Sub RunScript(ByVal inPts As List(Of On3dPoint), ByVal sPts2 As On3dPoint, ByRef A As Object)
If (inPts.Count = 0) Then Return
Dim points As On3dPoint() = inPts.ToArray()
Dim distances As Double()
ReDim distances(inPts.Count-1)
For i As Integer = 0 To points.Length - 1
distances(i) = inPts(i).DistanceTo(sPts2)
Next
Array.Sort(distances, points)
A = points 'Returns an array of points, sorted by distance.
End Sub
Tags:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by