ui: typed form fields for label lists, point lists, multi-choices and number-or-auto (#169)

Four field kinds in the schema, each checked and described in JSON Schema: labels (nodes or
elements, typed as 1-5, 8 with Use selection taking the viewport's picks), points (rows of
x, y, z, added and removed), multi (checkboxes: coupling DOFs, step output) and number or
auto (the deformed scale). Node and element lists, probe and Delaunay points and block
corners use them; the remaining JSON fields hold geometry-specific shapes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 11:07:46 -04:00
1 parent c0cbcadf3d
commit 1f85a8caa3
6 files changed
+420 -21

No files matched your search

+10
View File
@@ -171,6 +171,15 @@ fn form(app: &mut ModelApp, ui: &mut egui::Ui, t: &Tokens) {
};
});
}
// The nodes and elements picked in the viewport, for the label lists' Use selection.
let mut picked = crate::form::Picked::default();
for item in app.pick.selection.items() {
match item {
selection::Item::Node(n) => picked.nodes.push(u64::from(*n)),
selection::Item::Element(e) => picked.elements.push(u64::from(*e)),
_ => {}
}
}
let mut advanced = d.advanced;
heading(ui, t, Level::Section, |ui| {
ui.label(RichText::new("Parameters").size(12.0));
@@ -221,6 +230,7 @@ fn form(app: &mut ModelApp, ui: &mut egui::Ui, t: &Tokens) {
attempted: d.attempted,
refused,
problems: &problems,
picked: picked.clone(),
};
let out = crate::form::show(ui, t, &cx, fields, &mut obj);
invalid = out.invalid;