Skip to content

fix(wall-tool): snap length to grid instead of absolute coords to fix 90° gap at off-grid points#261

Open
zephran-dev wants to merge 1 commit intopascalorg:mainfrom
zephran-dev:main
Open

fix(wall-tool): snap length to grid instead of absolute coords to fix 90° gap at off-grid points#261
zephran-dev wants to merge 1 commit intopascalorg:mainfrom
zephran-dev:main

Conversation

@zephran-dev
Copy link
Copy Markdown
Contributor

Problem

When starting a wall from an off-grid endpoint (e.g. 17ft = 5.18m), the
angle snap would correctly lock the direction to 90°, but then
snapPointToGrid would round the absolute X/Z coordinates — moving the
endpoint away from the true perpendicular and creating micro-gaps in
closed rooms.

Root Cause

In snapPointTo45Degrees, after snapping the angle the result was passed
through snapPointToGrid, which rounds world-space coordinates to the
global grid regardless of where the start point is.

Fix

Instead of snapping the final XZ position to the grid, snap only the
distance (scalar) to the grid step. The direction stays locked to the
snapped angle and the start point is preserved exactly.

Closes #256

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.

Cannot create precise 17x18ft room due to lack of 90-degree snap at arbitrary points

1 participant