mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 04:20:27 +02:00
provided supports for $fa, $fs, $fn
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* line2d.scad
|
* line2d.scad
|
||||||
*
|
*
|
||||||
* Creates a line from two points.
|
* Creates a line from two points. When the end points are CAP_ROUND,
|
||||||
|
* you can use $fa, $fs or $fn to controll the circle module used internally.
|
||||||
*
|
*
|
||||||
* @copyright Justin Lin, 2017
|
* @copyright Justin Lin, 2017
|
||||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||||
@@ -10,8 +11,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
module line2d(p1, p2, width, p1Style = "CAP_SQUARE", p2Style = "CAP_SQUARE", round_fn = 24) {
|
module line2d(p1, p2, width, p1Style = "CAP_SQUARE", p2Style = "CAP_SQUARE") {
|
||||||
$fn = round_fn;
|
|
||||||
half_width = 0.5 * width;
|
half_width = 0.5 * width;
|
||||||
|
|
||||||
atan_angle = atan2(p2[1] - p1[1], p2[0] - p1[0]);
|
atan_angle = atan2(p2[1] - p1[1], p2[0] - p1[0]);
|
||||||
|
Reference in New Issue
Block a user