Fix swarm-review findings: empty-layer crashes, teardrop fills, Jmag
- adaptive: skip layers with zero quadtree leaves in the connectivity restriction and mesh-boundary loops (IndexError on boards where a selected layer has no copper) - board_io: accept ZT_TEARDROP zones as conducting copper (KiCad types teardrop fills ZT_TEARDROP, never ZT_COPPER, so they were dropped) - geometry: copper_bbox uses the exact stroke bbox (centerline extrema + half width) instead of a 100 um chord tessellation that could undershoot arc/cap extrema past the raster guard margin - solver/adaptive: reference |J| to the conduction-equivalent thickness sigma*rho in every branch (the uniform branch used geometric t, so AC plots changed scale ~rs_ratio depending on unrelated per-cell maps) - solver/adaptive/raster: chain cells no longer show phantom sheet-face currents; store dl per chain link and overlay the true 1D density |dV|/(rho*dl) (exact at any frequency: AC scaling of link conductance and cross-section cancels) - test_quadtree: compare edge lists pair-for-pair (the independent column sort destroyed endpoint association)
This commit is contained in:
@@ -292,7 +292,9 @@ def gather_net_fills(board: Board) -> dict[str, dict[str, list[Polygon]]]:
|
||||
"""net -> layer_name -> merged fill polygons (non-empty only)."""
|
||||
fills: dict[str, dict[str, list[Polygon]]] = {}
|
||||
for zone in board.get_zones():
|
||||
if zone.type != ZoneType.ZT_COPPER:
|
||||
# teardrop fills are conducting copper too, but KiCad types them
|
||||
# ZT_TEARDROP instead of ZT_COPPER
|
||||
if zone.type not in (ZoneType.ZT_COPPER, ZoneType.ZT_TEARDROP):
|
||||
continue
|
||||
net = zone.net.name if zone.net is not None else "<no net>"
|
||||
for layer, polys in zone.filled_polygons.items():
|
||||
@@ -392,8 +394,8 @@ def gather_mask_buildups(board: Board) -> dict[str, list[Polygon]]:
|
||||
|
||||
|
||||
def any_zone_unfilled(board: Board) -> bool:
|
||||
return any(z.type == ZoneType.ZT_COPPER and not z.filled
|
||||
for z in board.get_zones())
|
||||
return any(z.type in (ZoneType.ZT_COPPER, ZoneType.ZT_TEARDROP)
|
||||
and not z.filled for z in board.get_zones())
|
||||
|
||||
|
||||
def refill(board: Board) -> None:
|
||||
|
||||
Reference in New Issue
Block a user