Map Helix in the Python host model; record DXF handedness blocker

The host rebuilds the derived spline from the generating parameters on
scripted create/edit. staged_python_helix_lifecycle_over_real_ipc passes
every gate except DXF handedness, which acadrust's reader never applies;
the gap is pinned by a canary via per-format expectations in the shared
mesh lifecycle driver.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-20 14:48:44 +02:00
1 parent b97d74efa4
commit d4c2520907
11 files changed
+180 -13

No files matched your search

+25
View File
@@ -602,3 +602,28 @@ mod tests {
}
}
}
/// Rebuild the derived spline after a scripted create or edit of the
/// generating parameters. `radius` is the top radius; the base radius is the
/// start point's distance from the axis.
pub(crate) fn normalize_scripted_helix(old: Option<&Helix>, new: &mut Helix) -> Result<(), String> {
let unchanged = old.is_some_and(|old| {
old.axis_base_point == new.axis_base_point
&& old.start_point == new.start_point
&& old.axis_vector == new.axis_vector
&& old.radius.to_bits() == new.radius.to_bits()
&& old.turns.to_bits() == new.turns.to_bits()
&& old.turn_height.to_bits() == new.turn_height.to_bits()
&& old.handedness == new.handedness
&& old.constraint == new.constraint
});
if unchanged {
return Ok(());
}
let top = new.radius;
if rebuild(new, top) {
Ok(())
} else {
Err("Helix parameters do not define a valid curve".into())
}
}