NURBSbasis Class Reference

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 scalarFieldknots () const
 
const label & degree () const
 
const label & nCPs () const
 

Detailed Description

NURBSbasis function. Used to construct NURBS curves, surfaces and volumes.

Source files

Definition at line 55 of file NURBSbasis.H.

Constructor & Destructor Documentation

◆ NURBSbasis() [1/4]

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() [2/4]

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() [3/4]

NURBSbasis ( const dictionary dict)

Construct from dictionary.

Assumes uniform knot vector

Definition at line 110 of file NURBSbasis.C.

◆ NURBSbasis() [4/4]

NURBSbasis ( const NURBSbasis basis)

Construct as copy.

Definition at line 123 of file NURBSbasis.C.

References DebugInfo, and Foam::endl().

Here is the call graph for this function:

◆ ~NURBSbasis()

virtual ~NURBSbasis ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "NURBbasis"  )

Runtime type information.

◆ basisValue()

scalar basisValue ( const label  iCP,
const label  degree,
const scalar  u 
) const

◆ basisDerivativeU()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ basisDerivativeUU()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkRange()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertKnot()

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.

Here is the call graph for this function:

◆ knots()

const Foam::scalarField & knots ( ) const
inline

Definition at line 34 of file NURBSbasisI.H.

◆ degree()

◆ nCPs()


The documentation for this class was generated from the following files: