mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-12 09:44:16 +02:00
Checking parameters
This commit is contained in:
@@ -62,6 +62,10 @@ function _bspline_curve_interpolate(t, degree, points, knots, weights) =
|
|||||||
[for(i = 0; i < d; i = i + 1) nv[s][i] / nv[s][d]];
|
[for(i = 0; i < d; i = i + 1) nv[s][i] / nv[s][d]];
|
||||||
|
|
||||||
function bspline_curve(t_step, degree, points, knots, weights) =
|
function bspline_curve(t_step, degree, points, knots, weights) =
|
||||||
|
let(n = len(points))
|
||||||
|
assert(degree >= 1, "degree cannot be less than 1 (linear)")
|
||||||
|
assert(degree <= n - 1, "degree must be less than or equal to len(points) - 1")
|
||||||
|
assert(len(knots) == n + degree + 1, "len(knots) must be equals to len(points) + degree + 1")
|
||||||
[
|
[
|
||||||
for(t = 0; t < 1; t = t + t_step)
|
for(t = 0; t < 1; t = t + t_step)
|
||||||
_bspline_curve_interpolate(t, degree, points, knots, weights)
|
_bspline_curve_interpolate(t, degree, points, knots, weights)
|
||||||
|
Reference in New Issue
Block a user