Skip to content

Add connectsFromAbove / connectsFromBelow to pinHeaderProps - #805

Merged
addibble merged 1 commit into
tscircuit:mainfrom
addibble:feat/connects-from-above-below
Aug 20, 2026
Merged

Add connectsFromAbove / connectsFromBelow to pinHeaderProps#805
addibble merged 1 commit into
tscircuit:mainfrom
addibble:feat/connects-from-above-below

Conversation

@addibble

@addibble addibble commented Aug 19, 2026

Copy link
Copy Markdown
Member

Which side of the board a part is on is layer, and only layer — the 3D
model is always authored top-side and consumers flip it for a bottom-layer
component (3d-viewer repositions to -(z + pcbThickness) and rotates 180
degrees about X). But on a connector, "which side is this connected to from"
is the question actually being asked, and layer: "bottom" states the answer
in terms of the geometry rather than the intent.

These are aliases: connectsFromAbove is layer: "top", connectsFromBelow
is layer: "bottom". An explicit layer wins, and setting both is an error
rather than a silent precedence rule.

Resolved in the schema rather than by each consumer. core reads layer in
more than fifty places; an alias that only some of them understand is worse
than no alias, and after parsing there is one field to reason about again.

Worth stating what they are NOT: invert on a footprint string installs a
header BACKWARDS on whichever side it is on — long pins through the board
instead of short ones. That is a different axis, and conflating the two is
what produced tscircuit/jscad-electronics#333, where every through-hole pin
header rendered hanging beneath the board.

Merge stack

Stack: pin-header-semantics · layer alias
Upstream branch: props:feat/connects-from-above-below
Base: main

Prerequisites: none

Managed by ./tsc-dev pr-stack; edit prose above this block freely.

Which side of the board a part is on is `layer`, and only `layer` — the 3D
model is always authored top-side and consumers flip it for a bottom-layer
component (3d-viewer repositions to -(z + pcbThickness) and rotates 180
degrees about X). But on a connector, "which side is this connected to from"
is the question actually being asked, and `layer: "bottom"` states the answer
in terms of the geometry rather than the intent.

These are aliases: `connectsFromAbove` is `layer: "top"`, `connectsFromBelow`
is `layer: "bottom"`. An explicit `layer` wins, and setting both is an error
rather than a silent precedence rule.

Resolved in the schema rather than by each consumer. core reads `layer` in
more than fifty places; an alias that only some of them understand is worse
than no alias, and after parsing there is one field to reason about again.

Worth stating what they are NOT: `invert` on a footprint string installs a
header BACKWARDS on whichever side it is on — long pins through the board
instead of short ones. That is a different axis, and conflating the two is
what produced tscircuit/jscad-electronics#333, where every through-hole pin
header rendered hanging beneath the board.
@addibble
addibble marked this pull request as ready for review August 20, 2026 15:09
@addibble
addibble merged commit 93f0bf2 into tscircuit:main Aug 20, 2026
5 checks passed
@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


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