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 84 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 97 of file NURBSbasis.C.

◆ NURBSbasis() [3/4]

NURBSbasis ( const dictionary dict)

Construct from dictionary.

Assumes uniform knot vector

Definition at line 111 of file NURBSbasis.C.

◆ NURBSbasis() [4/4]

NURBSbasis ( const NURBSbasis basis)

Construct as copy.

Definition at line 124 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

Basis value.

Definition at line 140 of file NURBSbasis.C.

Referenced by NURBS3DCurve::buildCurve(), NURBS3DSurface::buildSurface(), NURBS3DCurve::curveDerivativeU(), NURBS3DCurve::curveDerivativeUU(), and NURBS3DCurve::curvePoint().

Here is the caller graph for this function:

◆ basisDerivativeU()

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

Basis derivative w.r.t u.

Definition at line 190 of file NURBSbasis.C.

Referenced by NURBS3DCurve::curveDerivativeU(), and NURBS3DCurve::curveDerivativeUU().

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 231 of file NURBSbasis.C.

Referenced by NURBS3DCurve::curveDerivativeUU().

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 273 of file NURBSbasis.C.

Referenced by NURBS3DCurve::checkRange().

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 298 of file NURBSbasis.C.

References Foam::Zero.

◆ knots()

const Foam::scalarField & knots ( ) const
inline

Definition at line 34 of file NURBSbasisI.H.

◆ degree()

const Foam::label & degree ( ) const
inline

Definition at line 40 of file NURBSbasisI.H.

Referenced by NURBS3DCurve::buildCurve(), NURBS3DSurface::buildSurface(), NURBS3DCurve::checkRange(), NURBS3DCurve::curveDerivativeU(), NURBS3DCurve::curveDerivativeUU(), and NURBS3DCurve::curvePoint().

Here is the caller graph for this function:

◆ nCPs()

const Foam::label & nCPs ( ) const
inline

Definition at line 46 of file NURBSbasisI.H.

Referenced by NURBS3DSurface::buildSurface(), axisAligned::computeControlPoints(), fromFile::computeControlPoints(), transformBox::computeControlPoints(), NURBS3DSurface::getBoundaryCPIDs(), NURBS3DSurface::invertU(), NURBS3DSurface::invertUV(), and NURBS3DSurface::invertV().

Here is the caller graph for this function:

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