1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00

added test_circle_path

This commit is contained in:
Justin Lin
2017-06-22 18:08:57 +08:00
parent 79f628f540
commit f1ead68286
2 changed files with 15 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ include <test_split_str.scad>;
include <test_parse_number.scad>;
include <test_cross_sections.scad>;
// Path
include <test_circle_path.scad>;
// 2D Shape
include <test_shape_arc.scad>;
include <test_shape_cyclicpolygon.scad>;

View File

@@ -0,0 +1,12 @@
echo("==== test_circle_path ====");
include <unittest.scad>;
include <circle_path.scad>;
$fn = 24;
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]];
actual = circle_path(radius = 50);
assertEqualPoints(expected, actual);