1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-21 05:52:16 +02:00

add tf_y_twist

This commit is contained in:
Justin Lin
2020-02-12 20:29:18 +08:00
parent b1b5efe022
commit 02b1d1e132

View File

@@ -0,0 +1,11 @@
use <rotate_p.scad>;
function tf_y_twist(size, point, angle) =
let(
xlen = size[0],
ylen = size[1],
x_offset = xlen / 2,
a_step = angle / ylen,
x_centered = [point[0], point[1], 0] + [-x_offset, 0, 0]
)
rotate_p(x_centered, [0, point[1] * a_step, 0]) + [x_offset, 0, 0];