forked from 1b-agent/opencadstudio-upstream
Resolve the DIMLFAC sign convention and add the viewport measurement seams
DXF gives DIMLFAC a sign convention: a positive value scales every
dimension, a negative one applies |DIMLFAC| only to dimensions that live in
a paper-space layout (where it compensates a viewport's scale). The linear
formatter multiplied by the raw signed value, so a drawing with negative
DIMLFAC (e.g. 115448.dxf) rendered negative measurements.
Resolve the sign once, in `resolved_dimension_style`, the single place an
effective style is derived, so dimension text, alternate units, exploded and
baked text and the properties panel all agree. `extended_data` keeps the raw
signed value, so DXF/DWG export is unchanged. The properties "Measurement"
row now reports the value the text shows rather than the raw distance, while
`actual_measurement` (group 42) stays raw as the format requires.
Also adds the PR2 seams the dimension work builds on:
* MeasurementScale::user_lfac_for_space / viewport_dimlfac_override —
the persisted representation of viewport compensation.
* Scene::viewport_frame and paper-point viewport resolution.
* Model-geometry hit testing through a content viewport, including
descent into block instances with the instance transform baked in.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
dbdddb7dc2
commit
9ee809d389
4 files changed
+605
-3
No files matched your search
@@ -41,6 +41,7 @@ pub mod named_parameters;
|
||||
mod named_parameters_persist;
|
||||
mod mspace;
|
||||
pub mod viewport_ref;
|
||||
pub mod viewport_dim_seam;
|
||||
mod page_setup;
|
||||
mod paper;
|
||||
mod preview;
|
||||
|
||||
Reference in new issue
Block a user