Skip to content

Plates: keep magnet and screw pockets out of a joint's cut in the floor - #69

Merged
Oliver-Johnson merged 18 commits into
mainfrom
claude/pocket-joint-housing
Oct 9, 2026
Merged

Oliver-Johnson merged 18 commits into
mainfrom
claude/pocket-joint-housing

Conversation

@Oliver-Johnson

@Oliver-Johnson Oliver-Johnson commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Requested by Oliver · project thread

What this changes

Closes #64.

Before. With a joint housed in the floor, a magnet pocket or counterbore from beneath could run into the joint's recess or notch. At the default 2 mm depth the two ceilings are level and share a face, and the plate built with bad edges and Download on: a bowtie at 42 mm gave 12 and 11 bad edges on its two pieces at 7.9 mm and 19 each at 10 mm, with no warning. Deeper or shallower pockets nearly always built clean, but cut into the space the key or the other piece's tab fills. Separately (#61 round 4), a 2.4 mm shank under a 4.8 mm head at 44.08 mm shipped a cell with 6 open edges.

After. Checks refuses a magnet, screw head or shank that would break into a key's recess, an H-clip's or a puzzle tab's notch, names the joint ("a hole has to stay out of the recesses the bowtie keys fit into"), lowers the field's max to the room there, and turns Download off. A dovetail's notch takes a pocket from beneath that breaks in, unless it is as deep as the notch or the magnet or screw would touch the tab, and Checks says which: the half-inch magnet on the default dovetail at 42 mm is taken 2 or 3 mm thick and refused 2.4 mm thick. A bowtie at 42 mm takes a magnet up to 7.6 mm. The counterbore case builds watertight.

How. mountLimits takes the layout and measures each whole cell's mounting sites against every joint cut on it, placed as the build places them (keys through keyPlan and keySiteOps, tabs through a new tabNotch the build shares). A pocket from above counts a cut when its floor would stand less than a layer over it. Each pocket is measured as cut, by its polygon. A pocket that stops short of a cut stops at least 0.01 mm short, past the weld's reach (4 of 715 pockets closer than 0.005 mm went bad, none of 1,941 from 0.005 to 0.03); beyond that a lottery remains, about one design in a thousand, byte for byte as on main. A pocket into a key's recess or a puzzle tab's notch is refused, since letting it in where the part stays clear went bad 15 times in 3,670; into a dovetail's notch it is taken where the magnet or screw clears the tab and the ceilings are not level (0 bad in 3,699). Just under the notch's edge that leaves a few hundredths of refused sizes, which the field names ("Use 5.58 mm or less, or 5.61 mm or more"). The page reads the mounting sizes last, after the clearance and margins, and works out the layout once a keystroke, as main does. The socket floor's fan is held clear of the true corners only, not the shank's split points. Comments and ENGINE.md say what settle's check does not judge and when the fan stays put.

What changes for designs people already make:

  • Dovetail and puzzle tabs count as joint cuts too, and the dovetail is the default joint. At 42 mm the default design's magnet cap drops from 13.6 to 13.1 mm (12.5 mm for a magnet 2.4 mm thick) and its screw head cap from 14 to 13.1 mm. With the default 6 x 2 mm magnets, the page's default dovetail design needs a 35.8 mm pitch (34.2 on main), and a puzzle-tab plate at 40 mm and below is now refused, where main builds it clean; with the default screws, puzzle tabs at 40 mm and below. (Screws at 34 mm were already refused on main, for the shank.)
  • How strict to be at the tabs is Oliver's pick, still open. This PR builds the review's middle rule (option c) for dovetail notches, which on the page's default design takes magnets and screw heads at 0.4 to 0.65 mm less pitch than refusing any overlap does, and keeps the strict rule for keys, H-clips and puzzle tabs, where the middle rule went bad. If Oliver picks "Any overlap", a follow-up PR puts back the strict rule at the dovetail too (this PR's b53ce5c).

#61's leftovers:

  • O4-a: the 44.08 mm counterbore repro goes from 6 open edges to watertight. Over 2,534 other counterbore designs, none is open before or after, and all are byte-identical; the review found 5 other designs whose bytes change, all clean before and after.
  • O4-b and O4-c: the settle comment, the refan comment and ENGINE.md now say what the end-of-build check doesn't judge (tabs and the top-insert pass), and that the fan stays put when fanCentre finds no clear point.
  • The 38.13 mm puzzle-key link with screws is this class: its 6.5 mm counterbore is level with the key's 2 mm recess. It is now refused (5 mm max) and is an audit row.
  • The 10.6 mm magnet at 38.92 mm is not: it has no joint, and its 3 open edges are a sliver on the pocket's ceiling, the same on main. It stays as it is.

Left for later: with corner bosses and any joint cut from beneath, the boss shells fill the key's housing, on main too, and with floor keys the boss pockets are buried in solid. The new limit leaves bosses out. That is #70.

New top-level names: tabNotch, MOUNT_LEVEL, MOUNT_SEAM and boreReach (core.js), MOUNT_LAST, mountNow, mountLayout, mountDepth, cutsNamed and nearWhy (src/ui.js). None clash with main (3145cc7) or #65. This PR contains main 3145cc7 (#66, #67, #68 and #71), merged in 6241d35, 47342e0 and 6734ba5; only sw.js conflicted, and the pages are rebuilt from the merged sources.

Checks

  • I edited the sources in src/, not the generated index.html / bins/index.html
  • I ran node build.js and committed the regenerated pages alongside the sources
  • npm run test:all passes (run here: npm test, ci-sim, and the plate UI specs, 165 passed; not the whole UI suite)

If this touches geometry

  • Bins: node test/bin-audit.js reports all cases clean
  • Baseplates: node test/plate-audit.js reports all plates watertight, and no case picked up bad edges
  • I added a case covering the new shape: eleven rows for pockets beside a joint (each fails on main), nine for what a dovetail's notch takes and refuses and the review's snap sliver, and the 44.08 mm counterbore

The strict rule (part A, b53ce5c): designs under every limit with no joint and no counterbore are byte-identical to main (808 checked), and so are jointed designs under the limit (4,484 on a solid floor, 588 with corner bosses, 288 with half cells). That limit refused 4,405 sizes main took in the sweep: 1,372 were bad on main, and the rest put the pocket into the joint's cut, many with the magnet or screw itself still clear of the key or tab.

The dovetail's middle rule (part B, on top) changes only the limit and the page, so every design builds the same bytes as under part A (72 jointed designs checked here, 140 by the review). It takes sizes part A refused. Of 1,200 random such designs, 800 more at the sizes the hundredth gaps free and 200 at 2.45 mm deep, 3 built bad. Each is byte-identical on main, which takes it, and is bad as well at nearby sizes or depths that were already taken.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY

claude added 4 commits October 9, 2026 07:57
With a screw counterbore, wallsAt(pad) handed the socket floor's refan the
points where the BSP split each flat of the shank along the head's planes,
24 of them, as well as the shank's 12 corners. A 2.4 mm shank under a 4.8 mm
head at 44.08 mm, loose, had one within FAN_CLEAR of every centre fanCentre
tried, so the fan stayed put and the cell shipped six edges open with no
warning. cornersAt keeps the points where two walls that are not in line
meet; from those the fan moves 0.2 mm and the floor closes. Only an open
cell's refan reads the list, so a cell that came out closed is built as
before.

Also says what settle's end-of-build check does not judge (the dovetail and
puzzle tabs, the top-insert pass), in core.js and ENGINE.md, and that the
fan stays put when fanCentre finds no clear point as well as when the spokes
are already clear.

The audit builds the 44.08 mm counterbore, which is 6 bad edges on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
A magnet pocket from beneath that reached a bowtie's recess at 42 mm built
12 bad edges a piece at 7.9 mm and 19 at 10, with no warning and Download on
(#64); puzzle tabs at 36 to 40 mm did the same with the spec's 6.5 x 2.4
magnet, 26 to 86. The pocket had run into the cut with its ceiling level
with the cut's (a 2 mm magnet or the default counterbore against a key's
2 mm recess, a 2.4 mm one against a tab's 2.4 mm notch), and the two
ceilings share a face. At any other depth the pocket breaks in just the
same and comes out closed, and the magnet and the key still want the same
place, so the pocket breaking in is what is refused.

mountLimits takes the layout and measures each whole cell's mounting sites
against every cut buildPiece makes from beneath beside them: a key's or an
H-clip's recess (keyPlan's 'recess', floor or wall) and a dovetail's or
puzzle tab's notch (tabNotch, now shared with buildPiece). Magnets from
beneath, counterbores and shanks are held to that room; a magnet from above
too, unless its floor stands a layer over the cut. No wall: of 10,882 keyed
designs none that stopped short of the cut was bad, and the first went bad
0.035 mm into it, where a 1 mm wall would refuse a 6 mm magnet beside a
bowtie at 42 mm. The page reads the mounting sizes after the layout and the
clearance are known, puts the room on the field's max, and says which
joint: "a hole has to stay out of the recesses the bowtie keys fit into".

The audit builds each case at the widest the page takes and refuses the
tenth past it and the size that leaked: the 42 mm bowtie each way and with
a counterbore, #61's bands, a key in the wall, the 38.13 mm puzzle-key link
#61 left for later, both tabs with the spec's magnet, and half cells. The
page specs take the new wording and field max; three old cases about the
cell's own room take cn=none, since the default dovetail now stops them
first.

Closes #64

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
@Oliver-Johnson Oliver-Johnson self-assigned this Oct 9, 2026
Only sw.js conflicted; the pages are rebuilt from the merged sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
claude added 11 commits October 9, 2026 10:18
Only sw.js conflicted; the pages are rebuilt from the merged sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
With magnets or screws on, a keystroke worked out the layout three times:
the depth fields' range asked mountLimits with the layout though the depth
needs none, the magnet's size was read again from scratch, and
recomputeLayout worked it out once more. In Fewest plates mode each one is a
search of about 100 ms, so typing took 230 to 310 ms a key against 110 on
main.

- The depth's range is read without the layout: only a corner boss caps it.
- readControls works out the layout the first time a size needs it, and
  recomputeLayout keeps that one: no mounting size moves it.
- mountLimits hands back the joint's cuts it measured, and takes them again
  (`known`) for the magnet's second read, measuring again only if the floor
  has moved.

One layout a keystroke now, as on main, and the same time to within the
noise on the review's links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
The comments and ENGINE.md overstated it. A pocket that breaks into a cut does
not mean the magnet or screw in it reaches the key or the tab: the pocket is
measured by the circle through its corners, and the part stands the fit
clearance inside the cut (a 12.7 mm magnet at 42 mm is about 0.24 mm clear of
a dovetail's tab). Only level ceilings went bad in the 768-pocket sample, but
a sliver into a cut has gone bad at other depths too. And stopping short of a
cut is a sample, not a promise: a counterbore 0.05 mm clear of a dovetail's
notch at 43.17 mm turns a face over, byte for byte as main does, the joint
cut's own lottery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…otch together

It is bad from 2.4 to 3 mm deep and clean at 2.35, 14 mm across and with no
counterbore, so it is not the joint cut's lottery alone. The snap sliver is
cited with the 0.5 mm fit clearance it needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
The review's option (c), measured before it was built. A dovetail's notch
now takes a magnet pocket or counterbore from beneath that breaks into it,
unless the pocket is as deep as the notch (within 0.05 mm, where every
level pocket tried went bad) or the magnet or screw itself would reach
the other piece's tab. So the half-inch magnet on the default dovetail at
42 mm is taken 2 and 3 mm thick (cap 13.1, was 12.3), and refused 2.4 mm
thick, level with the notch, where it builds 96 bad edges.

Keys, H-clips and puzzle tabs keep refusing any pocket that breaks in.
The same middle rule let 7 of 2,519 such pockets at the default fit or
tighter go bad (0.02 to 0.14 mm in) and 8 of 1,151 at looser fits; none
of 3,699 dovetail designs into the notch did.

Every cut is now measured by the pocket's own polygon (boreReach), not
the circle through its corners, and a pocket that stops short of a cut
stops 0.01 mm short (MOUNT_SEAM): within the weld's reach a thin wall is
welded through, and 4 of 715 pockets less than 0.005 mm short went bad,
none of 1,941 from 0.005 to 0.03. Under a dovetail's notch that leaves a
few hundredths of refused sizes below the cap (`gaps`); the field says so.

Checks says which refusal it is: as deep as the notch, the magnet
touching the tabs, too near the notch's edge, or a hole in a key's
recess, where it adds that keys put in from above leave the floor clear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…sliver

Seven plate-audit rows, each with the reason mountLimits has to give:
12.7 x 2 and 12.7 x 3 on the page's design at 42 mm taken and
watertight; 12.7 x 2.4 refused as level (96 bad edges if built); 13.2 x 2
refused only because the magnet would touch the tab (builds clean); at
36 mm 5.6 x 2 refused as too near the notch's edge and 5.7 taken; and the
review's snap sliver at 36.52 mm, 0.019 mm into the recess, refused (6
bad edges if built).

plates-robustness: the default dovetail's cap is 13.1 with the tab named,
12.5 at 2.4 mm deep with the level named, the 5.6 mm gap at 36 mm, the
bowtie's message with the keys-from-above way out, and the half-inch
magnet taken with Download on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
claude added 2 commits October 9, 2026 15:01
The sizes a pocket may not stop just short of a dovetail's notch at are a
window about 0.02 mm wide, and mountLimits rounded each one out to the
tenths, as the cap is: at 36 mm on the page's design 5.51 to 5.69 and 5.71
to 5.79 mm were refused, where the windows are near 5.6 and 5.73. The field
takes hundredths, so the gaps are now rounded out to the hundredth: 5.59,
5.6, 5.73 and 5.74 are refused there, and 5.65 and 5.75 are taken and build
watertight. At 42 mm, 12.51, 12.52, 12.61 and 12.62.

The advice for a size in a gap named the sizes either side of that one gap,
and two gaps can meet at one size: at 36 mm, 5.65 said "5.7 mm or more" and
5.75 was refused next. It now names the sizes taken round the run of gaps:
"Use 11.89 mm or less, 11.92 mm, or 11.95 mm or more" at 41.49 mm. Over the
page's design from 30 to 56 mm every 0.01, at three clearances, two gaps
meet in 298 of 7,546 fields with gaps, against 2,727 of 7,498 rounded to
tenths. A
gap can start under the field's least (a 1 mm magnet at 31 mm with no
clearance said "Use 0.9 mm or less"); the advice keeps inside the field's
range: "Use 1.01 mm, or 1.04 mm or more".

A notch's ceiling is 2.2 + 0.2, 2.4000000000000004 as summed, so a pocket
2.35 mm deep was taken and one 2.45 mm deep was called level. The ceiling
is kept to the micron and the distance measured to the micron, so both are
taken; 12.7 x 2.45 at 42 mm builds watertight.

The hint for a key put in from beneath now says what it buys: keys housed
inside the walls and put in from above keep out of the solid floor under
these pockets.

The audit takes 12.7 x 2.45 at 42 mm and 5.65 at 36 mm, both refused
before; the page refuses 5.6 at 36 mm with the new sizes, and the two new
advice cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
@Oliver-Johnson
Oliver-Johnson merged commit f319c83 into main Oct 9, 2026
3 checks passed
@Oliver-Johnson
Oliver-Johnson deleted the claude/pocket-joint-housing branch October 9, 2026 16:06
Oliver-Johnson pushed a commit that referenced this pull request Oct 9, 2026
… a screw is measured against the bore as it is now cut

Main measures every pocket against a joint's cut by its own polygon, through a BORE
table in mountLimits; that table now reads MOUNT_BORE, so a screw's counterbore and
shank are measured with their flats on the size, as they are cut. The magnet's pocket
is main's. The robustness case for a snap clip's screw head at 42 mm keeps this
branch's 7.6 mm (main's measure gave 7.8 with the corners on the size), and the
no-room case keeps 34.5 mm, where the dovetail's tabs now hold the head to 4.7. sw.js
is this branch's, and the pages are rebuilt from the merged sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Oliver-Johnson pushed a commit that referenced this pull request Oct 9, 2026
mountLimits measures a corner boss's pockets against the joint's cuts with
#69's bores, gaps and reasons, a pocket from above measured from the boss's
top. The page names a boss for what stops a pocket, and leaves out the hint
about keys put in from above with corner pockets. Both sets of page cases
kept, with #69's figure for the 20 mm magnet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Oliver-Johnson pushed a commit that referenced this pull request Oct 9, 2026
Only sw.js conflicted, on its VERSION line: taken from main and rebuilt
with node build.js, which regenerated both pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XjNf7SQF9o4ZVeWiSbWQmk
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.

Baseplates: magnet pockets can meet a floor-housed joint and leave bad edges

2 participants