mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-05 11:35:55 +00:00
Kernel rig: cone cases, a frustum on X and a full cone of negative height with their exact volume, area and centroid, and a zero height refused; a new solids area
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# The solids cases that fail today, one a line: `<case> <why it fails today>`. Sorted. A run with
|
||||
# `--known-failing` fails on a case that fails and is not listed here, and on a listed case that
|
||||
# passes: a fix removes its line in the same pull request.
|
||||
# Baseline: rig-cases-solids-frames 45f69c0e5 with SMLib 60b1c6a, aarch64 Linux.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Source files whose change must rerun the solids area (cones, scale, align, bounding solids).
|
||||
apps/solidcraft-cli/src/kernel_cases.rs
|
||||
crates/doc/src/eval.rs
|
||||
crates/doc/src/eval_more.rs
|
||||
crates/engine/src/cmd/features.rs
|
||||
crates/engine/src/cmd/features_more.rs
|
||||
crates/kernel/src/**
|
||||
crates/smlib/**
|
||||
tests/kernel-cases/solids/**
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a truncated cone (frustum) R10 r5 h20 on the X axis from x=5",
|
||||
"source": "analytic",
|
||||
"method": "frustum: V = pi h/3 (R^2+Rr+r^2) = pi*20*175/3; A = pi(R^2+r^2) + pi(R+r) sqrt(h^2+(R-r)^2); centroid h(R^2+2Rr+3r^2)/(4(R^2+Rr+r^2)) = 7.857 from the base; faces: base, top, side = 3",
|
||||
"body_count": 1,
|
||||
"faces": 3,
|
||||
"volume_mm3": 3665.191429188092,
|
||||
"area_mm2": 1364.1829574548633,
|
||||
"center_of_mass": [
|
||||
12.857142857142858,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"bbox": {
|
||||
"min": [
|
||||
5,
|
||||
-10,
|
||||
-10
|
||||
],
|
||||
"max": [
|
||||
25,
|
||||
10,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.cone",
|
||||
"params": {
|
||||
"radius": 10,
|
||||
"top_radius": 5,
|
||||
"height": 20,
|
||||
"base": [
|
||||
5,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"axis": "X"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a full cone (top radius 0: an apex) r6, height -12 from a base at z=10: the apex at z=-2",
|
||||
"source": "analytic",
|
||||
"method": "V = pi r^2 h/3 = pi*36*4; A = pi r^2 + pi r sqrt(h^2+r^2); centroid h/4 from the base toward the apex: z = 10-3; faces: base and side = 2",
|
||||
"body_count": 1,
|
||||
"faces": 2,
|
||||
"volume_mm3": 452.3893421169302,
|
||||
"area_mm2": 365.99066584669873,
|
||||
"center_of_mass": [
|
||||
0,
|
||||
0,
|
||||
7
|
||||
],
|
||||
"bbox": {
|
||||
"min": [
|
||||
-6,
|
||||
-6,
|
||||
-2
|
||||
],
|
||||
"max": [
|
||||
6,
|
||||
6,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.cone",
|
||||
"params": {
|
||||
"radius": 6,
|
||||
"height": -12,
|
||||
"base": [
|
||||
0,
|
||||
0,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a cone of height 0 has no volume: refused",
|
||||
"source": "analytic",
|
||||
"method": "the base and the top coincide: no solid, a clean refusal naming the height",
|
||||
"outcome": "refused",
|
||||
"refusal": "height must not be zero"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.cone",
|
||||
"params": {
|
||||
"radius": 5,
|
||||
"height": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user