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:
@@ -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);
|
scale_step = (scale - 1) / (leng_path_pts - 1);
|
||||||
|
|
||||||
echo(scale_step);
|
|
||||||
|
|
||||||
function first_stroke() =
|
function first_stroke() =
|
||||||
let(
|
let(
|
||||||
p1 = path_pts[0],
|
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)],
|
[stroke(path_pts[index - 1], path_pts[index], index)],
|
||||||
path_extend_inner(index + 1)
|
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 {
|
} else {
|
||||||
polytransversals(
|
polytransversals(
|
||||||
concat([first_stroke()], path_extend_inner(1))
|
concat([first_stroke()], path_extend_inner(1))
|
||||||
|
Reference in New Issue
Block a user