mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
1.5 KiB
1.5 KiB
polyline2d
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 theline2d
module so you have toinclude
line2d.scad.
Parameters
points
: The list ofx
,y
points of the polyline. : A vector of 2 element vectors. The points are indexed from 0 to n-1.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"
. $fa
,$fs
,$fn
: Check the circle module for more details.
Examples
include <polyline2d.scad>;
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
include <polyline2d.scad>;
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
endingStyle = "CAP_ROUND");
include <polyline2d.scad>;
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");