algorithmic modeling for Rhino
Hi,
I have been using rhinoscript via vbscript and python for sometime and I am transferring to the more powerful rhinocommon.
I am familiar with C# and this would be my choice for writing codes in the grasshopper component.
The problem is, there are lots of documentation missing in the rhinocommon doc and there are also just a few examples available on the http://wiki.mcneel.com/developer/rhinocommon .
Those resources seem to be quite insufficient to demystify many of the methods and properties of the rhinocommon sdk.
What is the recommended way to learn rhinocommon?
When will those missings in the documentation be filled?
Are there any websites and forums out there for me to learn rhinocommon?
Thanks!!!
Jerome
Tags:
Hi Jerome,
That is pretty much it right now. Is there a specific area that is not documented (and you find confusing) that you would like to see more comments about?
By the way, python uses RhinoCommon under the hood. If you want to see how any of the python functions use RhinoCommon, you can step into them in the debugger or just look at the function on github.
https://github.com/mcneel/rhinopython/tree/master/scripts/rhinoscript
Thanks,
-Steve
Hi Steve,
Thank you very much for your reply. I downloaded the doc from http://www.rhino3d.com/5/rhinocommon/rhinocommon.chm again and found this doc is "Build 22 March 2011". I found many of the documentation are still missing. Is this the latest build?
The social clouding on the github is cool and it could help a lot. There are some keywords which I cannot understand like utility.coerceplane. I can't find these keywords in .net MSDN, and neither do they appear in the rhinocommon doc. Could you show me the way to understand these? Thank you!
Thanks,
-Jerome
I just updated the RhinoCommon SDK docs at
http://www.rhino3d.com/5/rhinocommon/
with comments from the latest source
utility.coerceplane is a python function that attempts to generate a Rhino.Geometry.Plane from whatever type of input is provided to the function.
Thanks,
-Steve
Thank you! Is there a help doc which describe functions like utility.coerceplane?
Thanks,
-Jerome
A help file for the "rhinoscriptsyntax" python functions can be accessed from the EditPythonScript command in Rhino. This is also available online at http://www.rhino3d.com/5/ironpython/index.html
You can also see the specific implementation of these functions on github
https://github.com/mcneel/rhinopython/blob/master/scripts/rhinoscri...
I added a wishlist request to make this available from the python editor inside of grasshopper
https://github.com/mcneel/ghpython/issues/4
Thanks,
-Steve
Thank you, Steve,
I think I am quite familiar with rhinoscriptsyntax in python and I checked the help doc both on my computer and in the html you provided, but I couldn't find anything related with coerceplane.
May be I didn't grasp what you were saying and could you help me to find this? Thank you!
-Jerome
Hi Jerome,
coerceplane is one of the few python functions that I haven't written documentation for yet. The only documentation for this function would be it's "document string" in the script's source code
https://github.com/mcneel/rhinopython/blob/master/scripts/rhinoscri...
which is just
"Convert input into a Rhino.Geometry.Plane if possible."
All of the "coerce" function in python do something similar. They take a generic input parameter and try to figure out a way to convert that input into something specific. If this case it would be a Plane.
Thanks,
-Steve
Steve,
Thanks! This helps!
I am now using GhPython these days simply because it provide access to rhinoscriptsyntax which is a lot faster to write in many cases. But, in my latest two posts which relied by Giulio Piacentino, I found that GhPython is not quite robust as C# component which I could use as an alternative. Rhinoscriptsyntax in "editpythonscript" seem to be more robust(same code which runs successfully in python editor fails in GhPython component, I posted this in my last post 14 hours ago). Do python editor and GhPython component shares the same code under the hood? Could some code that not implemented in python editor(e.g. extrudeSurface) be run in GhPython component?
Thanks!
-Jerome
Hi again Jerome,
I can answer a part of this question, as I am an enthusiastic C# scripting component user also for some time :)
The Python component is very new - less than a month old from the first public release - so it contains still a few bugs. Its development is completely open-source, the component interface is written in C# and you can see all incremental changes ("commits") on GitHub. You are also welcome to propose changes ("forks").
In the long term, the Python component has the advantage of being very quick for testing dynamic code and it has the rhinoscriptsyntax, which unfortunately is not available in C#, that makes it expressive and productive.
On the other hand, the main difference with Rhino.Python is that the component uses a specially-crafted document as target for all rhinoscriptsyntax calls. This document mimics very carefully the Rhino document but uses Grasshopper types. It also does not have undo, so it can be faster.
I hope this helps,
- Giulio
_________________
giulio@mcneel.com
McNeel Europe
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