Fix hatched polygon pours importing without perimeter or nets (#41) - #52
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.