refactor: release-review cleanup for roof wall openings
Dual review pass (Claude multi-angle + Codex release-quality). One correctness fix and the agreed do-now cleanups: - fix: clone-scene-graph remaps roofSegmentId like wallId in both clone paths — duplicated scenes/levels kept pointing roof-hosted children at the original segments. - extract the settled, stateless roof target/cursor math shared by the four door/window tools into shared/roof-wall-opening-placement.ts (resolveRoofWallOpeningTarget + getRoofWallOpeningCursorPose + worldToSelectedBuildingLocal); tools keep the stateful lifecycle (drafts, undo/temporal, commit field lists). −199 net lines. - rename host-generic state: currentWallId→currentHostId, markWallDirty→markHostDirty (they hold segment ids too); capability cascadesViaHostSegment→dirtyHandledByOwnSystem (behavior-facing, before the public API hardens). - drop getRoofAccessoryKinds from core's public API — its only caller was the standalone Build tab, which now enumerates the registry inline with its app-specific filter. - window move-tool uses the shared stripPlacementMetadataFlags; stale "segment-local" comment fixed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
b8dfa90762
commit
aa3b0ef758
@@ -160,14 +160,14 @@ export const doorDefinition: NodeDefinition<typeof DoorNode> = {
|
||||
wallOpeningPlacement: true,
|
||||
// Doors also host on roof-segment wall faces (base walls under the
|
||||
// roof, gable ends). `buildCut` punches the opening into the
|
||||
// segment's wall brush; `cascadesViaHostSegment` keeps the roof-merge
|
||||
// segment's wall brush; `dirtyHandledByOwnSystem` keeps the roof-merge
|
||||
// loop from consuming door dirty marks (DoorSystem owns them and
|
||||
// already cascades to the host via parentId).
|
||||
roofAccessory: {
|
||||
buildCut: (node, hostSegment) =>
|
||||
buildRoofWallOpeningCut(node as DoorNodeType, hostSegment as RoofSegmentNode),
|
||||
cutScope: 'wall',
|
||||
cascadesViaHostSegment: true,
|
||||
dirtyHandledByOwnSystem: true,
|
||||
},
|
||||
// `wallId` / `roofSegmentId` tie the door to its host and are
|
||||
// re-derived from the surface under the cursor when a preset is
|
||||
|
||||
Reference in New Issue
Block a user