NURBSbasis function. Used to construct NURBS curves, surfaces and volumes. More...
Public Member Functions | |
TypeName ("NURBbasis") | |
Runtime type information. More... | |
NURBSbasis (const label nCPs, const label degree, const scalarField &knots) | |
Construct from number of control points, knot vector and basis order. More... | |
NURBSbasis (const label nCPs, const label degree) | |
Construct from number of control points and basis order. More... | |
NURBSbasis (const dictionary &dict) | |
Construct from dictionary. More... | |
NURBSbasis (const NURBSbasis &) | |
Construct as copy. More... | |
virtual | ~NURBSbasis ()=default |
Destructor. More... | |
scalar | basisValue (const label iCP, const label degree, const scalar u) const |
Basis value. More... | |
scalar | basisDerivativeU (const label iCP, const label degree, const scalar u) const |
Basis derivative w.r.t u. More... | |
scalar | basisDerivativeUU (const label iCP, const label degree, const scalar u) const |
Basis second derivative w.r.t u. More... | |
bool | checkRange (const scalar u, const label CPI, const label degree) const |
Checks to see if given u is affected by given CP. More... | |
label | insertKnot (const scalar uBar) |
const scalarField & | knots () const |
const label & | degree () const |
const label & | nCPs () const |
NURBSbasis function. Used to construct NURBS curves, surfaces and volumes.
Definition at line 55 of file NURBSbasis.H.
NURBSbasis | ( | const label | nCPs, |
const label | degree, | ||
const scalarField & | knots | ||
) |
Construct from number of control points, knot vector and basis order.
Definition at line 83 of file NURBSbasis.C.
NURBSbasis | ( | const label | nCPs, |
const label | degree | ||
) |
Construct from number of control points and basis order.
Assumes uniform knot vector
Definition at line 96 of file NURBSbasis.C.
NURBSbasis | ( | const dictionary & | dict | ) |
NURBSbasis | ( | const NURBSbasis & | basis | ) |
Construct as copy.
Definition at line 123 of file NURBSbasis.C.
References DebugInfo, and Foam::endl().
|
virtualdefault |
Destructor.
TypeName | ( | "NURBbasis" | ) |
Runtime type information.
scalar basisValue | ( | const label | iCP, |
const label | degree, | ||
const scalar | u | ||
) | const |
Basis value.
Definition at line 139 of file NURBSbasis.C.
References NURBSbasis::basisValue(), NURBSbasis::checkRange(), and NURBSbasis::degree().
Referenced by NURBSbasis::basisDerivativeU(), NURBSbasis::basisValue(), NURBS3DCurve::buildCurve(), NURBS3DSurface::buildSurface(), NURBS3DCurve::curveDerivativeCP(), NURBS3DCurve::curveDerivativeU(), NURBS3DCurve::curveDerivativeUU(), NURBS3DCurve::curveDerivativeWeight(), NURBS3DCurve::curvePoint(), NURBS3DSurface::surfaceDerivativeCP(), NURBS3DSurface::surfaceDerivativeU(), NURBS3DSurface::surfaceDerivativeUU(), NURBS3DSurface::surfaceDerivativeUV(), NURBS3DSurface::surfaceDerivativeV(), NURBS3DSurface::surfaceDerivativeVV(), NURBS3DSurface::surfaceDerivativeW(), NURBS3DSurface::surfacePoint(), NURBS3DCurve::write(), and NURBS3DCurve::writeWParses().
scalar basisDerivativeU | ( | const label | iCP, |
const label | degree, | ||
const scalar | u | ||
) | const |
Basis derivative w.r.t u.
Definition at line 189 of file NURBSbasis.C.
References NURBSbasis::basisDerivativeU(), NURBSbasis::basisValue(), NURBSbasis::checkRange(), and NURBSbasis::degree().
Referenced by NURBSbasis::basisDerivativeU(), NURBSbasis::basisDerivativeUU(), NURBS3DCurve::curveDerivativeU(), NURBS3DCurve::curveDerivativeUU(), NURBS3DSurface::surfaceDerivativeU(), NURBS3DSurface::surfaceDerivativeUU(), NURBS3DSurface::surfaceDerivativeUV(), NURBS3DSurface::surfaceDerivativeV(), and NURBS3DSurface::surfaceDerivativeVV().
scalar basisDerivativeUU | ( | const label | iCP, |
const label | degree, | ||
const scalar | u | ||
) | const |
Basis second derivative w.r.t u.
Definition at line 230 of file NURBSbasis.C.
References NURBSbasis::basisDerivativeU(), NURBSbasis::basisDerivativeUU(), NURBSbasis::checkRange(), and NURBSbasis::degree().
Referenced by NURBSbasis::basisDerivativeUU(), NURBS3DCurve::curveDerivativeUU(), NURBS3DSurface::surfaceDerivativeUU(), and NURBS3DSurface::surfaceDerivativeVV().
bool checkRange | ( | const scalar | u, |
const label | CPI, | ||
const label | degree | ||
) | const |
Checks to see if given u is affected by given CP.
Definition at line 272 of file NURBSbasis.C.
References NURBSbasis::degree().
Referenced by NURBSbasis::basisDerivativeU(), NURBSbasis::basisDerivativeUU(), NURBSbasis::basisValue(), NURBS3DCurve::checkRange(), NURBS3DSurface::checkRangeU(), and NURBS3DSurface::checkRangeV().
label insertKnot | ( | const scalar | uBar | ) |
Adds the new knot's u value, increments the nCPs and returns 'k', the index of the newly inserted uValue.
uBar should be pre-bounded between 0,1.
Definition at line 297 of file NURBSbasis.C.
References UList< T >::size(), and Foam::Zero.
|
inline |
Definition at line 34 of file NURBSbasisI.H.
|
inline |
Definition at line 40 of file NURBSbasisI.H.
Referenced by NURBSbasis::basisDerivativeU(), NURBSbasis::basisDerivativeUU(), NURBSbasis::basisValue(), NURBS3DCurve::buildCurve(), NURBS3DSurface::buildSurface(), NURBS3DCurve::checkRange(), NURBSbasis::checkRange(), NURBS3DSurface::checkRangeU(), NURBS3DSurface::checkRangeUV(), NURBS3DSurface::checkRangeV(), NURBS3DCurve::curveDerivativeCP(), NURBS3DCurve::curveDerivativeU(), NURBS3DCurve::curveDerivativeUU(), NURBS3DCurve::curveDerivativeWeight(), NURBS3DCurve::curvePoint(), NURBS3DCurve::insertKnot(), NURBS3DSurface::surfaceDerivativeCP(), NURBS3DSurface::surfaceDerivativeU(), NURBS3DSurface::surfaceDerivativeUU(), NURBS3DSurface::surfaceDerivativeUV(), NURBS3DSurface::surfaceDerivativeV(), NURBS3DSurface::surfaceDerivativeVV(), NURBS3DSurface::surfaceDerivativeW(), NURBS3DSurface::surfacePoint(), NURBS3DCurve::write(), and NURBS3DCurve::writeWParses().
|
inline |
Definition at line 46 of file NURBSbasisI.H.
Referenced by NURBS3DSurface::buildSurface(), axisAligned::computeControlPoints(), fromFile::computeControlPoints(), transformBox::computeControlPoints(), NURBS3DSurface::getBoundaryCPIDs(), NURBS3DCurve::insertKnot(), NURBS3DSurface::invertU(), NURBS3DSurface::invertUV(), NURBS3DSurface::invertV(), NURBS3DSurface::surfaceDerivativeCP(), NURBS3DSurface::surfaceDerivativeU(), NURBS3DSurface::surfaceDerivativeUU(), NURBS3DSurface::surfaceDerivativeUV(), NURBS3DSurface::surfaceDerivativeV(), NURBS3DSurface::surfaceDerivativeVV(), NURBS3DSurface::surfaceDerivativeW(), NURBS3DSurface::surfacePoint(), and NURBS3DSurface::writeVTK().