feat(nodes): mode-aware roof-segment edit + 2D rotation parity with 3D

Roof-segment edit/move ignored the active snap mode and showed no chip:
- add snapProfile:'structural' so a body-move resolves the no-angle polygon
  context (grid/lines/off) like every other structural move;
- resize uses getSegmentGridStep() (0 outside grid mode = the "smooth" resize
  that used to need a held Shift), dropping the captured gridSnapStep + Shift;
- move drops its Shift bypass;
- the affordance dispatcher opens a boundary reshape scope for the resize so
  the snapping chip shows and the context resolves.

2D rotation handles now match the 3D gizmo across all six rotate affordances
(column / elevator / roof-segment / shelf / spawn / stair): a shared
rotateAffordanceDelta snaps to the 15° step unless Shift (free), the
dispatcher opens the same ROTATE_HANDLE_DRAG_LABEL handle-drag scope the 3D
gizmo uses so the contextual HUD shows the "Shift = rotate freely" hint, and
the live degree readout snaps to match the committed rotation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-06-25 16:12:26 -04:00
co-authored by Claude Opus 4.8
parent 7512fccdaf
commit 84cdf4519d
9 changed files with 116 additions and 40 deletions
@@ -267,6 +267,11 @@ export const roofSegmentDefinition: NodeDefinition<typeof RoofSegmentNode> = {
schema: RoofSegmentNode,
category: 'structure',
surfaceRole: 'roof',
// Mirrors the parent roof: a body-move resolves the no-angle `polygon`
// snap context (grid / lines / off), so dragging a segment shows the
// snapping chip and honours the active mode like every other structural
// move. Resize / rotate run through their own reshaping scope.
snapProfile: 'structural',
defaults: () => {
const stub = RoofSegmentNodeSchema.parse({