mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
refactor: format
This commit is contained in:
@@ -15,7 +15,7 @@ function __polytransversals(transversals) =
|
|||||||
lefts
|
lefts
|
||||||
);
|
);
|
||||||
|
|
||||||
function _shape_path_extend_az(p1, p2) = -90 + atan2((p2.y - p1.y), (p2.x - p1.x));
|
function _shape_path_extend_az(p1, p2) = let(v = p2 - p1) -90 + atan2(v.y, v.x);
|
||||||
|
|
||||||
function _shape_path_first_stroke(stroke_pts, path_pts) =
|
function _shape_path_first_stroke(stroke_pts, path_pts) =
|
||||||
let(
|
let(
|
||||||
@@ -28,12 +28,11 @@ function _shape_path_first_stroke(stroke_pts, path_pts) =
|
|||||||
function _shape_path_extend_stroke(stroke_pts, p1, p2, scale_step, i) =
|
function _shape_path_extend_stroke(stroke_pts, p1, p2, scale_step, i) =
|
||||||
let(
|
let(
|
||||||
leng = norm(__to3d(p2) - __to3d(p1)),
|
leng = norm(__to3d(p2) - __to3d(p1)),
|
||||||
a = _shape_path_extend_az(p1, p2)
|
a = _shape_path_extend_az(p1, p2),
|
||||||
|
s = 1 + scale_step * i,
|
||||||
|
off_p = [0, leng]
|
||||||
)
|
)
|
||||||
[
|
[for(p = stroke_pts) ptf_rotate(p * s + off_p, a) + p1];
|
||||||
for(p = stroke_pts)
|
|
||||||
ptf_rotate(p * (1 + scale_step * i) + [0, leng], a) + p1
|
|
||||||
];
|
|
||||||
|
|
||||||
function _shape_path_extend_inner(stroke_pts, path_pts, leng_path_pts, scale_step) =
|
function _shape_path_extend_inner(stroke_pts, path_pts, leng_path_pts, scale_step) =
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user