algorithmic modeling for Rhino
Hello everyone,
I`m having problems trying to run a script I wrote on RhinoPython into GH python component. It seems that the issue is related with GUIDs. Is there a way to access GUID information in order to get geometric data such as points, crv, breps, etc? Please find the Rhinopython and the GH file.
By the way is there a improved version of GHpyhon or something you recommended for debugging in GH. With the actual version is quite complicate if you want to access data and see how the script is running, especially if you are beginner, that`s the reason why I wrote the script in rhino.
Thanks!!
Tags:
You're probably after the "coerce" methods. I can't find them in the documentation for some reason, but you can see them here (just search): https://github.com/mcneel/rhinoscriptsyntax/blob/master/Scripts/rhi...
rs.coerce3dpoint(a) will convert "a" to a Point3d if it's a coordinate or GUID, etc.
Hi Emeceo
OK; I checked your definition. You need to explore the 'List Access' and 'Type Hints' for component inputs. Then you are on the right path to make the definition work.
As a side note, we are planning on adding debugger support to GhPython, but there is no special version containing it, as there are still some technical difficulties to overcome.
Thanks,
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Python 3.5 please, which means either ditching IronPython or buying them out and making it, or getting rid of the .NET dependence, whatever the hell .NET is, which not 2% of Grasshopper users know about, or have even maybe even heard of except when some pirate software install fails, since .NET totally sucks.
Hi Nik
it seems you are unhappy about something, which I do not think is related with this discussion. You could start a new discussion with concerns about Python 2.7 vs 3.0 vs 3.5. As a general rule, we always hear and consider users' opinions. As a side note, the version of Python is one to be chosen within the whole Rhino, so it is not something that can be changed within GhPython (and so not "mine" to take).
My bitter realization was first that Python in Grasshopper, no, did not give me Godlike control over events, due to Grasshopper single thread event waves that only allowed me to do one thing at a time. The second icing on that stale Grasshopper 1.x cake was here, how IronPython was abandonware unable to import basic everyday extended math libraries:
http://www.grasshopper3d.com/forum/topics/scipy-and-numpy
My opinion is that you need some tyrannically enlightened Steve Jobs type pulling McNeel into the Grasshopper world properly, and doing a Manhattan Project to make Python work for real in Rhino/Grasshopper. Now, it's broken. As if .NET crap matters to any real users outside of computer science majors. I was told .NET meant I had to never be able to offer included math libraries in any script I offered normal clients. That threatens to bankrupt me, O.K.? Rent in Manhattan and all....
You guys could get together and make it work. But it doesn't work. It's always some special case, some dilemma. Some catch-22. Such bad surprises create homeless people out of talented folk, and I'm not kidding.
1. [...] first [...] Python in Grasshopper [...] did not give me Godlike control over events.
If the Grasshopper SDK does not expose enough functionality, you can request it. I know that David is working on an even-robuster SDK for Grasshopper 2.0.
2. [...] pulling McNeel into the Grasshopper world. [...] As if .NET crap matters [...]
Sorry, I am not following this. Grasshopper is the piece of software written in .Net. As such, for Python to work with it, the language development team chose to use IronPython. VbScript ("old" RhinoScript) could not be readily used in Grasshopper for this reason.
3. I was told .NET meant I had to never be able to offer included math libraries in any script.
Please start a new discussion for this topic. There are plenty of professional math libraries for .Net. I am not sure why they told you this.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by