Skip to content

Open corner pockets all the way at small pitches, with the socket's rim cut out of them - #84

Merged
Oliver-Johnson merged 8 commits into
mainfrom
claude/corner-pocket-rim
Oct 10, 2026
Merged

Oliver-Johnson merged 8 commits into
mainfrom
claude/corner-pocket-rim

Conversation

@Oliver-Johnson

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

Copy link
Copy Markdown
Owner

Requested by Oliver · project thread

What this changes

Closes #83.

Before. With corner pockets, a cell is only its socket's rim, and the pockets sit 13 mm from the cell's centre at every pitch. So at small pitches they run in under the rim. Each pocket was cut from its corner boss only, and the rim stood inside it. On a 34.5 mm plate a 6 mm magnet pocket had 14.7 mm³ of rim in it, in 41% of its area, and the magnet could not seat. At 36.13 mm a 7.9 mm pocket had 20.2 mm³. The default screw's counterbore at 34.5 mm had 13.2 mm³. A 6 mm magnet put in from above at 36.13 mm, or a 4.5 mm screw hole at 34.5, had the rim over it. All of these were taken with Download on. A solid floor's pockets were clear.

After. Every corner pocket is open all the way through, as a solid floor's is. A magnet put in from above, or a screw hole, that would meet the rim over its boss is refused at the field: its max is lowered, Checks says "a magnet put in from above has to clear the socket's rim over its corner boss" (or "a screw has to ..."), and Download is off. This costs those two caps about 2.5 mm from 34 to 38 mm. For example, a magnet from above at 34.5 mm goes from 6.3 to 3.8 mm and a screw hole from 6.5 to 4; the default 6 mm magnet from above is refused from 34.2 to 36.66 mm. A magnet from beneath and a screw's head keep their caps, and the default screw is not newly refused anywhere. Plates whose pockets the rim doesn't reach are built byte for byte as before: every plate without corner pockets, and corner pockets from 40.4 mm up (40.5 at tight tolerance). From 40 to 40.38 mm the rim still reaches the largest pockets from beneath (at 40 mm a magnet of 8.1 to 8.7 mm or a screw head of 8.3 to 9, at 40.38 an 8.4 mm magnet only), and those are opened as below 40.

How.

  • buildPiece: where a boss's pocket runs more than MOUNT_SEAM into its cell's rim, the rim is cut away under that corner's boss in every whole cell. The cut is a box from under the bed to just under the boss's top, two BLOATs in from the cell's edges and the boss's inner sides, and the boss stands round and over it, so the plate's solid is unchanged except for the pocket. A box rather than the pocket's own shape, because the pocket's shape split the rim on the boss's lines at the piece's edge and added four-use edges (108 to 118 at 34.5 mm); the box's bad-edge counts there equal main's. Its top sits midway in the widest gap between the planes it could meet.
  • Build time: the cut is one more BSP subtraction a whole cell where it applies. The review timed a warm 6 × 6 piece: at 34.5 mm with magnets 456 to 992 ms here against main's 314 to 447, at 36.13 mm with screws 769 to 1,098 against 582 to 755, and 42 mm unchanged. It is not optimised in this PR.
  • mountLimits gains rim: over the boss the rim is the socket's wall, the one a bin seats against, so a hole that opens on the boss's top is held MOUNT_SEAM clear of it, as a solid floor's hole is held to its socket floor. Cutting the wall there instead was not tried.
  • The page names the reason (mountWhy), and ENGINE.md §5 explains both.
  • At the default fit clearance, and any fit up to 0.25 mm at every tolerance and rim cutoff, the rim now stops pockets from above before an H-clip's or snap clip's cup does, from 30 to 42 mm, so Build puzzle plates watertight where four pieces meet at 0.35 mm, and keep corner pockets out of a key's cup #82's row "H-clip at 34 mm, 4 mm magnet above" now expects a refusal for the rim, built at 3.1 with no open edge. A snap clip's fit stops at 0.3 and the rim comes first at all of them. A looser H-clip fit widens the cup until it comes first, and Build puzzle plates watertight where four pieces meet at 0.35 mm, and keep corner pockets out of a key's cup #82's housing rule still refuses the size there: from a fit of 0.26 at loose tolerance and rim cutoff 0.1, and from 0.42 at standard tolerance and the default cutoff. At loose tolerance, cutoff 0.1 and fit 0.3 that is a magnet from above from about 32.3 to 34 mm and a screw hole from 32.1 to 33.8: #pi=33&w=132&d=66&mm=custom&ml=0&mr=0&mf=0&mb=0&bw=82&bd=400&cn=hclip&ki=top&bm=bosses&mg=1&ms=top&md=2.1&to=loose&tc=0.1&cl=0.3 refuses at 2 for the housing, where at standard settings it refuses at 1.7 for the rim.
Pitch Magnet from above Screw hole
33 4.8 to 1.7 5 to 1.9
34.5 6.3 to 3.8 6.5 to 4
36.13 7.9 to 5.4 8.1 to 5.6
38 9.7 to 7.3 10 to 7.5
39 9.7 to 8.3 10 to 8.5
40 and up unchanged unchanged

Sweep: 1,980 corner-pocket designs (22 pitches from 30 to 42 mm including uneven ones, all ten joints the page offers with corner pockets, half cells and margins, magnets from both sides at several depths, screws), each at the default size, main's cap and this cap: 5,439 records, 3,200 built. No open edge and no solid in any pocket, where main had rim in the pockets of 1,831 of them; folds were counted on the 535 builds this round added, and the review's 1,890 builds, and none has one. Bad edges are equal to main's or fewer (479 builds have fewer and 2,689 the same; 4,577 fewer edges net), except in a few designs with a puzzle key in the walls put in from above, which the first sweep left out: there edges used four times on the key cup's cavity floor at z = 1.45, which the rim's shell and the boss both carry, move as the box shifts the BSP's splits, +1 to +3 a piece in 32 of that joint's 260 builds (87 have fewer, 141 the same; 1,362 fewer over the 260). The review's random designs found 3 such of 38, +1 to +8 a piece, with 523 fewer over all 38: #pi=34.48&w=120.68&d=86.2&mm=custom&ml=0&mr=0&mf=0&mb=0&bw=84.96&bd=400&cn=puzzlekey&km=wall&ki=top&bm=bosses&mg=1&md=6.2&mh=1 has A1 95 and B1 66 on main and 96 and 67 here, Download on in both. None of these has an open edge or a fold, and main has the same class of edge in these designs (37 and 34 at that floor on that page's pieces). 392 designs without corner pockets give main's limits, and the 207 that build give its bytes; 80 corner-pocket designs at 40 to 50 mm give main's limits and the 64 that build give its bytes. Bytes change only where the rim reaches a pocket's cutter, counted at the cutter's corners, so 191 builds changed where the rim stood only in the clearance outside the magnet's or screw's circle.

Left for later: #80 (open edges at the shank's mouth on a boss's top at 34.04 mm) is a different fault and is unchanged here, 24 open edges a piece on main and here.

New top-level names: none (checked against main 88fef25 and #81). With #81 at b7ffea3 the sources merge cleanly and only the generated pages need a rebuild; on that merge the plate audit exits 0 and the #83 rows pass, with the screw hole built at 3.8, so ENGINE.md's "6.5 to 4" figure would then be 0.2 mm off.

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: npm test passes (at 894b6dd: 0 FAIL, 331 ok), and the full UI suite passed 747 of 747 at e6b68eb; the review round after it changed two comments only, and the plate specs (plates-input, plates-robustness, export, keys, half-cells) passed 174 of 174 again. node test/ci-sim.js says "CI will pass."

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 has picked up bad edges that were not already named as known
  • I added a case covering the new shape: the "corner pockets under the socket's rim" rows measure every pocket's open room at 34.5 and 36.13 mm (magnets, screws, a magnet from above and a screw hole refused for the rim), with controls at 42 mm. They fail on main. Two page rows cover the new refusal.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY

…im cut out of them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…r of the socket's rim over its boss, and Checks says so

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 two merge without a conflict

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
…h stays the same when the shank's bore changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…s cup only up to a fit of 0.25 mm, and where a looser fit lets the cup come first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
@Oliver-Johnson
Oliver-Johnson merged commit 326cc48 into main Oct 10, 2026
3 checks passed
@Oliver-Johnson
Oliver-Johnson deleted the claude/corner-pocket-rim branch October 10, 2026 06:45
Oliver-Johnson pushed a commit that referenced this pull request Oct 10, 2026
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 10, 2026
Only sw.js conflicted, on its VERSION line; node build.js regenerated it
and the 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: at small pitches the socket's rim stands inside the corner pockets, so a magnet can't seat

2 participants