algorithmic modeling for Rhino

Mapping paths with different number of dimensions/branches

When connecting streams from different areas of my definitions I find myself using the PathMapper a lot to ensure that there is a one to one mapping between the paths in each stream. Should I be doing this, or is grasshopper able to map two paths that have a different number of branches?

For example consider I have two data streams as follows.

{0;0;0} Curve A
{0;0;1} Curve B
{0;0;2} Curve C
{0;1;0} Curve D
{0;1;1} Curve E
{0;1;2} Curve F
{0;2;0} Curve G
{0;2;1} Curve H
{0;2;2} Curve I

{0;0} Distance X
{0;1} Distance Y
{0;2} Distance Z

Now say I want to extrude each curve by the respective distance. What I would typically do is use the PathMapper to partially flatted the curves stream like so:

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

However, I think it would make more sense if grasshopper could just map paths with a different number of indexes.

For example the path {0;0}  would map to any other path that begins with {0;0}. So in this example would be the following.

{0;0;0} Curve A
{0;0;1} Curve B
{0;0;2} Curve C

Does grasshopper already do something like this? If not does anyone else think it would be useful? How else have people been dealing with merging complex tree structures.

Views: 379

Replies to This Discussion

Ok here's a simple example using just text. Hopeful it's self explanatory. I don't understand what's going on though.

I understand how "Terrier" would map to "Bark"
Terrier {0;0;0} <-> Bark {0,0}

But why does "Beagle" map to "Meow"?
Beagle {0;0;2} <-> Meow {0;1}

High resolution

Grasshopper isn't up to that, it will just treat each input as an individual list and use longest list data matching. Therefore when the longest list runs out of matches it will use the last item in the shortest list in this case 'meow'






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service