Skip to content

Add intersection magnets for mounting the plate on metal surfaces - #69

Merged
yawkat merged 10 commits into
mainfrom
claude/gridflock-issue-68-6b59fe
Oct 1, 2026
Merged

yawkat merged 10 commits into
mainfrom
claude/gridflock-issue-68-6b59fe

Conversation

@yawkat

@yawkat yawkat commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Closes #68.

Adds magnet pockets on the underside of the plate at cell intersections, so the plate can be held in place on a metal surface such as a steel drawer. This is independent of the existing bin magnets.

Design

Magnets reuse the vertical screw machinery. A new vertical_screw_style option switches the intersection holes between Screw (the default, unchanged) and Magnet. The location toggles and insets are shared. The editor tab is relabelled "Intersection Holes", and the README chapter is renamed to match, with anchors kept for #vertical-screws and #screw-locations. Parameter names are unchanged, so existing configs keep working.

New options (magnet style)

  • vertical_screw_magnet_diameter / vertical_screw_magnet_height: pocket size. Defaults to 6.1 × 2.1 mm, for 6×2 magnets.
  • vertical_screw_magnet_floor: floor below the pocket.
    • 0: open at the bottom. Glue or press-fit the magnets from below.
    • > 0: enclosed pocket. Insert the magnets during a print pause.
    • > 0 with floor + height above the plate height (e.g. height 10): the pocket runs through the plate and the magnets go in from the top after printing. The hole cuts slightly into the corners of the bin profile.
  • vertical_screw_magnet_release_diameter (default 1.5, 0 disables): a small through-hole at each pocket for pushing the magnet out with a needle. At 1.5 mm it fits inside the material at the top of the intersection without touching the bin profile.

Magnets follow exactly the same location rules as screws, including the edge locations if the user enables them. The segment module is untouched: only vertical_screw() switches on the style.

Implementation notes

  • No asserts: following the rest of the generator, oversized pockets are not prevented.
  • Verified by volume: in the default, bin-magnet and embedded-floor configs, the material removed exactly equals the pocket cylinders, so the pockets are fully enclosed.

Docs

  • README: new "Intersection magnets" subsection with dimensions, floor and release-hole sections, and 3 generated images. The table of contents is updated.
  • editor.toml: the style option, the magnet parameters with display conditions. vertical_screw_style is also added to umami-track-export; drop that if you don't want it tracked.

🤖 Generated with Claude Code

yawkat and others added 5 commits October 1, 2026 19:08
Glue-in magnet pockets on the underside of the plate at cell
intersections. Placement reuses the vertical screw intersection
classification (plate corners, segment corners, other); edge
intersections are excluded since they lie on the plate edge or a
connector. The pocket size is checked against the material available
at the intersection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A floor below the pocket keeps the magnets in the plate. The magnets can
be embedded with a print pause, or, if the pocket height exceeds the
plate height, inserted from the top through a hole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the bin magnets and click latch next to each other, and puts the
niche bottom magnets option with the other plate mounting options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plate corners are classified before segment edges, so a plate corner on
a segment edge (e.g. with one-column segments) got a pocket that cut
through the intersection puzzle connector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🚀 Preview deployed to https://c7efea7e.gridflock-yawk-at.pages.dev

Instead of a separate section with duplicated location settings, the
vertical screw section (now labelled "Intersection Holes") gets a
vertical_screw_style option to switch between screw holes and magnet
pockets. Parameter names stay the same, so existing configs keep
working. Edge locations are ignored for magnets.

Also adds vertical_screw_magnet_release_diameter, a small hole through
the plate at each magnet pocket for pushing the magnet out with a
needle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat yawkat changed the title Add bottom magnets for mounting the plate on metal surfaces Add intersection magnets for mounting the plate on metal surfaces Oct 1, 2026
yawkat and others added 4 commits October 1, 2026 19:31
Drop the classification refactor and the special segment edge
exclusion. Magnets now follow exactly the same location rules as
screws, including edges if the user enables them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the pocket fit assert, the hollow mode assert and editor warning,
and the open-top special case (a pocket taller than the plate simply
cuts through the top).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat
yawkat merged commit 9788b3c into main Oct 1, 2026
1 check passed
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.

Option for bottom magnets (e.g. for a metal drawer)

1 participant