Grasshopper

algorithmic modeling for Rhino

Hi,

Is there a way to create a data tree with the same text value?

I've extracted room names from a Revit file and sorted them out. I now want to create a data tree with all the same room names under each different room name as shown in the attached image.  

SORT.JPG

I hope someone could shed me some lights to this.

Thank you!

DY Lee

Views: 1433

Replies to This Discussion

If you're not adverse to using plug-ins, it's simple to use sets and the clone structure component from TreeSloth. You also can just use native components pretty easily:

Attachments:

Thanks so much, David. I didn't expect to get an answer this quick! TreeSloth seems a very useful set of tools.  

Is it possible to sort surfaces with this sorted data structure? I want to match the data tree of surfaces to this sorted text values, so that I can group surfaces with same room names.

I don't seem to make it work. The original data structure of surfaces and room names were the same. Thank you.

Attachments:

The sort component has an option to add a value (V) to sort along with your keys. If your surfaces correspond to the string keys you are sorting with, then you should be able to fort them along with your room assignment logic. It's easier to help to if you include your GH definition.

It works now! I didn't catch that there was an additional item in one of surface branches, which caused me not to make a progress. After I fixed it, I could make it what I wanted to. 

Thanks a lot for your help on this!! The input data is coming from Flux in this GH definition, so posting the GH file here wouldn't work. Anyway, I'm attaching a screenshot of the resolved solution for people who are interested in this forum. 

Additionally, I'm wondering if there is a way to explode trees matching the number of branches from the input data automatically. I have to manually add output nodes in the "Explode Tree" in this definition. It would be nice if I could make this automatic, so that replacing the input data would work for other projects.

Attachments:

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