mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-31 21:42:05 +02:00
Cleanup of path_resample, add tests for round_corners, fix
bezier_curve and arc to always return n points for either endpoint setting.
This commit is contained in:
@@ -435,9 +435,11 @@ function bezier_curvature(curve, u) =
|
||||
// bez = [[0,0], [5,15], [40,20], [60,-15], [80,0]];
|
||||
// move_copies(bezier_curve(bez, 8)) sphere(r=1.5, $fn=12);
|
||||
// trace_bezier(bez, N=len(bez)-1);
|
||||
function bezier_curve(curve,n,endpoint) = [each bezier_points(curve, [0:1/n:(n-0.5)/n]),
|
||||
if (endpoint) curve[len(curve)-1]
|
||||
];
|
||||
function bezier_curve(curve,n,endpoint=true) =
|
||||
[
|
||||
each bezier_points(curve, rangex(endpoint?n-1:n,0,1)),
|
||||
if (endpoint) last(curve)
|
||||
];
|
||||
|
||||
// Function: bezier_segment_closest_point()
|
||||
// Usage:
|
||||
|
Reference in New Issue
Block a user