From 1db94682c05e946954fc9cc05b658fec716bce12 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 3 May 2017 15:42:33 +0800 Subject: [PATCH] changed parameter name --- docs/lib-path_extend.md | 2 +- docs/lib-path_extrude.md | 2 +- src/path_extend.scad | 4 ++-- src/path_extrude.scad | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/lib-path_extend.md b/docs/lib-path_extend.md index 624dbefd..6b76847d 100644 --- a/docs/lib-path_extend.md +++ b/docs/lib-path_extend.md @@ -11,7 +11,7 @@ When using this module, you should use points to represent the 2D stroke. - `stroke_pts` : A list of points represent a stroke. See the example below. - `path_pts` : A list of points represent the path. - `scale` : Scales the 2D shape by this value over the length of the extrusion. -- `round_robin` : If the first point and the last point of `path_pts` has the same coordinate, setting `round_robin` to `true` will connect them automatically. +- `closed` : If the first point and the last point of `path_pts` has the same coordinate, setting `closed` to `true` will connect them automatically. ## Examples diff --git a/docs/lib-path_extrude.md b/docs/lib-path_extrude.md index d1061cd1..9c2bab9e 100644 --- a/docs/lib-path_extrude.md +++ b/docs/lib-path_extrude.md @@ -13,7 +13,7 @@ When using this module, you should use points to represent the 2D shape. You nee - `triangles` : `"RADIAL"` (default), `"HOLLOW"` or user-defined indexes. See example below. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `round_robin` : If the first point and the last point of `path_pts` has the same coordinate, setting `round_robin` to `true` will connect them automatically. +- `closed` : If the first point and the last point of `path_pts` has the same coordinate, setting `closed` to `true` will connect them automatically. ## Examples diff --git a/src/path_extend.scad b/src/path_extend.scad index c7d423e2..698c2d2e 100644 --- a/src/path_extend.scad +++ b/src/path_extend.scad @@ -13,7 +13,7 @@ * **/ -module path_extend(stroke_pts, path_pts, scale = 1.0, round_robin = false) { +module path_extend(stroke_pts, path_pts, scale = 1.0, closed = false) { function length(p1, p2) = let( x1 = p1[0], @@ -62,7 +62,7 @@ module path_extend(stroke_pts, path_pts, scale = 1.0, round_robin = false) { path_extend_inner(index + 1) ); - if(round_robin && path_pts[0] == path_pts[leng_path_pts - 1]) { + if(closed && path_pts[0] == path_pts[leng_path_pts - 1]) { strokes = path_extend_inner(1); polytransversals( concat(strokes, [strokes[0]]) diff --git a/src/path_extrude.scad b/src/path_extrude.scad index 57c4a610..6498e5c0 100644 --- a/src/path_extrude.scad +++ b/src/path_extrude.scad @@ -13,7 +13,7 @@ * **/ -module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale = 1.0, round_robin = false) { +module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale = 1.0, closed = false) { s_pts = to3d(shape_pts); pth_pts = to3d(path_pts); @@ -72,7 +72,7 @@ module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale path_extrude_inner(index + 1) ); - if(round_robin && pth_pts[0] == pth_pts[len_path_pts_minus_one]) { + if(closed && pth_pts[0] == pth_pts[len_path_pts_minus_one]) { // round-robin sections = path_extrude_inner(1); polysections(