Skip to content

Site: lot as a block in mapped surroundings, straight front setbacks - #1017

Open
Steven-Tibbs wants to merge 1 commit into
pascalorg:mainfrom
Steven-Tibbs:architect/lot-map-and-setbacks
Open

Steven-Tibbs wants to merge 1 commit into
pascalorg:mainfrom
Steven-Tibbs:architect/lot-map-and-setbacks

Conversation

@Steven-Tibbs

@Steven-Tibbs Steven-Tibbs commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Engine side of the Architect's lot and map work. App PR: https://github.com/pascalorg/private-editor/pull/857 — merge this one first. @Aymericr

  • Terrain: with a property line, the lot's ground is cut to the line with a skirt down to a flat base, so the lot sits as a block inside mapped 3D surroundings (new lot-mask.ts).
  • Viewer: claimSceneGround(scene) lets a map layer outside React take over the scene ground.
  • Camera: max distance 1500 m while the ground is replaced (100 m otherwise).
  • Site plan: an edge running nearly straight on (≤ 8°) from a front or street edge takes that setback — no more curved arc when a frontage is split in two. Regression test with the real parcel.
  • Lot drop-in: no second roads lookup after a slow miss.

Tests: terrain-geometry 45 pass, site-plan + lot 66 pass. tsc clean (viewer, nodes, editor).

🤖 Generated with Claude Code

…backs

- Terrain: with a property line, the lot's ground is cut to the line and
  closed by a skirt down to one flat base (the lot reads as a block inside
  mapped 3D surroundings); the horizon disc sits just under that base.
- Viewer: claimSceneGround(scene) lets a map layer outside React claim the
  scene ground (the fallback disc steps aside until released).
- Camera: max distance 1500 m while the ground is replaced (a neighbourhood
  instead of the horizon disc), 100 m otherwise.
- Site plan: an edge running nearly straight on (within 8°) from a front or
  street edge takes that edge's setback, so a frontage split into two
  collinear pieces no longer gets a curved setback arc.
- Lot drop-in: no second roads lookup after a slow miss.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pascal

pascal Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Engine side of the Architect's lot work, in three parts. With a property line on the site, the terrain now renders as a block: the ground surface is masked to the parcel per fragment, and a skirt follows the property line down to one flat base, so the lot reads as a solid sitting inside mapped 3D surroundings instead of a disc that caps it. The viewer gets a claimSceneGround(scene) escape hatch so a map layer living outside React can take ownership of the scene ground, and the camera unlocks to 1500 m while that is the case. Separately, the site-plan setback code now carries a front or street role across an edge that continues nearly straight on (≤ 8°), which fixes the curved arc that appeared when a county parcel split one frontage into two almost-collinear lines.

File Change What
packages/nodes/src/site/lot-mask.ts added TSL even-odd point-in-polygon node, unrolled per edge, plus lotMaskedMaterial that clones the ground material with it
packages/nodes/src/site/terrain-geometry.ts modified skirtRing, terrainBlockBase, exported SKIRT_DROP; skirt can follow the property line instead of the field rectangle
packages/nodes/src/site/terrain-geometry.test.ts modified Ring winding and half-cell spacing, skirt top on ground / bottom on base, outward normals, sculpt rewrite matches a rebuild
packages/nodes/src/site/terrain-mesh.ts modified Threads the ring into skirt creation, keeps the ring in userData, widens skirt bounds to the ring, updates the skirt on every patch when ringed
packages/nodes/src/site/terrain-renderer.tsx modified New polygon prop: builds the ring, masks the surface material, leaves the skirt on the plain one
packages/nodes/src/site/renderer.tsx modified Horizon disc no longer punches the terrain footprint and now sits just under the block base; passes the site polygon down
packages/viewer/src/components/viewer/scene-ground-replacement.tsx modified claimSceneGround(scene) for non-React owners, refcounted with the existing component
packages/viewer/src/index.ts modified Exports the new claim helper
packages/editor/src/components/editor/custom-camera-controls.tsx modified maxDistance 1500 m while the ground is replaced, 100 m otherwise
packages/editor/src/lib/floorplan/site-plan/geometry.ts modified Propagates front/street roles to edges continuing within 8°, before setback distances are picked
packages/editor/src/lib/floorplan/site-plan/geometry.test.ts modified Regression test on the real 1054 Rivera Dr parcel: one straight front yard across the kink
packages/editor/src/lib/lot/drop-in.ts modified No second roads lookup when the first miss took over 4 s

Start with terrain-geometry.ts (skirtRing and terrainBlockBase) and lot-mask.ts, since the block geometry and the fragment mask have to agree on where the property line is; renderer.tsx and terrain-renderer.tsx are mostly wiring on top of those. One note for anyone following the trail: the app-side PR this one is meant to merge ahead of is still a placeholder in the description.

@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 2 potential issues.

Fix All in Cursor

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

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 27811f6. Configure here.

const distances: number[] = []
for (let i = 0; i < n; i++) {
const role = runRole.get(runs[i] as number) ?? (roles[i] as EdgeRole)
const role = continued.get(i) ?? runRole.get(runs[i] as number) ?? (roles[i] as EdgeRole)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3D setbacks miss straight frontage

Medium Severity

The new nearly-straight frontage inheritance lives only in the editor setbackEnvelope. The nodes copy, which the 3D dashed overlay uses and which is documented as the same rules, still treats the leftover half as a side yard, so a split frontage still draws a curved envelope in the scene.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 27811f6. Configure here.

addSlabHoles(shape, slabPolygons, fadeBounds.cx, fadeBounds.cz)
return new ShapeGeometry(shape)
}, [fadeBounds, slabPolygons, terrainKey, groundReplaced])
}, [fadeBounds, slabPolygons, groundReplaced])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Horizon disc caps live excavation

Medium Severity

The horizon disc no longer punches terrainFootprint and instead sits at a React horizonY from terrainBlockBase. A sculpt stroke rewrites the mesh and skirt in place but does not move that disc, so a pit that drops below the last committed base is roofed over until the stroke commits.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 27811f6. Configure here.

This branch has not been deployed

No deployments
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.

1 participant