Hello together
Can someone help me?
How can I grouping a list of curves with different lengths?
1 group (1-500mm)
2 group (500-1000mm)
3 group (1000-1500mm)
Next I need from each group, the total length.
Private Sub RunScript(ByVal Crv As List(Of OnCurve), ByVal Lng As List(Of OnInterval), ByRef A As Object)
Dim rc As New Grasshopper.DataTree(Of OnCurve)
For i As Integer = 0 To Crv.Count - 1
Dim c As OnCurve = Crv(i)
Dim crv_length As Double
If (Not c.GetLength(crv_length)) Then Continue For
For k As Integer = 0 To Lng.Count - 1
If (Lng(k).Includes(crv_length)) Then
rc.Add(c, New GH_Path(k))
End If
Next
Next
those are groups. Just select a bunch of objects, press Ctrl+G and you get a group (by default only the outline, no name). Well, you can't make groups at the moment because I haven't released the feature yet.
180000 curves is a lot of curves. No matter how you slice it, it will take a long time to compute. There's no big performance increase to be had by doing this in a VB script, as there are no clever ways to reduce the amount of work.
I don't know if and how you can speed up the process as I do not know what your file looks like.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by Rafi on December 31, 2009 at 10:40am
Thanks, David
You have been a great help!
For now, suffice it to me and I will deal with in stages.