From 1b5ca02b8cc9b6a160a8276af461a750ee1a8a1f Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 22 Oct 2026 13:14:40 -0400 Subject: [PATCH] solidcraft-smlib: SMLib's tangent draft corner meets lines at an edge (fork ccc56fd and docs) Pinned at the fork's draft-corners head: a drafted rectangle (or any line-line corner) has its walls meet at a corner edge under the tangent rule as well, 6 faces rather than 14. A curvature refusal for a curve that is neither a line nor an arc names that curve's start. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt --- crates/smlib/SMLIB_REV | 2 +- crates/smlib/src/lib.rs | 2 +- crates/smlib/src/sweeps.rs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/smlib/SMLIB_REV b/crates/smlib/SMLIB_REV index 639a91baa..0f2b80448 100644 --- a/crates/smlib/SMLIB_REV +++ b/crates/smlib/SMLIB_REV @@ -1 +1 @@ -815fe9f0f9b832bda08a584632178eb9db8af030 +04db68d0f62be428ab5bb325e33c9c7ddac25f68 diff --git a/crates/smlib/src/lib.rs b/crates/smlib/src/lib.rs index bc45ea996..e832683ae 100644 --- a/crates/smlib/src/lib.rs +++ b/crates/smlib/src/lib.rs @@ -90,7 +90,7 @@ impl std::fmt::Display for Error { sweeps::CornerRefusal::Apart => write!(f, "the draft's continued curves do not meet at the corner at {at}"), sweeps::CornerRefusal::WallCloses => write!(f, "the draft closes the wall at {at} before the far end"), sweeps::CornerRefusal::NotExact => { - write!(f, "the draft cannot continue the walls at the corner at {at} exactly (only a line's or an arc's wall continues)") + write!(f, "the draft cannot continue the walls exactly: the curve from {at} is neither a line nor an arc") } } } diff --git a/crates/smlib/src/sweeps.rs b/crates/smlib/src/sweeps.rs index 3372c0a2a..3e5c9fdb0 100644 --- a/crates/smlib/src/sweeps.rs +++ b/crates/smlib/src/sweeps.rs @@ -168,8 +168,9 @@ impl Brep { /// `draft` (radians) leans the walls: positive inward, negative outward; a drafted profile is /// one closed loop, its curves in order, and `direction` is its normal (either way round). /// `corner` closes a drafted profile's sharp corners; a corner it cannot close is - /// [`Error::Corner`] (or [`Error::NotExact`] where a curve there is neither a line nor an - /// arc, under [`DraftCorner::Curvature`]). + /// [`Error::Corner`] (with [`CornerRefusal::NotExact`] where, under + /// [`DraftCorner::Curvature`], a curve of a profile with a sharp corner is neither a line nor + /// an arc). pub fn extrude(profile: &[Curve], direction: [f64; 3], distance: f64, draft: f64, corner: DraftCorner, cap: bool) -> Result { init()?; let l = List::of(profile)?;