Translate courtyard outlines when changing footprint origins - #867
Open
pokemongo1027 wants to merge 1 commit into
Open
pokemongo1027 wants to merge 1 commit into
pokemongo1027 wants to merge 1 commit into
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 a footprint origin moves its copper and silkscreen but leaves
pcb_courtyard_outlinevertices at their original coordinates. For example,fp().sot23().origin("pin1")places the right edge of pin 3 at x = 2.9375mm while the courtyard still ends at x = 2.05mm, leaving copper outside the clearance outline.Translate courtyard outline vertices by the same offset as the rest of the footprint. Map them into a new array with copied points because several footprint generators reuse module-level courtyard constants. This preserves earlier results and prevents offsets from accumulating across repeated generation. Rectangular courtyards retain their existing translation behavior.
Validation
d0d2ee19b261781af97d405400eb88402598ac92:smf,parity/sod523, anddiode-kicad-parity/sod523(561 passed).Prepared with AI assistance, local regression testing and independent code review.