1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-29 11:58:39 +01:00
This commit is contained in:
Justin Lin 2022-04-09 19:21:51 +08:00
parent a99456225f
commit f5e24e2239
3 changed files with 27 additions and 1 deletions

View File

@ -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) {
}

View File

@ -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>;

View 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();