Passing geometries to a Grasshopper definition on a compute server

Hey,

I am currently setting up a local compute server to run a Grasshopper definition with python.
The Grasshopper definition will later process.3dm files automatically. For this, it is necessary to load certain geometries from the files.
My first approach was to leave my existing Python script in place within Grasshopper and load the .3dm files directly into Grasshopper using IronPython, passing only the file path to the compute server. However, it appears that these Python scripts are not executing.

Next, I tried opening the .3dm file in Python using the rhino3dm library and passing only the required geometries to Grasshopper. For this, I built the program like in the tutorials and named the groups like this: “RH_IN:xxx”. However this does not seem to work for the “geometry” component.
Then I found the following entry from Steve Bear:

So now I used the “Get Geometry” component.
My current problem is that I can now only pass a single (but arbitrary) geometry and not a tree.

Does anyone have any idea what I am doing wrong?

My line of python code:

geoTree = rcgh.DataTree(“RH_IN:geos”)
for i, geo in enumerate(layerGeo):
geoTree.Append([i], [json.dumps(geo.Encode())])

And in Grasshopper I’m using the “Get-Geometrie” Component with the name

RH_IN:geos

Please make sure you are using the latest version of Hops. Andy Payne covers how to set tree access for inputs in his short intro video that he just posted.

Hey @stevebaer,
Tanks for your quick reply.

I’ve got the latest version of Rhino 7 and the latest version of Hops (0.14.1) installed.
Unfortunately, the option “Tree Access” is not available for me.

@AndyPayne do you know which service release of Rhino 7 you added the tree option for the context get components?

1 Like

@jbudau and @stevebaer You need to update to Rhino 7.19.22130.15001 or Rhino 8.0.22131.04306 or higher. The Contextual Get components were updated in those service releases.

1 Like

Thanks for the help! Now it works like a charm.
I hadn’t found that version because it was only classified as a release candidate.