diff --git a/src/bezier_curve.scad b/src/bezier_curve.scad index 20f5e826..9f09cb62 100644 --- a/src/bezier_curve.scad +++ b/src/bezier_curve.scad @@ -12,6 +12,8 @@ * **/ +include <__private__/__to2d.scad>; + function _combi(n, k) = let( bi_coef = [ @@ -56,4 +58,5 @@ function bezier_curve(t_step, points) = for(t = [0: t_step: 1]) _bezier_curve_point(t, points) ], [_bezier_curve_point(1, points)]) - ) pts; \ No newline at end of file + ) + len(points[0]) == 3 ? pts : [for(pt = pts) __to2d(pt)]; \ No newline at end of file