Repository navigation
Conversation
- Sample sloped slab surfaces along wall polylines in computeWallSlabSupport and emit sloped baseSegments/faceDatum (endElevation) honored by wall CSG cutouts. - Treat sloped slabs as non-grounded in isFloatingSlab so drawn polygons stay verbatim and never expand into adjacent walls or sibling floor seams. - Guard all reconciler plateRole values (base, platform, sunken) in hasSlabSlope. - Sample point elevation in stairBaseElevation, resolveStairTotalRise, resolveFenceConstructionSupport, fence lift/geometry, and inline slab.railing. - Harden clampSlabElevationForWalls for steep rise > storeyHeight and add clampSlabSlope for inspector pitch/direction edits; remove static [0,360] clamp on Direction slider so scrubbing wraps modulo 360. - Anchor 2D floorplan slope arrows on the widest solid interior chord to avoid interior cutouts and concave exteriors. - Account for slope rise in author-scene slab_over_wall validation.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3b6fb67. Configure here.
- Compare pointer-cap maxElevation against the lowest sloped slab point across the item/fence footprint (planFootprintCorners) so downhill grabs on a ramp do not drop to ground while overhead decks/ramps are still rejected. - Subtract only the overlapping plane-bound wall local rise in clampSlabElevationForWalls, getSlabElevationUpperBound, and clampSlabSlope so a wall touching only the low end of a long ramp does not over-clamp.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds planar sloped slab support for manual solid slabs (ramps, driveways, sloped terraces, and flat-roof drainage falls), following the design suggested in #260 (Relates to #260; leaves roof-driven wall tops open in #260).
@pascal-app/core): Adds optionalslope: { direction, pitch }(pitchin0..45degrees,directionuphill azimuth in degrees where0 = +Xand90 = +Z) toSlabNode, keeping legacy flat scenes unchanged (E-003).packages/core/src/systems/slab/slab-slope.tsanchorsslab.elevationat the low-edge projection (minProj) of the stored polygon so adding slope or extending the high edge never sinks a ramp below the floor plane, and keeps recessed slabs and reconciler-owned floor plates flat.@pascal-app/core): UpdatesselectSlabSupportForItem,SpatialGridManager(getSlabElevationAt,getSlabSupportForItem,getPointedSupportSurfaceexact analytical ray-plane intersection,getSupportCandidatesForFootprint,getHostSlabElevationForFootprint),floor-placed-elevation,usage-field(floorUnderandapproxregion tagging),layout-clearance,procedural-items/query,clampSlabElevationForWalls, andspatial-grid-syncdirty triggers so floor-placed items and cursor picks follow the inclined surface live.@pascal-app/viewer,@pascal-app/nodes): Extrudes coplanar sloped top/bottom caps, sloped outer/hole side walls, and per-vertex slopedfillToTerrainskirts (buildTerrainPerimeterFillGeometry). Keeps top vs. side face splitting clean up to 45 degrees (cos(45°) > 0.5).@pascal-app/nodes,i18n): Draws an uphill direction arrow on sloped slabs in 2D floor plans, places 3D thickness/base handles on the sloped surface, clearsslopewhen toggling a slab torecessed, and adds a Slope section toSlabPanel(Pitch, Direction, Rotate 90°, Flip 180°, live Grade % and total rise readout, and Flat / Drainage 2% / Ramp 1:12 / Driveway 12% presets) with extracted and compiled Lingui catalogs.@pascal-app/ifc-converter,@pascal-app/mcp,skills/pascal-3d): Exports sloped slabs as inclinedIFCSLABmesh geometry rather than flatSweptSolid, evaluatesnode-world-pointon the sloped surface centroid, accepts optionalslopeinauthor_sceneusing sharedmeasurement('angle', 'deg')notation, and documents the field inskills/pascal-3d/SKILL.md.How to test
Ramp 1:12orDriveway (12%)) or drag Pitch and Direction: the slab top and underside tilt from the low edge atelevation, Grade updates with the percentage and rise, and Rotate 90° / Flip 180° reorient the uphill direction.bun run checkbun run check-typesbun run i18n:checkbun run skills:validatebun run check:render-bundlebun run --cwd packages/core test(7,692 pass, 3 skip, 0 fail)bun run --cwd packages/viewer test(1,769 pass, 0 fail)bun run --cwd packages/editor test(2,792 pass, 0 fail)bun run --cwd packages/mcp test(1,576 pass, 0 fail)bun test packages/nodes/src/slab packages/nodes/src/index.test.ts packages/ifc-converter/tests scripts/i18n.test.ts scripts/i18n-provider.test.ts scripts/i18n-literals.test.ts apps/editor/proxy.test.tsbun run --cwd apps/editor build && bun run --cwd apps/editor smoke(8/8 pass)Screenshots / screen recording
Verified live in Chrome (WebGPU) against the Next.js 16 production build (
node next start) with zero console or page errors across 3D, 2D, and Split views:3D view showing a 12° entry ramp with
fillToTerrainskirt meeting a flat upper landing, three columns stepping up the sloped surface, a hosted balustrade railing climbing the ramp, and a 15° sloped terrace with a rectangular cutout:2D floor plan and Slab inspector Slope controls (
Pitch,Direction,Rotate 90°,Flip 180°, liveGradeand rise readout, and presets), with uphill arrows anchored cleanly inside the solid slab regions (avoiding the terrace cutout):Split 2D + 3D view immediately after clicking
Flip 180°(both the 2D uphill arrow and 3D ramp/railing/columns reorient live to180°):Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Large cross-cutting change to slab support, wall bases, and spatial grid election; regressions could mis-place items or walls on ramps, though extensive automated tests cover the main paths.
Overview
Introduces optional
slope: { direction, pitch }(up to 45°) on manual solid slabs, withelevationanchored at the low edge of the polygon. A newslab-slopemodule supplies point elevation, ray–plane hits, and max height so the rest of the stack can treat ramps as inclined planes instead of flat tops.Support and authoring now sample height at each item’s XZ position: spatial grid election, floor-placed elevation, layout clearance, stairs (base and deck rise), fences/railings, wall slab support (including sloped
baseSegments/endElevation), elevation clamping against storey-bound walls, sync dirtying when slope changes, andauthor_scenepersistence plusslab_over_wallchecks usinggetSlabMaxElevation.Product surface: Slab inspector Slope controls (pitch, direction, presets, grade/rise readout), 2D uphill arrows, sloped 3D geometry and terrain fill, fence lift along ramps, IFC export as inclined mesh, MCP centroid on the sloped surface, and i18n strings.
Reviewed by Cursor Bugbot for commit 7ead760. Bugbot is set up for automated code reviews on this repo. Configure here.