nodes: improve modular cabinet constraints and finishes - #719
nodes: improve modular cabinet constraints and finishes#719sudhir9297 wants to merge 42 commits into
Conversation
Items (e.g. solar panels) can now be placed on sloped roof surfaces. The placement system computes euler rotation from the roof surface normal so items sit flush on the slope instead of going inside. - Add roofStrategy to placement-strategies with enter/move/click/leave - Wire roof:enter/move/click/leave events in the placement coordinator - Add calculateRoofRotation in placement-math using surface normals - Support full 3D cursor rotation for sloped surfaces - Items on roofs are parented to the level with world-space rotation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… github.com:pascalorg/editor
… github.com:pascalorg/editor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 85476a4. Configure here.
| (node.showPlinth ? node.plinthHeight : 0) + | ||
| node.carcassHeight + | ||
| (node.withCountertop ? node.countertopThickness : 0) | ||
| return Math.max(0.05, ceilingHeight - currentTop) |
There was a problem hiding this comment.
Fill to ceiling overshoots
Medium Severity
cabinetCeilingGap always returns at least 0.05, even when the module already reaches or exceeds the ceiling. Fill to ceiling then sets topFinishHeight to that floor, so the top finish can poke through the ceiling instead of becoming a zero or near-zero closure.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 85476a4. Configure here.
| return stack.length > 0 && stack.every((compartment) => isHoodCompartmentType(compartment.type)) | ||
| } | ||
|
|
||
| function cabinetModuleHeightHandleVisible( |
There was a problem hiding this comment.
Height handle under finish
Low Severity
The new module height handle is placed with cabinetTotalHeight, which excludes topFinishHeight, while local bounds now include the top finish. With Top Cabinet or Trim active, the Y handle sits inside the finish volume instead of above the full composition.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 85476a4. Configure here.
|
|
||
| const stack = stackForCabinet(node) | ||
| const planningRun = node.type === 'cabinet' ? node : parentRun | ||
| const planningReport = planningRun ? validateCabinetRun(planningRun, modules) : null |
There was a problem hiding this comment.
Wall top finish unchecked
Low Severity
Planning checks run validateCabinetRun only on the parent run’s direct modules. Nested wall cabinets—the modules that commonly use Top / Ceiling—are omitted, and selecting a wall child clears parentRun, so top-cabinet-too-short never surfaces for them.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 85476a4. Configure here.


What does this PR do?
How to test
bun dev, open the editor, and create a straight modular base-cabinet run with perpendicular walls constraining both ends.bun test packages/nodes/src/cabinet,bun run check-types,bun run check, andbun run build.Screenshots / screen recording
To be added — this is a visual and interactive cabinet-layout change.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Touches core cabinet layout reflow and schema defaults, so existing scenes and corner/L runs could resize differently; behavior is heavily tested but still user-visible geometry logic.
Overview
Adds research notes on modular kitchen sizing and ceiling-gap treatment, and implements the first slice of that model in Pascal cabinets.
Product model & defaults: Cabinet modules gain
topFinish(none/top-cabinet/trim) with independent height and depth, rendered as stacked storage or a solid soffit and included in bounds. Shared metric 600 mm family defaults (CABINET_METRIC_DEFAULTS) replace the old 0.5 m depth baseline; dimension profiles, standard widths, and reveal gap presets feed the side panel. Refrigerator presets/stacks no longer add a drawer filler above the appliance—the carcass height follows the fridge column.Layout & editing: Run reflow when applying wider presets or widths is reworked around perpendicular wall constraints (slack, growth detection, eligible donors). L-shaped corner runs keep constraints on the source straight run; derived legs are not mistaken for end walls. Failed reflow surfaces a clear “no space” notice instead of silently shrinking neighbors. Tall/wall modules get a height resize handle; front-style changes propagate to nested wall/top modules.
UI & checks: Module/run panels add Top / Ceiling (including fill-to-ceiling via
cabinetCeilingGap), planning warnings/errors fromvalidateCabinetRun, and run-level reveal sync. Corner fillers can use top finishes without preset conversion.Extensive new tests cover reflow (straight, L, nested, two-wall), top-finish geometry, and sizing helpers.
Reviewed by Cursor Bugbot for commit 85476a4. Bugbot is set up for automated code reviews on this repo. Configure here.