algorithmic modeling for Rhino
Hi.
I am trying to merge two trees, with each branch consisting of a list of midpoints and endpoints. It is pretty simple to do this in Python, but the output is not as I expected.
How do i write the output, so that I will get a tree consisting of points for further use in GH? I have chosen my input as "Tree access" and my hint as "Dynamic".
Hope anyone has a simple answer.
Thanks.
Rasmus
Tags:
This is effectively the same question posted here, right?
I've answered it there.
Thanks,
- Giulio
_______________
giulio@mcneel.com
Hi Giulio.
Yes it is. Thanks for your reply, It helped me solve my problem, so that I am running basically my whole routine inside the Python script instead.
I do feel though, that without knowing and being able to use the correct structure between GH and Python, I will not be able to get the full potential. Can you Guilio or anyone else recommend some reading or other things, so that I can get to know these things in depth.
I guess it is about knowing the GH structure in depth and then understanding the transition to and from a Python component.
Cheers Rasmus
I'll second the request for some reference material about the grasshopper structures. If not proper documentation, are there header files to look at?
I've gotten some mileage from the typing completion in the C# editor...it will list the methods I can call on a structure, for instance. But anything more comprehensive would be deeply appreciated.
Whoops, that was me, accidentally pretending to be my colleague Arlen...
Hi Rasmus,
my suggestion would be to read a complete Python reference book, if possible with lots of examples. There is no shortcut to knowing how Python (or other languages) work. Please keep on reading because this might help you as well.
---
Hi Dave,
I have the feeling you are inquiring about these two things: (1) what are the types used in the RhinoCommon library and (2) how can I get quick help about their methods?
(2) About getting quick help, I'd agree that the editor could be better. Granted, it is already much better than a simple text editor. I list here some methods to inspect tokens in a script.
I hope this helps,
- Giulio
________________
giulio@mcneel.com
I also forgot: the RhinoCommon library is opensource on GitHub (it is written in C#). And all rhinoscriptsyntax methods are written in Python and you can see them. Please also have a look at these 7 questions with answer about Rhino.Python.
- Giulio
________________
giulio@mcneel.com
Thanks, Giulio! To be clear, I've been writing in C# (simply because old-fashioned procedural C is my "native" language), but was recently struggling with generating tree structures and found this thread.
The RhinoCommon framework is well documented, but I had trouble finding any info about the grasshopper-specific stuff I needed (i.e. GH_Path). The auto-completion in the editor was the best source of info I found, but I'm probably missing something.
Thanks also, by the way, for your excellent C# components, and all-round helpfulness on this forum, I've learned a LOT from your examples.
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