Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions ladybug_geometry/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,16 @@ def from_shape_to_split(cls, boundary, holes, split_segments, tolerance):
if holes is not None:
split_holes = []
for hole in holes:
hole = hole.remove_colinear_vertices(tolerance)
hole_sgs = cls._intersect_segments(
hole.segments, split_segments, tolerance)
hole_pts = [seg.p1 for seg in hole_sgs]
split_holes.append(boundary.__class__(hole_pts))
try:
hole = hole.remove_colinear_vertices(tolerance)
hole_sgs = cls._intersect_segments(
hole.segments, split_segments, tolerance)
hole_pts = [seg.p1 for seg in hole_sgs]
split_holes.append(boundary.__class__(hole_pts))
except AssertionError:
pass # degenerate hole to ignore
if len(split_holes) == 0:
split_holes = None

# make the directed graph for the boundary + holes
dg = cls.from_shape_with_holes(split_boundary, split_holes, tolerance)
Expand Down