Skip to content

Commit

Permalink
Do not crash on empty copperfill
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Mar 10, 2024
1 parent e60dcc2 commit 28689df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kikit/panel_features/copperFill.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def apply(self, panel: Any) -> None:
geoms = [zoneArea] if isinstance(zoneArea, Polygon) else zoneArea.geoms

for g in geoms:
if len(g.exterior.coords) == 0:
# Skip empty geometries
continue
zoneContainer = pcbnew.ZONE(panel.board)
self._adjustZoneParameters(zoneContainer)
zoneContainer.Outline().AddOutline(linestringToKicad(g.exterior))
Expand Down

0 comments on commit 28689df

Please sign in to comment.