Add excludeRefs to PCB keepout props - #772
Merged
Merged
Conversation
seveibar
marked this pull request as ready for review
August 1, 2026 00:10
Comment on lines
+34
to
+49
| test("should parse keepout excludeRefs selectors", () => { | ||
| const rectProps: PcbKeepoutProps = { | ||
| shape: "rect", | ||
| width: "5mm", | ||
| height: "2mm", | ||
| excludeRefs: [".ANT1", ".C1"], | ||
| } | ||
| const circleProps: PcbKeepoutProps = { | ||
| shape: "circle", | ||
| radius: "1mm", | ||
| excludeRefs: [".ANT1"], | ||
| } | ||
|
|
||
| expect(pcbKeepoutProps.parse(rectProps).excludeRefs).toEqual([".ANT1", ".C1"]) | ||
| expect(pcbKeepoutProps.parse(circleProps).excludeRefs).toEqual([".ANT1"]) | ||
| }) |
Contributor
There was a problem hiding this comment.
A *.test.ts file may have AT MOST one test(...) call. This file already contains a prior test(...) block (ending at line 32), and the newly added test("should parse keepout excludeRefs selectors", ...) (lines 34–49) is a second test in the same file. Per the style guide, once a file has one test, any additional tests must be split into separate, numbered files — e.g., pcb-keepout1.test.ts and pcb-keepout2.test.ts. Please move the new test to its own file.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
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.
Summary
excludeRefs: string[]prop to circular and rectangular PCB keepouts".ANT1"and preserve them unchanged in parsed propsWhy
Keepouts need a way to identify selected components that may occupy the keepout region, such as allowing an antenna component inside its own RF keepout.
This PR adds the props-layer contract only.
@tscircuit/corewill need a follow-up change to resolve the selectors and apply the exclusions while rendering routing obstacles.API behavior
undefinedGenerated documentation note
Running the generators required by
AGENTS.mdalso synchronized pre-existing generated documentation drift forBusProps.routingPhaseIndex.Validation
bun test— 400 passingbun run typecheckbun run format:checkbun run buildbun run check-circular-depsgit diff --check