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

14 lines
816 B
OpenSCAD
Raw Normal View History

2022-06-06 13:11:46 +08:00
use <unittest.scad>
use <shape_ellipse.scad>
2017-05-25 11:30:41 +08:00
2017-05-25 14:05:19 +08:00
module test_shape_ellipse() {
echo("==== test_shape_ellipse ====");
2017-05-25 11:48:02 +08:00
2017-05-26 08:49:21 +08:00
expected = [[40, 0], [39.1259, 4.1582], [36.5418, 8.1347], [32.3607, 11.7557], [26.7652, 14.8629], [20, 17.3205], [12.3607, 19.0211], [4.1811, 19.8904], [-4.1811, 19.8904], [-12.3607, 19.0211], [-20, 17.3205], [-26.7652, 14.8629], [-32.3607, 11.7557], [-36.5418, 8.1347], [-39.1259, 4.1582], [-40, 0], [-39.1259, -4.1582], [-36.5418, -8.1347], [-32.3607, -11.7557], [-26.7652, -14.8629], [-20, -17.3205], [-12.3607, -19.0211], [-4.1811, -19.8904], [4.1811, -19.8904], [12.3607, -19.0211], [20, -17.3205], [26.7652, -14.8629], [32.3607, -11.7557], [36.5418, -8.1347], [39.1259, -4.1582]];
2017-05-25 11:30:41 +08:00
2017-05-25 14:05:19 +08:00
actual = shape_ellipse([40, 20]);
2017-05-25 11:30:41 +08:00
2017-05-25 14:05:19 +08:00
assertEqualPoints(expected, actual);
}
test_shape_ellipse();