From 9ceddd9d568fa6b90bb6aa01f592ff7838b5f226 Mon Sep 17 00:00:00 2001 From: Brett Lawson Date: Fri, 30 Oct 2026 06:56:18 +0100 Subject: [PATCH] solidcore: move the pin to 937a6319 (main, with solidcore#1534, #1537, #1544, #1617, #1608, #1582, #1591, #1625, #1586, #1619, #1620, #1611, #1647, #1646, #1643, #1642, #1638, #1635, #1633: planar section curves, SM_API intersections, cut, HCR silhouettes on solids, UV trim checks on the surface and tiny loops oriented, projection, trimming, tessellated boundaries and knot removal, the fillet refusal that leaves the body unchanged, Cone::lean_cylinder as a cone, and the fork's WR-260, WR-550, WR-545, WR-543, WR-80, WR-534 and WR-532 opt-ins) CreateParallelProjectionCurves now takes the curve itself (any of the SmBSplineCurve classes), so smlib_project_curves passes its line, arc or B-spline as the capi's GetRootCurve() does. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/smlib/src/core/sweep.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ba9197f8..77e57b276 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4054,7 +4054,7 @@ dependencies = [ [[package]] name = "solidcore" version = "0.0.1" -source = "git+https://github.com/tangency-labs/solidcore?rev=b2450cbf941c83a1f9932d4cf629a6363840edb7#b2450cbf941c83a1f9932d4cf629a6363840edb7" +source = "git+https://github.com/tangency-labs/solidcore?rev=937a63195fbf5a832c37271b1b3643e1c36bbec1#937a63195fbf5a832c37271b1b3643e1c36bbec1" dependencies = [ "thiserror 2.0.21", ] diff --git a/Cargo.toml b/Cargo.toml index 2ff63500f..d9865569e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ solidcraft-3dx-client = { path = "crates/threedx-client" } # they reach parity (crates/smlib/src/route.rs). Pinned; move the rev on its own commit. For a # local checkout, add `[patch."https://github.com/tangency-labs/solidcore"] solidcore = { path = # "../solidcore/crates/solidcore" }` to a `.cargo/config.toml` outside the repository. -solidcore = { git = "https://github.com/tangency-labs/solidcore", rev = "b2450cbf941c83a1f9932d4cf629a6363840edb7" } +solidcore = { git = "https://github.com/tangency-labs/solidcore", rev = "937a63195fbf5a832c37271b1b3643e1c36bbec1" } # foundation thiserror = "2" diff --git a/crates/smlib/src/core/sweep.rs b/crates/smlib/src/core/sweep.rs index 7f8bcdf71..40b2683f0 100644 --- a/crates/smlib/src/core/sweep.rs +++ b/crates/smlib/src/core/sweep.rs @@ -1478,8 +1478,12 @@ pub(crate) fn project_curves( }; let mut out = Vec::new(); for c in &given { - let Some(root) = bspline(c)? else { return Ok(Err(Error::Argument)) }; - let made = match create_parallel_projection_curves(k, b, &root, dir, &opts) { + // curve->GetRootCurve(): a line, an arc and a B-spline are their own root, and + // go in as themselves + if !matches!(c.kind(), CurveKind::BSpline(_) | CurveKind::Line(_) | CurveKind::Ellipse(_)) { + return Ok(Err(Error::Argument)); + } + let made = match create_parallel_projection_curves(k, b, c, dir, &opts) { Ok(m) => m.curves_3d.unwrap_or_default(), Err(e) => return Ok(Err(status(e))), };