fix: respect drawing units for annotative text

This commit is contained in:
gianlucafiore committed 2026-08-14 15:38:54 -03:00
1 parent 2c08b92267
commit f47ab7e891
3 files changed
+18 -2

No files matched your search

+1 -1
View File
@@ -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<WireModel> = tessellate::tessellate(
&self.tabs[i].scene.document,
+4
View File
@@ -1147,6 +1147,10 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
// 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();