1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 11:44:50 +02:00

add polygon_abuse

This commit is contained in:
Justin Lin
2022-04-20 23:00:58 +08:00
parent 65280744b3
commit d5fa8807e0

View File

@@ -10,10 +10,17 @@
use <__comm__/_convex_hull2.scad>; use <__comm__/_convex_hull2.scad>;
module polygon_hull(points) { module polygon_hull(points, polygon_abuse = false) {
poly = _convex_hull2(points); if(polygon_abuse) {
polygon(poly); // It's workable only because `polyhedron` doesn't complain about mis-ordered faces.
test_convex_hull2(poly); // It's fast but might be invalid in later versions.
hull() polygon(points);
}
else {
poly = _convex_hull2(points);
polygon(poly);
test_convex_hull2(poly);
}
} }
module test_convex_hull2(poly) { module test_convex_hull2(poly) {