mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
Merge pull request #2 from lorf/bezier-excess-point
Remove excess point at the end of the bezier_curve() output
This commit is contained in:
@@ -55,8 +55,8 @@ function _bezier_curve_point(t, points) =
|
||||
function bezier_curve(t_step, points) =
|
||||
let(
|
||||
pts = concat([
|
||||
for(t = [0: t_step: 1])
|
||||
_bezier_curve_point(t, points)
|
||||
for(t = [0: ceil(1 / t_step) - 1])
|
||||
_bezier_curve_point(t * t_step, points)
|
||||
], [_bezier_curve_point(1, points)])
|
||||
)
|
||||
len(points[0]) == 3 ? pts : [for(pt = pts) __to2d(pt)];
|
Reference in New Issue
Block a user