Skip to content

Feat: wall room creation and snap, stairs system#255

Merged
wass08 merged 26 commits intopascalorg:mainfrom
sudhir9297:feat/wall-room-creation
Apr 17, 2026
Merged

Feat: wall room creation and snap, stairs system#255
wass08 merged 26 commits intopascalorg:mainfrom
sudhir9297:feat/wall-room-creation

Conversation

@sudhir9297
Copy link
Copy Markdown
Contributor

@sudhir9297 sudhir9297 commented Apr 17, 2026

What does this PR do?

This PR delivers a comprehensive upgrade to the editor by improving wall, room, slab, ceiling, and stair workflows, with a strong focus on curved wall support, automatic geometry updates, and more intuitive editing interactions.

It introduces:

  • Full curved wall creation, editing, measurement, and geometry handling
  • Smarter room, slab, and ceiling generation that adapts to both straight and curved walls
  • Advanced wall editing UX including endpoint controls, detach behavior, and improved snapping
  • Robust stair system integration with automatic slab and ceiling cutouts
  • Improved handling of doors/windows during wall merges and edits
  • Enhanced ceiling interaction, visibility, and selection directly in 3D
  • A configurable grid snapping system for more precise control
  • Multiple fixes for rendering, geometry stability, and interaction loops

All improvements are implemented within the existing architecture without introducing new global state or breaking existing workflows.


Walls & Rooms

  • Fixed auto room/slab recalculation when curved walls move by including curveOffset in wall change detection and using sampled curved edges.
  • Improved slab handling around curved walls to prevent sharp spikes and align behavior with the existing room/slab generation flow.
  • Reduced auto slab polygon density so curved-room slabs don’t expose excessive edit points.
  • Moved shared polygon simplification logic into a reusable geometry utility.
  • Added wall merge-on-divider-delete behavior so split walls recombine into a single wall.
  • Improved merged-wall selection so walls with openings (doors/windows) are preserved as the surviving wall.
  • Ensured slabs correctly adjust their cutouts when curved walls are modified.

Wall Editing UX

  • Added floating wall-end controls in both 2D (floorplan) and 3D for direct endpoint manipulation.
  • Made connected walls follow endpoint movement in both preview and final state.
  • Added Alt + drag behavior to temporarily detach connected walls while moving endpoints.
  • Improved detach hint UI so it appears only in the correct context and state.
  • Increased usability of wall corner controls and improved interaction priority.
  • Enabled snapping-aware wall dragging for both straight and curved walls.
  • Made endpoint angle snapping follow the active grid snap setting.
  • Fixed curved wall drag infinite update loop by avoiding redundant preview updates.
  • Allowed moving walls from a single corner with proper linkage handling.

Wall Duplication

  • Fixed 3D duplicate action so walls correctly duplicate instead of failing silently.
  • Fixed duplicate vs move flow by creating the wall before entering move mode.
  • Ensured duplicated walls remain unlinked during placement and link correctly afterward.

Doors & Windows Behavior

  • Prevented doors and windows from being placed on curved walls.
  • Ensured wall openings (doors/windows) correctly reattach to the appropriate wall after divider deletion.
  • When split walls are merged:
    • Openings return to the merged wall correctly.
    • Walls merge only if material/color matches; otherwise they remain separate.

Ceilings

  • Added automatic ceiling generation similar to slabs:
    • Auto-create from closed rooms
    • Auto-update on wall movement
    • Support curved wall reshaping
    • Auto split/merge with divider changes
  • Updated naming convention to Room N Slab and Room N Ceiling.
  • Fixed ceiling selection affordances to appear reliably on load.
  • Introduced hot corner selection so ceilings can be selected directly without interfering with walls/floors.
  • Improved ceiling affordance visuals:
    • Cleaner corner brackets
    • Reduced to 4 key handles
    • Smaller, more precise interaction targets
  • Switched to rectangular hit areas for more predictable selection.
  • Ensured ceiling selection resets stale interaction states before activating.
  • Stabilized affordance system to avoid React update loops and render issues.
  • Improved ceiling move interaction:
    • Added translucent drag preview (ghost ceiling)
    • Added clear boundary outline during movement for better visibility

Stairs, Slabs & Ceiling Cutouts

  • Added stair opening data:
    • fromLevelId
    • toLevelId
    • slabOpeningMode
    • openingOffset
  • Added holeMetadata support for both slabs and ceilings.
  • Built automatic synchronization between stairs and slab/ceiling cutouts.
  • Wired cutout sync into the stair system for initial load and live updates.
  • Added stair panel controls for:
    • From/To level selection
    • Opening configuration
  • Updated stair tool defaults for improved initial behavior.
  • Fixed stair placement so adding stairs on a specific floor keeps them on that floor.

Hole Behavior & UI

  • Updated slab, ceiling, and manual hole UI to correctly preserve:
    • Manually created holes
    • Stair-generated holes
  • Ensured both types coexist without conflicts.

Stair Cutout Geometry

  • Implemented straight stair cutouts.
  • Implemented landing cutouts and merged them with connected flight cutouts.
  • Added support for larger straight-flight cutouts.
  • Limited flight cutouts to only affect the top side of the flight.
  • Added ceiling cutouts alongside slab cutouts for full vertical consistency.
  • Added spiral stair circular cutout support.

Snapping System

  • Added a top-bar grid snap control in the editor toolbar.
  • Persisted snap settings in editor state.
  • Connected snapping logic across placement and wall drafting systems.
  • Updated snap options:
    • Added: 0.25, 0.10, 0.05
    • Removed: 0.15
  • Converted snap control from toggle button to dropdown.
  • Reordered control placement for better UX.
  • Standardized display format (e.g., 0.50 instead of 0.5).
  • Kept grid visuals unchanged; only snapping behavior updated.

Geometry & Rendering Stability

  • Fixed curved wall measurement system:
    • Use curve length instead of straight chord
    • Measurement follows curve visually
    • Correct edge-to-edge measurement from wall face
    • Fixed endpoint anchoring
  • Restored correct measurement behavior for straight walls.
  • Ported curved wall mitering and junction logic from plan3D:
    • Improved intersection math using tangents
    • Refined wall footprint generation
    • Prevented sharp geometry artifacts at curved joins
  • Fixed slab and ceiling geometry to always generate uv2, resolving material issues.
  • Fixed WebGPU pipeline errors when modifying slab height with materials.
  • Fixed render crashes related to sunken slabs.
  • Fixed ceiling visibility during movement by adding outline feedback.

Architecture Notes

  • All changes remain within the existing architecture:
    • Same useEditor / useScene state system
    • Same node schemas
    • Same feature-based tool structure
  • No new global state or alternate rendering pipeline introduced.

@sudhir9297 sudhir9297 changed the title Feat/wall room creation Feat: wall room creation and snap system Apr 17, 2026
@sudhir9297 sudhir9297 changed the title Feat: wall room creation and snap system Feat: wall room creation and snap, stairs system Apr 17, 2026
@wass08 wass08 merged commit e016260 into pascalorg:main Apr 17, 2026
@open-pascal open-pascal mentioned this pull request Apr 21, 2026
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