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

15 lines
666 B
OpenSCAD
Raw Normal View History

2020-01-27 10:24:24 +08:00
use <unittest.scad>;
2020-03-17 14:23:18 +08:00
use <shape_circle.scad>;
2020-01-26 16:26:19 +08:00
2020-03-17 14:23:18 +08:00
module test_shape_circle() {
echo("==== test_shape_circle ====");
2017-06-22 18:08:57 +08:00
2017-06-22 18:12:29 +08:00
$fn = 24;
2017-06-22 18:08:57 +08:00
2017-06-22 18:12:29 +08:00
expected = [[50, 0], [48.2963, 12.941], [43.3013, 25], [35.3553, 35.3553], [25, 43.3013], [12.941, 48.2963], [0, 50], [-12.941, 48.2963], [-25, 43.3013], [-35.3553, 35.3553], [-43.3013, 25], [-48.2963, 12.941], [-50, 0], [-48.2963, -12.941], [-43.3013, -25], [-35.3553, -35.3553], [-25, -43.3013], [-12.941, -48.2963], [0, -50], [12.941, -48.2963], [25, -43.3013], [35.3553, -35.3553], [43.3013, -25], [48.2963, -12.941]];
2020-03-17 14:23:18 +08:00
actual = shape_circle(radius = 50);
2017-06-22 18:08:57 +08:00
2017-06-22 18:12:29 +08:00
assertEqualPoints(expected, actual);
}
2020-03-17 14:23:18 +08:00
test_shape_circle();