Skip to content

fix(editor): improve duct routing and parametric controls - #862

Merged
wass08 merged 63 commits into
pascalorg:mainfrom
sudhir9297:t3code/improve-duct-piping-wall-drawing
Sep 16, 2026
Merged

wass08 merged 63 commits into
pascalorg:mainfrom
sudhir9297:t3code/improve-duct-piping-wall-drawing

Conversation

@sudhir9297

@sudhir9297 sudhir9297 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Rectangular and oval duct wall clearance

    • Issue: Rectangular and oval ducts could be placed partly inside a wall because placement clearance used only the profile height.
    • Fixed: Placement and wall attachments now use the largest profile dimension, with a small wall standoff for non-round ducts.
  • Keep a run on its starting wall

    • Issue: Continuing a duct or pipe run could move onto another wall when the cursor crossed the room.
    • Fixed: The run stays constrained to the wall face where its first point was placed.
  • Automatic endcap cleanup

    • Issue: Deleting a duct or pipe left its automatically generated endcap behind.
    • Fixed: Deleting a run removes its automatic endcap while preserving manually placed endcaps.
  • Parametric inspector controls

    • Issue: Inspector groups and action buttons did not support the desired initial layout and grouping.
    • Fixed: Groups can specify their initial expansion state, and parametric actions use a two-column layout where appropriate.

How to test

  1. Run the editor with bun run dev.

  2. Draw round, rectangular, and oval duct runs against a wall.

    • All profiles should remain outside the wall, and continuing a run should stay on its starting wall face.
  3. Delete a duct or pipe with an automatic endcap.

    • The automatic endcap should be deleted with the run; manually placed endcaps should remain.
  4. Open a parametric inspector with multiple groups and actions.

    • Groups should use their configured initial state and actions should be laid out consistently.
  5. Run bun run checks.

    • Formatting, lint checks, type checks, and the full type validation should pass.

Focused node tests: 27 passed.

Screenshots / screen recording

Not added yet.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Note

Medium Risk
Touches scene load race handling and distribution-run interaction logic; behavior changes for wall routing and delete cascades could affect existing projects.

Overview
Duct/pipe routing and cleanup get the bulk of the changes. Wall placement clearance for rectangular and oval ducts now uses the largest profile dimension (plus a small standoff) via ductSurfaceClearanceM, and multi-segment runs can lock to the wall face where the first point was placed until the user commits outward from that surface. Deleting a duct or pipe run cascades removal of automatic end caps only (findAutomaticRunEndCapIds), with tests covering manual caps.

Editor/inspector: ParamGroup gains optional defaultExpanded, wired through single- and multi-selection inspectors; parametric Actions use a two-column grid when custom actions exist. Scene loading passes the current attempt into load() so an older in-flight load cannot apply after a newer retry.

Deps: @pascal-app/plugin-pool moves from a vendor tarball to a pinned GitHub package; @react-three/test-renderer is added for new distribution-run tool tests.

Reviewed by Cursor Bugbot for commit 0a1014e. Bugbot is set up for automated code reviews on this repo. Configure here.

sudhir9297 and others added 30 commits May 19, 2026 02:59
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>
@pascal

pascal Bot commented Sep 13, 2026

Copy link
Copy Markdown

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/nodes/src/shared/distribution-run-tool.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/nodes/src/shared/distribution-run-tool.tsx Outdated
Comment thread packages/nodes/src/shared/distribution-run-tool.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c02bca2. Configure here.

Comment thread apps/editor/package.json Outdated
@wass08
wass08 merged commit c278a25 into pascalorg:main Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants