From a683077c43f563d0998e907e8b15bae9e091aa31 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:34:43 -0400 Subject: [PATCH] solidcraft-smlib: a plane face takes SMLib's own trims (fork c6530bf) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt --- crates/smlib/SMLIB_REV | 2 +- crates/smlib/src/export.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/smlib/SMLIB_REV b/crates/smlib/SMLIB_REV index 485043915..ed764d3da 100644 --- a/crates/smlib/SMLIB_REV +++ b/crates/smlib/SMLIB_REV @@ -1 +1 @@ -c8a19a2497cd5bc3702b0f491d3540ca3bb0a4a3 +c6530bfb94c79f266d7d94bf9e9a04c88c2e7b6a diff --git a/crates/smlib/src/export.rs b/crates/smlib/src/export.rs index 03b14d297..b78930e4d 100644 --- a/crates/smlib/src/export.rs +++ b/crates/smlib/src/export.rs @@ -832,7 +832,9 @@ fn native_ordered(arrays: &Arrays) -> Res<(b::Brep, Report, Order)> { let params = nurbs.as_ref().unwrap_or(&surface); let natural = params.natural(); let domain = [onto([r[0], r[2]], natural[0]), onto([r[1], r[3]], natural[1])]; - let spline = matches!(params, b::Surface::Spline { .. } | b::Surface::RationalSpline { .. }); + // SMLib's own trims are taken where the arrays carry them: B-spline faces, NURBS forms, and + // planes (mapped onto the plane's own (u, v) by the export). + let spline = matches!(params, b::Surface::Spline { .. } | b::Surface::RationalSpline { .. } | b::Surface::Plane { .. }); let mut out = Vec::with_capacity(loops.len()); let mut records = Vec::with_capacity(loops.len()); let mut given = Vec::with_capacity(loops.len());