@@ -66,6 +66,9 @@ def __init__(self, brep=None):
6666 super (RhinoBrep , self ).__init__ ()
6767 self ._brep = brep or Rhino .Geometry .Brep ()
6868
69+ def __deepcopy__ (self , * args , ** kwargs ):
70+ return self .copy ()
71+
6972 # ==============================================================================
7073 # Data
7174 # ==============================================================================
@@ -89,6 +92,17 @@ def data(self, data):
8992 RhinoBrepFace .from_data (f_data , builder )
9093 self ._brep = builder .result
9194
95+ def copy (self , cls = None ):
96+ """Creates a deep-copy of this Brep using the native Rhino.Geometry.Brep copying mechanism.
97+
98+ Returns
99+ -------
100+ :class:`~compas_rhino.geometry.RhinoBrep`
101+
102+ """
103+ # Avoid reconstruction when just copying. for sake of efficiency and stability
104+ return RhinoBrep .from_native (self ._brep .DuplicateBrep ())
105+
92106 # ==============================================================================
93107 # Properties
94108 # ==============================================================================
@@ -237,7 +251,7 @@ def trim(self, trimming_plane, tolerance=TOLERANCE):
237251 Parameters
238252 ----------
239253 trimming_plane : :class:`~compas.geometry.Frame` or :class:`~compas.geometry.Plane`
240- The frame or plane to use when trimming.
254+ The frame or plane to use when trimming. The discarded bit is in the direction of the frame's normal.
241255
242256 tolerance : float
243257 The precision to use for the trimming operation.
0 commit comments