1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-02-24 01:22:27 +01:00
This commit is contained in:
Justin Lin 2020-03-12 20:36:23 +08:00
parent f7f0716670
commit 66f958ddc3

View File

@ -12,6 +12,7 @@ use <__comm__/__to3d.scad>;
use <__comm__/__to2d.scad>;
use <__comm__/__lines_from.scad>;
use <pixel/px_line.scad>;
use <util/dedup.scad>;
function px_polyline(points) =
let(
@ -19,4 +20,4 @@ function px_polyline(points) =
pts = is_2d ? [for(pt = points) __to3d(pt)] : points,
polyline = [for(line = __lines_from(pts)) each px_line(line[0], line[1])]
)
is_2d ? [for(pt = polyline) __to2d(pt)] : polyline;
dedup(is_2d ? [for(pt = polyline) __to2d(pt)] : polyline);