Missing CoordinateSystem object in python RhinoCommon

Hello, I’m having trouble using the GetTransform() method of the Rhino.Display.RhinoViewport object. According to it’s documentation, it takes two CoordinateSystem objects as arguments, but I can’t find anywhere how to create this kind of object in python, I have run into it in Vb and C but not in python. Thanks for your help!

Hi @rocarbajal, you might try these:

Rhino.DocObjects.CoordinateSystem.World
Rhino.DocObjects.CoordinateSystem.Screen

more info here
_
c.

Thanks mate, but those are the Vb and C# objects y said, they are not available in RhinoCommon for python. Unless I-m understanding something wrong. Thanks anyway. C ya!

Hi @rocarbajal, that is RhinoCommon. Just import the Rhino namespace into your Python script to use it. I wonder how you access Rhino.Display.RhinoViewport without. As far as i understand, RhinoScript in python uses planes or views instead for eg. remapping from one coordinate system to another eg. using these methods:

rs.XformCPlaneToWorld
rs.XformWorldToCPlane
rs.XformWorldToScreen
rs.XformScreenToWorld
rs.XformChangeBasis
rs.XformChangeBasis2

_
c.

Wow! Found it, thank you so much, I was going nuts.
I was confused about that, I thought through Rhino I was accessing the same RhinoCommon, the one whose documentation can be seen in the attached image of the python grasshopper script editor, as you can see I have no CoordinateSystem object in DocObjects, but I do have access to rhino.Display where the RhinopView and RhinoViewport objects can be found.
More stuff to play with GREAT!
You are a god amongst men! C ya around!
pythonRhino

1 Like