Skip to content

Place flex-board CAD components during rendering - #4092

Merged
seveibar merged 8 commits into
mainfrom
share-flex-cad-transforms
Sep 23, 2026
Merged

seveibar merged 8 commits into
mainfrom
share-flex-cad-transforms

Conversation

@seveibar

@seveibar seveibar commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Create board-mounted CAD components in their assembled position/rotation during rendering. The board computes its fold once in PcbFlexRender; components calculate flat position/rotation, optionally apply the fold projection in an explicit conditional, then insert the CAD record. Folded records carry is_on_folded_board: true. getCircuitJson remains a plain export, and PCB placement/routing stay flat.

Use @tscircuit/flex-utils@0.0.5 from the pinned jscdn tarball as a development dependency. Bundle its JavaScript and declaration types via tsup noExternal/dts.resolve, so package consumers do not install flex-utils separately.

Validation: focused CAD/flex tests and the existing capsule snapshot pass. Dependency policy passes. Built JavaScript/declarations contain no external flex-utils imports; Node can import the built package with flex-utils removed from node_modules. The published CDN tarball installs without authentication.

CAD placement uses sequential statements instead of wrapping position/rotation literals in a resolver. getBoardFoldContext only gathers the containing board and flat PCB mount. The projection uses the shared named-argument API.

@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tscircuit-core-benchmarks Ready Ready Preview Sep 23, 2026 5:26am UTC

Request Review

@seveibar seveibar changed the title Export folded CAD poses using flex-utils Place flex-board CAD components in assembled poses during rendering Sep 23, 2026
@seveibar seveibar changed the title Place flex-board CAD components in assembled poses during rendering Place flex-board CAD components during rendering Sep 23, 2026
@seveibar
seveibar merged commit bb95630 into main Sep 23, 2026
17 checks passed
@seveibar
seveibar deleted the share-flex-cad-transforms branch September 23, 2026 17:41
@tscircuitbot

Copy link
Copy Markdown
Contributor

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

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


This branch was successfully deployed

1 active deployment
Preview — 9050bc56 Deployed Sep 23, 2026 by vercel[bot]
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.

2 participants