1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/test/test_shape_pie.scad

14 lines
549 B
OpenSCAD
Raw Normal View History

2022-06-06 13:11:46 +08:00
use <unittest.scad>
use <shape_pie.scad>
2017-05-25 09:43:10 +08:00
2017-05-25 14:05:19 +08:00
module test_shape_pie() {
echo("==== test_shape_pie ====");
2017-05-25 09:43:10 +08:00
2017-05-26 08:49:57 +08:00
expected = [[0, 0], [7.0711, 7.0711], [5, 8.6603], [2.5882, 9.6593], [0, 10], [-2.5882, 9.6593], [-5, 8.6603], [-7.0711, 7.0711], [-8.6603, 5], [-9.6593, 2.5882], [-10, 0], [-9.6593, -2.5882], [-8.6603, -5], [-7.0711, -7.0711], [-5, -8.6603], [-2.5882, -9.6593], [0, -10], [2.5882, -9.6593], [5, -8.6603], [7.0711, -7.0711]];
2017-05-25 09:43:10 +08:00
2017-05-25 14:05:19 +08:00
actual = shape_pie(10, [45, 315], $fn = 24);
2017-05-25 09:43:10 +08:00
2017-05-25 14:05:19 +08:00
assertEqualPoints(expected, actual);
}
test_shape_pie();