1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 01:04:07 +02:00

updated doc

This commit is contained in:
Justin Lin
2017-03-23 09:58:00 +08:00
parent e03e5bc8d3
commit 220a5e7211

View File

@@ -1,6 +1,7 @@
# polyline2d
Creates a polyline from a list of `x`, `y` coordinates. It depends on the `line2d` module so you have to `include` line2d.scad.
Creates a polyline from a list of `x`, `y` coordinates. When the end points are `CAP_ROUND`,
* you can use `$fa`, `$fs` or `$fn` to controll the circle module used internally. It depends on the `line2d` module so you have to `include` line2d.scad.
## Parameters
@@ -8,19 +9,21 @@ Creates a polyline from a list of `x`, `y` coordinates. It depends on the `line2
- `width` : The line width.
- `startingStyle` : The end-cap style of the starting point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- endingStyle : The end-cap style of the ending point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `round_fn` : When the end-cap style is "CAP_ROUND", it controlls the `$fn` value used by the `circle` module. The default value is `24`.
## Examples
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
![polyline2d](images/lib-polyline2d-1.JPG)
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
endingStyle = "CAP_ROUND");
![polyline2d](images/lib-polyline2d-2.JPG)
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");