algorithmic modeling for Rhino


Quick question about objects that originate in grasshopper and linking them to material specifications.

I understand that I need to have the material set up on the rhino side of pachyderm according to layer. How does grasshopper count the layer in rhino. The NURBS/Polygon scene component required a "layerID (integer)" for every element that is generated within grashopper.

Does the layerID (integer) correspond to the numerical order that the layer appears?

If so, does this list start with index 0 or 1?

I can extract the true LayerID of a rhino layer within grasshopper using the Human plugin, but it generates a hexadecimal number (as with all unique elements in rhino) - screen shot below

Views: 68

Replies to This Discussion

Hey there,

So Pachyderm accesses the layers through Rhino.RhinoDoc.ActiveDoc.Layers[LayerIndex]. The Layers property is indexed as an array, which means it ought to be zero-based. My notes in the code seem to indicate that I was aware that it was zero-based when I wrote it, so most likely, it is zero based.

The order corresponds to the order it appears in the rhino layer list. That said, I don't know how it does nested layers, and I don't know if there are any exceptions. To be on the safe side, try not to change the order of the layers in your model. If you must, at least save it, and then close Rhino, and open it again.

I'm not sure how Human is accessing layers. It doesn't surprise me that layers in Rhino have GUIDs, much as everything does in Rhino. I don't see any value to Pachyderm referencing layers this way, but if you can think of a good reason to do it, maybe I can set up Pachyderm to accept layers this way as well.

Hope this helps.







  • Add Photos
  • View All


  • Add Videos
  • View All

© 2022   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service