Compare commits

...

1 Commits

Author SHA1 Message Date
rlartot 3d678dcfc2 test: add SolidCraft fixtures 2852 and 3062
Two SolidCraft regression fixtures for --solidcraft-cases, each volume
recomputed in closed form. The 2852 expectation clips the 54 x 22 x 48
cavity box (z from -1) to the 47 mm of solid it cuts: 54*20*47, not
54*20*48; expected volume 8390.176727.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 16:36:43 -05:00
2 changed files with 208 additions and 0 deletions
@@ -0,0 +1,91 @@
{
"issue": "https://github.com/tangency-labs/solidcraft/issues/1668 (earlier report); fix PR below",
"pr": "https://github.com/tangency-labs/solidcraft/pull/2852",
"test": "crates/kernel/src/blend_fit.rs (fit check), test outside_round_concentric_with_the_inside_round_of_a_wall_fits",
"summary": "An upside-down U, 3 mm thick, 60 x 20 x 50: an r 15 round on the two inside top edges, then an r 18 round on the two outside ones (concentric, wall stays 3 mm) was refused by SolidCraft's fit check. Volume from the PR test: the shell plus 2 * 20 * (1 - pi/4) * (15^2 - 18^2). Also expected: r 30 outside is refused (largest radius ~25.24).",
"cases": [
{
"name": "u_r15_inside_r18_outside",
"steps": [
{
"op": "box",
"id": "outer",
"origin": [
0,
0,
0
],
"size": [
60,
20,
50
]
},
{
"op": "box",
"id": "hollow",
"origin": [
3,
-1,
-1
],
"size": [
54,
22,
48
]
},
{
"op": "difference",
"id": "u",
"a": "outer",
"b": "hollow"
},
{
"op": "fillet",
"id": "inner",
"body": "u",
"edges": [
[
3,
10,
47
],
[
57,
10,
47
]
],
"radius": 15
},
{
"op": "fillet",
"id": "result",
"body": "inner",
"edges": [
[
0,
10,
50
],
[
60,
10,
50
]
],
"radius": 18
}
],
"expect": {
"lumps": 1,
"volume": {
"value": 8390.176727,
"tol": 0.731018,
"formula": "60*20*50 - 54*20*47 + 2*20*(1 - pi/4)*(15^2 - 18^2)"
}
}
}
]
}
@@ -0,0 +1,117 @@
{
"issue": "https://github.com/tangency-labs/solidcraft/issues/3062",
"pr": "https://github.com/tangency-labs/solidcraft/pull/3485 (fix by another contributor, open; our PR #3297 was closed, cause analysis only)",
"test": "none upstream yet; analytic case derived from the issue (synthetic kernel repro, not the reporter's file)",
"summary": "A 14 mm cylinder, 48.2 high, with a 5.4 mm boss joined on top and sunk 0.5 mm into it; an r 0.8 fillet on the outer top edge was refused ('the blend is taller than the walls') because the union split the cylinder wall at the boss foot. Expected: the round of the outer edge, volume by Pappus. Control: boss flush with the top.",
"cases": [
{
"name": "boss_sunk_0.5",
"steps": [
{
"op": "cylinder",
"id": "base",
"origin": [
0,
0,
0
],
"radius": 7,
"height": 48.2
},
{
"op": "cylinder",
"id": "boss",
"origin": [
0,
0,
47.698
],
"radius": 2.7,
"height": 2.502
},
{
"op": "union",
"id": "joined",
"a": "base",
"b": "boss"
},
{
"op": "fillet",
"id": "result",
"body": "joined",
"edges": [
[
7,
0,
48.2
]
],
"radius": 0.8
}
],
"expect": {
"lumps": 1,
"volume": {
"value": 7459.731401,
"tol": 0.745973,
"formula": "pi*7^2*48.2 + pi*2.7^2*2 - 2*pi*(7 - d)*(1 - pi/4)*0.8^2, d = 0.8*(10 - 3*pi)/(3*(4 - pi))"
}
}
},
{
"name": "boss_flush",
"note": "control: boss starting at the top face (the SolidCraft version passed this)",
"steps": [
{
"op": "cylinder",
"id": "base",
"origin": [
0,
0,
0
],
"radius": 7,
"height": 48.2
},
{
"op": "cylinder",
"id": "boss",
"origin": [
0,
0,
48.2
],
"radius": 2.7,
"height": 2.0
},
{
"op": "union",
"id": "joined",
"a": "base",
"b": "boss"
},
{
"op": "fillet",
"id": "result",
"body": "joined",
"edges": [
[
7,
0,
48.2
]
],
"radius": 0.8
}
],
"expect": {
"lumps": 1,
"volume": {
"value": 7459.731401,
"tol": 0.745973,
"formula": "same as boss_sunk_0.5"
}
}
}
]
}