knots_and_mults_to_knotvector

compas.geometry.knots_and_mults_to_knotvector(knots, mults)[source]

Convert a list of knots and multiplicities to a knot vector.

Parameters:
knotslist[int | float]

Knots.

multslist[int]

Multiplicities.

Returns:
list[int | float]

Knot vector.

Notes

The “standard” representation of a knot vector is a list of the form [0] * (degree + 1) + [i / d for i in range(1, d)] + [1] * (degree + 1), with d = pointcount - degree. This representation is used, for example, in the NURBS Book and OpenCASCADe.

Rhino uses a knot vector of the form [0] * (degree) + [i / d for i in range(1, d)] + [1] * (degree).