mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-25 22:09:12 +02:00
977 B
977 B
line2d
Creates a line from two points.
Parameters
p1
: 2 element vector[x, y]
.p2
: 2 element vector[x, y]
.width
: The line width.p1Style
: The end-cap style of the pointp1
. The value must be"CAP_BUTT"
,"CAP_SQUARE"
or"CAP_ROUND"
. The default value is"CAP_SQUARE"
.p2Style
: The end-cap style of the pointp2
. 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 thecircle
module. The default value is24
.
Examples
line2d(p1 = [0, 0], p2 = [5, 0], width = 1);
translate([0, -2, 0])
line2d(p1 = [0, 0], p2 = [5, 0], width = 1,
p1Style = "CAP_ROUND", p2Style = "CAP_ROUND");
translate([0, -4, 0])
line2d(p1 = [0, 0], p2 = [5, 0], width = 1,
p1Style = "CAP_BUTT", p2Style = "CAP_BUTT");