1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 14:56:47 +02:00

prepared for supporting round-robin

This commit is contained in:
Justin Lin
2017-05-03 08:46:33 +08:00
parent e68a70a21d
commit e4b6e3abed

View File

@@ -13,7 +13,7 @@
* *
**/ **/
module path_extend(stroke_pts, path_pts, scale = 1.0) { module path_extend(stroke_pts, path_pts, scale = 1.0, round_robin = false) {
function length(p1, p2) = function length(p1, p2) =
let( let(
x1 = p1[0], x1 = p1[0],
@@ -63,8 +63,11 @@ module path_extend(stroke_pts, path_pts, scale = 1.0) {
[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]) {
} else {
polytransversals( polytransversals(
concat([first_stroke()], path_extend_inner(1)) concat([first_stroke()], path_extend_inner(1))
); );
}
} }