Honor design units in sketch dimensions and measurements (#241)
* Honor design units in sketch dimensions and measurements
* fix: apply document units to specialized length controls
* Accept explicit units in length fields; document design-unit dimension values
Length fields in a design-unit control now evaluate what is typed as a
length expression: a bare number stays in the design's units, while an
explicit unit ("10 mm", "0.5 in", "1 in + 5 mm") is converted.
Document that a bare numeric sketch.dimension value from scripts, the
control channel or MCP is read in the design's units.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
---------
Co-authored-by: bherbruck <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
23 files changed
+285
-71
No files matched your search
@@ -132,3 +132,16 @@ when a parameter moves the geometry. Islands inside the region are its holes. Wh
|
||||
more than one (both halves of a circle cut by a line), is bounded by exactly those curves, the
|
||||
feature reports an error rather than taking another region. Profiles picked by index or by point
|
||||
(`[{"point": [x, y]}]`) are stored the same way when the feature is made.
|
||||
|
||||
## Measurement units
|
||||
|
||||
Change the current design through **Document Settings > Units** in the browser.
|
||||
The units preference applies to new designs. Existing sketch annotations, live drawing
|
||||
lengths and Measure follow the current design units without resizing geometry.
|
||||
Inches display at least three decimal places and retain a meaningful fourth digit;
|
||||
a higher display precision can be selected in Preferences. Bare length values typed
|
||||
in the dimension tool use the current design units. Explicit units such as `25.4 mm`
|
||||
remain valid in an inch design. Angular dimensions keep their angular units. Deliberately typed four-place inch literals
|
||||
retain trailing zeros. Component/canvas distance controls and inspection, parts-library
|
||||
and flat-pattern measurements follow design units too; parameter expressions and metric
|
||||
standard names retain their explicit authored units.
|
||||
Reference in new issue
Block a user