Knot Vectors

Knot vectors are fundamental data structures that define the parametric domain and behavior of B-spline and NURBS bases.

Constructor

TinyGismo.KnotVectorType
KnotVector(knots::Vector{Float64})

Construct a knot vector from a vector of knot values.

Arguments

  • knots: A vector of knot values (non-decreasing)

Returns

A knot vector object

Details

A knot vector is a non-decreasing sequence of real numbers that define the parametric domain and behavior of B-spline and NURBS bases.

Examples

knots = [0.0, 0.0, 0.0, 0.25, 0.5, 0.75, 1.0, 1.0, 1.0]
kv = KnotVector(knots)
source

Query Functions

Base.sizeMethod
Base.size(kv::KnotVector)

Get the total number of knots in the knot vector (including multiplicities).

Alias for the C++ size() method.

source
TinyGismo.uSizeFunction
uSize(knotVector::KnotVector)

Get the number of unique knot values.

Arguments

  • knotVector: The knot vector

Returns

The number of unique knots

source
TinyGismo.uniqueFunction
unique(knotVector::KnotVector)

Get the unique knot values from the knot vector.

Arguments

  • knotVector: The knot vector

Returns

A vector of unique knot values in ascending order

source
TinyGismo.multiplicitiesFunction
multiplicities(knotVector::KnotVector)

Get the multiplicity of each unique knot value.

Arguments

  • knotVector: The knot vector

Returns

A vector of multiplicities corresponding to each unique knot

Details

The multiplicity of a knot indicates how many times that knot value appears in the knot vector. Higher multiplicity reduces continuity at that knot.

source
TinyGismo.knotContainerFunction
knotContainer(knotVector::KnotVector)

Get the underlying knot values as an array.

Arguments

  • knotVector: The knot vector

Returns

A const array view of the knot values

source

Degree Operations

These operations are documented in the Basis Functions section.

Refinement

Refinement operations for knot vectors are documented in the Basis Functions - Refinement section.