1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 21:58:26 +01:00
This commit is contained in:
Justin Lin 2022-05-15 20:48:46 +08:00
parent 7c22b6ceca
commit 5a63fe41f7

View File

@ -9,12 +9,12 @@
**/
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])
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]
]
];