From e4d864b0ad6e91fdc2c01a0e07939faccd817016 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Wed, 8 Mar 2023 05:43:54 -0800 Subject: [PATCH] Fixed taper broken by fix for #1010 --- skin.scad | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/skin.scad b/skin.scad index e114cd8..343d168 100644 --- a/skin.scad +++ b/skin.scad @@ -3686,11 +3686,12 @@ function _textured_revolution( let( regions = !is_path(shape,2)? region_parts(shape) : closed? region_parts([shape]) : - region_parts([ - [0,shape[0].y], - each shape, - [0,last(shape).y], - ]), + let( + clpoly = [[0,shape[0].y], each shape, [0,last(shape).y]], + dpoly = deduplicate(clpoly), + cwpoly = is_polygon_clockwise(dpoly) ? dpoly : reverse(dpoly) + ) + [[ select(cwpoly,1,-2) ]], checks = [ for (rgn=regions, path=rgn) assert(all(path, function(pt) pt.x>=0))