Compute_rhino3d vs RhinoCommon

I’m going through the make_mesh.py example (found here) to learn how Rhino.Compute works and as I tinker with the script it seems like some types are missing attributes.

For instance, the Sphere type has a BoundingBox property (doc page) but if I try to access it I get an AttributeError: 'rhino3dm._rhino3dm.Sphere' object has no attribute 'BoundingBox' error.

Similarly, the Mesh type has a Volume() method (doc page) but I also get an AttributeError when trying to access it.

So my questions are is compute_rhino3d supposed to be equivalent to RhinoCommon (if not then maybe I shouldn’t be using the RhinoCommon docs), and if it is supposed to be equivalent, what’s the workaround for a missing attribute?

Some further info:

Here’s a script that prints the number of properties/data attributes and methods in a Mesh object:

As you can see, 16 properties and 24 methods were found. This is far less than the 29 properties and 212 methods in the doc page for Mesh.

make_mesh.py (1.4 KB)

Not all functionality is available in every language binding currently. There’s more docs per language and system. I’d take a look at the rhino3d.py and compute_rhino3d docs instead, found below.

I can’t double check these links as my github access has been flaky today, so let me know if the docs here don’t answer your question :slight_smile:

The compute_rhino3d docs was just what I needed. Thanks!

1 Like