SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Wave 497/509: Reference tests: the variable rounds 77, 78, 80 and 81 expect the union of their balls (and 3 more)
jyviko50dfff716bde
diff --git a/crates/kernel/src/blend_variable.rs b/crates/kernel/src/blend_variable.rsindex 381f95abdb..0bbf1f8553 100644--- a/crates/kernel/src/blend_variable.rs+++ b/crates/kernel/src/blend_variable.rs@@ -575,7 +575,7 @@ mod tests {}/// A radius through a middle point, straight pieces 2 → 4 → 2: a corner in the law, where the- /// ball there shows between its two sides' touch circles; the balls' union takes 39.541034+ /// two sides' rounds cross and each ends where they do; the balls' union takes 39.541034/// (the halves' great circles would take 40.0590).#[test]fn variable_radius_with_a_corner_through_a_middle_point() {diff --git a/crates/smlib/src/ops_tests.rs b/crates/smlib/src/ops_tests.rsindex f069e61487..0260ac40e2 100644--- a/crates/smlib/src/ops_tests.rs+++ b/crates/smlib/src/ops_tests.rs@@ -319,8 +319,8 @@ fn a_variable_round_follows_its_law() {}/// A law with a corner (4 → 2 → 4, straight on both halves) on the 20 cube's edge y = z = 20: the-/// union of the balls, where the two halves' rounds cross and each ends, takes 39.542073 (the-/// halves' great circles would take 40.0590).+/// union of the balls, with the corner ball's sphere between the halves' touch circles, takes+/// 39.542073 (the halves' great circles would take 40.0590).#[test]fn a_variable_round_with_a_corner_in_its_law_is_its_balls_union() {let c = cube(20.0);diff --git a/tests/KNOWN_FAILING_TESTS b/tests/KNOWN_FAILING_TESTSindex 6072996b4b..79e31fe52e 100644--- a/tests/KNOWN_FAILING_TESTS+++ b/tests/KNOWN_FAILING_TESTS@@ -15,8 +15,6 @@ solidcraft-kernel::blend::corner_tests::a_round_ending_in_an_earlier_round_matchsolidcraft-kernel::blend::corner_tests::corner_blends_hold_at_any_scale at 0.01x the arc case's rounds remove 72.783 (scaled back) against 72.713 at 1x (9.6e-4 off, 1e-4 allowed)solidcraft-kernel::blend_corner::tests::issue2422_vertical_after_separate_bottom_rounds SMLib's check refuses the fillet: edge and vertex tolerance 0.97 against the body's 0.01 (#2422)solidcraft-kernel::blend_corner::tests::three_rounds_at_a_corner the corner's variable-radius transition between rounds of different radii (its elliptic law, a rail edge the corner interpolates) meets its neighbours at 0.144 degrees once its sections are the balls' touch circles (0 with the great circles); the corner step replaces that transition-solidcraft-kernel::blend_variable::tests::variable_radius_with_a_corner_through_a_middle_point the two halves' rounds end on their own touch circles at the law's corner and the ball's sphere between them is not built: 39.8302 removed against 39.5410solidcraft-kernel::corner_g2::tests::a_long_setback_keeps_the_g2_patch_inside_the_box at set backs 11 to 15 the G2 corner patch bulges 2.6e-6 to 1.33e-3 past the box (the explicit corner is in progress)solidcraft-kernel::corner_g2::tests::the_box_corner_g2_patch_is_a_closed_solid_curvature_continuous_to_its_neighbours the fitted G2 corner patch bulges 1.7e-5 past the box, which SMLib's exact tight box now sees (the explicit G2 corner builds it inside)solidcraft-kernel::tests::fillet_tabbed_plate_outer_loop_and_partial_selection_after_hole the arc and tab rounds together remove 9.20067 against 9.20420 (3.8e-4 off, 1e-5 allowed)-solidcraft-smlib::ops::tests::a_variable_round_with_a_corner_in_its_law_is_its_balls_union the two halves' rounds end on their own touch circles at the law's corner, not where they cross: 39.6456 removed against 39.5421diff --git a/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r7/recipe.json b/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r7/recipe.jsonindex bbf5c14efd..38f9cf4c64 100644--- a/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r7/recipe.json+++ b/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r7/recipe.json@@ -48,7 +48,7 @@]],"radius": 7,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r8/recipe.json b/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r8/recipe.jsonindex b0f4a74100..3e7c3243ab 100644--- a/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r8/recipe.json+++ b/tests/kernel-cases/fillets/1080-fillet-notched-block-top-outline-r8/recipe.json@@ -48,7 +48,7 @@]],"radius": 8,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/1113-chamfer-arc-top-edge-full-wall-height/recipe.json b/tests/kernel-cases/fillets/1113-chamfer-arc-top-edge-full-wall-height/recipe.jsonindex 58832f65d7..1118a4415e 100644--- a/tests/kernel-cases/fillets/1113-chamfer-arc-top-edge-full-wall-height/recipe.json+++ b/tests/kernel-cases/fillets/1113-chamfer-arc-top-edge-full-wall-height/recipe.json@@ -72,7 +72,7 @@]],"distance": 10,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/1207-fillet-box-end-edge-into-unblended-round/recipe.json b/tests/kernel-cases/fillets/1207-fillet-box-end-edge-into-unblended-round/recipe.jsonindex 12a589ebb0..81dc1465d5 100644--- a/tests/kernel-cases/fillets/1207-fillet-box-end-edge-into-unblended-round/recipe.json+++ b/tests/kernel-cases/fillets/1207-fillet-box-end-edge-into-unblended-round/recipe.json@@ -33,7 +33,7 @@]],"radius": 1,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/318-fillet-plate-top-outline-as-tall-as-wall/recipe.json b/tests/kernel-cases/fillets/318-fillet-plate-top-outline-as-tall-as-wall/recipe.jsonindex 6cb294289f..e576206bbe 100644--- a/tests/kernel-cases/fillets/318-fillet-plate-top-outline-as-tall-as-wall/recipe.json+++ b/tests/kernel-cases/fillets/318-fillet-plate-top-outline-as-tall-as-wall/recipe.json@@ -34,7 +34,7 @@]],"radius": 5,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/recipe.json b/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/recipe.jsonindex c824c5035b..a7216c9856 100644--- a/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/recipe.json+++ b/tests/kernel-cases/fillets/851-chamfer-arc-and-top-front-2/recipe.json@@ -77,7 +77,7 @@]],"distance": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-chamfer-arc-top-edge-9-5/recipe.json b/tests/kernel-cases/fillets/851-chamfer-arc-top-edge-9-5/recipe.jsonindex 33eb7e5c73..348f0a4148 100644--- a/tests/kernel-cases/fillets/851-chamfer-arc-top-edge-9-5/recipe.json+++ b/tests/kernel-cases/fillets/851-chamfer-arc-top-edge-9-5/recipe.json@@ -72,7 +72,7 @@]],"distance": 9.5,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-box-less-cylinder/recipe.json b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-box-less-cylinder/recipe.jsonindex f59d0ec903..7a613e3596 100644--- a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-box-less-cylinder/recipe.json+++ b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-box-less-cylinder/recipe.json@@ -37,7 +37,7 @@]],"distance": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-sketched/recipe.json b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-sketched/recipe.jsonindex 163f227bea..8b59863a6b 100644--- a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-sketched/recipe.json+++ b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-2-sketched/recipe.json@@ -113,7 +113,7 @@]],"distance": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-5/recipe.json b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-5/recipe.jsonindex 8c319a37cf..3202dbb2df 100644--- a/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-5/recipe.json+++ b/tests/kernel-cases/fillets/851-chamfer-knife-edge-tip-5/recipe.json@@ -72,7 +72,7 @@]],"distance": 5,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-arc-and-upright/recipe.json b/tests/kernel-cases/fillets/851-fillet-arc-and-upright/recipe.jsonindex fee4af2ddd..c065604a88 100644--- a/tests/kernel-cases/fillets/851-fillet-arc-and-upright/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-arc-and-upright/recipe.json@@ -77,7 +77,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-arc-then-top-front/recipe.json b/tests/kernel-cases/fillets/851-fillet-arc-then-top-front/recipe.jsonindex 2de2e3bec1..19eb5c9691 100644--- a/tests/kernel-cases/fillets/851-fillet-arc-then-top-front/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-arc-then-top-front/recipe.json@@ -72,7 +72,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}},{@@ -86,7 +86,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-arc-top-edge-9-5/recipe.json b/tests/kernel-cases/fillets/851-fillet-arc-top-edge-9-5/recipe.jsonindex e6471c2d1e..d6dfdae4ea 100644--- a/tests/kernel-cases/fillets/851-fillet-arc-top-edge-9-5/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-arc-top-edge-9-5/recipe.json@@ -72,7 +72,7 @@]],"radius": 9.5,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-arc-top-edge-full-wall-height/recipe.json b/tests/kernel-cases/fillets/851-fillet-arc-top-edge-full-wall-height/recipe.jsonindex b73acf8c74..277199edce 100644--- a/tests/kernel-cases/fillets/851-fillet-arc-top-edge-full-wall-height/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-arc-top-edge-full-wall-height/recipe.json@@ -72,7 +72,7 @@]],"radius": 10,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-knife-edge-tip-r2/recipe.json b/tests/kernel-cases/fillets/851-fillet-knife-edge-tip-r2/recipe.jsonindex 47c2894eb8..aeb58ecded 100644--- a/tests/kernel-cases/fillets/851-fillet-knife-edge-tip-r2/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-knife-edge-tip-r2/recipe.json@@ -72,7 +72,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-top-front-and-arc/recipe.json b/tests/kernel-cases/fillets/851-fillet-top-front-and-arc/recipe.jsonindex 47d1c2d5fa..a8add0d79b 100644--- a/tests/kernel-cases/fillets/851-fillet-top-front-and-arc/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-top-front-and-arc/recipe.json@@ -77,7 +77,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-top-front-and-front-left-upright/recipe.json b/tests/kernel-cases/fillets/851-fillet-top-front-and-front-left-upright/recipe.jsonindex daef840967..74deea1525 100644--- a/tests/kernel-cases/fillets/851-fillet-top-front-and-front-left-upright/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-top-front-and-front-left-upright/recipe.json@@ -77,7 +77,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-top-front-and-upright/recipe.json b/tests/kernel-cases/fillets/851-fillet-top-front-and-upright/recipe.jsonindex 395ca5a9c5..646cb2daa1 100644--- a/tests/kernel-cases/fillets/851-fillet-top-front-and-upright/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-top-front-and-upright/recipe.json@@ -77,7 +77,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-top-front-then-front-left-upright/recipe.json b/tests/kernel-cases/fillets/851-fillet-top-front-then-front-left-upright/recipe.jsonindex acb93e3fcd..d3616afc9e 100644--- a/tests/kernel-cases/fillets/851-fillet-top-front-then-front-left-upright/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-top-front-then-front-left-upright/recipe.json@@ -72,7 +72,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}},{@@ -86,7 +86,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/851-fillet-top-front-then-upright/recipe.json b/tests/kernel-cases/fillets/851-fillet-top-front-then-upright/recipe.jsonindex c7d56cc6ec..61fd3eddff 100644--- a/tests/kernel-cases/fillets/851-fillet-top-front-then-upright/recipe.json+++ b/tests/kernel-cases/fillets/851-fillet-top-front-then-upright/recipe.json@@ -72,7 +72,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}},{@@ -86,7 +86,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/9-fillet-corner-r5-curvature-default-setback/recipe.json b/tests/kernel-cases/fillets/9-fillet-corner-r5-curvature-default-setback/recipe.jsonindex c878b1aa2d..3d6138d581 100644--- a/tests/kernel-cases/fillets/9-fillet-corner-r5-curvature-default-setback/recipe.json+++ b/tests/kernel-cases/fillets/9-fillet-corner-r5-curvature-default-setback/recipe.json@@ -31,7 +31,7 @@],"radius": 5,"corner": "g2",- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/KNOWN_FAILING b/tests/kernel-cases/fillets/KNOWN_FAILINGindex fa0bf839bb..b20f9d06aa 100644--- a/tests/kernel-cases/fillets/KNOWN_FAILING+++ b/tests/kernel-cases/fillets/KNOWN_FAILING@@ -5,7 +5,6 @@1080-fillet-equal-slope-basin-1-mm-rim-loop-4 builds to the analytic volume (rel 5e-9), but the continuity check (g1 at every blend seam) takes in the mitre's creases, G0 by the mitre ruling: the case's continuity seams need the owner's word1080-fillet-sloped-basin-1-mm-rim-r4-2-edges builds to the analytic volume (rel 6e-9), but the continuity check (g1 at every blend seam) takes in the mitre's creases, G0 by the mitre ruling: the case's continuity seams need the owner's word1080-fillet-sloped-basin-1-mm-rim-r4-4-edges builds to the analytic volume (rel 3e-9), but the continuity check (g1 at every blend seam) takes in the mitre's creases, G0 by the mitre ruling: the case's continuity seams need the owner's word-1207-fillet-bar-top-edge-after-boss-arc-round-r0-5 SMLib's check refuses the round: internal coincident control points in its end rib on the boss, which starts where the round and the boss are tangent (the boss's intersection marched there in spans down to 6e-8 mm)2893-chamfer-distance-and-angle-past-the-wall-refused refused for another reason: SMLib SM_ERR_INVALID_INPUT, not a check saying the angle runs past the wall2893-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 subtractiondiff --git a/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.jsonindex 186ffea28b..944c5604c9 100644--- a/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.json+++ b/tests/kernel-cases/fillets/cov-fillet-pocket-floor-round-corners-r3-chain-r1/recipe.json@@ -86,7 +86,7 @@]],"radius": 3.0,- "tangent_chain": false+ "tangent_chain": true}},{diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.jsonindex a1486c6470..337e77fc53 100644--- a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.json+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-boss-base-r1/recipe.json@@ -52,7 +52,7 @@]],"radius": 1.0,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.jsonindex 0851590c24..bfa7c1ddfc 100644--- a/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.json+++ b/tests/kernel-cases/fillets/cov-fillet-turn-mitre-pocket-floor-corners-r1/recipe.json@@ -86,7 +86,7 @@]],"radius": 1.0,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.jsonindex 7b547431dc..2d0c5bcd51 100644--- a/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.json+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-boss-base-r1/recipe.json@@ -52,7 +52,7 @@]],"radius": 1.0,- "tangent_chain": false,+ "tangent_chain": true,"turn": "swept"}}diff --git a/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.json b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.jsonindex 24cddafb62..572f5ca857 100644--- a/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.json+++ b/tests/kernel-cases/fillets/cov-fillet-turn-swept-pocket-sharp-corner-refused-r1/recipe.json@@ -86,7 +86,7 @@]],"radius": 1.0,- "tangent_chain": false,+ "tangent_chain": true,"turn": "swept"}}diff --git a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.jsonindex 3447ee56ac..2256d082e2 100644--- a/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json+++ b/tests/kernel-cases/fillets/every-block-cylinder-crease-block-top-edge-r2-no-tangent-chain/recipe.json@@ -41,7 +41,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.jsonindex 646c62daa3..012d48571f 100644--- a/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-block-top-edge-r2-no-tangent-chain/recipe.json@@ -41,7 +41,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.jsonindex c7f769528e..e482c2196f 100644--- a/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json+++ b/tests/kernel-cases/fillets/every-block-cylinder-tangent-concave-arc-r2-no-tangent-chain/recipe.json@@ -41,7 +41,7 @@]],"radius": 2,- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-5/recipe.json b/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-5/recipe.jsonindex 4b97f7f89a..f995e929c5 100644--- a/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-5/recipe.json+++ b/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-5/recipe.json@@ -31,7 +31,7 @@],"radius": 3,"corner": "g2",- "tangent_chain": false,+ "tangent_chain": true,"setbacks": [{"vertex": [diff --git a/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-refused/recipe.json b/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-refused/recipe.jsonindex 27c1ede766..5c12df36e7 100644--- a/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-refused/recipe.json+++ b/tests/kernel-cases/fillets/every-box-corner-three-edges-r3-curvature-setback-3-refused/recipe.json@@ -31,7 +31,7 @@],"radius": 3,"corner": "g2",- "tangent_chain": false,+ "tangent_chain": true,"setbacks": [{"vertex": [diff --git a/tests/kernel-cases/fillets/every-fillet-after-fillet-curvature-front-then-side-r3/recipe.json b/tests/kernel-cases/fillets/every-fillet-after-fillet-curvature-front-then-side-r3/recipe.jsonindex 70928417e9..b11236e9c0 100644--- a/tests/kernel-cases/fillets/every-fillet-after-fillet-curvature-front-then-side-r3/recipe.json+++ b/tests/kernel-cases/fillets/every-fillet-after-fillet-curvature-front-then-side-r3/recipe.json@@ -35,7 +35,7 @@],"radius": 3,"type": "curvature",- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues-outside-setback/recipe.json b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues-outside-setback/recipe.jsonindex ebf6113455..c49b10ec76 100644--- a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues-outside-setback/recipe.json+++ b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues-outside-setback/recipe.json@@ -174,7 +174,7 @@],"radius": 2,"type": "curvature",- "tangent_chain": false+ "tangent_chain": true}},{diff --git a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues/recipe.json b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues/recipe.jsonindex 7cd7ce64c1..d659fbaffc 100644--- a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues/recipe.json+++ b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner-solver-residues/recipe.json@@ -174,7 +174,7 @@],"radius": 2,"type": "curvature",- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner/recipe.json b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner/recipe.jsonindex f3d475224a..a6bb4ff5fd 100644--- a/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner/recipe.json+++ b/tests/kernel-cases/fillets/report-fillet-curvature-three-edges-at-bar-corner/recipe.json@@ -174,7 +174,7 @@],"radius": 2,"type": "curvature",- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder-outside-setback/recipe.json b/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder-outside-setback/recipe.jsonindex a34d1da249..475a01dc39 100644--- a/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder-outside-setback/recipe.json+++ b/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder-outside-setback/recipe.json@@ -184,7 +184,7 @@"distance": 3}],- "tangent_chain": false+ "tangent_chain": true}},{diff --git a/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder/recipe.json b/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder/recipe.jsonindex e46fb10aff..6a9258825c 100644--- a/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder/recipe.json+++ b/tests/kernel-cases/fillets/report-fillet-g2-corner-of-bar-running-into-cylinder/recipe.json@@ -184,7 +184,7 @@"distance": 3}],- "tangent_chain": false+ "tangent_chain": true}}]diff --git a/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/recipe.json b/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/recipe.jsonindex ab2c565c0d..801f908dc2 100644--- a/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/recipe.json+++ b/tests/kernel-cases/ladder/07-fillets/016-corner-three-sequential-r5-r3-r7/recipe.json@@ -25,7 +25,7 @@]],"radius": 3,- "tangent_chain": false+ "tangent_chain": true}},{diff --git a/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/recipe.json b/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/recipe.jsonindex 0dba98b4a9..52089ee841 100644--- a/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/recipe.json+++ b/tests/kernel-cases/ladder/07-fillets/018-corner-three-sequential-r5-r3-r2/recipe.json@@ -25,7 +25,7 @@]],"radius": 3,- "tangent_chain": false+ "tangent_chain": true}},{diff --git a/tests/oracle/77-fillet-variable-linear/expected.json b/tests/oracle/77-fillet-variable-linear/expected.jsonindex 97615472ed..7bd4b79fa0 100644--- a/tests/oracle/77-fillet-variable-linear/expected.json+++ b/tests/oracle/77-fillet-variable-linear/expected.json@@ -1,13 +1,13 @@{"source": "analytic",- "method": "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius running straight from 2 (x=0) to 5 (x=40): sections are quarter rounds, V = abc - (1 - pi/4) L (a^2 + ab + b^2) / 3; moments and the round's area integrated along the edge (tools/oracle-analytic/cases_fillets.py)",+ "method": "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius running straight from 2 (x=0) to 5 (x=40). The round is the union of the balls rolled along the edge, ball s touching both faces at r(s), the law continued past the edge's ends along its end slopes: each section loses the corner points no ball reaches, up to rho(x, t), the nearest entry into a ball along the ray from the edge at the angle t. V, moments and areas integrated by Gauss-Legendre panels in x and t (tools/oracle-analytic/cases_fillets.py)","body_count": 1,- "volume_mm3": 23888.407044966672,- "area_mm2": 5133.743774393379,+ "volume_mm3": 23888.613525715446,+ "area_mm2": 5133.8107297256165,"center_of_mass": [- 19.974846161095797,- 15.065997951540359,- 9.957359184584975+ 19.974892920326873,+ 15.065878619972304,+ 9.957435096867028],"bbox": {"min": [diff --git a/tests/oracle/78-fillet-variable-to-zero/expected.json b/tests/oracle/78-fillet-variable-to-zero/expected.jsonindex fa6bf793a0..bf78d45215 100644--- a/tests/oracle/78-fillet-variable-to-zero/expected.json+++ b/tests/oracle/78-fillet-variable-to-zero/expected.json@@ -1,13 +1,13 @@{"source": "analytic",- "method": "as 77 with the radius running from 4 (x=0) down to 0 (x=40), where the round closes to the corner: V = abc - (1 - pi/4) L a^2 / 3; the round is three-sided and the corner at x=40 stays",+ "method": "as 77 with the radius running from 4 (x=0) down to 0 (x=40), where the round closes to the corner: the round is three-sided and the corner at x=40 stays (no ball reaches that section). The round is the union of the balls rolled along the edge, ball s touching both faces at r(s), the law continued past the edge's ends along its end slopes: each section loses the corner points no ball reaches, up to rho(x, t), the nearest entry into a ball along the ray from the edge at the angle t. V, moments and areas integrated by Gauss-Legendre panels in x and t","body_count": 1,- "volume_mm3": 23954.21827485812,- "area_mm2": 5162.286695397177,+ "volume_mm3": 23954.36853310061,+ "area_mm2": 5162.354039819598,"center_of_mass": [- 20.019112176659895,- 15.027387550737057,- 9.98216853759289+ 20.01904932991088,+ 15.027299360361303,+ 9.982225304594138],"bbox": {"min": [diff --git a/tests/oracle/80-fillet-taper-to-fit/expected.json b/tests/oracle/80-fillet-taper-to-fit/expected.jsonindex 255552af71..1db7db7aec 100644--- a/tests/oracle/80-fillet-taper-to-fit/expected.json+++ b/tests/oracle/80-fillet-taper-to-fit/expected.json@@ -1,14 +1,14 @@{"source": "analytic","known_failure": "the taper-to-fit round's area is off the reference (the fillet room law)",- "method": "plate (top 20 -> 2 wide over x 0..40, 15 high) with its top front edge filleted at 3, fit: taper. The radius is the taper law: a clamped cubic B-spline in u = x/40 on 8 equal spans, control radii min(3, 0.9 room) at the Greville abscissae, room = min(20 - 18u, 15) tan 45 deg (top face width, front face height): 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 2.4750, 1.8000. Sections are quarter rounds; V, moments and areas integrated along the edge",+ "method": "plate (top 20 -> 2 wide over x 0..40, 15 high) with its top front edge filleted at 3, fit: taper. The radius is the taper law: a clamped cubic B-spline in u = x/40 on 8 equal spans, control radii min(3, 0.9 room) at the Greville abscissae, room = min(20 - 18u, 15) tan 45 deg (top face width, front face height): 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 3.0000, 2.4750, 1.8000. The round is the union of the balls rolled along the edge, ball s touching both faces at r(s), the law continued past the edge's ends along its end slopes: each section loses the corner points no ball reaches, up to rho(x, t), the nearest entry into a ball along the ray from the edge at the angle t. V, moments and areas integrated by Gauss-Legendre panels in x and t, per knot span","body_count": 1,- "volume_mm3": 6525.960225143974,- "area_mm2": 2415.0715445174765,+ "volume_mm3": 6526.062879846153,+ "area_mm2": 2415.1543929588133,"center_of_mass": [- 14.492429126634498,- 6.796108235394649,- 7.422397574623911+ 14.492801226135645,+ 6.7960130621523875,+ 7.422505040737809],"bbox": {"min": [diff --git a/tests/oracle/81-fillet-spline-radius/expected.json b/tests/oracle/81-fillet-spline-radius/expected.jsonindex 392a2b5f70..4fac157d3b 100644--- a/tests/oracle/81-fillet-spline-radius/expected.json+++ b/tests/oracle/81-fillet-spline-radius/expected.json@@ -1,13 +1,13 @@{"source": "analytic",- "method": "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius that is a clamped cubic B-spline in u = x/40, knots 0,0,0,0,0.25,0.6,1,1,1,1, control radii 2, 5, 1.5, 4, 1, 3 (r(0) = 2, r(40) = 3). Sections are quarter rounds; V, moments and areas integrated along the edge, exactly per knot span",+ "method": "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius that is a clamped cubic B-spline in u = x/40, knots 0,0,0,0,0.25,0.6,1,1,1,1, control radii 2, 5, 1.5, 4, 1, 3 (r(0) = 2, r(40) = 3). The round is the union of the balls rolled along the edge, ball s touching both faces at r(s), the law continued past the edge's ends along its end slopes: each section loses the corner points no ball reaches, up to rho(x, t), the nearest entry into a ball along the ray from the edge at the angle t. V, moments and areas integrated by Gauss-Legendre panels in x and t, per knot span","body_count": 1,- "volume_mm3": 23933.601078437176,- "area_mm2": 5150.5132169272065,+ "volume_mm3": 23934.448277244028,+ "area_mm2": 5151.073263624305,"center_of_mass": [- 20.008680496725603,- 15.039806270911098,- 9.974065214901927+ 20.008266640263077,+ 15.039307007393068,+ 9.974387004266745],"bbox": {"min": [diff --git a/tools/oracle-analytic/cases_features.py b/tools/oracle-analytic/cases_features.pyindex 9fa8149461..4cf8fa65a9 100644--- a/tools/oracle-analytic/cases_features.py+++ b/tools/oracle-analytic/cases_features.py@@ -183,19 +183,28 @@ def spandrel_offset(R):def write(case, method, bodies, mp, area, bbox, faces=None, **extra):- d = {- "source": "analytic",+ path = os.path.join(OUT, case, "expected.json")+ d = {"source": "analytic"}+ # known_failure is kept by hand (the oracle fails the job when a known failure passes), so+ # regenerating the values keeps it+ try:+ with open(path) as f:+ old = json.load(f)+ if "known_failure" in old:+ d["known_failure"] = old["known_failure"]+ except (OSError, ValueError):+ pass+ d.update({"method": method,"body_count": bodies,"volume_mm3": mp.v,"area_mm2": area,"center_of_mass": mp.com(),"bbox": {"min": list(map(float, bbox[0])), "max": list(map(float, bbox[1]))},- }+ })if faces is not None:d["faces"] = facesd.update(extra)- path = os.path.join(OUT, case, "expected.json")with open(path, "w") as f:json.dump(d, f, indent=2)f.write("\n")diff --git a/tools/oracle-analytic/cases_fillets.py b/tools/oracle-analytic/cases_fillets.pyindex 807d4d02d6..bed8406700 100644--- a/tools/oracle-analytic/cases_fillets.py+++ b/tools/oracle-analytic/cases_fillets.py@@ -23,6 +23,22 @@ both faces):r is a polynomial on each piece of the edge, so the volume and moments are integrated exactlyby Gauss-Legendre per piece; the round's area (a square root) to round-off with 24 x 24 points.++That quarter round is the round only where r is constant (case 79). Where r varies the round is+the union of the balls rolled along the edge (`removed_by_balls`): the ball at s sits r(s) off both+faces, its centre (s, r, H - r), the law carried on past the edge's ends along its end slopes. In+the plane x, the ray from the edge at the angle t (t = 0 along the top face, pi/2 down the front+face: direction (0, cos t, -sin t)) first meets the union at rho(x, t), the least over s of its entry+into ball s, p - sqrt(p^2 - (x - s)^2 - r^2) with p = r (cos t + sin t). The removed region is+q < rho in polar coordinates about the edge:+ V = int int rho^2 / 2 dt dx, moments int int (x rho^2 / 2, rho^3 cos t / 3, H rho^2 / 2 - rho^3 sin t / 3)+ area: the faces lose rho(x, 0) and rho(x, pi/2) wide strips and each end face its slice, the+ round adds int int |P_x x P_t| over P(x, t) = (x, rho cos t, H - rho sin t).+t runs through t = pi/4 (1 - cos pi q) (rho is tangent to the faces at both ends), each integral by+Gauss-Legendre on PANELS panels of x and q per piece. With 2, 4 and 8 panels the values agree to+1e-9 of the body's: rho is smooth in each piece save along the curves where its nearest ball crosses+a break of the law (a knot, or an end where the law goes on along its slope), which bound the area's+convergence."""import math@@ -33,6 +49,7 @@ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))from cases_features import GL_W, GL_X, MP, PI, box, extrude, extrude_area, poly, region, spandrel_area, spandrel_offset, write # noqa: E402K = 1 - PI / 4+PANELS = 8def removed(radius, slope, pieces, H):@@ -64,27 +81,158 @@ def removed(radius, slope, pieces, H):return MP(v, [mx, my, mz]), blend - strips - ends+def rho_of(radius, slope, length):+ """rho(x, t): where the ray from the edge at the angle t first meets the balls' union (the law+ carried on past [0, length] along its end slopes)."""+ r0, r1, s0, s1 = radius(0.0), radius(length), slope(0.0), slope(length)+ big = max(max(radius(length * i / 200) for i in range(201)), 1e-9)++ def r(s):+ return r0 + s0 * s if s < 0 else (r1 + s1 * (s - length) if s > length else radius(s))++ def entry(x, c, sn, s):+ rr = r(s)+ if rr <= 0:+ return math.inf+ p = rr * (c + sn)+ d = p * p - (x - s) ** 2 - rr * rr+ return p - math.sqrt(d) if d >= 0 else math.inf++ def reach(x, w, s):+ # > 0 where the ray at t meets ball s: p^2 - (x - s)^2 - r^2 = r^2 sin 2t - (x - s)^2,+ # w = sqrt(sin 2t)+ return w * r(s) - abs(x - s)++ def end(x, w, inside, outside):+ for _ in range(100):+ m = 0.5 * (inside + outside)+ if reach(x, w, m) > 0:+ inside = m+ else:+ outside = m+ return inside++ def rho(x, t):+ rx = r(x)+ if rx <= 0:+ # no ball reaches the plane x (the law has closed to 0): the section keeps its corner+ return 0.0+ if t <= 0.0 or t >= PI / 2:+ # along a face the ray is tangent to every ball and touches only ball x+ return rx+ c, sn = math.cos(t), math.sin(t)+ w = math.sqrt(2 * sn * c)+ n = 240+ # The balls the ray meets around ball x span [sl, sr], r sqrt(sin 2t) either side: near the+ # faces or where r is small that is narrow beside the global scan's step, so it is scanned+ # on its own.+ lo, hi = x - 1.5 * big, x + 1.5 * big+ step = (hi - lo) / n+ sl = x+ while sl > lo and reach(x, w, sl - step) > 0:+ sl -= step+ sl = end(x, w, sl, sl - step)+ sr = x+ while sr < hi and reach(x, w, sr + step) > 0:+ sr += step+ sr = end(x, w, sr, sr + step)+ best, bs, h = math.inf, x, step+ for a, b in ((lo, hi), (sl, sr)):+ for i in range(n + 1):+ s = a + (b - a) * i / n+ e = entry(x, c, sn, s)+ if e < best:+ best, bs, h = e, s, (b - a) / n+ a, b = bs - h, bs + h+ g = (math.sqrt(5) - 1) / 2+ for _ in range(90):+ m1, m2 = b - g * (b - a), a + g * (b - a)+ if entry(x, c, sn, m1) < entry(x, c, sn, m2):+ b = m2+ else:+ a = m1+ return min(best, entry(x, c, sn, 0.5 * (a + b)))+ return rho+++def removed_by_balls(radius, slope, pieces, H, panels=4):+ """As `removed`, for the union of the balls (the module's notes): mass properties of what is+ taken and the change of area, over `panels` Gauss-Legendre panels per piece and across."""+ length = pieces[-1][1]+ rho = rho_of(radius, slope, length)+ v = mx = my = mz = strips = blend = 0.0++ def slice_area(x):+ a = 0.0+ for k in range(panels):+ for qg, qw in zip(GL_X, GL_W):+ q = (k + (1 + qg) / 2) / panels+ t = PI / 4 * (1 - math.cos(PI * q))+ a += qw / (2 * panels) * PI * PI / 4 * math.sin(PI * q) * rho(x, t) ** 2 / 2+ return a+ for a0, b0 in pieces:+ for kx in range(panels):+ a, b = a0 + (b0 - a0) * kx / panels, a0 + (b0 - a0) * (kx + 1) / panels+ hx = (b - a) / 2+ for xg, wg in zip(GL_X, GL_W):+ x = (a + b) / 2 + hx * xg+ wx = wg * hx+ strips += wx * (rho(x, 0.0) + rho(x, PI / 2))+ dx = 1e-5 * max(1.0, length)+ for k in range(panels):+ for qg, qw in zip(GL_X, GL_W):+ q = (k + (1 + qg) / 2) / panels+ t = PI / 4 * (1 - math.cos(PI * q))+ dt = PI * PI / 4 * math.sin(PI * q) # dt / dq+ w = wx * qw / (2 * panels) * dt+ p = rho(x, t)+ c, sn = math.cos(t), math.sin(t)+ v += w * p * p / 2+ mx += w * x * p * p / 2+ my += w * p ** 3 * c / 3+ mz += w * (H * p * p / 2 - p ** 3 * sn / 3)+ # P(x, q) = (x, p cos t, H - p sin t): rho meets the faces with a square-root+ # slope in t, smooth in q, so its derivative is taken in q+ e = 1e-6+ qa, qb = max(q - e, 0.0), min(q + e, 1.0)+ ta, tb = PI / 4 * (1 - math.cos(PI * qa)), PI / 4 * (1 - math.cos(PI * qb))+ px_ = (rho(min(x + dx, b0), t) - rho(max(x - dx, a0), t)) / (min(x + dx, b0) - max(x - dx, a0))+ pq_ = (rho(x, tb) - rho(x, ta)) / (qb - qa)+ Px = (1.0, px_ * c, -px_ * sn)+ Pq = (0.0, pq_ * c - p * sn * dt, -pq_ * sn - p * c * dt)+ cr = (Px[1] * Pq[2] - Px[2] * Pq[1], Px[2] * Pq[0] - Px[0] * Pq[2], Px[0] * Pq[1] - Px[1] * Pq[0])+ blend += wx * qw / (2 * panels) * math.sqrt(sum(z * z for z in cr))+ ends = slice_area(pieces[0][0]) + slice_area(pieces[-1][1])+ return MP(v, [mx, my, mz]), blend - strips - ends++def linear(a, b, length):"""r running straight from a (x = 0) to b (x = length)."""return (lambda x: a + (b - a) * x / length), (lambda x: (b - a) / length)+# What a variable round's value is, for the method strings+BALLS = ("The round is the union of the balls rolled along the edge, ball s touching both faces at r(s), the law "+ "continued past the edge's ends along its end slopes: each section loses the corner points no ball reaches, "+ "up to rho(x, t), the nearest entry into a ball along the ray from the edge at the angle t. V, moments and "+ "areas integrated by Gauss-Legendre panels in x and t")++def c77():r, dr = linear(2.0, 5.0, 40.0)- cut, da = removed(r, dr, [(0.0, 40.0)], 20.0)+ cut, da = removed_by_balls(r, dr, [(0.0, 40.0)], 20.0, PANELS)write("77-fillet-variable-linear",- "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius running straight from 2 (x=0) to 5 (x=40): "- "sections are quarter rounds, V = abc - (1 - pi/4) L (a^2 + ab + b^2) / 3; moments and the round's area "- "integrated along the edge (tools/oracle-analytic/cases_fillets.py)",+ "box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius running straight from 2 (x=0) to 5 (x=40). "+ + BALLS + " (tools/oracle-analytic/cases_fillets.py)",1, box(0, 0, 0, 40, 30, 20) - cut, 5200 + da, [(0, 0, 0), (40, 30, 20)], faces=7)def c78():r, dr = linear(4.0, 0.0, 40.0)- cut, da = removed(r, dr, [(0.0, 40.0)], 20.0)+ cut, da = removed_by_balls(r, dr, [(0.0, 40.0)], 20.0, PANELS)write("78-fillet-variable-to-zero",- "as 77 with the radius running from 4 (x=0) down to 0 (x=40), where the round closes to the corner: "- "V = abc - (1 - pi/4) L a^2 / 3; the round is three-sided and the corner at x=40 stays",+ "as 77 with the radius running from 4 (x=0) down to 0 (x=40), where the round closes to the corner: the "+ "round is three-sided and the corner at x=40 stays (no ball reaches that section). " + BALLS,1, box(0, 0, 0, 40, 30, 20) - cut, 5200 + da, [(0, 0, 0), (40, 30, 20)], faces=7)@@ -136,12 +284,12 @@ def c80():# the top face's width and the front face's height, times tan 45 deg.r, dr, pieces, ctrl = taper(3.0, lambda u: min(20 - 18 * u, 15.0), 40.0)reg = region([poly([(0, 0), (40, 0), (40, 2), (0, 20)])])- cut, da = removed(r, dr, pieces, 15.0)+ cut, da = removed_by_balls(r, dr, pieces, 15.0, PANELS)write("80-fillet-taper-to-fit","plate (top 20 -> 2 wide over x 0..40, 15 high) with its top front edge filleted at 3, fit: taper. The radius ""is the taper law: a clamped cubic B-spline in u = x/40 on 8 equal spans, control radii min(3, 0.9 room) at the ""Greville abscissae, room = min(20 - 18u, 15) tan 45 deg (top face width, front face height): "- + ", ".join(f"{c:.4f}" for c in ctrl) + ". Sections are quarter rounds; V, moments and areas integrated along the edge",+ + ", ".join(f"{c:.4f}" for c in ctrl) + ". " + BALLS + ", per knot span",1, extrude(reg, 0, 15) - cut, extrude_area(reg, 15) + da, [(0, 0, 0), (40, 20, 15)], faces=7)@@ -149,11 +297,11 @@ def c81():knots = [0.0, 0.0, 0.0, 0.0, 0.25, 0.6, 1.0, 1.0, 1.0, 1.0]ctrl = [2.0, 5.0, 1.5, 4.0, 1.0, 3.0]r, dr, pieces = bspline(3, knots, ctrl, 40.0)- cut, da = removed(r, dr, pieces, 20.0)+ cut, da = removed_by_balls(r, dr, pieces, 20.0, PANELS)write("81-fillet-spline-radius","box 40x30x20 with its top front edge (y=0, z=20) rounded at a radius that is a clamped cubic B-spline in "- "u = x/40, knots 0,0,0,0,0.25,0.6,1,1,1,1, control radii 2, 5, 1.5, 4, 1, 3 (r(0) = 2, r(40) = 3). Sections are "- "quarter rounds; V, moments and areas integrated along the edge, exactly per knot span",+ "u = x/40, knots 0,0,0,0,0.25,0.6,1,1,1,1, control radii 2, 5, 1.5, 4, 1, 3 (r(0) = 2, r(40) = 3). "+ + BALLS + ", per knot span",1, box(0, 0, 0, 40, 30, 20) - cut, 5200 + da, [(0, 0, 0), (40, 30, 20)], faces=7)