single_equation_pass analytically solves variables and bakes their values as Const() nodes into downstream residual expressions. During drag, the cached residuals use these stale constants even though part positions have changed, causing constraints like Planar distance=0 to silently stop being enforced. Skip single_equation_pass in the pre_drag() path. Only substitution_pass (which replaces genuinely grounded parameters) is safe to cache across drag steps. Newton-Raphson converges in 1-2 iterations from a nearby initial guess anyway, so the prepass optimization is unnecessary for drag. Add regression tests covering the bug scenario and the fix.
9.5 KiB
9.5 KiB