handle scalar scale case

This commit is contained in:
Adrian Mariano 2024-02-25 12:50:57 -05:00
parent 5d30951ef1
commit 3ce62afcd4

View file

@ -1794,9 +1794,8 @@ module path_sweep(shape, path, method="incremental", normal, closed, twist=0, tw
symmetry, last_normal, tangent, uniform, relaxed, caps, style, transforms=true,_return_scales=true);
transforms = trans_scale[0];
scales = trans_scale[1];
firstscale = [1/scales[0].x, 1/scales[0].y];
lastscale = [1/last(scales).x, 1/last(scales).y];
echo(scales=firstscale,lastscale);
firstscale = is_num(scales[0]) ? 1/scales[0] : [1/scales[0].x, 1/scales[0].y];
lastscale = is_num(last(scales)) ? 1/last(scales) : [1/last(scales).x, 1/last(scales).y];
vnf = sweep(is_path(shape)?clockwise_polygon(shape):shape, transforms, closed=false, caps=caps,style=style);
shapecent = point3d(centroid(shape));
$transforms = transforms;