Conversation
This branch has not been deployed
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.
Changing the origin of a footprint containing polygon pads currently corrupts its coordinates:
fp.string("sot89_3").origin("bottomleft").circuitJson()producesNaNpositions because polygon pads have points instead ofx,y,width, andheight. Withorigin("pin1"), a rectangular first pad moves correctly but the polygon stays behind; a polygon first pad also produces invalid offsets.Include polygon vertices in the copper bounds, use the polygon bounding-box center for a polygon pin1 (consistent with
applyPin1Location), and translate polygon points together with the other elements. Replace the point array rather than mutating shared generator constants.Add four regression tests with SVG snapshots covering SOT89 bottom-left, center and pin1 origins, DFN polygon pin1, alignment with silkscreen, and repeated generation without shared-point contamination.
Validation on Bun 1.4.2, macOS arm64, base
d0d2ee19b261781af97d405400eb88402598ac92: the four regression tests fail before the fix; all 568 tests pass after it. ESM/declaration build, formatting and diff whitespace checks pass. Rendered SOT89 and DFN snapshots were visually inspected.Related: #867 addresses courtyard outline translation. This change addresses polygon copper pads and leaves that separately proposed change to its author.
Implementation and validation were performed with OpenAI Codex.