Grasshopper

algorithmic modeling for Rhino

Why does the index change to zero's after the CCX function? See attached jpg-picture. (The CCX function is set to longest list and is not flattend).

Views: 547

Attachments:

Replies to This Discussion

For every curve it will create a new path (see the path numbers). I think that if you select "longest list" the CCX component only search for the first intersection on every curve, so you have only one point on every path.

If you have groups of curves on different branchs, you can use the path mapper to group your intersection points, try with {A;B;C} -> {A;B}
The logic is as follows:

Since CCX can generate multiple answers for a single curve, the output is always stored in lists, even if each list only has a single item. Every component which (potentially) output multiple items of data for a single input item has this behaviour.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks for this answer.
My example has every time only one solution. How can I make a list of it again? (My list has 360 items)
Cheers, Bas
if you want only one list, use the flatten tree component.
I want a list with index numbers from 1 till 360
What Manuel said is right. Faltten and flatten... all objects in one single list, with indexes from 0 to the last item u have.

The parameter viewer is a good component to follow path, trees and even forests
You may not want to flatten the entire structure all the time. Sometimes you merely with to flatten only the items in the last path number:

{0;0;0;0} (N = 2)
{0;0;0;1} (N = 2)
{0;0;0;2} (N = 2)
{0;0;0;3} (N = 2)
{0;0;0;4} (N = 2)
{0;0;1;0} (N = 2)
{0;0;1;1} (N = 2)
{0;0;1;2} (N = 2)
{0;0;1;3} (N = 2)
{0;0;1;4} (N = 2)

Flattening this structure using the Flatten component would result in:

{0} (N = 20)

However, using a Path Mapper with the following masks will flatten is somewhat more intelligently:

{A;B;C;D} -> {A;B;C}

Now, you get:

{0;0;0} (N = 10)
{0;0;1} (N = 10)

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks, I can go further. :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service