Skip to content

Commit

Permalink
fix(face): Ensure splitting face with lines does not cause exception
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Oct 19, 2024
1 parent 627c20b commit 02a1c35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ladybug_geometry/geometry3d/face.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,8 +1343,11 @@ def split_with_lines(self, lines, tolerance):
if len(cycle) >= 3:
pt_3ds = [prim_pl.xy_to_xyz(node.pt) for node in cycle]
new_face = Face3D(pt_3ds, plane=prim_pl)
new_face = new_face.remove_colinear_vertices(tolerance)
split_faces.append(new_face)
try:
new_face = new_face.remove_colinear_vertices(tolerance)
split_faces.append(new_face)
except AssertionError: # degenerate geometry to ignore
pass

# rebuild the Face3D from the results and return them
if len(split_faces) == 1:
Expand Down

0 comments on commit 02a1c35

Please sign in to comment.