diff --git a/Cargo.lock b/Cargo.lock index 0ba9197f87..77e57b2762 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 2ff63500fe..d9865569e0 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 7f8bcdf71b..40b2683f0f 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))), };