Grasshopper

algorithmic modeling for Rhino

how to extract datas in the same branch and merge them


Hi guys,

I have one urgent question about extracting datas in the same branch of one data tree out.

like the image is showing:


there is an array of array of curves:


{0;0;0} {0;0;1} {0;0;2} {0;0;3} {0;0;4}

{1;0;0} {1;0;1} {1;0;2} {1;0;3}

{2;0;0} {2;0;1} {2;0;2} {2;0;3} 


now i want to extract all the datas in the {0;x;x} format out and put into one separate array

and do the same thing to {1;x;x} and {2;x;x}


and what if I have more branchs than 3?

Is there a way that can automatically sort the list through and extract all datas of one branch 



anyone can help?

thanks a lot




Views: 536

Replies to This Discussion

Hi hurriarc,

if I understand the problem correctly, I think you should be able to use a Path Mapper for this. The two masks would be:

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

This will merge all the data of all the branches that share the first path index.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
thanks for your quick reply, David!

which exactly solve my problem.
Hi Hurriarc

The sorting can be done with path mapper... for the rest you will have to get the branches with "explode tree

try this
source:
{A;0;B}(i)

Target:
{A}(B)
yeah, it turned out working!

thank you for solving my problem, Frane!

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