add nopin option to omit pins rendering in mountedpcbmodule#494
add nopin option to omit pins rendering in mountedpcbmodule#494techmannih merged 2 commits intotscircuit:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a nopin boolean property to the mountedpcbmodule_def schema to allow users to omit pin rendering in PCB modules.
Changes:
- Added
nopinboolean property to the schema definition with a default value offalse
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| nopin: z | ||
| .boolean() | ||
| .optional() | ||
| .default(false) | ||
| .describe("omit pins rendering"), |
There was a problem hiding this comment.
The nopin property is defined in the schema but is never extracted from the parameters object or used in the rendering logic. This means setting nopin: true will have no effect on the output.
To implement this feature properly, you need to:
- Extract
nopinfrom theparametersobject (around line 226-254) - Use it to conditionally skip pin rendering in the
addPinfunction (around line 271-332) and the pin rendering loops (around lines 410-481)
For example, the addPin function should check if (parameters.nopin) return; at the beginning, or the calls to addPin should be wrapped in a condition like if (!parameters.nopin) { addPin(...); }.
| nopin: z | |
| .boolean() | |
| .optional() | |
| .default(false) | |
| .describe("omit pins rendering"), |
techmannih
left a comment
There was a problem hiding this comment.
It works for cad model only?
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This pull request introduces an optional property to the
mountedpcbmodule_defschema to provide more control over how pins are rendered in PCB modules.Enhancement to rendering options:
nopinboolean property (defaulting tofalse) to themountedpcbmodule_defschema insrc/fn/mountedpcbmodule.ts, allowing users to omit pins from rendering when set totrue.