Skip to content

feat(wall): Dimension input overlay and continuous chain drafting in 3D and 2D floorplan #1206

Open

Description

@saadmooh

Problem or motivation

When drafting walls in Pascal Editor (in both the 3D canvas and the 2D floorplan view):

  1. Lack of numerical precision during drafting: There is no floating dimension input overlay to enter exact wall lengths or angles via keyboard input while drafting.
  2. Discontinuous workflow: Drafting walls currently stops after each segment instead of allowing continuous multi-point chain wall drafting.
  3. 2D floorplan feedback: During 2D wall drafting, real-time dimension input overlays and ghost wall previews are not rendered.

Proposed solution

Implement an interactive numerical dimension input overlay and continuous multi-point chain drafting across both 3D and 2D floorplan modes:

  1. Dimension Input Overlay (packages/editor/src/components/tools/shared/dimension-input.tsx):

    • Floating dimension input box that tracks cursor position during wall drafting.
    • Allows typing exact wall lengths (supports unit conversion via packages/core/src/lib/units.ts).
    • Managed via a dedicated dimension-draft-store.ts Zustand store for clean decoupled reactivity.
  2. Continuous Multi-Point Chain Drafting (packages/nodes/src/wall/tool.tsx & loorplan-panel.tsx):

    • Clicking places the current wall node and automatically starts the next wall segment from the previous endpoint.
    • Enter/Escape/double-click finalizes or cancels the drafting chain cleanly.
  3. 2D Floorplan Drafting Preview (packages/editor/src/components/editor/floorplan-panel.tsx):

    • Directly renders the dimension input overlay and ghost wall preview lines while drawing walls in the 2D floorplan view.

Implementation

Implemented and tested on fork: https://github.com/saadmooh/parser-editor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions