Trigger realization more directly

Simplify the system that reactively triggers realizations, at the cost
of removing the preconditioning step described in issue #101 and doing
unnecessary realizations after certain kinds of updates.

The new system should trigger a realization after any update that could
affect the assembly's deformation space. For simplicity, any update to
the regulator list triggers an update, even if it doesn't affect the set
of constraints. In particular, adding a regulator triggers an
unnecessary realization.
This commit is contained in:
Aaron Fenyes 2025-07-24 14:59:21 -07:00
parent 0801200210
commit c73008d702
4 changed files with 36 additions and 96 deletions

View file

@ -900,9 +900,6 @@ pub fn TestAssemblyChooser() -> View {
let state = use_context::<AppState>();
let assembly = &state.assembly;
// pause realization
assembly.keep_realized.set(false);
// clear state
assembly.regulators.update(|regs| regs.clear());
assembly.elements.update(|elts| elts.clear());
@ -923,9 +920,6 @@ pub fn TestAssemblyChooser() -> View {
"irisawa-hexlet" => load_irisawa_hexlet_assemb(assembly),
_ => ()
};
// resume realization
assembly.keep_realized.set(true);
});
});