Add connectsFromAbove / connectsFromBelow to pinHeaderProps - #805
Merged
Conversation
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
marked this pull request as ready for review
August 20, 2026 15:09
seveibar
approved these changes
Aug 20, 2026
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
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.
Which side of the board a part is on is
layer, and onlylayer— the 3Dmodel 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 answerin terms of the geometry rather than the intent.
These are aliases:
connectsFromAboveislayer: "top",connectsFromBelowis
layer: "bottom". An explicitlayerwins, and setting both is an errorrather than a silent precedence rule.
Resolved in the schema rather than by each consumer. core reads
layerinmore 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:
inverton a footprint string installs aheader 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· layeraliasUpstream branch:
props:feat/connects-from-above-belowBase:
mainPrerequisites: none
Managed by
./tsc-dev pr-stack; edit prose above this block freely.