1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-09 16:26:47 +02:00

supported round_robin

This commit is contained in:
Justin Lin
2017-05-03 08:50:30 +08:00
parent e4b6e3abed
commit 9da693e6f9

View File

@@ -34,8 +34,6 @@ module path_extend(stroke_pts, path_pts, scale = 1.0, round_robin = false) {
scale_step = (scale - 1) / (leng_path_pts - 1);
echo(scale_step);
function first_stroke() =
let(
p1 = path_pts[0],
@@ -63,8 +61,12 @@ module path_extend(stroke_pts, path_pts, scale = 1.0, round_robin = false) {
[stroke(path_pts[index - 1], path_pts[index], index)],
path_extend_inner(index + 1)
);
if(round_robin && path_pts[0] == path_pts[leng_path_pts - 1]) {
if(round_robin && path_pts[0] == path_pts[leng_path_pts - 1]) {
strokes = path_extend_inner(1);
polytransversals(
concat(strokes, [strokes[0]])
);
} else {
polytransversals(
concat([first_stroke()], path_extend_inner(1))