diff --git a/drawing.scad b/drawing.scad index fccd43e..21daad8 100644 --- a/drawing.scad +++ b/drawing.scad @@ -244,6 +244,7 @@ module stroke( ]); assert(is_num(trim2)); + if (len(path) == 1) { if (len(path[0]) == 2) { translate(path[0]) circle(d=width[0]); @@ -255,7 +256,6 @@ module stroke( pathcut_su = _cut_to_seg_u_form(pathcut,path); path2 = _path_cut_getpaths(path, pathcut, closed=false)[1]; widths = _path_select(width, pathcut_su[0][0], pathcut_su[0][1], pathcut_su[1][0], pathcut_su[1][1]); - start_vec = path[0] - path[1]; end_vec = last(path) - select(path,-2); diff --git a/paths.scad b/paths.scad index d337913..b847586 100644 --- a/paths.scad +++ b/paths.scad @@ -908,7 +908,7 @@ function _path_cut_getpaths(path, cutlist, closed) = if (!approx(cutlist[0][0], path[cutlist[0][1]-1])) cutlist[0][0] ], for(i=[0:1:cuts-2]) - cutlist[i][0]==cutlist[i+1][0] ? [] + cutlist[i][0]==cutlist[i+1][0] && cutlist[i][1]==cutlist[i+1][1] ? [] : [ if (!approx(cutlist[i][0], select(path,cutlist[i][1]))) cutlist[i][0], each slice(path, cutlist[i][1], cutlist[i+1][1]-1),