Grasshopper

algorithmic modeling for Rhino


I'm having some trouble understanding how to use datatree inputs within C# components: for example how can I pass uvParameter coordinates from 'Surface Divide' into my own component?  Is it simply a matter of casting?

This might be very straightforward, but I can't seem to make it work - I'd appreciate some clarity on the issue.

Thanks,
Ultan.

Views: 679

Replies to This Discussion

Hi Ultan,

at the moment you cannot supply DataTrees to Script componenta, you can only operate on individual items or on individual branches (lists) in the DataTree.

This has been asked for before and it's quite near the top of the ToDo list.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
appreciate the quick response David.

Ultan.
With simple tree structures it isnt too difficult to recreate the tree structure within the scripting component. You just need too create variables for the number of branches in the tree, and number of items in each branch. You can then flatten your original tree and reassemble using two loops.

Ive made a simple tutorial to show you how to do this: http://ledatomica.wordpress.com/2010/03/27/reassemble-datatrees/

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service