1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00
This commit is contained in:
Justin Lin
2019-05-02 09:56:05 +08:00
parent f6c03d239f
commit 8385bbb145

View File

@@ -72,7 +72,7 @@ function _rotz(pt, a) =
function _rotate_p_3d(point, a) = function _rotate_p_3d(point, a) =
_rotz(_roty(_rotx(point, a[0]), a[1]), a[2]); _rotz(_roty(_rotx(point, a[0]), a[1]), a[2]);
function to_avect(a) = function _to_avect(a) =
len(a) == 3 ? a : ( len(a) == 3 ? a : (
len(a) == 2 ? [a[0], a[1], 0] : ( len(a) == 2 ? [a[0], a[1], 0] : (
len(a) == 1 ? [a[0], 0, 0] : [0, 0, a] len(a) == 1 ? [a[0], 0, 0] : [0, 0, a]
@@ -80,7 +80,7 @@ function to_avect(a) =
); );
function _rotate_p(p, a) = function _rotate_p(p, a) =
let(angle = to_avect(a)) let(angle = _to_avect(a))
len(p) == 3 ? len(p) == 3 ?
_rotate_p_3d(p, angle) : _rotate_p_3d(p, angle) :
__to2d( __to2d(