diff --git a/src/util/flat.scad b/src/util/flat.scad index dd1dc2c9..f7af5b7d 100644 --- a/src/util/flat.scad +++ b/src/util/flat.scad @@ -1 +1,3 @@ -function flat(lt) = [for(row_pts = lt) each row_pts]; \ No newline at end of file +function flat(lt, depth = 1) = + depth == 1 ? [for(row = lt) each row] : + [for(row = lt) each flat(row, depth - 1)]; \ No newline at end of file