mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Update test_geometry.scad
This commit is contained in:
parent
30fc691b40
commit
06419a6786
1 changed files with 7 additions and 7 deletions
|
@ -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(){
|
||||
|
|
Loading…
Reference in a new issue