algorithmic modeling for Rhino
Hi,
Im having an issuing trying to join curves in C# and return them from the node.
when i join some curves and return just that new curve everything works as predicted (see) below
Now if i try to return a Rhinolist<Curve[]> of joined curves. it doesnt return usable geometry (see below). does anybody know how i can turn a Curve[] into something usable?
Thanks in advance!
Tags:
The problem is that grasshopper's script component only "automatically" breaks apart one level of list nesting. If you pass out a list, you get the items of that list. That means if you pass a list of lists, or a list of arrays, as you have here, you get back the arrays. You have a few options - you can construct your own DataTree to pass out (if you need to preserve info about which group each list of results came from) or you can just pass the curves into a flat list (make it a List<Curve> and use AddRange instead of Add). Finally, you can even create a SECOND script - that just says "A = x;" - and pass the output of the first script into x. The new script will process each array as its own item, and thus automatically convert the contents of each array into its own branch of output (I think).
Hope that helps!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by