Add filleted rectangle cutouts#54
Conversation
|
Update after conflict-reduction pass:
Validation for this follow-up:
Pairwise merge status after this update:
|
jasonmadigan
left a comment
There was a problem hiding this comment.
changes requested
blockers
SVG/STL fillet radius mismatch -- CutoutOverlay.tsx computes filletR = Math.min(w/3, h/2) where h is rectangle height. Backend _filleted_rect_radius computes min(width/3, pocket_depth/2) where the second term is pocket depth (Z-axis). The preview won't match the printed shape whenever pocket_depth != height.
profile winding direction unverified -- _rounded_bottom_rect_profile_pts docstring says "CCW x/z profile" but the point order appears clockwise. manifold3d CrossSection requires CCW. Tests pass (manifold3d may auto-correct), but should use _ensure_ccw() like elsewhere in the file rather than relying on implicit behaviour.
should fix
z_margin bleed in Y -- _make_filleted_rectangle_cutter applies z_margin to the Y-dimension length (length = h + z_margin * 2). The cutter overshoots 0.005mm per side in Y. Fix: length = h.
test coverage gaps -- zero fillet radius, fillet = half width, negative dimensions, rotation, and the profile point positions are all untested.
nits
cutoutShapeLabelswitch could be aRecord<CutoutShape, string>for exhaustiveness checking- duplicated ternary chains for
isCutoutMode/cutoutModeIcon/cutoutModeLabelin ToolEditor (existing tech debt made slightly worse)
overall solid contribution -- the schema change is backward compatible, the CutoutShape type extraction is clean, and the chamfer grouping is correct. The preview mismatch is the main concern.
|
Updated PR #54 to address the requested changes. Changes made:
Validation:
That covers the blockers, should-fix items, and the |
…uts-tools # Conflicts: # frontend/src/components/BinEditorToolbar.tsx
|
thanks @noobydp! |
Summary
filleted_rectangleas a supported cutout shape across backend schema, frontend types, and the tool editor cutout menu.min(width / 3, cutout_depth / 2).Testing
python -m py_compile backend\app\services\stl_generator_manifold.py backend\tests\test_cylinder_shape.pyPYTHONPATH="$env:TEMP\codex-manifold3d-inspect;D:\Development\tracefinity-cylinder-cutouts\backend" python -m pytest backend\tests\test_cylinder_shape.py -qnpx tsc --noEmitnpm run buildhttp://localhost:4002/with no build-error overlay or console errors.Disclaimer
Code and PR drafted with Codex