mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
12 lines
3.0 KiB
OpenSCAD
12 lines
3.0 KiB
OpenSCAD
use <voxel/vx_sphere.scad>;
|
|
|
|
module test_vx_sphere() {
|
|
echo("==== test_vx_sphere ====");
|
|
|
|
expected = [[-2, -2, -4], [-1, -2, -4], [0, -2, -4], [1, -2, -4], [2, -2, -4], [-2, -1, -4], [-1, -1, -4], [0, -1, -4], [1, -1, -4], [2, -1, -4], [-2, 0, -4], [-1, 0, -4], [0, 0, -4], [1, 0, -4], [2, 0, -4], [-2, 1, -4], [-1, 1, -4], [0, 1, -4], [1, 1, -4], [2, 1, -4], [-2, 2, -4], [-1, 2, -4], [0, 2, -4], [1, 2, -4], [2, 2, -4], [-2, -3, -3], [-1, -3, -3], [0, -3, -3], [1, -3, -3], [2, -3, -3], [-3, -2, -3], [-2, -2, -3], [2, -2, -3], [3, -2, -3], [-3, -1, -3], [3, -1, -3], [-3, 0, -3], [3, 0, -3], [-3, 1, -3], [3, 1, -3], [-3, 2, -3], [-2, 2, -3], [2, 2, -3], [3, 2, -3], [-2, 3, -3], [-1, 3, -3], [0, 3, -3], [1, 3, -3], [2, 3, -3], [-2, -4, -2], [-1, -4, -2], [0, -4, -2], [1, -4, -2], [2, -4, -2], [-3, -3, -2], [-2, -3, -2], [2, -3, -2], [3, -3, -2], [-4, -2, -2], [-3, -2, -2], [3, -2, -2], [4, -2, -2], [-4, -1, -2], [4, -1, -2], [-4, 0, -2], [4, 0, -2], [-4, 1, -2], [4, 1, -2], [-4, 2, -2], [-3, 2, -2], [3, 2, -2], [4, 2, -2], [-3, 3, -2], [-2, 3, -2], [2, 3, -2], [3, 3, -2], [-2, 4, -2], [-1, 4, -2], [0, 4, -2], [1, 4, -2], [2, 4, -2], [-2, -4, -1], [-1, -4, -1], [0, -4, -1], [1, -4, -1], [2, -4, -1], [-3, -3, -1], [3, -3, -1], [-4, -2, -1], [4, -2, -1], [-4, -1, -1], [4, -1, -1], [-4, 0, -1], [4, 0, -1], [-4, 1, -1], [4, 1, -1], [-4, 2, -1], [4, 2, -1], [-3, 3, -1], [3, 3, -1], [-2, 4, -1], [-1, 4, -1], [0, 4, -1], [1, 4, -1], [2, 4, -1], [-2, -4, 0], [-1, -4, 0], [0, -4, 0], [1, -4, 0], [2, -4, 0], [-3, -3, 0], [3, -3, 0], [-4, -2, 0], [4, -2, 0], [-4, -1, 0], [4, -1, 0], [-4, 0, 0], [4, 0, 0], [-4, 1, 0], [4, 1, 0], [-4, 2, 0], [4, 2, 0], [-3, 3, 0], [3, 3, 0], [-2, 4, 0], [-1, 4, 0], [0, 4, 0], [1, 4, 0], [2, 4, 0], [-2, -4, 1], [-1, -4, 1], [0, -4, 1], [1, -4, 1], [2, -4, 1], [-3, -3, 1], [3, -3, 1], [-4, -2, 1], [4, -2, 1], [-4, -1, 1], [4, -1, 1], [-4, 0, 1], [4, 0, 1], [-4, 1, 1], [4, 1, 1], [-4, 2, 1], [4, 2, 1], [-3, 3, 1], [3, 3, 1], [-2, 4, 1], [-1, 4, 1], [0, 4, 1], [1, 4, 1], [2, 4, 1], [-2, -4, 2], [-1, -4, 2], [0, -4, 2], [1, -4, 2], [2, -4, 2], [-3, -3, 2], [-2, -3, 2], [2, -3, 2], [3, -3, 2], [-4, -2, 2], [-3, -2, 2], [3, -2, 2], [4, -2, 2], [-4, -1, 2], [4, -1, 2], [-4, 0, 2], [4, 0, 2], [-4, 1, 2], [4, 1, 2], [-4, 2, 2], [-3, 2, 2], [3, 2, 2], [4, 2, 2], [-3, 3, 2], [-2, 3, 2], [2, 3, 2], [3, 3, 2], [-2, 4, 2], [-1, 4, 2], [0, 4, 2], [1, 4, 2], [2, 4, 2], [-2, -3, 3], [-1, -3, 3], [0, -3, 3], [1, -3, 3], [2, -3, 3], [-3, -2, 3], [-2, -2, 3], [2, -2, 3], [3, -2, 3], [-3, -1, 3], [3, -1, 3], [-3, 0, 3], [3, 0, 3], [-3, 1, 3], [3, 1, 3], [-3, 2, 3], [-2, 2, 3], [2, 2, 3], [3, 2, 3], [-2, 3, 3], [-1, 3, 3], [0, 3, 3], [1, 3, 3], [2, 3, 3], [-2, -2, 4], [-1, -2, 4], [0, -2, 4], [1, -2, 4], [2, -2, 4], [-2, -1, 4], [-1, -1, 4], [0, -1, 4], [1, -1, 4], [2, -1, 4], [-2, 0, 4], [-1, 0, 4], [0, 0, 4], [1, 0, 4], [2, 0, 4], [-2, 1, 4], [-1, 1, 4], [0, 1, 4], [1, 1, 4], [2, 1, 4], [-2, 2, 4], [-1, 2, 4], [0, 2, 4], [1, 2, 4], [2, 2, 4]];
|
|
actual = vx_sphere(5, false);
|
|
|
|
assert(expected == actual);
|
|
}
|
|
|
|
test_vx_sphere(); |