Skip to content

fix(nodes): use roof outlines for plan eaves and selection - #38

Draft
kvnloo wants to merge 2 commits into
mainfrom
nc/pe19-1028-outline-plan-parity
Draft

kvnloo wants to merge 2 commits into
mainfrom
nc/pe19-1028-outline-plan-parity

Conversation

@kvnloo

@kvnloo kvnloo commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Problem

The parent #1028 review found that roof plan silhouettes and segment click targets still used width/depth rectangles even after a segment stored a polygon footprint and optional coverFootprint. A 12 m × 8 m L shape with a 6 m × 4 m missing corner therefore appeared as 96 m² rather than 72 m² in plan and could be selected in the absent corner.

Design

  • E-001 / E-002: Pure polygon offset moves from viewer internals to the existing core roof-canopy domain helper and is exported publicly; the roof/segment floorplans stay in their registry-owned node definitions. No Three.js enters core.
  • E-003: Legacy roof segments with no polygon retain rectangular wall outlines, click targets and existing visible-top bounds.
  • E-006 / E-010: Outlined 2D eaves and 3D clipping consume the same offsetPlanRing implementation; existing roof-building and agent operations remain unchanged. This is a parity fix, not a new editing mechanism.
  • T-001: New regressions call published @pascal-app/core schemas and published @pascal-app/nodes definition callbacks, in the existing floorplan test file.

Change (file:line at commit 2bb5771)

Tests (NOT RUN)

  • bun run build — UNRUN (build workspace package exports before focused tests).
  • bun test packages/nodes/src/roof/floorplan.test.ts — UNRUN.
  • bun --cwd packages/viewer run test — UNRUN.
  • bun run ci — UNRUN. No local Bun/browser/GPU execution was available via this GitHub-connector-only worker; do not infer pass.
  • Hand-derived expectations: rectangle 12 × 8 = 96 m²; L notch 12 × 8 − 6 × 4 = 72 m², unchanged at 90°; rectangular canopy 12 × 10 = 120 m²; 1 m overhang at 60° projects cos(60°) = 0.5 m, yielding (12 + 1) × (10 + 1) = 143 m² eave polygon.
  • 2D/3D evidence boundary: source wiring above proves both presentations call the same offset helper; test assertions are not executed and no in-app screenshots, recording, 3D render or bake proof was produced. Visual acceptance is still pending.

Upstream readiness

HOLD. Fork-only Draft PR. Upstream pascalorg/editor#1028 remains open with conflicts. This branch intentionally starts at its author head 594fba1; kvnloo/editor:main was 352ec93 when checked. The fork comparison has 2 commits ahead / 220 behind and includes the original upstream outline feature plus this single six-file parity commit. This PR should not be mistaken for a clean minimal patch onto current main. No upstream write or merge.

Follow-ups

  1. PE19-1028-OUTLINE-VISUAL-ACCEPTANCE: capture matching L roof, rotated L, and canopy in live floorplan and 3D, plus baked/print parity.
  2. PE19-1028-UNEQUAL-GABLE-EAVE: verify per-side pitch, ridge step, and compound canopy offsets against 3D with published numeric cases.
  3. PE19-1028-AUTHOR-REBASE: author-led conflict reconciliation of roof: draw a roof by outline — shed/gable over any outline, canopies, overhangs, roof paint roles pascalorg/editor#1028 and viewer: nothing passes through a roof pascalorg/editor#1018, then exact-head CI and reviewer media; no automated upstream action.

Implemented by ChatGPT (mobile app, GitHub connector) for Kevin's OSS factory.

8Maverik8 and others added 2 commits October 12, 2026 10:23
…nd overhangs PAR-1159

Roof by outline
- Outline tool: draw a roof segment as a polygon; points snap to the
  building's outer contour (outer wall corners and faces of this storey and
  the one below, slab corners, posts), partitions excluded.
- Shed and gable over an arbitrary outline: the slope planes cover the
  drawn polygon, not just its bounding rectangle.
- Gable with a different pitch per side and a ridge step (split-level
  ridge); ridge height, ridge position and per-side attic walls are edited
  from a "Ridge" section in the panel and from plan handles, read against
  the house walls.
- Canopies: pull any edge of a segment's covering outwards; the covering
  continues in the slope's plane while the walls stay on the house. Canopy
  edges snap to the building contour.
- Overhang is drawn on every edge of the outline (eaves and rakes), with
  fascia and soffit geometry.

Paint
- Separate surface roles for the roof: gables, fascia, inside, covering and
  soffit, each in its own material slot (ROOF_SLOT_ROLES) and paintable
  separately on roofs and segments.
- Print solids follow the new shapes: per-side pitches, the gable back and
  the per-pitch deck overhang.

Walls and posts under a roof
- Walls under a roof are cut to the roof's underside (and rise to it when
  the roof is higher than the storey); posts meet the underside.
- Nothing passes through a roof: levels above are clipped by the roof below
  them. Fixes: a storey above a lower roof stays intact, removing a roof
  restores the clipped geometry, and the clip planes use the right frame.

Panel fields
- Metric and slider fields no longer change their value on mouse wheel, so
  scrolling the panel cannot edit a value by accident.

Tests cover outline snapping, the outline tool, canopy snapping, gable ridge
editing and handles, per-side pitches, ridge steps, canopies, abutments,
fascia, footprint clipping, CSG robustness, paint slots, wall fit to the
roof and the roof clip frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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