feat(dimstyle): expand Dimension Style editor to the full field set

Adds the remaining ~40 DIMSTYLE variables across the tabs (and a new
Alternate Units tab): dim/ext line colors+lineweights, fixed-length ext
lines, separate arrow blocks, arc symbol, jog angle, text color/justify/
vertical pos/fill/direction, fit options (DIMATFIT/DIMTIX/DIMSOXD/DIMTMOVE/
DIMUPT/DIMTOFL/DIMFIT), decimal separator, rounding, zero suppression,
fraction + angular units, alternate units, and tolerance vert-just/zero
suppression. Only the arrowhead-block / extension-line-linetype Handle
references are left (they need a block/linetype picker).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-03 20:09:08 +03:00
1 parent 4675a439da
commit a21caf821b
4 files changed
+379

No files matched your search

+127
View File
@@ -391,6 +391,53 @@ pub(super) struct OpenCADStudio {
ds_dimtdec: String,
ds_dimtfac: String,
ds_annotative: bool,
// Lines (colors / lineweights / fixed-length extension)
ds_dimclrd: String,
ds_dimlwd: String,
ds_dimclre: String,
ds_dimlwe: String,
ds_dimfxl: String,
ds_dimfxlon: bool,
// Symbols & Arrows
ds_dimsah: bool,
ds_dimarcsym: String,
ds_dimjogang: String,
// Text
ds_dimclrt: String,
ds_dimjust: String,
ds_dimtvp: String,
ds_dimtfill: String,
ds_dimtfillclr: String,
ds_dimtxtdirection: bool,
// Fit
ds_dimatfit: String,
ds_dimtix: bool,
ds_dimsoxd: bool,
ds_dimtmove: String,
ds_dimupt: bool,
ds_dimtofl: bool,
ds_dimfit: String,
// Primary units
ds_dimdsep: String,
ds_dimrnd: String,
ds_dimzin: String,
ds_dimfrac: String,
ds_dimaunit: String,
ds_dimadec: String,
ds_dimazin: String,
// Alternate units
ds_dimalt: bool,
ds_dimaltf: String,
ds_dimaltd: String,
ds_dimaltu: String,
ds_dimalttd: String,
ds_dimaltrnd: String,
ds_dimapost: String,
ds_dimaltz: String,
ds_dimalttz: String,
// Tolerances (extra)
ds_dimtolj: String,
ds_dimtzin: String,
}
/// What triggered the "unsaved changes" dialog.
@@ -434,6 +481,46 @@ pub enum DsField {
Dimtdec,
Dimtfac,
Annotative,
Dimclrd,
Dimlwd,
Dimclre,
Dimlwe,
Dimfxl,
Dimfxlon,
Dimsah,
Dimarcsym,
Dimjogang,
Dimclrt,
Dimjust,
Dimtvp,
Dimtfill,
Dimtfillclr,
Dimtxtdirection,
Dimatfit,
Dimtix,
Dimsoxd,
Dimtmove,
Dimupt,
Dimtofl,
Dimfit,
Dimdsep,
Dimrnd,
Dimzin,
Dimfrac,
Dimaunit,
Dimadec,
Dimazin,
Dimalt,
Dimaltf,
Dimaltd,
Dimaltu,
Dimalttd,
Dimaltrnd,
Dimapost,
Dimaltz,
Dimalttz,
Dimtolj,
Dimtzin,
}
#[derive(Debug, Clone)]
@@ -1105,6 +1192,46 @@ impl OpenCADStudio {
ds_dimtdec: "2".to_string(),
ds_dimtfac: "1".to_string(),
ds_annotative: false,
ds_dimclrd: "0".to_string(),
ds_dimlwd: "-2".to_string(),
ds_dimclre: "0".to_string(),
ds_dimlwe: "-2".to_string(),
ds_dimfxl: "1".to_string(),
ds_dimfxlon: false,
ds_dimsah: false,
ds_dimarcsym: "0".to_string(),
ds_dimjogang: "45".to_string(),
ds_dimclrt: "0".to_string(),
ds_dimjust: "0".to_string(),
ds_dimtvp: "0".to_string(),
ds_dimtfill: "0".to_string(),
ds_dimtfillclr: "0".to_string(),
ds_dimtxtdirection: false,
ds_dimatfit: "3".to_string(),
ds_dimtix: false,
ds_dimsoxd: false,
ds_dimtmove: "0".to_string(),
ds_dimupt: false,
ds_dimtofl: false,
ds_dimfit: "3".to_string(),
ds_dimdsep: "46".to_string(),
ds_dimrnd: "0".to_string(),
ds_dimzin: "0".to_string(),
ds_dimfrac: "0".to_string(),
ds_dimaunit: "0".to_string(),
ds_dimadec: "0".to_string(),
ds_dimazin: "0".to_string(),
ds_dimalt: false,
ds_dimaltf: "25.4".to_string(),
ds_dimaltd: "2".to_string(),
ds_dimaltu: "2".to_string(),
ds_dimalttd: "2".to_string(),
ds_dimaltrnd: "0".to_string(),
ds_dimapost: String::new(),
ds_dimaltz: "0".to_string(),
ds_dimalttz: "0".to_string(),
ds_dimtolj: "1".to_string(),
ds_dimtzin: "0".to_string(),
};
app.sync_ribbon_layers();
app