FIELD: Field dialog, FIELD command and the ATTDEF field buttons

A Field dialog with the fields the application evaluates and the
reference format choices, FIELD placing a field as multi-line text, the
attribute definition dialogs' field buttons, field attachment on commit,
system variable / file size / regional date providers for field
evaluation, and the codec patch with the field authoring API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-02 09:56:54 +03:00
1 parent 53f2983e9c
commit 87211f4654
40 files changed
+1859 -14

No files matched your search

+7
View File
@@ -218,6 +218,8 @@ pub struct AttdefSpec {
/// Multi-line boundary width (0 = none).
pub boundary_width: f64,
pub line_spacing: f64,
/// A field the default value comes from: its code and referenced objects.
pub field: Option<(String, Vec<codec::Handle>)>,
}
impl AttdefSpec {
@@ -447,6 +449,7 @@ impl AttdefCommand {
oblique_angle,
boundary_width: 0.0,
line_spacing: 1.0,
field: None,
},
lines: Vec::new(),
styles,
@@ -952,6 +955,10 @@ impl CadCommand for AttdefPlaceCommand {
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> {
Some(cross_preview(pt, self.plane))
}
fn text_field(&self) -> Option<(String, Vec<codec::Handle>)> {
self.spec.field.clone()
}
}
/// A small cross at the cursor while a placement point is asked.