Skip to content

fix: lower cutout resize minimum from 10mm to 1mm#132

Merged
jasonmadigan merged 1 commit into
mainfrom
114-cutout-min-size
Jul 7, 2026
Merged

fix: lower cutout resize minimum from 10mm to 1mm#132
jasonmadigan merged 1 commit into
mainfrom
114-cutout-min-size

Conversation

@jasonmadigan

Copy link
Copy Markdown
Collaborator

Summary

  • Rectangle cutout drag-resize was floored at 10mm per dimension (radius 5mm for circle/square), an arbitrary default carried from the initial release with no geometric justification. The reporter wanted a 25x5mm slot.
  • New floor is 1mm per dimension (0.5mm radius): the practical FDM printing floor. Backend verified safe down to 1x1mm: cutters are plain solids, fillet radii self-clamp, clearance buffers only apply to traced polygon outlines.
  • Resize maths extracted from the component into pure helpers (resizeRectCutout, resizeRoundCutout) with unit tests, including a mutation-guard against the floor regressing.

Test evidence

  • Frontend vitest: 90/90, 10 new tests (25x5mm allowed, sub-floor clamps, rotation-local dims, midpoint centring, radius floor regression guard). New tests verified red before the fix.
  • Backend pytest: 235/235, 6 new tests: 1x1mm and 25x5mm cutters produce valid geometry with correct extents; full generate_bin for the reporter's exact 25x5mm case yields a valid STL that removes material.
  • make lint: 0 errors.

Closes #114

rectangle cutout drag resize was floored at 10mm per axis (circle/square
at 5mm radius), an arbitrary initial-release default. backend geometry
holds at any positive size: plain cube cutter, self-clamping fillet
radius, outward-only chamfer, clearance buffers polygon outlines only.

extract the pinned-corner resize maths into resizeRectCutout() so the
floor is unit-testable, and add backend regression tests proving 25x5mm
and 1x1mm rectangle and filleted-rectangle cutouts generate valid STLs.

Signed-off-by: Jason Madigan <[email protected]>
@jasonmadigan
jasonmadigan marked this pull request as ready for review July 7, 2026 07:01
@jasonmadigan
jasonmadigan merged commit 765c6f8 into main Jul 7, 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.

Can't resize cut out rectangle less than 10mm

1 participant