algorithmic modeling for Rhino
Hello,
So, a couple of questions from a beginner.
I have produced a GH file that allows me to create a given geometry from a set of points. It is working perfect.
I now need to create a python script that does that exactly and in the end exports the geometry to an iges file.
So, I am mainly unsure of where to generate the script: GH or Rhino?
What are the advantages in python scripting for GH?
Another question I have is, even if scripting in GH i am constrained to the available rhino script commands, right? There is no, for example, import coordinates, which is the command I use in GH to import the points from a txt file.
Thanks so much for your time and answers.
Ricardo
Tags:
Hi Ricardo,
out of interest, if you already have one way that works (i.e. a Grasshopper file) why are you looking for another (i.e. a Python scruipt)? Is it for sharing purposes?
Anyway, the VB/C# and python components in Grasshopper are probably not the best place to mimic a Grasshopper file. You'll want to use the python editor in Rhino or otherwise some IDE that compiles to .NET assemblies (Visual Studio Express is very popular).
The main purpose for the code components inside Grasshopper is to extend the functionality. Perhaps you want to do some intricate looping or data analysis that is very difficult or impossible in GH proper. Perhaps you want to read or write custom file formats or use some external DLL.
--
David Rutten
david@mcneel.com
Tirol, Austria
Hi David,
Thanks so much for your answer.
The reason why I am interested in moving from a GH file to a script is because I need to generate a reasonable amount of geometries as part of an optimization routine. My script will be fed with the points coordinates (which are variables in an optimization routine).
In the end I want to export the geometry as an iges file.
I believe the best way to do this is by using scripting as it might be lighter and not even use the GUI. Does this make sense?
Thank you,
Ricardo
Yeah sure. I can't help you with Python as I no hablo, but I can certainly convert simple algorithms from Grasshopper into C# or VB. Some Grasshopper components do things that do not have RhinoCommon equivalents (Delaunay, Octrees, Voronoi, Metaballs) so those would be very difficult to convert.
--
David Rutten
david@mcneel.com
Tirol, Austria
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