Skip to content

Build puzzle plates watertight where four pieces meet at 0.35 mm, and keep corner pockets out of a key's cup - #82

Merged
Oliver-Johnson merged 9 commits into
mainfrom
claude/puzzle-corner-key-cup
Oct 10, 2026
Merged

Oliver-Johnson merged 9 commits into
mainfrom
claude/puzzle-corner-key-cup

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 #72
Closes #75

#72: puzzle tabs at a 0.35 mm fit, where four pieces meet

  • Before: at 0.35 mm (and 0.349), two of the pieces round a four-way corner each had one edge used four times, at every pitch from 31.6 to 52.2 mm, with Download on. The same happened at 0.608 and 0.609 with the tight tolerance, 0.843 and 0.844 with a 1 mm rim cutoff, and 0.102, 0.103 and 0.279 to 0.281 with a 0.1 rim cutoff.
  • After: those plates are watertight. A plate without mounting pockets that was watertight on main is built byte for byte as before. A puzzle plate with mounting pockets at these clearances can come out with other bytes even where main's was watertight: on main a later pass (settle) cleared the shared edge by cutting the pockets again, and the nudge now gets there first. Every such plate is still watertight, and none is worse.
  • How: the BSP carried the plane of a socket wall's facet at the cell's corner across the cell. It cut the notch lobe's face 0.3 microns from where the next cell's region ends, so the two shells shared that edge, and the touch retries only reorder the cut. A jointed cell that still shares an edge after those retries now has its joint cut again with the cutters moved one NUDGE along each diagonal in turn, and the first clean result is kept.
    • Sweeps covered 2,580 designs (11 pitches, 5 layouts including four-way corners and half cells, the predicted clearances and 600 random designs).
    • 408 were bad on main; 0 are bad now, and none got worse.
    • Only those 408 changed bytes.
    • With mounting pockets (1,008 designs at the same clearances and at 0.3, with magnets from both sides and screws, on solid floors and corner pockets): 342 were bad on main and 0 are now; 640 change bytes, 298 of them watertight on main and still watertight; none is worse; nothing at 0.3 changes. Across 400 random designs with pockets: 4 bad on main, 2 now (the 2 left keep main's bytes), 2 change bytes, none worse.

#75: a wall key put in from above, beside a corner boss's pocket

  • Before: with corner pockets, the cup a wall bowtie, wall puzzle key, H-clip or wall snap drops into from above was built after the pockets and stood in any it reached. The 36.13 mm bowtie plate lost 1.31 mm³ in the four 6 mm magnet pockets beside the seam, and a 7.9 mm magnet 1.45 mm deep there, level with the cup's cavity floor, left 13 edges open a piece, both with Download on.
  • After: Checks refuses the size that would meet the cup and names the keys ("a hole has to stay out of the housings the bowtie keys drop into from above; put in from beneath, the bowtie keys leave more room"), the field's max drops, and Download is off. At 36.13 mm the magnet's cap falls from 7.9 to 5, and at 39.46 mm from 9.3 to 8.1. Keys put in from beneath keep their caps (6.1 at 36.13 mm). The pointer to keys from beneath is not given for the snap clip, whose recess from beneath leaves less room.
  • How: mountLimits counts the cup as one more cut (reason 'housing'): its outline from its underside up. keySiteOps also returns that outline (footprint) and the underside (bottom); the geometry is unchanged. A pocket from beneath clears the cup by stopping MOUNT_LEVEL under it; a pocket from above or a shank meets any cup it reaches; MOUNT_SEAM applies as for the other cuts.
    • Out of 17,820 designs, limits change in 1,280, all with corner pockets and a key from above. Nothing on a solid floor changes, and no size taken meets a cup.
    • 224 designs (784 pieces) across 14 joints build the same bytes as main.
  • H-clip and wall snap: they lose sizes too (H-clip 7.9 to 6.8 at 36.13 mm, 4.8 to 2.3 at 33 mm). Where their cups reach a pocket, the pocket has no less room than with no joint, because the socket rim's corner already stands there (Baseplates: at small pitches the socket's rim stands inside the corner pockets, so a magnet can't seat #83). But the cup's cavity can still leave the plate open: an H-clip from above at 34 mm took a 4 mm magnet from above on main with 4 open edges and Download on. It is refused at 3.8 now, and it is an audit row. So the cap is held off every cup alike.

Left for later, on main too: the socket's rim stands in a big corner pocket at small pitches with no joint (about 1.9 mm³ in a 6 mm pocket at 36.13 mm). Filed as #83.

New top-level names: none (checked against main f9873f5 and #81). #81 also adds a field to the same jointCuts.push line in core.js, so whichever merges second resolves it as jointCuts.push({ top: ceiling, bottom, segs, sites }); a trial merge with #81's current head 02a78f3 builds and passes the full plate audit.

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 plates-input, plates-robustness, export, keys and half-cells, 172 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 has picked up bad edges that were not already named as known
  • I added a case covering the new shape: puzzle 42 quads, 0.35 (fails on main, A2 and B2 one edge each); eight rows on the corner pockets beside a key put in from above: six measure each pocket's open room (five fail on main; the 42 mm control is taken on both), and two require the plate closed at the size taken (both fail on main, with 4 and 26 open edges); and two page tests for the refusal (both fail on main)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY

claude added 5 commits October 9, 2026 21:33
…m fit clearance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…ve, 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
… edits, so the two merge cleanly

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
… and the docs say the rule keeps them closed

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…s put in from beneath

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 88fef25 into main Oct 10, 2026
3 checks passed
@Oliver-Johnson
Oliver-Johnson deleted the claude/puzzle-corner-key-cup branch October 10, 2026 01:08
Oliver-Johnson pushed a commit that referenced this pull request Oct 10, 2026
#82 adds the housing of a key put in from above to the joint cuts mountLimits
measures (its bottom), and this branch adds the cut's outline (segs) for the
turned shank's reach; both fields are kept on the one jointCuts.push line.
sw.js and the pages rebuilt.

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; taken from main and rebuilt.

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

2 participants