Enhanced sweep() to accept region input.

This commit is contained in:
Garth Minette
2020-11-17 14:25:08 -08:00
parent e4f2497863
commit 9d5d7cbc4f
3 changed files with 30 additions and 16 deletions

View File

@@ -285,8 +285,8 @@ function region_faces(region, transform, reverse=false, vnf=EMPTY_VNF) =
vnfs = [
if (vnf != EMPTY_VNF) vnf,
for (rgn = regions) let(
cleaved = _cleave_simple_region(rgn),
face = is_undef(transform)? cleaved : apply(transform,path3d(cleaved)),
cleaved = path3d(_cleave_simple_region(rgn)),
face = is_undef(transform)? cleaved : apply(transform,cleaved),
faceidxs = reverse? [for (i=[len(face)-1:-1:0]) i] : [for (i=[0:1:len(face)-1]) i]
) [face, [faceidxs]]
],