From 06419a678685fcdbc68835bff461aa630097a585 Mon Sep 17 00:00:00 2001 From: RonaldoCMP Date: Wed, 13 Oct 2021 21:52:56 -0300 Subject: [PATCH] Update test_geometry.scad --- tests/test_geometry.scad | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_geometry.scad b/tests/test_geometry.scad index 1b62076..d7405df 100644 --- a/tests/test_geometry.scad +++ b/tests/test_geometry.scad @@ -85,13 +85,13 @@ module test_polygon_triangulate() { poly2 = [ [0,0], [5,5], [-5,5], [0,0], [-5,-5], [5,-5] ]; poly3 = [ [0,0], [10,0], [10,10], [10,13], [10,10], [0,10], [0,0], [3,3], [7,3], [7,7], [7,3], [3,3] ]; tris0 = sort(polygon_triangulate(poly0)); - assert(approx(tris0, [[0, 1, 2]]); - tris1 = sort(polygon_triangulate(poly1)); - assert(approx*tris1,sort([[2, 3, 4], [8, 9, 0], [2, 4, 6], [8, 0, 1], [1, 2, 6], [6, 8, 1]])); - tris2 = sort(polygon_triangulate(poly2)); - assert(approx*tris2,sort([[0, 1, 2], [3, 4, 5]])); - tris3 = sort(polygon_triangulate(poly3)); - assert(approx*tris3,sort( [[5, 6, 7], [7, 8, 9], [10, 11, 0], [5, 7, 9], [10, 0, 1], [4, 5, 9], [9, 10, 1], [1, 4, 9]])); + assert(approx(tris0, [[0, 1, 2]])); + tris1 = (polygon_triangulate(poly1)); + assert(approx(tris1,( [[2, 3, 4], [6, 7, 0], [2, 4, 5], [6, 0, 1], [1, 2, 5], [5, 6, 1]]))); + tris2 = (polygon_triangulate(poly2)); + assert(approx(tris2,([[0, 1, 2], [3, 4, 5]]))); + tris3 = (polygon_triangulate(poly3)); + assert(approx(tris3,( [[5, 6, 7], [7, 8, 9], [10, 11, 0], [5, 7, 9], [10, 0, 1], [4, 5, 9], [9, 10, 1], [1, 4, 9]]))); } module test__normalize_plane(){