fix(editor): improve duct routing and parametric controls - #862
fix(editor): improve duct routing and parametric controls#862sudhir9297 wants to merge 52 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
# Conflicts: # packages/editor/src/components/editor/handles/handle-arrow.tsx # packages/editor/src/components/editor/index.tsx
- Keep larger duct profiles clear of wall faces - Lock runs to their starting wall surface - Remove automatic end caps with deleted runs
- Support default-expanded inspector groups and grid action buttons - Fix switch styling in the editor - Disable incompatible React Scan bootstrap loading
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 3c5ee842-fe04-498b-b876-c397431a6467 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ab2d983. Configure here.
| : null | ||
| : hasSurface | ||
| ? { point: hit.point, frame: hit.frame } | ||
| : null |
There was a problem hiding this comment.
Unlocked runs stick to hovered walls
Medium Severity
The old leave-wall fallback that switched an unlocked run back to a horizontal plane through the start point was removed, and lockedWallTargetRef is only set on the first click of a new draft. Floor-started runs and continuation seeds therefore keep the last hovered wall as the working plane once the cursor leaves that mesh, so the preview stays stuck on that wall instead of routing freely at the start elevation.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ab2d983. Configure here.


What does this PR do?
Rectangular and oval duct wall clearance
Keep a run on its starting wall
Automatic endcap cleanup
Parametric inspector controls
How to test
Run the editor with
bun run dev.Draw round, rectangular, and oval duct runs against a wall.
Delete a duct or pipe with an automatic endcap.
Open a parametric inspector with multiple groups and actions.
Run
bun run checks.Focused node tests: 27 passed.
Screenshots / screen recording
Not added yet.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Changes MEP run drafting, wall attachment math, and delete cascades in core node tools—user-visible geometry and scene mutations, though covered by new tests.
Overview
Improves duct/pipe drafting against walls and cleans up deletion and inspector behavior.
Routing & clearance: Rectangular and oval ducts now offset from walls using the largest profile dimension (plus a small non-round wall standoff) via shared
ductSurfaceClearanceM, used for cursor clearance and wall attachments. Runs that start on a wall stay locked to that host/face for the rest of the draft instead of jumping to another surface when the cursor crosses the room.Scene graph: Deleting a duct or pipe cascade-deletes automatic run end caps (metadata-owned) while manual end caps are left alone;
findAutomaticRunEndCapIdsdrives this.Editor UI: Parametric inspector groups can set
defaultExpandedonParamGroup; parametric Actions use a two-column grid when actions are present. Switch checked/unchecked styling moves to global CSS (.pascal-switch) after stripping Tailwinddata-[state]classes. React Scan is removed fromClientBootstrap(webpack ESM/CJS issue); dev diagnostics still gate Agentation in layout. Minor scene-load effect cleanup (drops unusedvoid sceneLoadAttempt).Tests cover clearance, wall-surface matching, end-cap discovery, and delete behavior.
Reviewed by Cursor Bugbot for commit ab2d983. Bugbot is set up for automated code reviews on this repo. Configure here.