File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3535* Changed use of ` compas.geometry.allclose ` to ` compas.tolerance.TOL.is_allclose ` .
3636* Changed use of ` compas.geometry.close ` to ` compas.tolerance.TOL.is_close ` .
3737* Changed imports of itertools to ` compas.itertools ` instead of ` compas.utilities ` .
38+ * Updated ` compas_rhino.conversions.point_to_compas ` to allow for ` Rhino.Geometry.Point ` as input.
3839* Changed ` compas.datastructures.Tree.print_hierarchy ` to ` compas.datastructures.Tree.__str__ ` .
3940
4041### Removed
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ def draw(
6464 vertices , faces = self .geometry .to_vertices_and_faces (u = u , v = v )
6565 mesh = conversions .vertices_and_faces_to_blender_mesh (vertices , faces , name = self .geometry .name )
6666 if shade_smooth :
67- print (dir (mesh ))
6867 mesh .shade_smooth ()
6968
7069 obj = self .create_object (mesh , name = name )
Original file line number Diff line number Diff line change 33from __future__ import print_function
44
55import Rhino # type: ignore
6+ from System import MissingMemberException # type: ignore
67
78from compas .geometry import Frame
89from compas .geometry import Plane
@@ -103,14 +104,20 @@ def point_to_compas(point):
103104
104105 Parameters
105106 ----------
106- point : :rhino:`Rhino.Geometry.Point3d`
107+ point : :rhino:`Rhino.Geometry.Point3d` | :rhino:`Rhino.Geometry.Point`
107108
108109 Returns
109110 -------
110111 :class:`compas.geometry.Point`
111112
112113 """
113- return Point (point .X , point .Y , point .Z )
114+ try :
115+ return Point (point .X , point .Y , point .Z )
116+ except MissingMemberException :
117+ try :
118+ return Point (point .Location .X , point .Location .Y , point .Location .Z )
119+ except MissingMemberException :
120+ raise TypeError ("Unexpected point type, got: {}" .format (type (point )))
114121
115122
116123def vector_to_compas (vector ):
Original file line number Diff line number Diff line change @@ -534,7 +534,6 @@ def slice(self, plane):
534534 if isinstance (plane , Frame ):
535535 plane = Plane .from_frame (plane )
536536 curves = Rhino .Geometry .Brep .CreateContourCurves (self ._brep , plane_to_rhino (plane ))
537- print ("curves:{}" .format (curves ))
538537 return [curve_to_compas (curve ) for curve in curves ]
539538
540539 def split (self , cutter ):
You can’t perform that action at this time.
0 commit comments