fix: index or bound array replacements, DIM field spellings, path samples, hatch refills and broken tables (#2734)

* fix: index or bound array replacements, DIM field spellings, path samples, hatch refills and broken tables

* address review: index placeable array replacements, search past zero-length DIVIDE runs, per-part broken-table outlines
This commit is contained in:
Dylan M. Taylor
2026-11-10 21:33:42 -05:00
committed by GitHub
parent 95fdf8d11a
commit 2c25c2d700
11 changed files with 188 additions and 28 deletions
+4 -2
View File
@@ -34,10 +34,12 @@ pub(crate) fn arraypath(
_ => (6, if c.closed { l / 6.0 } else { l / 5.0 }),
};
crate::cmd::array::check_size(s, n as u64, objs.len())?;
let Some((p0, t0)) = c.at_length(0.0) else { return Ok(Vec::new()) };
// Segment end lengths once: each sample is then a binary search, not a scan from the start.
let ends = c.end_lengths();
let Some((p0, t0)) = c.at_length_in(&ends, 0.0) else { return Ok(Vec::new()) };
let mut mats = Vec::new();
for i in 1..n {
let Some((p, t)) = c.at_length(step * i as f64) else { continue };
let Some((p, t)) = c.at_length_in(&ends, step * i as f64) else { continue };
let mut m = Mat3::translate(p - p0);
if align {
m = Mat3::rotate_about(p, t.angle() - t0.angle()).then_before(m);