Grasshopper

algorithmic modeling for Rhino

Just a quick bit of self-promotion: I've uploaded a simple script that will traverse Grasshopper definitions saved in XML formats and outputs them to standalone script files.

I'm mostly using this so that I can use version control systems to more easily track changes to large/complicated scripts, but am interested to check and see if anyone has any ideas for other possible uses? It opens up the possibility to using static code analysis / checking tools like flake8, and perhaps it could be made to work in reverse by writing  externally-edited scripts in to Grasshopper?

Views: 275

Replies to This Discussion

Hi Philip,

This is interesting! You can also use component.Code to find the code inside the components right from Grasshopper canvas and then you can play with the data.

Here is an example that I used it to export the code and create userObjects from GHPython components:

https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug...

Here is another example that I used component.Code to update the file based on github repository:

https://github.com/mostaphaRoudsari/ladybug/blob/master/src/Ladybug...

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