Projection keeps free-form geometry exact: tilted circles project to ellipses and tilted arcs to conics (rational quadratic arcs), other sketches' ellipses, splines and conics in parallel planes map exactly, and smooth edges that are neither lines nor arcs become fit splines instead of line chains

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 00:38:11 +00:00
1 parent e4f7ff3997
commit 02de01f87c
4 files changed
+284 -5

No files matched your search

+4
View File
@@ -404,6 +404,10 @@ fn link_polyline(g: &solvecraft_sketch::LinkGeom) -> Vec<Vec2> {
(0..=48).map(|i| c + Vec2::from_angle(s0 + sw * i as f64 / 48.0) * r).collect()
}
LinkGeom::Conic { a, apex, b, rho } => (0..=32).map(|i| solvecraft_sketch::conic_point(a, apex, b, rho, i as f64 / 32.0)).collect(),
LinkGeom::Ellipse { c, major, minor } => {
(0..=96).map(|i| solvecraft_sketch::ellipse_point(c, major, minor, i as f64 / 96.0 * std::f64::consts::TAU)).collect()
}
LinkGeom::Spline { ref pts, control, degree } => solvecraft_sketch::spline_polyline(pts, control, degree),
LinkGeom::Point(_) => Vec::new(),
}
}