solidcraft-smlib: pin the fork at 276b509, SMLib C++ fixes from solidcore

SMLIB_REV moves from e1ac3c3 to capi-solidcraft 276b509: thread groove
booleans (#435, #410), a holed profile swept along a bent path (#411), a
revolution a turn past its range (#428), shell and offset faces (#402, #380,
#403), the check linear in the body (#431), a far box that leaked (#377),
fillets and chamfers where a neighbouring round collapses (#416, #417, #420,
#379), tangent faces round a non-manifold edge (#383) and split faces of an
exact NURBS surface (#387).

The last one is why the SMLib block-and-cylinder decode test no longer finds a
spline edge on part of its curve: SMLib keeps a split face's parameterization
now. The test keeps its volume check; the decode of such edges stays covered
by spline_edges_on_part_of_their_curve_load_as_that_piece.

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-21 15:26:25 -04:00
parent d22e89bcc7
commit 22cfc69c02
2 changed files with 7 additions and 11 deletions
+6 -10
View File
@@ -399,12 +399,14 @@ fn smlib_torus_decodes_without_meshing_and_plans_with_a_sphere_beside_it() {
}
}
/// SMLib's intersection of a block and a cylinder bounds the top disc with spline edges on
/// part of their curves: the body decodes (it was refused) with the cylinder's volume inside
/// the block, π r² h.
/// SMLib's intersection of a block and a cylinder, both sent as truck's splines, decodes with
/// the cylinder's volume inside the block, π r² h. (SMLib used to bound the top disc with spline
/// edges on part of their curves, which the decode refused; since the fork keeps a split face's
/// surface parameterization it no longer does, and
/// `spline_edges_on_part_of_their_curve_load_as_that_piece` covers that decode directly.)
#[cfg(feature = "smlib")]
#[test]
fn smlib_spline_edges_on_part_of_their_curve_decode() {
fn smlib_intersection_of_truck_splines_decodes_with_its_volume() {
use solidcraft_smlib::BooleanOp;
let block = crate::box_solid(Vec3::new(7.5, 15., 0.), Vec3::new(25., 32.5, 27.5)).unwrap();
let post = crate::cylinder(Vec3::new(12.5, 20., 10.), Vec3::Z, 5., 30.).unwrap();
@@ -412,12 +414,6 @@ fn smlib_spline_edges_on_part_of_their_curve_decode() {
// patches (the import otherwise sends SMLib's cylinder and planes, whose cut leaves circles).
let keeping = |body: &Body| solidcraft_smlib::Brep::from_record_keeping_splines(&crate::brep_record(body).unwrap(), true).unwrap();
let common = keeping(&block).boolean(&keeping(&post), BooleanOp::Intersect).unwrap().unwrap();
let record = common.to_native().unwrap();
assert!(
record.edges.iter().any(|e| matches!(e.curve.natural(), b::Natural::Range(lo, hi) if [lo, hi] != e.interval)
&& matches!(e.curve, b::Curve::Spline { .. } | b::Curve::RationalSpline { .. })),
"a spline edge on part of its curve"
);
let body = crate::native::body_from_smlib(&common).unwrap();
let exact = std::f64::consts::PI * 25. * 17.5;
let ours = crate::measure(&body).unwrap().volume;
+1 -1
View File
@@ -1 +1 @@
e1ac3c31ae1f6c6dae6bd9e0bdfd19952cecff44
276b509ad2b634843b2f256e1eb1fbaa29a5ef87