Repository navigation
fix: clip tool cutouts at bin interior boundary - #120
Merged
Merged
Conversation
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>
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 equivalenttest_interior_clip_rect.py: lip-wider-than-wall, no-lip, and thick-wall-overrides-lip casesTest evidence