Add Female MountedPcbModule support with examples and tests#262
Merged
rushabhcodes merged 3 commits intotscircuit:mainfrom Feb 1, 2026
Merged
Add Female MountedPcbModule support with examples and tests#262rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes merged 3 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds support for rendering female pin headers in MountedPcbModule to improve 3D visualization accuracy for modules with female connectors.
Changes:
- Add
femaleprop toMountedPcbModuleand pass through fromFootprinter3d. - Extend
FemaleHeaderwith an optionalzoffset and update geometry placement calculations. - Add an example and a new PNG snapshot test for the female-mounted module footprint.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/snapshots/mountedpcbmodule-female.test.ts | Adds a snapshot test covering the _female mounted PCB module footprint rendering. |
| lib/MountedPcbModule.tsx | Introduces the female prop and switches rendering from PinHeader to FemaleHeader based on that prop. |
| lib/Footprinter3d.tsx | For mountedpcbmodule footprints, forwards fpJson.female into MountedPcbModule. |
| lib/FemaleHeader.tsx | Adds an optional z prop and applies it to all geometry centers for adjustable placement. |
| examples/mountedPcbModule-female.example.tsx | Adds an example demonstrating MountedPCBModule usage with female enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
seveibar
approved these changes
Feb 1, 2026
|
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.
This pull request adds support for rendering female pin headers in the
MountedPCBModulecomponent, allowing for more accurate 3D visualization of modules with female connectors. The changes introduce a newfemaleprop to control rendering and update related logic and tests to reflect this capability.Female header rendering support:
femaleprop to theMountedPCBModulecomponent and updated its logic to renderFemaleHeadercomponents instead of standard pins whenfemaleis true. (lib/MountedPcbModule.tsx, [1] [2] [3]lib/MountedPcbModule.tsx, lib/MountedPcbModule.tsxL124-R128)Footprinter3dcomponent to pass thefemaleproperty from the footprint JSON, enabling automated rendering of female headers based on footprint data. (lib/Footprinter3d.tsx, lib/Footprinter3d.tsxR377)FemaleHeader component improvements:
zprop toFemaleHeaderand updated all geometry calculations to use this value, allowing for flexible placement of female headers in 3D space. (lib/FemaleHeader.tsx, [1] [2] [3] [4]FemaleHeaderinto the module rendering logic and example usage. (lib/MountedPcbModule.tsx, [1];examples/mountedPcbModule-female.example.tsx, [2]Testing:
tests/snapshots/mountedpcbmodule-female.test.ts, tests/snapshots/mountedpcbmodule-female.test.tsR1-R9)