I wish to generate objects in Grasshopper and export a mesh file format from python using Rhino Compute.
I manage to generate the mesh and retrieve the 3dm file, but if I export the mesh as obj with a C# script in Grasshopper I get the following error message that’s returned from the gh.EvaluateDefinition method:
‘Could not find a part of the path ‘C:\Users\jridd\MeshA01.obj’. (line: 0): component “C#” (1e56110f-3c5c-4e61-a9c7-84197f93d1ff)’.
Obviously since you perform the calculations on the compute server this directory on my pc cannot be found, but is there some way to do this in another way? Below are a snip of the python script and printscreen of the Grasshopper file.
McNeel Developers if you read this, many thanks for this amazing development.
import compute_rhino3d.Util import compute_rhino3d.Grasshopper as gh import rhino3dm import json compute_rhino3d.Util.authToken = *** my token *** move_tree = gh.DataTree("RH_IN:num") move_tree.Append(, ) # Here it adds the radius to the sphere trees = [move_tree] output = gh.EvaluateDefinition('firsttest.ghx', trees) print(output)