Skip to content

Commit b00cd8f

Browse files
committed
Merge branch 'main' into tree
2 parents 75f49bb + 08f0624 commit b00cd8f

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

src/compas_blender/scene/capsuleobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

src/compas_rhino/conversions/geometry.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import print_function
44

55
import Rhino # type: ignore
6+
from System import MissingMemberException # type: ignore
67

78
from compas.geometry import Frame
89
from 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

116123
def vector_to_compas(vector):

src/compas_rhino/geometry/brep/brep.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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):

0 commit comments

Comments
 (0)