Grasshopper

algorithmic modeling for Rhino

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.

Views: 3446

Replies to This Discussion


--
David Rutten
david@mcneel.com
Poprad, Slovakia
Here's a Script solution:


The Script component has two inputs:

1. A List of OnCurve
2. A List of OnInterval

The output is a tree of curves.

The Script itself looks like:

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

A = rc
End Sub


--
David Rutten
david@mcneel.com
Poprad, Slovakia
I think the comment cloud is a great addition! But should it not reside in the special Tab?
Danny,

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.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
So what's the cloud in your Markov panel? Groups.... brilliant I can do away with all my background panels
Thanks David

It works great but I have another problem there are about 180000 curves.

How can I speed up the process of the curve generated parts so not hang the computer?

In the process about 7000 curves in 180000 pieces are divided.

Should I possibly working with a VB component?

However, such curves with the help of VB can be divided?
Hi Rafi,

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
Thanks, David

You have been a great help!

For now, suffice it to me and I will deal with in stages.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service