77 label nrmOrientation_;
83 label sgn(
const scalar val)
const;
85 scalar abs(
const scalar val)
const;
87 label mod(
const label
x,
const label interval)
const;
105 const label spacingCorrInterval,
106 const scalar tolerance
205 const label lenAcc = 25,
206 const label maxIter = 10,
207 const label spacingCorrInterval = -1,
208 const scalar tolerance = 1.e-5
221 const vector& targetPoint,
222 const label maxIter = 1000,
223 const scalar tolerance = 1.e-13
230 const vector& targetPoint,
231 const scalar initGuess,
232 const label maxIter = 1000,
233 const scalar tolerance = 1.e-13
239 const vector nrm2D(
const scalar zVal,
const scalar u)
const;
245 const label nPts = 100,
246 const label lenAcc = 25,
247 const label maxIter = 10,
248 const label spacingCorrInterval=-1,
249 const scalar tolerance = 1.e-5
356 inline label nrmOrientation()
const
358 return nrmOrientation_;
364 return givenInitNrm_;
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
~NURBS3DCurve()=default
Destructor.
const vector nrm3D(const vector &refTan, const scalar u) const
Find the normal to the curve, with the option of forcing a z-plane.
void insertKnot(const scalarField &oldKnots, const scalar uBar, const label kInsert)
Insert a knot by re-computing the control points.
void setNrm3DOrientation(const vector &givenNrm, const vector &givenTan)
vector curveDerivativeUU(const scalar u) const
Curve second derivative wrt u at point ui.
NURBS3DCurve(const NURBS3DCurve &)
Construct as copy.
void setCPs(const List< vector > &CPs)
Set CPs.
void makeEquidistant(const label lenAcc=25, const label maxIter=10, const label spacingCorrInterval=-1, const scalar tolerance=1.e-5)
Make curve points equidistant in cartesian space.
vector curveDerivativeWeight(const scalar u, const label CPI)
Curve derivative wrt CPII at point u.
scalar length() const
Calculate length for the entire curve length.
void setName(const word &name)
Set name.
const List< scalar > & getWeights() const
Get weights.
void invert()
Invert CPs order and re-build curve.
const List< scalar > & getParametricCoordinates() const
Get parametric coordinates.
scalar findClosestCurvePoint(const vector &targetPoint, const label maxIter=1000, const scalar tolerance=1.e-13)
label nrmOrientation() const
Return the nrm sgn relation to the u=0 nrm.
void buildCurve()
Build curve.
const NURBSbasis & getBasisFunction() const
Get basis function.
scalarList genEquidistant(const label nPts=100, const label lenAcc=25, const label maxIter=10, const label spacingCorrInterval=-1, const scalar tolerance=1.e-5)
const vector nrm2D(const scalar zVal, const scalar u) const
scalar lengthDerivativeU(const scalar uStart, const scalar uEnd, const label nPts)
const vector & givenInitNrm() const
Return the initial normal given to compare to the Curve's normals.
void write()
Write curve to file.
bool checkRange(const scalar u, const label CPI, const label degree) const
Check if given parametric coordinate u and CP are linked.
const word & getName() const
Get name.
vector curveDerivativeU(const scalar u) const
Curve derivative wrt u at point ui.
void setNrm2DOrientation(const vector &givenNrm, const scalar zVal)
void flipNrmOrientation()
Flip the orientation of the nrm.
void setWeights(const List< scalar > &weights)
Set weights.
vector curvePoint(const scalar u) const
Curve point cartesian coordinates at ui.
scalar curveDerivativeCP(const scalar u, const label CPI)
const List< vector > & getCPs() const
Get CPs.
NURBSbasis function. Used to construct NURBS curves, surfaces and volumes.
A class for handling file names.
A class for handling words, derived from Foam::string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.