mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-31 20:10:36 +02:00
changed parameter name
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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]])
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user