Skip to content

Add Female MountedPcbModule support with examples and tests#262

Merged
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:mountedpcbmodule_female
Feb 1, 2026
Merged

Add Female MountedPcbModule support with examples and tests#262
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:mountedpcbmodule_female

Conversation

@rushabhcodes
Copy link
Contributor

This pull request adds support for rendering female pin headers in the MountedPCBModule component, allowing for more accurate 3D visualization of modules with female connectors. The changes introduce a new female prop to control rendering and update related logic and tests to reflect this capability.

Female header rendering support:

  • Added a female prop to the MountedPCBModule component and updated its logic to render FemaleHeader components instead of standard pins when female is true. (lib/MountedPcbModule.tsx, [1] [2] [3]
  • Modified the board offset calculation to account for female headers, ensuring the board sits correctly on the z-axis when pins are omitted or female headers are used. (lib/MountedPcbModule.tsx, lib/MountedPcbModule.tsxL124-R128)
  • Updated the Footprinter3d component to pass the female property from the footprint JSON, enabling automated rendering of female headers based on footprint data. (lib/Footprinter3d.tsx, lib/Footprinter3d.tsxR377)

FemaleHeader component improvements:

  • Added an optional z prop to FemaleHeader and 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]
  • Integrated FemaleHeader into the module rendering logic and example usage. (lib/MountedPcbModule.tsx, [1]; examples/mountedPcbModule-female.example.tsx, [2]

Testing:

Copilot AI review requested due to automatic review settings January 31, 2026 19:08
@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
jscad-electronics Ready Ready Preview, Comment Jan 31, 2026 7:16pm

Request Review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for rendering female pin headers in MountedPcbModule to improve 3D visualization accuracy for modules with female connectors.

Changes:

  • Add female prop to MountedPcbModule and pass through from Footprinter3d.
  • Extend FemaleHeader with an optional z offset 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.

@rushabhcodes rushabhcodes merged commit 4aeba50 into tscircuit:main Feb 1, 2026
6 checks passed
@rushabhcodes rushabhcodes deleted the mountedpcbmodule_female branch February 1, 2026 18:19
@tscircuitbot
Copy link


Thank you for your contribution! 🎉

PR Rating:
Impact: Tiny

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants