Check

verb.eval.Check

CLASS

Source code

Check includes various tools for checking the validity of various NURBS data structures. This is important because it is very easy to construct such data structures with incorrect structure. This class contains static, immutable functions for doing those checks.

Note that the classes in verb.eval are very tolerant of incorrect NURBS data structures for performance reasons. You should perform these checks before using these classes.

isValidKnotVector

STATIC METHOD

Source code

isValidKnotVector(vec : Array<Float>, degree : Int) : Bool

Check whether a given array is a valid NURBS knot vector. This also checks the validity of the end points. More specifically, this method checks if the knot vector is of the following structure:

The knot vector must be non-decreasing and of length (degree + 1) * 2 or greater

[ (degree + 1 copies of the first knot), internal non-decreasing knots, (degree + 1 copies of the last knot) ]

params

returns

isNonDecreasing

STATIC METHOD

Source code

isNonDecreasing(vec : Array<Float>)

Check if an array of floating point numbers is non-decreasing, although there may be repeats. This is an important validation step for NURBS knot vectors.

params

returns

isValidNurbsCurveData

STATIC METHOD

Source code

isValidNurbsCurveData(data : NurbsCurveData) : NurbsCurveData

Validate a NurbsCurveData object

params

returns

isValidNurbsSurfaceData

STATIC METHOD

Source code

isValidNurbsSurfaceData(data : NurbsSurfaceData) : NurbsSurfaceData

Validate a NurbsSurfaceData object

params

returns