Repository navigation
feat(DIMENSION): add editable measurements on a dedicated layer - #2104
RICHRAN2030 wants to merge 3 commits into
Conversation
Messhias
left a comment
There was a problem hiding this comment.
feat(DIMENSION): add editable measurements on a dedicated layer. Checklist cargo xtask ci is ticked.
|
Thanks @RICHRAN2030 for the work that went into this. I'm closing it because the Dimension tool has already landed in #1788. It has Linear, Angular and Radial modes, Tool Options, restyling from Properties with Apply to All and Set as Default, and native files keep the recipes. It also does what the reference app's documentation describes: dimensions follow the art they measure when it's transformed. The measurements here are snapshots that don't update, and the reference app's public documentation doesn't describe a dedicated Dimensions layer, so merging this would give us two tools that behave differently. If the current tool is missing something you need (explicit Width/Height modes for rectangles, for example), please open an issue about it against the current tool. Join us on Discord: https://discord.gg/artcraft |
What and why
Add a Dimension tool that leaves editable measurement annotations in the drawing. Users can place linear, angular, radius and diameter dimensions, with explicit rectangle Width/Height modes available in a floating toolbar even when the optional Control bar is hidden.
Annotations automatically go on a dedicated Dimensions layer, preserving the source artwork and its layer. A compact options dialog controls units, precision (format examples
0,0.0,0.00, etc.), scale, dimension/extension lines, arrows and text. Selected annotations can be restyled through Properties; native files retain their editable recipes. Each placement or restyle is one undo step.Measurements are snapshots: changing the source artwork does not automatically remeasure existing annotations. Automatic radial picking supports live circles/circular arcs; arbitrary curves are not fitted. SVG/PDF export retains ordinary vector artwork. Public behaviour references and usage details are in
docs/dimension-tool.md.This PR is independent of Image Trace PR #1879. It includes a separate Rust 1.95 lint-fix commit and a merge of current upstream main, retaining upstream PDF backend changes.
How it was tested
cargo xtask cipassed on the final merged source tree: all eight gates (fmt, clippy, test, pdf-deps, assets, brands, layers, wasm), 6,607 tests passed.Checklist
cargo xtask cipasses (fmt, clippy, tests, pdf-deps, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests; command errors returnResult.ASSETS.md(no new asset files).