Skip to content

Commit

Permalink
style(face): Implement better __copy__ method
Browse files Browse the repository at this point in the history
All of the copy methods really aren't needed since geometry objects are immutable but I can see they might be useful for certain types of advanced editing of underlying properties (that users do at their own peril).

So I'll just leave them as they are and make sure that they work.
  • Loading branch information
chriswmackey committed Mar 5, 2025
1 parent 018b6db commit e58d6f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ladybug_geometry/geometry3d/face.py
Original file line number Diff line number Diff line change
Expand Up @@ -3298,9 +3298,9 @@ def _corner_pt_verts(corner_pt, verts3d, verts2d):
return verts3d

def __copy__(self):
_new_face = Face3D(self.vertices, self.plane)
_new_face = Face3D(self.boundary, self.plane, self.holes,
enforce_right_hand=False)
self._transfer_properties(_new_face)
_new_face._holes = self._holes
_new_face._polygon2d = self._polygon2d
_new_face._mesh2d = self._mesh2d
_new_face._mesh3d = self._mesh3d
Expand Down
4 changes: 2 additions & 2 deletions ladybug_geometry/geometry3d/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def vertex_normals(self):
@property
def face_edges(self):
"""List of polylines with one Polyline3D for each face.
This is faster to compute compared to the edges and results in effectively
the same type of wireframe visualization.
"""
Expand All @@ -246,7 +246,7 @@ def face_edges(self):
@property
def edges(self):
""""Tuple of all edges in this Mesh3D as LineSegment3D objects.
Note that this method will return only the unique edges in the mesh without
any duplicates. This is sometimes desirable but can take a lot of time
to compute for large meshes. For a faster property, use face_edges."""
Expand Down

0 comments on commit e58d6f9

Please sign in to comment.