4.5. RhinoCommon

RhinoCommon in GH-Python

RhinoCommon is another library which contains all the Classes, Structures and Functions.


# import RhinoCommon library
import rhino.geometry as rg

Vertices

It gives us more access to all Rhino functionalities. We can access classes and structures to create objects such as points, lines and spheres and once created this object we then get in return it’s own atributes and methods.

Vertices

# Import RhinoCommon library
import rhino.geometry as rg

# Add a Point from rhinoscriptsyntax
pt = rg.Point3d(1,2,3)
print pt # It will return the three coordinates
print type (pt) # It will return the Data Type of this geometry (Point3D)
print pt.X # It will return the X coordinate of this Point3d