Skip to content

Commit

Permalink
Merge branch 'main' into tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Licini committed May 7, 2024
2 parents 75f49bb + 08f0624 commit b00cd8f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed use of `compas.geometry.allclose` to `compas.tolerance.TOL.is_allclose`.
* Changed use of `compas.geometry.close` to `compas.tolerance.TOL.is_close`.
* Changed imports of itertools to `compas.itertools` instead of `compas.utilities`.
* Updated `compas_rhino.conversions.point_to_compas` to allow for `Rhino.Geometry.Point` as input.
* Changed `compas.datastructures.Tree.print_hierarchy` to `compas.datastructures.Tree.__str__`.

### Removed
Expand Down
1 change: 0 additions & 1 deletion src/compas_blender/scene/capsuleobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def draw(
vertices, faces = self.geometry.to_vertices_and_faces(u=u, v=v)
mesh = conversions.vertices_and_faces_to_blender_mesh(vertices, faces, name=self.geometry.name)
if shade_smooth:
print(dir(mesh))
mesh.shade_smooth()

obj = self.create_object(mesh, name=name)
Expand Down
11 changes: 9 additions & 2 deletions src/compas_rhino/conversions/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import print_function

import Rhino # type: ignore
from System import MissingMemberException # type: ignore

from compas.geometry import Frame
from compas.geometry import Plane
Expand Down Expand Up @@ -103,14 +104,20 @@ def point_to_compas(point):
Parameters
----------
point : :rhino:`Rhino.Geometry.Point3d`
point : :rhino:`Rhino.Geometry.Point3d` | :rhino:`Rhino.Geometry.Point`
Returns
-------
:class:`compas.geometry.Point`
"""
return Point(point.X, point.Y, point.Z)
try:
return Point(point.X, point.Y, point.Z)
except MissingMemberException:
try:
return Point(point.Location.X, point.Location.Y, point.Location.Z)
except MissingMemberException:
raise TypeError("Unexpected point type, got: {}".format(type(point)))


def vector_to_compas(vector):
Expand Down
1 change: 0 additions & 1 deletion src/compas_rhino/geometry/brep/brep.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ def slice(self, plane):
if isinstance(plane, Frame):
plane = Plane.from_frame(plane)
curves = Rhino.Geometry.Brep.CreateContourCurves(self._brep, plane_to_rhino(plane))
print("curves:{}".format(curves))
return [curve_to_compas(curve) for curve in curves]

def split(self, cutter):
Expand Down

0 comments on commit b00cd8f

Please sign in to comment.