Grasshopper

algorithmic modeling for Rhino

A while back, I posted a discussion that suggested some user interface improvements that use some of the functionality found in 3ds Max Design's Slate Materials Editor. It was a very interesting discussion that I learned a lot from:

http://www.grasshopper3d.com/forum/topics/grasshopper-vs-3ds-max-de...

Today I attended a webinar titled, Vasari Talk Session 22: AU2012 Sneak Peak, that had a section devoted to Dynamo, the visual programming interface for Vasari and Revit. It is very similar to Grasshopper. It should be posted online soon:

http://wikihelp.autodesk.com/Vasari/enu/Community/Tutorials/Vasari_...

What really struck me as powerful was the ability to browse to an external script file and bring it into Dynamo for editing on the fly. It made me wonder if the opposite scenario was possible.

I use CAM software that creates tool paths for CNC machining. When I'm done with the tool paths, I post process it into a simple text file of G code that the CNC machine reads. The software automatically converts the graphic representation of the tool path into simple code.

Would it be possible to post process the results of a Grasshopper definition into Python code that could then be used elsewhere?

This would allow you to use the visual programming interface of Grasshopper to create a complex element and then have the software convert it into Python code. You could leverage the easier Grasshopper interface to create complex scripts that a novice scripter might not otherwise be able to create.

Please excuse my ignorance if this is already possible to do with Grasshopper!

Views: 2834

Replies to This Discussion

Hi Djordje,

This feature broke about about a year ago during an update, but has been fixed in the last two updates.The code input is off by default, you activate by right-clicking the component and selecting "Show code input parameter". I haven't tested it since it was "reintroduced" though. Good to see you travelling deeper and deeper down the Python hole :)

Best,

Anders

Got it. Thanks.
Still on the top of the hole, though :)

Hi David,

 

Please check out this update to DesignScript: http://through-the-interface.typepad.com/through_the_interface/2013...

 

It has added a visual programming interface but the interesting thing is the potential ability to convert code to a node (component) or vice versa. I say potential because they haven't figured it all out yet!

 

They also have a stand alone version like GC that doesn't need AutoCAD to run it. Are any of these things in store for Grasshopper? Thanks.

Gh already has this capability through the use of the python script component or even through the use of a vb component. I would argue gh is aleatory very advanced in the use of clusters which can be saved to a library and instantiated at any point in a new document much like a power copy in catia. You can already refernce external dlls including external program APIs such as autocad in a gh vb component.

Gh vb components can also be saved to a libray and instantiated at any point as gh user.
object.

You write your script in a vb component , save it as a user object to your library and then instantiate it in a new gh component at which point you can decide to open it and edit the code.

A cluster is similar except it is based in native gh component defined visually, i would say clusters have the biggest potential of all.

FYI... I use grasshopper to create g code and its an amazing way to create generative tool paths that update as my models change. I don't use any post processor to do this. I export .nc's right out of gh to run my 4 axis mill. still trying to learn to do 3+2 milling right out of grasshopper as I have another axis to add to my machine 5th! that i never have even used... just downloaded the KUKA plug in to see if i can make that suit my purposes somehow.   

Very interesting question, if you have components purely based on reflection of methods it would be in theory possible to generate managed IL from it so you could directly use it in phyton as assembly

[with some attributes which control the rest of the component clutter] In grasshopper however where is no clear line between the execution method and the component, so you could not seperate the core logic from the render gui etc. logic. So it will not work with grasshopper. However I think also the stuff done with the new Autodesk visual programmers I believe this also does not work, because they have a own scripting language under the hood including a solver, which will cause you lots of problems to directly link this to Phyton.

So you have to use the Grasshopper solver to execute the Definitions. For this you need Grasshopper + Rhino.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service