Skip to content

Fix hatched polygon pours importing without perimeter or nets (#41) - #52

Merged
anarthrous-eda merged 1 commit into
mainfrom
pr47-review
Sep 4, 2026
Merged

Fix hatched polygon pours importing without perimeter or nets (#41)#52
anarthrous-eda merged 1 commit into
mainfrom
pr47-review

Conversation

@anarthrous-eda

Copy link
Copy Markdown
Owner

Altium realizes a hatched or outlines-only pour as Tracks6/Arcs6 with the net on the parent Polygons6 record, the mirror of a solid pour's Regions6 fill. FYPA applied the solid-pour rules to both: the perimeter was dropped as polygon-outline artwork, and only the region extractors inherited the parent net, so the surviving hatch lines arrived on no net.

_extract_tracks/_extract_arcs now inherit the polygon net, and _pour_outline_is_artwork gates the outline exclusion on fill style so a solid pour still drops its border (no spurious copper on rounded corners) while a hatched pour keeps its outer conductor.

Both region extractors converge on the same resolver, which fixes a shared hazard: altium_monkey parses a missing NET field as int(record.get('NET', 0)), making a net-less polygon indistinguishable from one on net index 0. 27 of Corvette's 134 polygons carry no NET field and were attributing 28 regions to PWR_I2C.SDA; they now import as unassigned.

Corpus diff vs. pre-fix extraction: Imperial, Methuselah, Sandbox and 1194 bit-identical; Corvette changes only in those 28 regions. No hatched pour exists in ExampleDesigns, so the new tests pin both seams with synthetic fixtures rather than a real .PcbDoc.

Altium realizes a hatched or outlines-only pour as Tracks6/Arcs6 with the
net on the parent Polygons6 record, the mirror of a solid pour's Regions6
fill. FYPA applied the solid-pour rules to both: the perimeter was dropped
as polygon-outline artwork, and only the region extractors inherited the
parent net, so the surviving hatch lines arrived on no net.

_extract_tracks/_extract_arcs now inherit the polygon net, and
_pour_outline_is_artwork gates the outline exclusion on fill style so a
solid pour still drops its border (no spurious copper on rounded corners)
while a hatched pour keeps its outer conductor.

Both region extractors converge on the same resolver, which fixes a shared
hazard: altium_monkey parses a missing NET field as int(record.get('NET',
0)), making a net-less polygon indistinguishable from one on net index 0.
27 of Corvette's 134 polygons carry no NET field and were attributing 28
regions to PWR_I2C.SDA; they now import as unassigned.

Corpus diff vs. pre-fix extraction: Imperial, Methuselah, Sandbox and 1194
bit-identical; Corvette changes only in those 28 regions. No hatched pour
exists in ExampleDesigns, so the new tests pin both seams with synthetic
fixtures rather than a real .PcbDoc.
@anarthrous-eda
anarthrous-eda merged commit 6ab1e42 into main Sep 4, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant