Skip to content

add nopin option to omit pins rendering in mountedpcbmodule#494

Merged
techmannih merged 2 commits intotscircuit:mainfrom
rushabhcodes:nopin
Jan 31, 2026
Merged

add nopin option to omit pins rendering in mountedpcbmodule#494
techmannih merged 2 commits intotscircuit:mainfrom
rushabhcodes:nopin

Conversation

@rushabhcodes
Copy link
Contributor

This pull request introduces an optional property to the mountedpcbmodule_def schema to provide more control over how pins are rendered in PCB modules.

Enhancement to rendering options:

  • Added an optional nopin boolean property (defaulting to false) to the mountedpcbmodule_def schema in src/fn/mountedpcbmodule.ts, allowing users to omit pins from rendering when set to true.

Copilot AI review requested due to automatic review settings January 31, 2026 10:05
Copy link
Contributor

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

This PR introduces a nopin boolean property to the mountedpcbmodule_def schema to allow users to omit pin rendering in PCB modules.

Changes:

  • Added nopin boolean property to the schema definition with a default value of false

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +30
nopin: z
.boolean()
.optional()
.default(false)
.describe("omit pins rendering"),
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

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:

  1. Extract nopin from the parameters object (around line 226-254)
  2. Use it to conditionally skip pin rendering in the addPin function (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(...); }.

Suggested change
nopin: z
.boolean()
.optional()
.default(false)
.describe("omit pins rendering"),

Copilot uses AI. Check for mistakes.
Copy link
Member

@techmannih techmannih left a comment

Choose a reason for hiding this comment

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

It works for cad model only?

@techmannih techmannih merged commit f010f2b into tscircuit:main Jan 31, 2026
5 checks passed
@rushabhcodes rushabhcodes deleted the nopin branch January 31, 2026 10:11
@tscircuitbot
Copy link
Contributor


Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

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