Grasshopper

algorithmic modeling for Rhino

EDIT: This was the earliest release of the component. Now you can find the new more updated version here.

Hi all,

I've read this thread started by Benjamin and it made me look into integrating the new Rhino V5 Python interpreter into a Grasshopper component. After a couple attempts, it seems now to work well in V5. If you are eager to try again the Python syntax in Grasshopper, this should be useful.

This component will still need to be significantly improved with respect to features and performance, especially variable non-textual inputs, syntax editor and highlighting and parse-time error notifications would come in handy.


To install (the usual way), in Grasshopper 0.7:

  • download TestPython.gha
  • copy it to C:\Program Files\Rhinoceros 4.0\Plug-ins\Grasshopper\Components\
  • right-click the file, then chose "Unblock" inside the properties dialog
  • start Rhino v5 and load Grasshopper
  • for a simple example, you can try the definition above


I am also attaching the source code (in C#, TestPython.7z), in case you feel like having a look.

- Giulio
______________________
giulio@mcneel.com
McNeel Europe, Barcelona

Views: 3246

Replies are closed for this discussion.

Replies to This Discussion

Hi Giulio,

Is it possible to attach a enable/disable toggle so when the component becomes active it runs the script as if it were run by the PythonEditor through GH classes, so you select geometry and any other parameter within rhino. Just an idea

My C# knowledge is not up to the job I'm afraid!

Cheers

Evert
This would be a nice addition. I'll see what I can do about it. Also, there are some additions to the PythonScript class by Steve in the upcoming Rhino v5 release that should allow a better support of RhinoScript.

- Giulio
_____________________
giulio@mcneel.com
McNeel Europe, Barcelona
Great job Giulio!!!

Alessio
Steve is adding some additional possibilities to RhinoScript/Python, so it should be possible to have additional features soon.

- Giulio
_____________________
giulio@mcneel.com
McNeel Europe, Barcelona
Great!!!...
it´s powerfull!... im very happy!

Tks!
Awesome!
thank you this is great!!!

Steve and I have been working on a new version for this component.

There is a discussion on this forum, a description on the Python forum and this is the page to download from.

Here are the main changes from this previous version:

  • Modifiable number of input and output variables
  • List and tree support
  • Editor with autocompletion on double-click
  • Support of the rhinoscriptsyntax, both to modify the Rhino document and to use in Grasshopper
______________________
giulio@mcneel.com
McNeel Europe

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service