From f1ead682861f1bfe2b6aab0b6b3bf92aeb908bd7 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 22 Jun 2017 18:08:57 +0800 Subject: [PATCH] added test_circle_path --- test/test_all.scad | 3 +++ test/test_circle_path.scad | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/test_circle_path.scad diff --git a/test/test_all.scad b/test/test_all.scad index cb4a23c9..ef0edaa9 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -27,6 +27,9 @@ include ; include ; include ; +// Path +include ; + // 2D Shape include ; include ; diff --git a/test/test_circle_path.scad b/test/test_circle_path.scad new file mode 100644 index 00000000..b4ff2f18 --- /dev/null +++ b/test/test_circle_path.scad @@ -0,0 +1,12 @@ +echo("==== test_circle_path ===="); + +include ; +include ; + +$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); \ No newline at end of file