diff --git a/src/app/mtext_editor.rs b/src/app/mtext_editor.rs index f1954ffc..ce6d370c 100644 --- a/src/app/mtext_editor.rs +++ b/src/app/mtext_editor.rs @@ -705,7 +705,7 @@ impl super::OpenCADStudio { // it keeps the layout's shape, wrapping and alignment identical. mt.insertion_point = Vector3::new(0.0, 0.0, 0.0); let entity = EntityType::MText(mt.clone()); - let anno = self.tabs[i].scene.annotation_scale; + let anno = 1.0; let bg = self.tabs[i].scene.bg_color; let wires: Vec = tessellate::tessellate( &self.tabs[i].scene.document, diff --git a/src/app/update/file.rs b/src/app/update/file.rs index aceda987..148d6fe3 100644 --- a/src/app/update/file.rs +++ b/src/app/update/file.rs @@ -1147,6 +1147,10 @@ pub(super) fn on_open_file(&mut self) -> Task { // CANNOSCALEVALUE (paper/drawing factor). Convert its inverse into // drawing units as well: metric annotation sizes are paper millimetres // and imperial annotation sizes are paper inches. + // Current model-space annotation scale comes from the drawing's + // CANNOSCALEVALUE (paper/drawing factor). Convert its paper unit into + // the drawing's INSUNITS as well, so e.g. a metre drawing uses + // 0.001 model units for 1 mm of paper at 1:1. let cannoscale_value = self.tabs[i].scene.document.header.annotation_scale_value; let unit_factor = self.tabs[i].scene.annotation_scale_unit_factor(); diff --git a/src/scene/annotative.rs b/src/scene/annotative.rs index bef6d168..0c887277 100644 --- a/src/scene/annotative.rs +++ b/src/scene/annotative.rs @@ -670,7 +670,19 @@ pub fn effective_annotation_scale_for( if !context_annotative && (text_like || !style_annotative) { return 1.0; } - + // Annotative TEXT/MTEXT store their paper text height as the base value. + // `fallback` is the absolute paper-to-model multiplier for the active + // annotation scale and already includes the drawing's INSUNITS conversion. + // + // Example for a metre drawing with 2 mm paper text: + // 1:1 -> 2 * 0.001 = 0.002 m + // 1:100 -> 2 * 0.100 = 0.200 m + // + // Using active/native here would only produce 1 / 100 and would lose the + // millimetre-to-metre conversion entirely. + if matches!(entity, EntityType::Text(_) | EntityType::MText(_)) { + return fallback; + } if matches!( entity, EntityType::Dimension(_)