mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-15 11:14:17 +02:00
add polygon_abuse
This commit is contained in:
@@ -10,10 +10,17 @@
|
||||
|
||||
use <__comm__/_convex_hull2.scad>;
|
||||
|
||||
module polygon_hull(points) {
|
||||
poly = _convex_hull2(points);
|
||||
polygon(poly);
|
||||
test_convex_hull2(poly);
|
||||
module polygon_hull(points, polygon_abuse = false) {
|
||||
if(polygon_abuse) {
|
||||
// It's workable only because `polyhedron` doesn't complain about mis-ordered faces.
|
||||
// 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) {
|
||||
|
Reference in New Issue
Block a user