Commit Graph

2 Commits

Author SHA1 Message Date
rob 12e4bbab88 Fix miter preview/highlight: show the cut-off wedge, not a tenon box
The cyan (select) / red (edit) overlay for a miter fell through to the
tenon/mortise box branch, so it looked like a 1" pocket at the end instead of an
angled cut.

- viewer._miter_wedge_mesh: build board ∩ cutter (the piece the miter removes),
  placed in world space, and return that as the preview/highlight mesh; falls
  back to highlighting the end face when the angle is 0.
- factored tessellation into _solid_to_polydata; miter excluded from the
  normal-axis spin step.
- test: the miter preview is a wedge reaching the board end, not a centre box.
238 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 00:21:47 -03:00
rob b284b58229 Add angled end cuts: miter + bevel
A new 'miter' feature angles a board's end — miter across the width (frame
corners, braces), bevel through the thickness (tilted blade), or both
(compound). Slots into the existing Feature system.

- scene: Feature.miter_deg/bevel_deg; END_KINDS={"miter"}; add_feature forces an
  end face and defaults to 45° miter; serialization additive.
- geometry._apply_miter: subtracts a large block rotated about the end (Z=miter,
  Y=bevel) so the viewer/export show the real angled end; guarded.
- cut list notes "miter 45° / bevel 15°"; instructions describe the angled end;
  jigs suggest a miter sled/gauge for ≥3 repeated angle settings.
- cli feature --miter/--bevel; controller wood-feature passthrough; gen_wood_tools
  wood-feature gains --miter/--bevel (re-run it for the voice tools).
- GUI Joinery tab: "+ Miter" button + Miter/Bevel angle fields (live edit/apply).
- tests: default 45°, end-face forcing, JSON roundtrip, cut-list note,
  instructions, jig suggestion, and real geometry (volume reduced). 237 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 00:12:48 -03:00