Grasshopper

algorithmic modeling for Rhino

Is there an easy way to shift the path address in a list yet keep the same number of branches and in the same order. I find myself needing to do this after using the relative path with a negative path shift. I realize I can use 'replace branch' but I do not have an available mask to utilize.  I have simplified the problem to its simplest form so my question is understandable, however, the tree I am trying perform this operation on is a much larger 3 digit path address.

 

{1;3;2}

{2;3;4}

{3;5;4}

{4;3;7}

Change the above list to the list below.

{0;3;2}

{1;3;4}

{2;5:4}

{3;3;7}

 

I wish for a more robust arsenal of branch manipulation components.  Most of the things I need to do are possible with the existing components, however, many operations take several components to perform even simple manipulations.  Since branch/path manipulation is so integral to using GH successfully, it seems the GH community would be well served by enhancing the available path manipulation components.

Thanks,

Stan

 

Views: 649

Replies to This Discussion

Hi, Stan,

maybe this will work for you:

(simple Path Mapper operation)

Dimitri

Hi Stan,

 

Path Mapper = {A;B;C} --> {A-1;B;C} 

Ah, Path Mapper. I never think to use expressions within path mapper, I will from now on....You guys made that look easy.  Thank you both, very much!!!  

 

Stan 

Here's one Path-mapper free way:

 

As you mention, this is a lot of components to achieve a simple action, but it does the trick. The benefit of doing it without the path mapper is that it is now possible to save as a cluster if this is a task you find yourself needing to do often. 

Wow!!  I never thought of adding branch paths like that.  I am sure learning a lot of great stuff today.

Thanks Andrew.

 

Stan

 

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service