feat(board): propagate solderMaskColor prop to pcb_board.solder_mask_color#2343
Open
podarok wants to merge 3 commits into
Open
feat(board): propagate solderMaskColor prop to pcb_board.solder_mask_color#2343podarok wants to merge 3 commits into
podarok wants to merge 3 commits into
Conversation
@tscircuit/core already preserves silkscreentext.font through to Circuit JSON. The ZodEnum that gated values lives in @tscircuit/props (forked separately at EnergyCitizen/props feat/ubuntu-font, 0.0.538-ec.1). Real glyph rasterization happens in renderer pkgs (circuit-to-svg for preview SVG, @tscircuit/cli for Gerber, circuit-json-to-gltf for 3D). Those repos are the next forks in the W15 chain. Marker doc UBUNTU-FONT-INTEGRATION.md captures the architecture so future contributors understand why this fork branch exists without src changes.
…color W15.P4.C EnergyCitizen fork. Board normal-component accepted solderMaskColor prop via @tscircuit/props BoardProps but never threaded it into the emitted pcb_board entry. Downstream consumers (circuit-json-to-gltf, custom 3D viewers, fab-doc generators) had no way to read the requested solder mask color from Circuit JSON. Add solder_mask_color field to the pcb_board.insert() call alongside material + dimension constraints. Value is the BoardColor enum string (green/red/blue/purple/black/white/yellow/not_specified) — same shape that @energycitizen/circuit-json-to-gltf maps to fab finish colors at render time. Back-compat: solderMaskColor is optional. Boards without the prop emit pcb_board without the field — same as before this commit. Version 0.0.1272 -> 0.0.1272-ec.1 (EnergyCitizen pre-release). Depends on circuit-json schema accepting solder_mask_color on pcb_board; this is already supported via circuit-json passthrough — verified by checking that no schema validation rejected the field in our test build.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
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
Propagates the
solderMaskColorprop from<board>intopcb_board.solder_mask_colorso downstream renderers (gltf, custom 3D viewers, fab-doc generators) can read the requested solder mask finish from Circuit JSON.Use case
<board solderMaskColor="red">is accepted at the props layer (BoardColor enum: green, red, blue, purple, black, white, yellow, not_specified) but@tscircuit/corecurrently drops the value during board emission. Renderers downstream have no way to honor the request — the GLTF viewer defaults to green regardless of what the consumer set, and fab order automation can't read the color from the artifact bundle.EnergyCitizen's vBMS carrier-board project ran into this when adding red solder mask for visual identity. The PR at
tscircuit/circuit-json-to-gltf(companion) maps the field to seven preset fab finish colors; this PR is the producer side.Change
Back-compat
solderMaskColorremains optional on the Board props (no change in @tscircuit/props).pcb_boardwithout the field — identical to pre-PR behavior.Test plan
bun run buildclean<board solderMaskColor="red">→ pcb_board entry containssolder_mask_color: "red"<board>(no prop) → pcb_board entry has nosolder_mask_colorRelated
tscircuit/circuit-json-to-gltfcompanion PR — maps pcb_board.solder_mask_color → 3D fab finish color (7 presets)@tscircuit/propsalready defines BoardColor enum + accepts the prop