mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
refactor
This commit is contained in:
parent
7c22b6ceca
commit
5a63fe41f7
@ -9,12 +9,12 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
function path_scaling_sections(shape_pts, edge_path) =
|
function path_scaling_sections(shape_pts, edge_path) =
|
||||||
let(base_leng = norm(edge_path[0]))
|
let(pts = shape_pts / norm(edge_path[0]))
|
||||||
[
|
[
|
||||||
for(i = [len(edge_path) - 1:-1:0])
|
for(i = [len(edge_path) - 1:-1:0])
|
||||||
let(edge_p = edge_path[i], s = norm([edge_p.x, edge_p.y] / base_leng))
|
let(edge_p = edge_path[i])
|
||||||
[
|
[
|
||||||
for(p = shape_pts * s)
|
for(p = pts * norm([edge_p.x, edge_p.y]))
|
||||||
[each p, edge_p.z]
|
[each p, edge_p.z]
|
||||||
]
|
]
|
||||||
];
|
];
|
Loading…
x
Reference in New Issue
Block a user