Skip to content

Commit d2540f7

Browse files
committed
Brep.trim takes cutting plane also as Plane
1 parent b273650 commit d2540f7

File tree

1 file changed

+3
-0
lines changed
  • src/compas_rhino/geometry/brep

1 file changed

+3
-0
lines changed

src/compas_rhino/geometry/brep/brep.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from compas.geometry import Brep
33
from compas.geometry import BrepInvalidError
44
from compas.geometry import BrepTrimmingError
5+
from compas.geometry import Plane
56

67
from compas_rhino.conversions import box_to_rhino
78
from compas_rhino.conversions import point_to_rhino
@@ -200,6 +201,8 @@ def trim(self, trimming_plane, tolerance=TOLERANCE):
200201
None
201202
202203
"""
204+
if isinstance(trimming_plane, Plane):
205+
trimming_plane = Frame.from_plane(trimming_plane)
203206
rhino_frame = frame_to_rhino(trimming_plane)
204207
rhino_frame.Flip()
205208
results = self._brep.Trim(rhino_frame, tolerance)

0 commit comments

Comments
 (0)