Skip to content

fix: place finger recesses on the sunk part of the figure (OPE-9) - #15

Merged
Rigare merged 1 commit into
mainfrom
fix/ope-9-recesses-sunk-silhouette
Nov 14, 2026
Merged

Rigare merged 1 commit into
mainfrom
fix/ope-9-recesses-sunk-silhouette

Conversation

@Rigare

@Rigare Rigare commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Problem

_recess_pair took the figure's silhouette over all Z layers. With a T/mushroom figure (4×20×25 mm stem, 40×20×5 mm head, depth 0.7, pitch 0.5, default radius 8), only the stem is sunk, but the recesses followed the 40 mm head. The finished STL had three separate pockets: the cavity plus two finger holes that do not touch it. The wall check was still green.

Change

  • _recess_pair(..., top_z) now measures silhouette and grip length only on vertices below the box's top face. build_inlay passes top_z = -offset_z, so a figure raised by its own Z offset is measured on what actually stays sunk.
  • If no vertex is below the top face (figure raised entirely out of the box), it falls back to the whole figure; the wall check already reports no_cavity for that case.

Measured on the finished STL (geometry_probe.cavities)

Axis finger_recess_z_offset Before After
x 0 3 pockets 1
x 4 3 pockets 1
y 0 / 4 1 1

Tests

  • test_recesses_join_the_cavity_under_an_overhanging_head[0.0, 4.0]: T figure, default radius, one pocket.
  • test_recesses_follow_the_sunk_part_after_a_z_offset: cone raised by an individual Z offset until only its narrow part is sunk.
  • All three cases fail on the old code. The docstring says explicitly that this is not a rule that every figure must leave exactly one pocket (models made of separate parts may leave several).
  • Full suite: 577 passed (Python 3.13). Docker was not available locally, so the container check runs only in CI.

README and AGENTS.md updated. No release.

🤖 Generated with Claude Code

_recess_pair measured the silhouette over every Z layer, so a wide head
standing out above the box pulled the recesses off a narrow sunk stem:
a T figure left three separate pockets with a green wall check. The
silhouette and the grip length now come from the vertices below the top
face, after the figure's own Z offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rigare
Rigare merged commit 3e2431c into main Nov 14, 2026
2 checks 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.

1 participant