8000 fix: clip tool cutouts at bin interior boundary by jasonmadigan · Pull Request #120 · tracefinity/tracefinity · GitHub
[go: up one dir, main page]

Skip to content

fix: clip tool cutouts at bin interior boundary - #120

Merged
jasonmadigan merged 2 commits into
mainfrom
118-clip-tool-cutouts-at-bin-boundary
Jun 27, 2026
Merged

jasonmadigan merged 2 commits into
mainfrom
118-clip-tool-cutouts-at-bin-boundary

Conversation

@jasonmadigan
Copy link
Copy Markdown
Collaborator

Summary

Tool polygons that extend beyond the bin boundary were punching through the walls, leaving holes in the STL. This clips all tool polygons against the bin interior rectangle before subtraction.

The clip boundary uses max(wall_thickness, LIP_D0 + LIP_D2) when a stacking lip is present, since the lip tapers inward further than the wall thickness alone.

Closes #118

Changes

  • stl_generator_manifold.py: added _clip_to_interior() and _interior_clip_rect() helpers, applied clipping in both _make_polygon_cutouts() and _make_chamfer_cutouts()
  • test_overflow_clip.py: overflow polygon produces same volume as manually-clipped equivalent
  • test_interior_clip_rect.py: lip-wider-than-wall, no-lip, and thick-wall-overrides-lip cases

Test evidence

  • 189/189 tests pass
  • Verified visually: oversized tools no longer breach walls or stacking lip

Tool polygons that extend beyond the bin are now intersected against the
bin interior rectangle before subtraction. The clip boundary accounts for
wall_thickness and, when a stacking lip is present, the lip's inward
taper (LIP_D0 + LIP_D2 = 2.6mm) -- whichever is wider.

Fixes #118

Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
@jasonmadigan
jasonmadigan merged commit 2d76903 into main Jun 27, 2026
3 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.

Clip tool cutouts at bin boundary instead of punching through walls

1 participant

0