Skip to content

PCB-MVP-0 slice 3: package-body placement and collision substrate - #8212

Closed
gunbai-bot[bot] wants to merge 3 commits into
session/pcb-mvp-0-scaled-extentfrom
session/pcb-mvp-0-physical
Closed

gunbai-bot[bot] wants to merge 3 commits into
session/pcb-mvp-0-scaled-extentfrom
session/pcb-mvp-0-physical

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #8209.

CORRECTED AFTER OPERATOR RULING. An earlier revision of this PR called the carrier ComponentFootprint and claimed it discharged RequiresPackageFootprintAuthority. Both were wrong and are withdrawn.

WHAT THIS IS: a package BODY ENVELOPE and the placement/collision substrate over it. The article's physical standing admitted an outline as a NonEmptyStr — a shape no consumer can intersect, measure or test for containment — so it could not ask whether every part is on the board or whether any part's body sits on another. Both are answered from geometry now, reusing std.orthogonal_geometry's rectangle and drawing in a micrometre-registered frame.

WHAT THIS IS NOT: a footprint. A footprint is a LAND PATTERN — numbered pads with positions, shapes and sizes, a contact-to-pad map, mask and paste apertures, a pin-one orientation and a courtyard. None of that is here, and #8205 explicitly did not supply it. RequiresPackageFootprintAuthority is RETAINED.

THE UNDER-APPROXIMATION IS STATED AT THE CARRIER, because it is the dangerous half: a TQ144's leads and lands span 22 mm against a 20 mm body, so two bodies clearing each other by a millimetre have already collided at their leads. A body-only collision check therefore ADMITS boards that cannot be assembled. The success arm is named BodyEnvelopesAdmitted rather than PhysicallyAdmitted — the latter claimed a board is physically realizable when nothing here has looked at a pad, a clearance, a trace or a layer.

ONE CONTROL ASSERTED SOMETHING PHYSICALLY FALSE and has been corrected. It read 'two parts butted exactly edge to edge are a legal, dense layout' — false for this very part. The geometric assertion is kept, because touching-is-not-overlapping is a real convention of the geometry layer and worth pinning; the board-level claim attached to it is deleted, and the test is renamed to say it is about geometry.

ONE DEFECT FOUND BY ITS OWN WITNESS: the pair walk deduplicated with a.identity < b.identity, silently skipping every pair whose members share an identity — two parts stacked at identical coordinates under one repeated identity were reported as a naming defect and never as the collision they also are. Caught by the counting test expecting two causes and getting one. Pairs are now selected by position.

Ten witnesses pass, positive control first.

Brian Searls and others added 3 commits August 13, 2026 05:12
… answer

The article's physical standing admitted an outline as a NonEmptyStr — a shape
no consumer can intersect, measure, or test for containment, so nothing could
ask whether every part is on the board or whether any part sits on top of
another. Both are now answered from geometry.

It reuses std.orthogonal_geometry's rectangle rather than minting a
board-local one, and draws in a micrometre-registered frame, which is why the
two slices before it had to land first: at millimetre grain a 0.5 mm package
pitch is not expressible and two adjacent pins collapse onto one coordinate. A
millimetre-registered board frame is refused rather than rounded, and an
unregistered one refuses distinctly — a board drawn at the wrong grain and a
board whose grain nobody declared have different remedies.

The 2D siblings of box3_contains_point and box3_overlaps land upstream in
std.orthogonal_geometry on the same boundary convention: an edge point is
contained, and two rectangles sharing only an edge are adjacent rather than
overlapping. That convention is what makes a dense layout legal instead of
reporting every neighbour as a collision. They are plane siblings rather than
a second implementation — lifting a footprint into a degenerate box to reuse
the 3D test would invent a Z extent no authority supplies and then compare
on it.

The footprint is DERIVED from the cited package rather than retyped beside it,
so a datasheet correction moves the placement with it.

ONE DEFECT FOUND BY ITS OWN WITNESS AND FIXED, worth recording because it was
the interesting one. The pair walk deduplicated with a.identity < b.identity,
which silently skipped every pair whose members share an identity — so two
parts stacked at identical coordinates under one repeated identity were
reported as a naming defect and never as the collision they also are. The
counting test caught it by expecting two causes and receiving one. Pairs are
now selected by position: ordering on a value that is not guaranteed distinct
is accidental correctness, and position always is.

Ten witnesses pass, positive control first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Operator ruling, and the defect is mine. ComponentFootprint held only a
designator, a body width and a body height. That is a package BODY ENVELOPE. A
footprint is a land pattern: numbered pads with positions, shapes and sizes, a
contact-to-pad map, mask and paste apertures, a pin-one orientation and a
courtyard. None of that is here, and #8205 explicitly did not supply it.

The witness locked the error in rather than catching it: it was called
w_the_footprint_is_the_cited_package_body, which states the category error as
though it were the finding.

Worse, one control asserted something physically false. Its comment read "two
parts butted exactly edge to edge are a legal, dense layout" — for this very
part. A TQ144's leads and lands span 22 mm against a 20 mm body, so two bodies
touching have already collided at their leads. The geometric assertion is kept,
because the touching-is-not-overlapping convention is real and worth pinning;
the board-level claim attached to it is deleted.

That under-approximation is the dangerous half and is now stated at the
carrier: a body-only collision check ADMITS boards that cannot be assembled.
So the success arm is renamed BodyEnvelopesAdmitted. PhysicallyAdmitted
claimed a board is physically realizable when nothing here has looked at a pad,
a clearance, a trace or a layer — rung inflation, and the more dangerous for
being one word.

RequiresPackageFootprintAuthority is NOT discharged. The PR body claimed it
was; that claim was false and is withdrawn.

Ten witnesses pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title PCB-MVP-0 slice 3: the board as a shape PCB-MVP-0 slice 3: package-body placement and collision substrate Aug 13, 2026
@gunbai-bot

gunbai-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Reworked after the operator ruling, despite the approvals — the approval tally does not make a category error correct.

The blocking finding was right: ComponentFootprint held only a designator, a body width and a body height, which is a package body envelope, not a footprint. Renamed to PackageBodyEnvelope throughout. RequiresPackageFootprintAuthority is RETAINED; the PR body's claim that it was discharged is withdrawn.

Two related things the rename alone would not have fixed:

The success arm was called PhysicallyAdmitted, which claimed a board is physically realizable when nothing here has looked at a pad, a clearance, a trace or a layer. It is now BodyEnvelopesAdmitted. Rung inflation in one word is still rung inflation.

And one control asserted something physically false: 'two parts butted exactly edge to edge are a legal, dense layout'. For a TQ144 that is wrong — leads and lands span 22 mm against a 20 mm body, so two touching bodies have already collided at their leads. I kept the geometric assertion, because touching-is-not-overlapping is a real convention worth pinning, and deleted the board-level claim attached to it. The under-approximation is now stated at the carrier itself: a body-only collision check admits boards that cannot be assembled.

Ten witnesses pass.

@gunbai-bot

gunbai-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #8214 at the operator's request. These four were a linear stack and the tip branch already contained every commit from all of them, so nothing is lost by closing here — the same commits are in #8214, now based on main.

Worth stating the cost plainly rather than letting it pass silently: this discards the approval tally these PRs accumulated. The combined diff is a different subject from any one slice and needs reviewing as one, so those approvals were not transferable in any case.

Closing this one; review continues on #8214.

@gunbai-bot gunbai-bot Bot closed this Aug 13, 2026
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.

0 participants