Skip to content

Add hole-to-hole and edge-to-hole assembly drawing dimensions - #4939

Merged
seveibar merged 4 commits into
mainfrom
codex/drawing-hole-dimensions
Oct 27, 2026
Merged

seveibar merged 4 commits into
mainfrom
codex/drawing-hole-dimensions

Conversation

@seveibar

@seveibar seveibar commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Drawing dimensions can now measure PCB mounting/plated-hole spacing and edge-to-hole offsets, as well as the same measurements between named native CAD outlines.

<assembly.drawing.dimension fromRef=".H1" toRef=".H2" axis="x" />
<assembly.drawing.dimension fromRef=".carrier" toRef=".H1" axis="x" />
<assembly.drawing.dimension fromRef=".plate > .rim" toRef=".plate > .bore1" />

Anchors are optional and inferred from projected geometry. Disjoint references use centers. When one reference's bounds enclose the other, core chooses the nearest edge, restricted by axis when supplied; with no axis, it chooses the nearest of all four edges. Inferred edge witnesses align with the other reference's center. Explicit fromAnchor/toAnchor override inference, including center for nested or concentric outlines.

PCB witnesses use finalized drill coordinates. Native references reuse existing transforms for model units, fitting, origins, rotations and layer placement. Section cuts reject removed anchors instead of moving centers. Invalid, ambiguous, out-of-selection and zero-separation references fail before any page records are inserted. PCB holes accept center anchors; folded PCB references and imported mesh/STEP feature names remain unsupported.

Reference selection and dimension math remain under lib/utils/assembly-drawing/dimensions/, with scene-point extraction in geometry/. Includes three visual snapshots, transform/validation/inference coverage, documentation and a built-package dimension smoke test.

Validation: 87 assembly tests pass, including 18 drawing tests; typecheck, package build, browser build and dist smoke checks pass.

Uses published @tscircuit/props@^0.0.712 (props #958), with no preview dependencies.

Upstream integration fix: tscircuit/tscircuit#6045 (green). Inference documentation follow-up: tscircuit/props#959 (green; no schema changes).

@vercel

vercel Bot commented Oct 27, 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 Oct 27, 2026 4:02am UTC

Request Review

@seveibar
seveibar marked this pull request as ready for review October 27, 2026 04:02
@seveibar
seveibar merged commit c28bae1 into main Oct 27, 2026
20 checks passed
@seveibar
seveibar deleted the codex/drawing-hole-dimensions branch October 27, 2026 04:25
@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 — 82372da0 Deployed Oct 27, 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