ui: Relax around worst element at the top of Mesh Quality; plain preview text (#398)

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 14:40:00 -04:00
1 parent 87af68f550
commit a6f1a6dbeb
3 files changed
+16 -14

No files matched your search

+4 -2
View File
@@ -374,7 +374,9 @@ pub(crate) fn weights(model: &Model, p: &Value) -> Result<(BTreeMap<u32, f64>, O
nodes.extend(el.nodes.iter().copied());
}
if listed == 0 {
return Err(EngineError::Params("say which nodes to relax: give one of `center` and `radius`, `around_element`, `nodes`, `elements` or `set`".into()));
return Err(EngineError::Params(
"say which nodes to relax: give one of `center` and `radius`, `around_element`, `nodes`, `elements` or `set`".into(),
));
}
if let Some(only) = &only {
nodes.retain(|n| only.contains(n));
@@ -450,7 +452,7 @@ fn relax_nodes(s: &mut Session, p: &Value) -> Result<Value> {
s.model.set_node(*n, *x)?;
}
let summary = format!(
"moved {} node{} (largest {:.3e}); scaled Jacobian min {:.3} → {:.3}{}",
"moved {} node{} (largest {:.3e}); scaled Jacobian min from {:.3} to {:.3}{}",
r.moved,
if r.moved == 1 { "" } else { "s" },
r.max_displacement,