From 3cd0d138aff5e51fb75333b8a40062391d1ad346 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 19 Feb 2020 12:19:31 +0800 Subject: [PATCH] support 3D point --- src/experimental/tf_bend.scad | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/experimental/tf_bend.scad b/src/experimental/tf_bend.scad index 3c7f45de..f5544259 100644 --- a/src/experimental/tf_bend.scad +++ b/src/experimental/tf_bend.scad @@ -12,7 +12,9 @@ function tf_bend(size, point, radius, angle) = // ylen = size[1], y = point[0], z = point[1], + x = is_undef(point[2]) ? 0 : point[2], a_step = angle / xlen, - a = a_step * y + a = a_step * y, + r = radius + x ) - [radius * cos(a), radius * sin(a), z]; \ No newline at end of file + [r * cos(a), r * sin(a), z]; \ No newline at end of file