Grasshopper

algorithmic modeling for Rhino

Hi Everybody


I have a set of points from a set of divided lines. The points are arranged in this fashion in the data tree, all the points from each line on its own branch. (here is a simplified
version)


{0;0;0;0}

0 {X0,Y0,Z0}

1 {X1,Y1,Z1}

2 {X2,Y2,Z2}


{1;0;0;0}

0 {X3,Y3,Z3}

1 {X4,Y4,Z4}

2 {X5,Y5,Z5}


{2;0;0;0}

0 {X6,Y6,Z6}

1 {X7,Y7,Z7}

2 {X8,Y8,Z8}


I would like to create polylines accross these branches, so the first point of the first branch connects to the first point of the second branch and so on, which
means transforming the above tree into the following tree.


{0;0;0;0}

0 {X0,Y0,Z0}

1 {X3,Y3,Z3}

2 {X6,Y6,Z6}


{1;0;0;0}

0 {X1,Y1,Z1}

1 {X4,Y4,Z4}

2 {X7,Y7,Z7}


{2;0;0;0}

0 {X2,Y2,Z2}

1 {X5,Y5,Z5}

2 {X8,Y8,Z8}


Would anyone have a suggestion?

Thanks to all and have a nice day ;o)

Views: 236

Replies to This Discussion

Search for "path mapper". The first result should be what you are looking for.
Hi Vicente

Thanks for the suggestion, I had tried that, however this does not rearrange the points in the order I need, the tree is changed but the general order of the points remains.
What are you getting?
You could have a path mapper component that contains "{A;B;C;D}(i)" as the source and "{i}" as the target.
It works, I was not using it properly, thanks a lot ( and a bit more too ) ;o)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service