mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 02:25:55 +00:00
Tests: expectations for the SMLib fixes of 2026-10-29
With SMLib integration-overnight + b78bd4a (the fixes of 2026-10-29), three expectations that held a refusal now build, each checked against its exact answer: - rig fillets/1207-fillet-box-end-edge-into-unblended-round (was ...-refused): the end face's top edge of a cube rounded r3 along its top back edge, rounded r1 alone (tangent chain off), builds. Its round runs on along y through the r3 round's end until that surface drops below it at y = 17 + sqrt(5): V = 8000 - 20 (9 - 9 pi/4) - 17 (1 - pi/4) - 0.218236 = 7957.505202 (the last term the section under the round, integrated exactly); SMLib gives 7957.505245. - blend_smlib smooth_edges_and_unfinished_tangent_chains_are_refused_saying_why: the same cube builds, at that volume. - modify_history_tests::smlib::draft_tilts_a_side_and_keeps_its_name: the rod's side, a cylinder along the pull, drafts 5 deg to a frustum, radius 5 at the neutral plane and 5 - 10 tan 5 deg at the top, at its exact volume. tests/kernel-cases/fillets/KNOWN_FAILING drops 1557-fillet-vertical-corners-after- bottom-rounds, which passes now; the other eight still fail, so the gate holds (81 pass, 8 known failing, no regression). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -610,9 +610,10 @@ mod tests {
|
||||
|
||||
/// A smooth edge (a round's seam with the face it runs into) has nothing to round: refused
|
||||
/// before SMLib, saying so. An edge that runs on tangentially into one left out is SMLib's to
|
||||
/// end: where it cannot (the end face's top edge into the round's end arc) the refusal says
|
||||
/// why, and rounded with its tangent chain the edge builds; where it can (a vertical edge run
|
||||
/// on up a top round's end arc into the corner, ladder 07-fillets/018) it builds.
|
||||
/// end: the end face's top edge into the round's end arc builds, its round run on through the
|
||||
/// arc's round until it leaves the material (rig fillets/1207-fillet-box-end-edge-into-
|
||||
/// unblended-round), and with its tangent chain the edge builds too; a vertical edge run on
|
||||
/// up a top round's end arc into the corner (ladder 07-fillets/018) builds.
|
||||
#[test]
|
||||
fn smooth_edges_and_unfinished_tangent_chains_are_refused_saying_why() {
|
||||
let b = cube();
|
||||
@@ -620,10 +621,12 @@ mod tests {
|
||||
// the seam where the r3 round meets the top, 3 in from the old edge
|
||||
let seam = imp::blend(&rounded, "fillet", Kind::Round, &[Vec3::new(10.0, 17.0, 20.0)], &[1.0]).unwrap_err().to_string();
|
||||
assert!(seam.contains("is smooth: its faces meet tangentially, so there is nothing to round"), "{seam}");
|
||||
// the end face's top edge runs on tangentially into the round's end arc
|
||||
// the end face's top edge runs on tangentially into the round's end arc: its r1 round
|
||||
// goes on along y through the r3 round until that drops below it, at y = 17 + sqrt(5)
|
||||
// (the rig case's closed form: 8000 - 20 (9 - 9 pi/4) - 17 (1 - pi/4) - 0.218236)
|
||||
let top = Vec3::new(0.0, 8.0, 20.0);
|
||||
let alone = imp::blend(&rounded, "fillet", Kind::Round, &[top], &[1.0]).unwrap_err().to_string();
|
||||
assert!(alone.contains("continues tangentially"), "{alone}");
|
||||
let alone = fillet(&rounded, &[top], 1.0).unwrap();
|
||||
assert!((volume(&alone) - 7957.505202).abs() < 1e-3, "{}", volume(&alone));
|
||||
let chain = crate::tangent_chain(&rounded, &[top]).unwrap();
|
||||
assert!(chain.len() > 1, "{chain:?}");
|
||||
let whole = fillet(&rounded, &chain, 1.0).unwrap();
|
||||
|
||||
@@ -596,10 +596,13 @@ mod smlib {
|
||||
let tilted = with(h, &[face(face_at(&b, side))]);
|
||||
assert_eq!(tilted.len(), 1, "{h:?}");
|
||||
assert_eq!(h.faces[tilted[0]].change, Change::Modified);
|
||||
// A round wall isn't flat; the top isn't parallel to the pull.
|
||||
// A round wall along the pull leans in the same way: the rod drafts to a frustum, radius
|
||||
// 5 at the neutral plane and 5 - 10 tan 5 deg at the top. The top isn't parallel to the pull.
|
||||
let rod = cylinder(Vec3::ZERO, Vec3::Z, 5.0, 10.0).unwrap();
|
||||
let e = offset_backend::draft(&rod, &[Vec3::new(5.0, 0.0, 5.0)], &Plane::XY, Vec3::Z, 5.0 * deg).unwrap_err();
|
||||
assert!(e.to_string().contains("not supported yet"), "{e}");
|
||||
let frustum = offset_backend::draft(&rod, &[Vec3::new(5.0, 0.0, 5.0)], &Plane::XY, Vec3::Z, 5.0 * deg).unwrap();
|
||||
let top = 5.0 - 10.0 * (5.0 * deg).tan();
|
||||
let exact = std::f64::consts::PI * 10.0 * (25.0 + 5.0 * top + top * top) / 3.0;
|
||||
assert!((volume(&frustum) - exact).abs() < 1e-3, "{} vs {exact}", volume(&frustum));
|
||||
let e = offset_backend::draft(&b, &[Vec3::new(20.0, 15.0, 20.0)], &Plane::XY, Vec3::Z, 5.0 * deg).unwrap_err();
|
||||
assert!(e.to_string().contains("not supported yet"), "{e}");
|
||||
}
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#1207"
|
||||
],
|
||||
"what": "an edge that runs on tangentially into a round left out of the blend (tangent chain off) is refused saying so: a blend cannot end where its edge continues smoothly",
|
||||
"source": "invariants",
|
||||
"method": "cube 20, its top back edge (y=20, z=20) rounded r3; the end face's top edge (x=0, z=20, y 0..17) then rounded r1 alone, tangent_chain false: at (0, 17, 20) it continues tangentially into the round's end arc, which is not blended with it. A round has no end there (SMLib blends a tangent chain as one sequence), so the right answer is a clean refusal naming that; with the tangent chain on it builds",
|
||||
"outcome": "refused",
|
||||
"refusal": "continues tangentially"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"sources": [
|
||||
"tangency-labs/solidcraft#1207"
|
||||
],
|
||||
"what": "an edge that runs on tangentially into a round left out of the blend (tangent chain off) is rounded on past the round's end arc until it leaves the material",
|
||||
"source": "analytic",
|
||||
"method": "cube 20 (V0 = 8000), its top back edge (y=20, z=20) rounded r3: removes 20 (9 - 9 pi/4) = 38.628316. The end face's top edge (x=0, z=20, y 0..17) then rounded r1 alone, tangent_chain false: over y 0..17 it removes 17 (1 - pi/4) = 3.648231; at y=17 the edge goes on tangentially into the r3 round's end arc, and the r1 round's cylinder (axis x=1, z=19) runs on along y through the r3 round, cutting the part of its section under the round's surface z = 17 + sqrt(9 - (y-17)^2) until that surface drops below z=19 at y = 17 + sqrt(5): with t = sqrt(9 - (y-17)^2) - 2, the section's area under it is t - (t sqrt(1-t^2) + asin t)/2, integrated over y 17..17+sqrt(5) (Simpson, 200000 steps) = 0.218236. V = 8000 - 38.628316 - 3.648231 - 0.218236 = 7957.505202",
|
||||
"outcome": "solid",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 7957.505202,
|
||||
"continuity": {
|
||||
"order": "g1"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
# The fillet cases that fail today, one a line: `<case> <why it fails today>`. Sorted. The fillet
|
||||
# rig gate (.github/workflows/fillet-rig.yml) fails on a case that fails and is not listed here,
|
||||
# and on a listed case that passes: a fix removes its line in the same pull request.
|
||||
# Baseline: develop 229739a70 (SMLib 7e917f0), aarch64 Linux, 2026-10-29.
|
||||
# Baseline: develop 242bbc89f with the SMLib fixes of 2026-10-29 (integration-overnight + b78bd4a), aarch64 Linux.
|
||||
1207-fillet-bar-top-edge-after-boss-arc-round-r0-5 SMLib's check refuses the round: internal coincident control points in a B-spline curve (an internal pole)
|
||||
1557-fillet-vertical-corners-after-bottom-rounds SMLib status 1001 since bodies are read back from their records (#8625): the bottom rounds come back as SmCylinder where SMLib's blend made SmCone(0), and the corner-ball trace starts 2.78e-4 off
|
||||
4782-fillet-bar-edge-wider-than-both-faces SMLib status 1001: a convex round past both its faces is not yet built by subtraction
|
||||
4782-fillet-two-end-verticals-past-a-full-round SMLib's result is not a closed solid, where a refusal naming 7.5 mm (fillet_max for the exact fit) is right
|
||||
5158-fillet-round-just-past-a-10mm-face SMLib status 1001: a convex round 0.01 past its face is not yet built by subtraction (10.0001-10.04 open)
|
||||
|
||||
Reference in New Issue
Block a user