algorithmic modeling for Rhino
Hello all!
I have a python script that creates a 3d metaball around points that I have. The output of this script are the points defining the mesh of the metaball. I need to create the mesh from these points. I can do it manually by selecting all the points and entering manually "MeshFromPoints" into the command line.
Is there a possibility to import this command into a python script as for example "import Rhino.Geomtry" or "import rhinoscriptsyntax" and then choose it from the drop down menu?
Thank You in advance!
Tags:
Hi Rodion,
Every Rhino command can be called through rs.Command function.
You just need to supply the ids of your baked points (the ones you used to create the mesh by running the "MeshFromPoints" command). Here is an example:
import rhinoscriptsyntax as rs
# "ids" are Rhino guids of your baked points
if len(ids) > 2:
commandString = "_-MeshFromPoints "
for id in ids:
commandString = commandString + "_SelId %s " % id
commandString = commandString + "_Enter _Enter"
rs.Command(commandString)
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
© 2024 Created by Scott Davidson. Powered by