SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 499/509: Ladder: 016 and 018 refused, their r3 chain takes the vertical edge; 020 and 021 recorded (and 3 more)
jyviko0aa6f15b82e5
diff --git a/crates/kernel/src/tests.rs b/crates/kernel/src/tests.rsindex 2056d1b2e8..d2c6c859b8 100644--- a/crates/kernel/src/tests.rs+++ b/crates/kernel/src/tests.rs@@ -1974,8 +1974,14 @@ fn fillet_three_edges_at_a_corner() {let a = r * r * (1.0 - PI / 4.0);let want = a * (40.0 + 30.0 + 20.0) - 3.0 * a * r + (r * r * r - PI * r * r * r / 6.0);assert!(rel(removed, want) < 2e-3, "removed {removed} vs {want}");+ // The corner is one face: SMLib builds it as a rational patch exactly on the ball's sphere+ // (not an analytic sphere), between the three cylinders and the six planes.let m = measure(&f).unwrap().merged;- assert_eq!(m.face_types.get("sphere"), Some(&1), "{m:?}");+ assert_eq!(+ (m.faces, m.face_types.get("plane"), m.face_types.get("cylinder"), m.face_types.get("other")),+ (10, Some(&6), Some(&3), Some(&1)),+ "{m:?}"+ );}#[test]diff --git a/tests/kernel-cases/fillets/KNOWN_FAILING b/tests/kernel-cases/fillets/KNOWN_FAILINGindex b20f9d06aa..bfe6a7acd9 100644--- a/tests/kernel-cases/fillets/KNOWN_FAILING+++ b/tests/kernel-cases/fillets/KNOWN_FAILING@@ -9,6 +9,8 @@2893-chamfer-two-distances-elliptical-rim SMLib status 1001: the two arcs of the rim take their chamfer offsets each at its own midpoint, where the faces' angle differs (78.5 and 101.5 deg), and their chamfers do not meet at the tangent corners (held for the owner's ruling on unequal chamfers of a varying angle)4782-fillet-bar-edge-wider-than-both-faces SMLib status 1001: a convex round past both its faces is not yet built by subtraction5158-fillet-round-just-past-a-10mm-face SMLib status 1001: the round passes 5e-6 under the box's top back edge, inside the body's tolerance (1e-5), and subtracting its removal region maps that edge to two of the region's faces (SmTopologyIntersector); 10.0001-10.04 open+851-fillet-arc-then-top-front SMLib status 1001: the top front edge's tangent chain (the edge, the arc round's end curve on the front face, the upright under it) rounded R2; along the end curve the R2 ball sits on the arc round's own centre circle, so that piece is the ball about (39.2538, -19, 8) touching front, top and wall (a torus of tube-centre radius 0), the three-edge rolling-ball corner; the same piece on a plane end arc builds (851-fillet-top-front-then-front-left-upright)+851-fillet-top-front-then-upright SMLib status 1001: the upright's tangent chain (the upright, the first round's end curve on the wall, the arc's top edge) rounded R2; along the end curve the R2 ball sits on the first round's axis, so that piece is the ball about (39.2538, -19, 8) touching front, top and wall (a torus of tube-centre radius 0), the three-edge rolling-ball corner; the upright alone builds, the upright with the end curve fails the same; the same piece on a plane end arc builds (851-fillet-top-front-then-front-left-upright)9-fillet-corner-curvature-with-reduce-fit not supported yet: solid.fillet builds corner g2 with the exact fit only9-fillet-corner-curvature-with-taper-fit not supported yet: solid.fillet builds corner g2 with the exact fit onlycov-fillet-g2-corner-beside-a-cylinder not supported yet: the curvature fillet builds its sections only between planar faces ("a picked edge is not on the face beside it" on the cylinder's arc)@@ -17,6 +19,7 @@ cov-fillet-g2-four-edge-apex-corner refused: the default setback is shorter thancov-fillet-g2-mixed-corner not supported yet: SMLib sets back a corner only where its edges are all convex or all concavecov-fillet-g2-oblique-three-edge-corner the G2 corner patch meets the new order-2 section's rounds only G1 at one face seam (its volume holds); the corner step rebuilds the patchcov-fillet-g2-pocket-corner the G2 corner patch meets the new order-2 section's rounds only G1 at one face seam (its volume holds); the corner step rebuilds the patch+cov-fillet-section-curvature-pipe-on-plate-r2 builds, but a seam grades G3 where exactly G2 is wanted (the Gⁿ section on faces of finite smoothness; tangency-labs/smlib#93)cov-fillet-turn-swept-boss-base-r1 not supported yet: solid.fillet has no `turn`; the corners are mitred (12508.9676, the Mitre case's volume)cov-fillet-turn-swept-pocket-sharp-corner-refused-r1 not supported yet: solid.fillet has no `turn`, so the sharp concave corners are mitred, not refusedcov-junction-boss-tilt-20-root-round SMLib fillet status 1001 on a cylinder tilted 20 degrees into the plate (also before the blend rework)diff --git a/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/expected.json b/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/expected.jsonindex ba913b441f..e45c440bdc 100644--- a/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/expected.json+++ b/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/expected.json@@ -1,8 +1,8 @@{"sources": [],- "what": "rounds r5 and r3 on the two top edges at a corner, then r7 on the vertical edge under them: refused, the r7 cannot exist",+ "what": "rounds r5 and r3 on the two top edges at a corner, the r3 with its tangent chain, then a round on the vertical edge under them: the r3 chain has rounded that edge, so the pick takes no edge: refused","source": "invariants",- "method": "the r7 runs on (tangent chain) up the side x=60 along its arc on the r5 round, a circle of radius 5 about the r5 axis: the r7's contact line on that face would be the arc offset 7 towards its centre, radius 5 - 7 < 0, so the blend passes through itself; and along the seam of the r5 and r3 rounds no ball over r3 fits the r3 round. No such round exists, so the right answer is a clean refusal (SMLib: no room for the rolling ball). 018 is the same corner with a radius that fits.",+ "method": "box 60x40x20; the top edge y=40 rounded r5, then the top edge x=60 rounded r3 with its tangent chain: at (60, 35, 20) it runs on tangentially into the r5 round's end arc on x = 60 (a quarter circle about y = 35, z = 15, convex), which runs on at (60, 40, 15) into the vertical edge x=60, y=40, so the r3 rounds all three and the vertical edge is gone: its round is the cylinder r3 about (57, 37), z 0..15, meeting the faces along x=57, y=40 and x=60, y=37. The third pick (60, 40, 8) is 3 from each of those two lines and nearer no other edge: it names neither, and the right answer is a clean refusal asking for a point along one edge. The corner this case was made for, with the r3 on its edge alone, is ladder 07-fillets/020.","outcome": "refused",- "refusal": "the fillet is larger than the faces beside its edges allow"+ "refusal": "give a point along one edge"}diff --git a/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/expected.json b/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/expected.jsonindex f1ac914a9d..4419add89e 100644--- a/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/expected.json+++ b/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/expected.json@@ -1,20 +1,8 @@{"sources": [],- "what": "rounds r5 and r3 on the two top edges at a corner, then r2 on the vertical edge under them, run on up into the corner",+ "what": "rounds r5 and r3 on the two top edges at a corner, the r3 with its tangent chain, then a round on the vertical edge under them: the r3 chain has rounded that edge, so the pick takes no edge: refused","source": "invariants",- "method": "as 016 with a radius that fits (r < 3, the smaller top round): the r2 runs up the vertical edge and on along the side's arc on the r5 round and the seam between the two rounds, tapering to a point where they become tangent. Faces: the box's 6 and the two top rounds, + 3 for the r2 (along the vertical edge, up the arc, along the seam); one valid body inside the box",- "body_count": 1,- "faces": 11,- "bbox": {- "min": [- 0,- 0,- 0- ],- "max": [- 60,- 40,- 20- ]- }+ "method": "box 60x40x20; the top edge y=40 rounded r5, then the top edge x=60 rounded r3 with its tangent chain: at (60, 35, 20) it runs on tangentially into the r5 round's end arc on x = 60 (a quarter circle about y = 35, z = 15, convex), which runs on at (60, 40, 15) into the vertical edge x=60, y=40, so the r3 rounds all three and the vertical edge is gone: its round is the cylinder r3 about (57, 37), z 0..15, meeting the faces along x=57, y=40 and x=60, y=37. The third pick (60, 40, 8) is 3 from each of those two lines and nearer no other edge: it names neither, and the right answer is a clean refusal asking for a point along one edge. The corner this case was made for, with the r3 on its edge alone, is ladder 07-fillets/021.",+ "outcome": "refused",+ "refusal": "give a point along one edge"}diff --git a/tests/kernel-cases/ladder/golden.json b/tests/kernel-cases/ladder/golden.jsonindex 65bb4508f6..19bc8d40d3 100644--- a/tests/kernel-cases/ladder/golden.json+++ b/tests/kernel-cases/ladder/golden.json@@ -1381,14 +1381,6 @@"status": "pass"},"ladder/07-fillets/018-corner-three-sequential-r5-r3-r2": {- "measured": {- "area_mm2": 8591.675008996122,- "body_count": 1,- "edges": 24,- "faces": 11,- "vertices": 15,- "volume_mm3": 47589.770467263734- },"seconds": 0.06135609,"status": "pass"},@@ -1404,6 +1396,22 @@"seconds": 2.083591798,"status": "pass"},+ "ladder/07-fillets/020-corner-three-sequential-r5-r3-r7-partial-chain": {+ "seconds": 0.053107612,+ "status": "pass"+ },+ "ladder/07-fillets/021-corner-three-sequential-r5-r3-r2-partial-chain": {+ "measured": {+ "area_mm2": 8591.674904919324,+ "body_count": 1,+ "edges": 24,+ "faces": 11,+ "vertices": 15,+ "volume_mm3": 47589.7705835473+ },+ "seconds": 0.06135609,+ "status": "pass"+ },"ladder/08-chamfers/001-equal-5": {"measured": {"area_mm2": 8599.26406871193,@@ -1993,5 +2001,5 @@"status": "pass"}},- "reason": "06/023 (1/2-14 NPT) passes: a taper thread's groove follows its crest cone, so no sliver of the flanks is left (volume 8226.4042 against the standard's 8226.4049); the other cases as recorded on SMLib 60b1c6a"+ "reason": "07-fillets/016 and 018 round the r3 with its tangent chain, which takes the vertical edge their third round was to pick (refused: the pick names no edge); 020 and 021 are the same corners with the r3 alone, as 016 and 018 were recorded (021 measured on SMLib f12a101); 06/023 (1/2-14 NPT) passes: a taper thread's groove follows its crest cone, so no sliver of the flanks is left (volume 8226.4042 against the standard's 8226.4049); the other cases as recorded on SMLib 60b1c6a"}