forked from 1b-agent/fieldcraft-upstream
results.deformed: scale 0 draws the undeformed shape
A factor of 0 was refused, so a picture sequence swinging the deformation out from the undeformed shape had to start at a small factor or switch `show` off. 0 is now a factor like any other (the view stays deformed), and the results panel no longer works around the refusal. The MCP show_results docs say so, beside `deformed: false`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
89651b707c
commit
025c826dd4
4 files changed
+13
-8
No files matched your search
@@ -143,10 +143,10 @@ pub fn controls(app: &mut ModelApp, plot: &Plot, ui: &mut egui::Ui, t: &Tokens)
|
||||
}
|
||||
let mut auto = plot.view.scale.is_none();
|
||||
if ui.checkbox(&mut auto, "Auto").on_hover_text("Scale the largest displacement to a tenth of the model").changed() {
|
||||
run.push(("results.deformed", json!({"scale": if auto { json!("auto") } else { json!(plot.scale.max(f64::MIN_POSITIVE)) }})));
|
||||
run.push(("results.deformed", json!({"scale": if auto { json!("auto") } else { json!(plot.scale) }})));
|
||||
}
|
||||
let mut scale = plot.scale;
|
||||
let drag = egui::DragValue::new(&mut scale).speed(plot.scale.abs().max(1e-6) * 0.01).range(1e-9..=1e12).prefix("× ");
|
||||
let drag = egui::DragValue::new(&mut scale).speed(plot.scale.abs().max(1e-6) * 0.01).range(0.0..=1e12).prefix("× ");
|
||||
if ui.add_enabled(plot.view.deformed, drag).changed() {
|
||||
run.push(("results.deformed", json!({"scale": scale})));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user