From c983987c64cebe1114c3e1a3255801f3db1b79c6 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 15 Oct 2026 11:37:38 -0400 Subject: [PATCH] results: Export CSV takes every parameter its description names (set, at, mode, frame, about) results.export.csv's form listed only nodes and sets, so the parameter check refused the probe's set, at, mode and frame and the reactions' about point that the command documents. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo --- crates/engine/src/cmd/forms.rs | 5 +++++ crates/engine/src/cmd/results.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/crates/engine/src/cmd/forms.rs b/crates/engine/src/cmd/forms.rs index 4a74792..8139771 100644 --- a/crates/engine/src/cmd/forms.rs +++ b/crates/engine/src/cmd/forms.rs @@ -1727,7 +1727,12 @@ pub const EXPORT_CSV: &[Field] = &[ path("path", "File", true).help("The CSV file to write.").req(), SOLVED, references("sets", "Sets", C::Set).help("Reactions: the sets to sum; the step's BC sets when empty.").hint("the step's BC sets"), + xyz("about", "About point", D::Length).help("Reactions: the point moments are taken about."), labels("nodes", "Nodes", LabelOf::Node).help("Probe: the node labels."), + reference("set", "Set", C::Set).help("Probe: a set whose nodes to read."), + points("at", "Points", D::Length, 10_000).help("Probe: points to read at the nearest nodes."), + int("mode", "Mode", 1, 1_000_000).help("Probe: the mode to read, for frequency and buckling steps."), + int("frame", "Frame", 0, 1_000_000_000).help("Probe: the frame to read, for explicit and transient steps."), ]; pub const REACTIONS: &[Field] = &[ SOLVED, diff --git a/crates/engine/src/cmd/results.rs b/crates/engine/src/cmd/results.rs index 54434d1..1180924 100644 --- a/crates/engine/src/cmd/results.rs +++ b/crates/engine/src/cmd/results.rs @@ -621,6 +621,11 @@ mod tests { } assert!(!rows[0].iter().any(|h| h == "temperature"), "columns the step does not have are left out: {:?}", rows[0]); // A stale result is refused. + // Every parameter the description names is taken: a set's nodes, points, a moment point. + let set = s.execute("results.export.csv", &json!({"what": "probe", "path": path, "step": "Bend", "set": "tip"})).unwrap(); + assert!(set["rows"].as_u64().unwrap_or(0) > 0, "{set}"); + s.execute("results.export.csv", &json!({"what": "probe", "path": path, "step": "Bend", "at": [[0, 0, 0]]})).unwrap(); + s.execute("results.export.csv", &json!({"what": "reactions", "path": path, "step": "Bend", "about": [1, 0, 0]})).unwrap(); s.execute("mesh.node.add", &json!({"label": 99_999, "xyz": [0, 0, 0]})).unwrap(); assert!(s.execute("results.export.csv", &json!({"what": "reactions", "path": temp_csv("stale"), "step": "Bend"})).is_err()); for p in ["reactions", "probe"] {