File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/compas_rhino/conversions Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -103,14 +103,19 @@ def point_to_compas(point):
103103
104104 Parameters
105105 ----------
106- point : :rhino:`Rhino.Geometry.Point3d`
106+ point : :rhino:`Rhino.Geometry.Point3d` | :rhino:`Rhino.Geometry.Point`
107107
108108 Returns
109109 -------
110110 :class:`compas.geometry.Point`
111111
112112 """
113- return Point (point .X , point .Y , point .Z )
113+ if isinstance (point , Rhino .Geometry .Point3d ):
114+ return Point (point .X , point .Y , point .Z )
115+ elif isinstance (point , Rhino .Geometry .Point ):
116+ return Point (point .Location .X , point .Location .Y , point .Location .Z )
117+ else :
118+ raise TypeError ("Expected Rhino.Geometry.Point3d or Rhino.Geometry.Point., got: {}" .format (type (point )))
114119
115120
116121def vector_to_compas (vector ):
You can’t perform that action at this time.
0 commit comments