mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-08 04:52:10 +00:00
c281589321
From the llvm-cov run of `difftest --green`: 136 fixture cases (fixtures/<unit>/coverage.json, each citing the upstream branch and the Rust line it covers) execute about 70 previously uncovered spans in offset_surface (zero first derivatives replaced by base tangents, a hyperboloid base), sphere (coincident/concentric spheres, degenerate arcs, tangency marks, cone and box rejects, pole and seam inversion), surface_p5 (singular iso curve, CoverOtherCoincidentSurface branches, IdenticalSolutions at a pole), surface_p4 (curve/surface crossing classification on dome, saddle and cylinder points), surf_of_extrusion_p1 (coincident generators touching or disjoint), surface_p6 (solutions at a pole), surface_point_solve_p2 (cross-seam solutions), torus (horn torus, axis-start minor circle), curve_bounded_surface (== stops) and surf_of_revolution_p1/p3 (revolutions of a real SmHyperbola). The surf_of_revolution_p1 runner, FFI and shim gain a hyperbola generator; the five shims sharing that generator block parse it too. Fuzzing it showed SmHyperbola's constructor ignoring a failed MakeNurb (NULL or non-finite NURB, then a segfault): the shims refuse such a hyperbola, and plan/upstream-issues.md UB-46 records the trigger. Generated cases are unchanged. All eleven units PASS with 0 failures and 0 deferred (max_rel_err 0); --perturb SENSITIVE on all; --fuzz 200 (p1, p3, offset): FUZZ-PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
404 lines
6.2 KiB
JSON
404 lines
6.2 KiB
JSON
{
|
|
"cases": [
|
|
{
|
|
"name": "cylinder_offset_to_axis_minus",
|
|
"upstream_ref": "source/SMLib/src/SmOffsetSurface.cpp:1598 (coverage: crates/solidcore/src/surface/offset_surface.rs:1451)",
|
|
"inputs": {
|
|
"kind": "script",
|
|
"off": {
|
|
"d": -1.0,
|
|
"owns": true,
|
|
"sing": 0,
|
|
"allow": false,
|
|
"base": {
|
|
"revolution": {
|
|
"gen": {
|
|
"kind": "line",
|
|
"a": [
|
|
1,
|
|
0,
|
|
0
|
|
],
|
|
"b": [
|
|
1,
|
|
0,
|
|
2
|
|
]
|
|
},
|
|
"build": {
|
|
"mode": "canonical",
|
|
"point": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"axis": [
|
|
0,
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 1,
|
|
"hv": 1
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 2,
|
|
"hv": 0
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 0,
|
|
"hv": 2
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 1,
|
|
"hv": 1,
|
|
"nzt": false
|
|
},
|
|
{
|
|
"op": "normal",
|
|
"uv": "MID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "sphere_offset_to_centre_minus",
|
|
"upstream_ref": "source/SMLib/src/SmOffsetSurface.cpp:1598 (coverage: crates/solidcore/src/surface/offset_surface.rs:1451)",
|
|
"inputs": {
|
|
"kind": "script",
|
|
"off": {
|
|
"d": -1.0,
|
|
"owns": true,
|
|
"sing": 0,
|
|
"allow": false,
|
|
"base": {
|
|
"revolution": {
|
|
"gen": {
|
|
"kind": "circle",
|
|
"c": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"x": [
|
|
1,
|
|
0,
|
|
0
|
|
],
|
|
"y": [
|
|
0,
|
|
0,
|
|
1
|
|
],
|
|
"d": [
|
|
-1.5707963267948966,
|
|
1.5707963267948966
|
|
],
|
|
"r": 1
|
|
},
|
|
"build": {
|
|
"mode": "canonical",
|
|
"point": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"axis": [
|
|
0,
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 1,
|
|
"hv": 1
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 2,
|
|
"hv": 0
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 0,
|
|
"hv": 2
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 1,
|
|
"hv": 1,
|
|
"nzt": false
|
|
},
|
|
{
|
|
"op": "normal",
|
|
"uv": "MID"
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": [
|
|
1.0,
|
|
0.3
|
|
],
|
|
"hu": 1,
|
|
"hv": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperboloid_base_offset_script",
|
|
"upstream_ref": "source/SMLib/src/SmSurfOfRevolution.cpp:639 with an SmHyperbola generator, offset by SmOffsetSurface (coverage: crates/solidcore/src/surface/surf_of_revolution/p1.rs:193)",
|
|
"inputs": {
|
|
"kind": "script",
|
|
"off": {
|
|
"d": 0.25,
|
|
"owns": true,
|
|
"sing": 0,
|
|
"allow": false,
|
|
"base": {
|
|
"revolution": {
|
|
"gen": {
|
|
"kind": "hyperbola",
|
|
"c": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"x": [
|
|
1,
|
|
0,
|
|
0
|
|
],
|
|
"y": [
|
|
0,
|
|
0,
|
|
1
|
|
],
|
|
"d": [
|
|
-1,
|
|
1
|
|
],
|
|
"a": 1.0,
|
|
"b": 0.5
|
|
},
|
|
"build": {
|
|
"mode": "canonical",
|
|
"point": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"axis": [
|
|
0,
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"op": "state"
|
|
},
|
|
{
|
|
"op": "eval",
|
|
"uv": "MID",
|
|
"hu": 2,
|
|
"hv": 1
|
|
},
|
|
{
|
|
"op": "eval_pt",
|
|
"uv": "VMIN"
|
|
},
|
|
{
|
|
"op": "normal",
|
|
"uv": "VMAX"
|
|
},
|
|
{
|
|
"op": "knots",
|
|
"param": 1
|
|
},
|
|
{
|
|
"op": "max_anal"
|
|
},
|
|
{
|
|
"op": "bbox",
|
|
"dom": "NAT",
|
|
"want": [
|
|
true,
|
|
true,
|
|
true
|
|
]
|
|
},
|
|
{
|
|
"op": "step_inv",
|
|
"dom": "NAT",
|
|
"p": "ON",
|
|
"tol": 1e-06
|
|
},
|
|
{
|
|
"op": "copy"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperboloid_base_offset_edits",
|
|
"upstream_ref": "source/SMLib/src/SmSurfOfRevolution.cpp:639 with an SmHyperbola generator, offset by SmOffsetSurface (coverage: crates/solidcore/src/surface/surf_of_revolution/p1.rs:218)",
|
|
"inputs": {
|
|
"kind": "script",
|
|
"off": {
|
|
"d": -0.2,
|
|
"owns": true,
|
|
"sing": 0,
|
|
"allow": false,
|
|
"base": {
|
|
"revolution": {
|
|
"gen": {
|
|
"kind": "hyperbola",
|
|
"c": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"x": [
|
|
1,
|
|
0,
|
|
0
|
|
],
|
|
"y": [
|
|
0,
|
|
0,
|
|
1
|
|
],
|
|
"d": [
|
|
-1,
|
|
1
|
|
],
|
|
"a": 1.0,
|
|
"b": 0.5
|
|
},
|
|
"build": {
|
|
"mode": "canonical",
|
|
"point": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"axis": [
|
|
0,
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"op": "reverse",
|
|
"param": 1
|
|
},
|
|
{
|
|
"op": "swap"
|
|
},
|
|
{
|
|
"op": "trim",
|
|
"dom": "SUB"
|
|
},
|
|
{
|
|
"op": "state"
|
|
},
|
|
{
|
|
"op": "create_offset",
|
|
"d": 0.1
|
|
},
|
|
{
|
|
"op": "base_offset",
|
|
"d": 0.1,
|
|
"tol": 0.001
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "hyperboloid_base_read_db",
|
|
"upstream_ref": "source/SMLib/src/SmOffsetSurface.cpp:2197 (ReadFromDB) over an SmHyperbola-generated SmSurfOfRevolution (coverage: crates/solidcore/src/surface/surf_of_revolution/p1.rs:152)",
|
|
"inputs": {
|
|
"kind": "read_db",
|
|
"off": {
|
|
"d": 0.3,
|
|
"owns": true,
|
|
"sing": 0,
|
|
"allow": false,
|
|
"base": {
|
|
"revolution": {
|
|
"gen": {
|
|
"kind": "hyperbola",
|
|
"c": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"x": [
|
|
1,
|
|
0,
|
|
0
|
|
],
|
|
"y": [
|
|
0,
|
|
0,
|
|
1
|
|
],
|
|
"d": [
|
|
-1,
|
|
1
|
|
],
|
|
"a": 1.0,
|
|
"b": 0.5
|
|
},
|
|
"build": {
|
|
"mode": "canonical",
|
|
"point": [
|
|
0,
|
|
0,
|
|
0
|
|
],
|
|
"axis": [
|
|
0,
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"binary": false,
|
|
"version": 30
|
|
}
|
|
}
|
|
]
|
|
} |