polygon_hull.scad
1 /** 2 * polygon_hull.scad 3 * 4 * @copyright Justin Lin, 2020 5 * @license https://opensource.org/licenses/lgpl-3.0.html 6 * 7 * @see https://openhome.cc/eGossip/OpenSCAD/lib3x-polygon_hull.html 8 * 9 **/ 10 11 use <__comm__/_convex_hull2.scad> 12 13 module polygon_hull(points, polygon_abuse = false) { 14 if(polygon_abuse) { 15 // It's workable only because `polygon` doesn't complain about mis-ordered points. 16 // It's fast but might be invalid in later versions. 17 hull() polygon(points); 18 } 19 else { 20 poly = _convex_hull2(points); 21 polygon(poly); 22 test_convex_hull2(poly); 23 } 24 } 25 26 module test_convex_hull2(poly) { 27 28 }