Files
solvecraft/fixtures/boolean.api_brep/nested_shells.json
T
Brett Lawson 776c9c1f3f SolidCraft runner: hand boolean operands over without resetting their owners
The runner passed every boolean operand as a Brep::clone. The copy constructor
resets every geometry owner, so the merge's ray fires found no curve or surface
and classified every face that meets nothing as lying in the infinite region.
Sphere 40 minus sphere 18.5 lost its inner sphere, and the block cut by that
shell kept its whole 768. The C++ reference gives 653.3429080270938, and the
Rust kernel gives the same value once the operand is moved in.

An operand that no later step reads is now moved out of the map. One that is
read again is handed over as an SmApiBrepCopy, as the pattern copies already
were. SolidCraft 451: the sphere-difference control now passes. The
block-in-hollow cut now gives 0, which is what C++ gives. Other cases are
unchanged.

Adds boolean.api_brep fixture cases for nested and disjoint operands, including
the sphere-difference shell. Adds WR-443: a difference with the full-revolve
hollow shell (WR-442) removes what lies in the hollow. C++ and Rust agree on
all three volumes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 14:08:40 +01:00

289 lines
5.6 KiB
JSON

{
"cases": [
{
"name": "nested_sphere_difference",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
},
{
"name": "nested_sphere_offset_difference",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
1,
2,
3
],
"radius": 18.5
}
}
},
{
"name": "nested_sphere_union",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "union",
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
},
{
"name": "nested_sphere_intersection",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "intersection",
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
},
{
"name": "box_in_sphere_difference",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "box",
"origin": [
-4,
-4,
-4
],
"size": [
8,
8,
8
]
}
}
},
{
"name": "sphere_in_box_difference",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "box",
"origin": [
-40,
-40,
-40
],
"size": [
80,
80,
80
]
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
},
{
"name": "block_crossing_hollow_minus_sphere_shell",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "box",
"origin": [
8,
-4,
-4
],
"size": [
12,
8,
8
]
},
"b": {
"kind": "boolean",
"operation": 3,
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
}
},
{
"name": "block_in_hollow_minus_sphere_shell",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "difference",
"a": {
"kind": "box",
"origin": [
-4,
-4,
-4
],
"size": [
8,
8,
8
]
},
"b": {
"kind": "boolean",
"operation": 3,
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
}
},
{
"name": "block_crossing_hollow_union_sphere_shell",
"upstream_ref": "SolidCraft 451 (fixtures/solidcraft/451-hollow-shell-cut.json)",
"inputs": {
"api": "union",
"a": {
"kind": "box",
"origin": [
8,
-4,
-4
],
"size": [
12,
8,
8
]
},
"b": {
"kind": "boolean",
"operation": 3,
"a": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 40.0
},
"b": {
"kind": "sphere",
"center": [
0,
0,
0
],
"radius": 18.5
}
}
}
}
]
}