From e1b4ebfe2f399298c92d769f15473901223ae3d4 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Sat, 31 Oct 2026 10:40:56 -0400 Subject: [PATCH] Wave 489/509: Rig: fillet corners graded curvature-continuous, the default to be (and 3 more) 4 commits, squashed; the originals stay reachable from tag archive/merge-main-develop. - a3165f62d jyviko: Rig: fillet corners graded curvature-continuous, the default to be - be0b1b39b jyviko: Rig: the test-peg's front chamfer builds - 6cd4003ad jyviko: Rig: the curvature-continuous corner cases pick the curvature fillet - 4401ffb1f jyviko: Rig: the test-peg's concave chamfer, alone and after the front chamfer, builds Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- tests/kernel-cases/fillets/KNOWN_FAILING | 9 +- .../expected.json | 9 + .../recipe.json | 78 ++++++++ .../expected.json | 9 + .../recipe.json | 175 ++++++++++++++++++ .../expected.json | 9 + .../recipe.json | 155 ++++++++++++++++ .../cov-fillet-g2-mixed-corner/expected.json | 9 + .../cov-fillet-g2-mixed-corner/recipe.json | 56 ++++++ .../expected.json | 9 + .../recipe.json | 107 +++++++++++ .../cov-fillet-g2-pocket-corner/expected.json | 9 + .../cov-fillet-g2-pocket-corner/recipe.json | 55 ++++++ 13 files changed, 685 insertions(+), 4 deletions(-) create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/recipe.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/recipe.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/recipe.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/recipe.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/recipe.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/expected.json create mode 100644 tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/recipe.json diff --git a/tests/kernel-cases/fillets/KNOWN_FAILING b/tests/kernel-cases/fillets/KNOWN_FAILING index 5aef9e908..388e7a9f5 100644 --- a/tests/kernel-cases/fillets/KNOWN_FAILING +++ b/tests/kernel-cases/fillets/KNOWN_FAILING @@ -16,16 +16,17 @@ cov-chamfer-concave-edge-through-up-down-joined-squares SMLib status 1001 on the concave chamfer's tangent chain cov-chamfer-outer-corner-edge-of-a-shelled-box-with-a-lip SMLib's chamfer result is not a closed solid where it ends on the lip cov-fillet-arc-edge-on-an-oblique-cut-of-a-bar SMLib's check refuses the round: internal coincident control points in a B-spline curve +cov-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) +cov-fillet-g2-five-edge-apex-corner refused: the default setback is shorter than where the rounds' contact lines meet (3.5056 mm from the apex); the corner should take a setback that works +cov-fillet-g2-four-edge-apex-corner refused: the default setback is shorter than where the rounds' contact lines meet (3.9027 mm from the apex); the corner should take a setback that works +cov-fillet-g2-mixed-corner not supported yet: SMLib sets back a corner only where its edges are all convex or all concave every-block-cylinder-crease-top-edge-after-arc-round-r1 the r1 round's contact seam with the block's side face reads 60 degrees (the cylinder wall's normal) at its end on the crease (8.660, 5, 15.284): G0 where the round is built tangent every-hole-top-rim-r12-past-plate-bottom SMLib status 1001: a convex round past its face on the tangent side is not yet built by subtraction report-drafted-peg-front-and-concave-rounds-together-r2 not supported yet: SMLib refuses the corner where the drafted front top edge runs tangent into the concave arc (on the cone) as of no kind its blend corners take report-fillet-concave-arc-and-front-top-edge-together-r5-solver-residues the corner patch where the convex and concave rounds meet stands 0.128 out of the front face (box y min -0.0699 against 0.0579) report-fillet-concave-arc-and-front-top-edge-together-r7-solver-residues the corner patch where the convex and concave rounds meet stands 0.230 out of the front face (box y min -0.1723 against 0.0579) report-fillet-concave-arc-and-front-top-edge-together-solver-residues the corner patch where the convex and concave rounds meet stands 0.0374 out of the front face (box y min 0.0205 against 0.0579) -report-peg-concave-chamfer-d2 SMLib status 1001: SmFilletNx1Corner, Corner Edge Computation Failure, at the chamfer's end on the front face, which leaves its contact line on the cylinder tangentially -report-peg-front-and-concave-chamfers-together-d2 SMLib status 1001: SmFilletNx1Corner, Corner Edge Computation Failure, at the chamfers' tangent ends (as report-peg-front-chamfer-d2) +report-peg-front-and-concave-chamfers-together-d2 SMLib status 1001 at the 3x2 mixed-convexity corner where the two chamfers meet on the tangent seam (SmFillet3x2MixedConvexityCorner): the corner, not the tangent ends, which each chamfer alone now builds report-peg-front-and-concave-rounds-together-r2 the corner patch where the convex and concave rounds meet stands 0.0374 out of the front face (box y min -0.0374), and the two rounds meet at (32, 2, 10), where their contact lines on the top cross, with normals 180 degrees apart report-peg-front-and-concave-rounds-together-r5 the corner patch where the convex and concave rounds meet stands 0.128 out of the front face (box y min -0.1278), and the two rounds meet at (27.351, 5, 10), where their contact lines on the top cross, with normals 180 degrees apart -report-peg-front-chamfer-d1-then-concave-chamfer-d2 SMLib status 1001 on the first chamfer (as report-peg-front-chamfer-d2) -report-peg-front-chamfer-d2 SMLib status 1001: SmFilletNx1Corner, Corner Edge Computation Failure, at the chamfer's end on the cylinder, which leaves its contact line on the front face tangentially report-peg-step-front-and-concave-rounds-together-r2 SMLib status 1001: Fillet Surface Computation Failure on the peg read back from STEP (the native peg builds, with its corner patch out of the front face) diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/expected.json new file mode 100644 index 000000000..93379d715 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/expected.json @@ -0,0 +1,9 @@ +{ + "what": "the corner of a half cylinder's top (the top's arc, its straight edge and the upright seam where the flat face meets the cylinder) filleted 2 as a curvature-continuous (G2) fillet", + "source": "invariants", + "method": "a half disc R10 (the arc from (10, 0) round to (-10, 0) and its diameter) extruded 10; the three edges at (10, 0, 10); the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/recipe.json new file mode 100644 index 000000000..723c9a517 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-corner-beside-a-cylinder/recipe.json @@ -0,0 +1,78 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Half" + } + }, + { + "command": "sketch.arc.center_point", + "params": { + "center": [ + 0, + 0 + ], + "start": [ + 10, + 0 + ], + "end": [ + -10, + 0 + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.extrude", + "params": { + "sketch": "Half", + "distance": 10 + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 7.0710678118654755, + 7.0710678118654755, + 10 + ], + [ + 0, + 0, + 10 + ], + [ + 10, + 0, + 5 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/expected.json new file mode 100644 index 000000000..a359951cf --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/expected.json @@ -0,0 +1,9 @@ +{ + "what": "the 5 slant edges of a 5-sided pyramid filleted 2 as a curvature-continuous (G2) fillet: a convex corner of 5 edges at the apex", + "source": "invariants", + "method": "a regular 5-gon of circumradius 20 lofted to the apex (0, 0, 30); its 5 slant edges; the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/recipe.json new file mode 100644 index 000000000..9b2f72416 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-five-edge-apex-corner/recipe.json @@ -0,0 +1,175 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Base" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 1.2246467991473533e-15, + 20.0 + ], + [ + -19.02113032590307, + 6.18033988749895 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -19.02113032590307, + 6.18033988749895 + ], + [ + -11.755705045849465, + -16.180339887498945 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -11.755705045849465, + -16.180339887498945 + ], + [ + 11.755705045849458, + -16.180339887498953 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 11.755705045849458, + -16.180339887498953 + ], + [ + 19.021130325903073, + 6.180339887498944 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 19.021130325903073, + 6.180339887498944 + ], + [ + 1.2246467991473533e-15, + 20.0 + ] + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0, + 0, + 30 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Top" + } + }, + { + "command": "sketch.point", + "params": { + "point": [ + 0, + 0 + ], + "id": "apex" + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "Base" + }, + { + "sketch": "Top", + "point": "apex" + } + ] + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 6.123233995736766e-16, + 10.0, + 15.0 + ], + [ + -9.510565162951535, + 3.090169943749475, + 15.0 + ], + [ + -5.877852522924733, + -8.090169943749473, + 15.0 + ], + [ + 5.877852522924729, + -8.090169943749476, + 15.0 + ], + [ + 9.510565162951536, + 3.090169943749472, + 15.0 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/expected.json new file mode 100644 index 000000000..230618e4a --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/expected.json @@ -0,0 +1,9 @@ +{ + "what": "the 4 slant edges of a 4-sided pyramid filleted 2 as a curvature-continuous (G2) fillet: a convex corner of 4 edges at the apex", + "source": "invariants", + "method": "a regular 4-gon of circumradius 20 lofted to the apex (0, 0, 30); its 4 slant edges; the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/recipe.json new file mode 100644 index 000000000..1ee088fb2 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-four-edge-apex-corner/recipe.json @@ -0,0 +1,155 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Base" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 1.2246467991473533e-15, + 20.0 + ], + [ + -20.0, + 2.4492935982947065e-15 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -20.0, + 2.4492935982947065e-15 + ], + [ + -3.673940397442059e-15, + -20.0 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + -3.673940397442059e-15, + -20.0 + ], + [ + 20.0, + -4.898587196589413e-15 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 20.0, + -4.898587196589413e-15 + ], + [ + 1.2246467991473533e-15, + 20.0 + ] + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "sketch.create", + "params": { + "plane": { + "origin": [ + 0, + 0, + 30 + ], + "x_dir": [ + 1, + 0, + 0 + ], + "y_dir": [ + 0, + 1, + 0 + ] + }, + "name": "Top" + } + }, + { + "command": "sketch.point", + "params": { + "point": [ + 0, + 0 + ], + "id": "apex" + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.loft", + "params": { + "sections": [ + { + "sketch": "Base" + }, + { + "sketch": "Top", + "point": "apex" + } + ] + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 6.123233995736766e-16, + 10.0, + 15.0 + ], + [ + -10.0, + 1.2246467991473533e-15, + 15.0 + ], + [ + -1.8369701987210296e-15, + -10.0, + 15.0 + ], + [ + 10.0, + -2.4492935982947065e-15, + 15.0 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/expected.json new file mode 100644 index 000000000..97c718469 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/expected.json @@ -0,0 +1,9 @@ +{ + "what": "a step's corner (the concave step edge, the lower box's convex front top edge, the upper box's convex upright edge) filleted 2 as a curvature-continuous (G2) fillet", + "source": "invariants", + "method": "a 30 x 20 x 10 box with a 15 x 20 x 10 box joined on its top at x 0..15; the three edges at (15, 0, 10); the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/recipe.json new file mode 100644 index 000000000..319838eb0 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-mixed-corner/recipe.json @@ -0,0 +1,56 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "corner": [ + 0, + 0, + 0 + ], + "length": 30, + "width": 20, + "height": 10, + "body_name": "Step" + } + }, + { + "command": "solid.box", + "params": { + "corner": [ + 0, + 0, + 10 + ], + "length": 15, + "width": 20, + "height": 10, + "operation": "join" + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 15, + 10, + 10 + ], + [ + 22.5, + 0, + 10 + ], + [ + 15, + 0, + 15 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/expected.json new file mode 100644 index 000000000..8f83897b1 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/expected.json @@ -0,0 +1,9 @@ +{ + "what": "the three edges at a top corner of a block drafted 15 deg (an oblique convex corner) filleted 2 as a curvature-continuous (G2) fillet", + "source": "invariants", + "method": "a 30 x 20 rectangle extruded 10 with a 15 deg inward taper; the top front edge, the top left edge and the drafted edge between them at the corner near (0, 0, 10); the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/recipe.json new file mode 100644 index 000000000..5298f8c5a --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-oblique-three-edge-corner/recipe.json @@ -0,0 +1,107 @@ +{ + "commands": [ + { + "command": "sketch.create", + "params": { + "plane": "XY", + "name": "Base" + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 0, + 0 + ], + [ + 30, + 0 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 30, + 0 + ], + [ + 30, + 20 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 30, + 20 + ], + [ + 0, + 20 + ] + ] + } + }, + { + "command": "sketch.line", + "params": { + "points": [ + [ + 0, + 20 + ], + [ + 0, + 0 + ] + ] + } + }, + { + "command": "sketch.finish", + "params": {} + }, + { + "command": "solid.extrude", + "params": { + "sketch": "Base", + "distance": 10, + "taper": "-15 deg" + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 15, + 2.679491924311227, + 10 + ], + [ + 2.679491924311227, + 10, + 10 + ], + [ + 1.3397459621556136, + 1.3397459621556136, + 5 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/expected.json b/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/expected.json new file mode 100644 index 000000000..24d3e17ff --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/expected.json @@ -0,0 +1,9 @@ +{ + "what": "a pocket's corner (its two floor edges and the upright edge between them, all concave) filleted 2 as a curvature-continuous (G2) fillet", + "source": "invariants", + "method": "a 60 x 40 x 10 plate less a 30 x 20 pocket 5 deep from (15, 10); the floor edges and the upright edge at (15, 10); the fillet type curvature (G2 sections and G2 corner patches): every seam of a round and of the corner patch with its neighbours G2, one valid body", + "body_count": 1, + "continuity": { + "order": "g2" + } +} diff --git a/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/recipe.json b/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/recipe.json new file mode 100644 index 000000000..32c2459d1 --- /dev/null +++ b/tests/kernel-cases/fillets/cov-fillet-g2-pocket-corner/recipe.json @@ -0,0 +1,55 @@ +{ + "commands": [ + { + "command": "solid.box", + "params": { + "corner": [ + 0, + 0, + 0 + ], + "length": 60, + "width": 40, + "height": 10 + } + }, + { + "command": "solid.box", + "params": { + "corner": [ + 15, + 10, + 5 + ], + "length": 30, + "width": 20, + "height": 6, + "operation": "cut" + } + }, + { + "command": "solid.fillet", + "params": { + "edges": [ + [ + 30, + 10, + 5 + ], + [ + 15, + 20, + 5 + ], + [ + 15, + 10, + 7.5 + ] + ], + "radius": 2, + "type": "curvature" + } + } + ] +}