Skip to content

respect millimetre notation in 3d labels#540

Open
tylergibbs1 wants to merge 1 commit into
pascalorg:mainfrom
tylergibbs1:agent/complete-millimeter-labels
Open

respect millimetre notation in 3d labels#540
tylergibbs1 wants to merge 1 commit into
pascalorg:mainfrom
tylergibbs1:agent/complete-millimeter-labels

Conversation

@tylergibbs1

@tylergibbs1 tylergibbs1 commented Jul 24, 2026

Copy link
Copy Markdown

what does this pr do?

fixes #509 by completing the label only millimetre preference across 3d measurement surfaces that still defaulted to metres.

  • passes the persisted metric notation through saved and draft 3d measurements
  • updates alignment, opening, dormer, drag, and system summary pills
  • reuses the canonical linear formatter so negative values and half millimetre rounding stay consistent
  • keeps numeric editor inputs and area and volume labels unchanged

how to test

  1. choose metric millimetres in the viewer settings.
  2. create distance and perimeter measurements in both floor plan and 3d views.
  3. move an opening or dormer and confirm its guide labels use millimetres.
  4. drag a wall or fence height handle and confirm every value in the pill uses millimetres.
  5. switch back to metres and imperial and confirm those labels update immediately.

local validation completed with a 1,329 file biome check and 25 passing measurement tests. i could not run bun dev or package type checks because the filtered dependency install exceeded the available disk space on the five remaining runtime packages.

screenshots / screen recording

not included. this change only wires the existing display preference into the remaining label paths.

checklist

  • i have tested this locally with bun dev
  • my code follows the existing code style
  • i have updated relevant documentation, not applicable here
  • this pr targets the main branch

Note

Low Risk
Display-only wiring of an existing viewer preference through label formatters; no persistence, auth, or geometry logic changes.

Overview
3D linear readouts now follow the viewer’s metric notation (metres vs millimetres) instead of defaulting to metres when millimetres are selected.

The change threads metricNotation from useViewer into alignment guides, opening/dormer placement pills, floating action menu height and HVAC run-length summaries, dimension pills, saved measurement labels, and in-progress measurement draft previews. formatMeasurement in the editor now delegates to formatLinearMeasurement, so formatting stays aligned with the shared rules (including signs and sub‑millimetre rounding). Area and volume labels are unchanged.

Tests add millimetre formatting cases for values like 0.2m200mm and half‑millimetre rounding to 1mm.

Reviewed by Cursor Bugbot for commit 5887d3a. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

Proposal: metric-mm measurement system (millimetre labels)

1 participant