Grasshopper

algorithmic modeling for Rhino

Hi,

I would like to call my method for each list (path, branch) in my GH_Structure tree.

foreach( List<GH_Point> pts_list in pts_tree) { call(pts_list); }

What is the best way to do it? 
Thanks.

Views: 794

Replies to This Discussion

Hi Kurilla,

you can iterate over the Branches property, it returns an IList(Of List(Of T)).

foreach (List<GH_Point> branch in ptr_tree.Branches) { call(branch); }

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,
thanks for your help.

Specifically I need the List(Point3d) to read x,y,z position.
How can I get it from GH_Structure tree? Or how can I convert it?

Lukas
I have found GH_Point.Value

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service