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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
This commit is contained in:
jyviko
2026-10-22 13:14:40 -04:00
parent 0459614457
commit 1b5ca02b8c
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
815fe9f0f9b832bda08a584632178eb9db8af030
04db68d0f62be428ab5bb325e33c9c7ddac25f68
+1 -1
View File
@@ -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")
}
}
}
+3 -2
View File
@@ -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<Brep> {
init()?;
let l = List::of(profile)?;