Test convexity of 3d polygons

This commit is contained in:
RonaldoCMP
2021-04-07 07:13:03 +01:00
parent a4c099e670
commit 99e40a5679
2 changed files with 19 additions and 16 deletions

View File

@@ -844,6 +844,7 @@ module test_polygon_area() {
module test_is_convex_polygon() {
assert(is_convex_polygon([[1,1],[-1,1],[-1,-1],[1,-1]]));
assert(is_convex_polygon(circle(r=50,$fn=1000)));
assert(is_convex_polygon(rot([50,120,30], p=path3d(circle(1,$fn=50)))));
assert(!is_convex_polygon([[1,1],[0,0],[-1,1],[-1,-1],[1,-1]]));
}
*test_is_convex_polygon();