mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-29 11:58:39 +01:00
add test
This commit is contained in:
parent
a99456225f
commit
f5e24e2239
@ -11,5 +11,11 @@
|
||||
use <__comm__/_convex_hull2.scad>;
|
||||
|
||||
module polygon_hull(points) {
|
||||
polygon(_convex_hull2(points));
|
||||
poly = _convex_hull2(points);
|
||||
polygon(poly);
|
||||
test_convex_hull2(poly);
|
||||
}
|
||||
|
||||
module test_convex_hull2(poly) {
|
||||
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
include <test_rounded_square.scad>;
|
||||
include <test_line2d.scad>;
|
||||
include <test_hexagons.scad>;
|
||||
include <test_polygon_hull.scad>;
|
||||
|
||||
// 3D
|
||||
include <test_rounded_cube.scad>;
|
||||
|
19
test/test_polygon_hull.scad
Normal file
19
test/test_polygon_hull.scad
Normal file
@ -0,0 +1,19 @@
|
||||
include <polygon_hull.scad>;
|
||||
|
||||
module test_polygon_hull() {
|
||||
echo("==== test_polygon_hull ====");
|
||||
polygon_hull([
|
||||
[1, 1],
|
||||
[1, 0],
|
||||
[0, 1],
|
||||
[-2, 1],
|
||||
[-1, -1]
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
module test_convex_hull2(poly) {
|
||||
assert(poly == [[-2, 1], [-1, -1], [1, 0], [1, 1]]);
|
||||
}
|
||||
|
||||
test_polygon_hull();
|
Loading…
x
Reference in New Issue
Block a user