Grasshopper

algorithmic modeling for Rhino

How to extract data from tree branches & how to access GH components through scripts

Hi guys,

 

I've been looking through the forums and Google, and I'm having trouble finding how to extract data from the leaf nodes of a tree I have. I've passed a set of surfaces into a Substrate node, and it's outputting a tree just fine. However, each branch in the tree contains an array of lines from the Substrate. I want to access the first element in each branch to intersect with the first surface, then the second element in each branch to intersect with the second surface, etc... How would I go about doing that? Is there no way other than using a script? I've attached the GHX to show what I'm trying to do.

 

As for the other part of the topic title: is there a way to access all Grasshopper components in scripts? It's easy to find basic things like Lines, Curves, Breps, Lists, and Trees... but what about more non-standard components, like Substrate or Galapagos?

 

Cheers!

Views: 1820

Attachments:

Replies to This Discussion

Hi nesis,

 

I think you only have to Graft your list of surfaces, thus turning it into a list of list of surfaces (where each sublist contains only one surface). That way your data will match up.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Brilliant, it works! So that's what Graft does...

 

Thanks David :)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service