C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
mb_nurbs_function.h File Reference

The module of geometric constructions. More...

#include <templ_s_array.h>
#include <templ_array2.h>
#include <templ_sparse_array2.h>
#include <templ_dptr.h>
#include <math_define.h>
#include <mb_enum.h>
#include <curve3d.h>
#include <surface.h>
#include <mb_rect1d.h>
#include <mb_matrixnn.h>
#include <mb_vector3d.h>
#include <mb_cart_point3d.h>
#include <op_binding_data.h>
#include <alg_base.h>
#include <vector>

Classes

class  MbCurveIntoNurbsInfo
 Additional information for transformation of a curve or surface to NURBS. More...
 
struct  MbNurbsParameters
 Parameters for the construction of a NURBS copy of the object. More...
 
class  MbNurbsCopyCurveResult
 Output data for create NURBS copy of curve. More...
 
class  MbNurbsCopySurfaceResult
 Output data for create NURBS copy of surface. More...
 
struct  MbNurbsPointInfo
 Parameters of knot point of the object spline copy. More...
 

Enumerations

enum  MbeSplineCreateType { sct_Version0 = 0 , sct_Version1 = 1 , sct_Version2 = 2 }
 Flag defining creation of spline passing through points. More...
 

Functions

template<class Type >
double GetParamDistance (const Type &p1, const Type &p2, MbeSplineParamType spType)
 Get a measure of the distance. More...
 
bool IsValidNurbsParams (size_t degree, bool closed, size_t pcnt)
 Check initialization parameters of a nurbs-object. More...
 
bool IsValidNurbsParams (size_t degree, bool closed, size_t pcnt, size_t wcnt)
 Check initialization parameters of a nurbs-object. More...
 
bool IsValidNurbsParams (size_t degree, bool closed, size_t pcnt, size_t wcnt, size_t kcnt)
 Check initialization parameters of a nurbs-object. More...
 
template<class KnotsVector >
bool IsValidNurbsParamsExt (size_t degree, bool closed, size_t pcnt, const KnotsVector &knots)
 Check initialization parameters of a nurbs-curve. More...
 
template<class PointVector , class DoubleVector >
bool IsValidNurbsParamsExt (size_t degree, bool closed, const PointVector &pnts, const DoubleVector *wts, const DoubleVector *knots=nullptr)
 Check initialization parameters of a nurbs-curve. More...
 
template<class KnotsVector >
bool IsValidNurbsKnots (const KnotsVector &knots, double eps=EXTENT_EPSILON)
 Check knots vector of a nurbs-object. More...
 
template<class KnotsVector >
bool RestoreClippedKnots (size_t degree, bool closed, size_t pointsCnt, KnotsVector &knots)
 Check and try to restore knots vector of a nurbs-object. More...
 
template<class KnotsVector >
ptrdiff_t KnotIndex (size_t degree, const KnotsVector &knots, double &t)
 Definition of "left" knot index for the first non-zero function. More...
 
template<class KnotsVector >
ptrdiff_t DefineKnotsVector (ptrdiff_t degree, bool closed, ptrdiff_t uppPointsIndex, KnotsVector &knots)
 Define knot vector (uniform parameterization). More...
 
template<class ParamsVector , class KnotsVector >
bool DefineKnotsVector (size_t degree, bool closed, size_t count, const ParamsVector *paramsPtr, size_t kMode, KnotsVector &knots)
 Define knot vector. More...
 
template<class PointsVector , class ParamsVector >
bool DefineThroughPointsParams (const PointsVector &points, MbeSplineParamType spType, bool closed, ParamsVector &params)
 Define parametric distribution of points. More...
 
template<class KnotsVector , class DoubleVector >
bool BasisFuns (ptrdiff_t i, double t, ptrdiff_t p, const KnotsVector &knots, DoubleVector &nsplines, DoubleVector &lrVect)
 The calculation of B - basis ("degree" - order of B-spline, p = (degree - 1) - the degree of the polynomial (B-spline)). More...
 
template<class DoubleVector >
bool CalcBsplvb (const DoubleVector &knots, double t, ptrdiff_t leftIndex, ptrdiff_t degree, DoubleVector &biatx, DoubleVector &lrVect)
 Calculate basic spline by "t" parameter and knots vector. More...
 
template<class Point , class NurbsVector , class KnotsVector >
void CurveDeriveCpts (ptrdiff_t p, const KnotsVector &U, const Point *P, const double *W, size_t pointCount, const NurbsVector *PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, NurbsVector *PK)
 Calculate all difference forms of curve. More...
 
template<class Point , class NurbsVector , class KnotsVector >
void CurveDeriveCpts (ptrdiff_t p, const KnotsVector &U, const Point *P, const double w, size_t pointCount, const NurbsVector *PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, NurbsVector *PK)
 Calculate all difference forms of curve. More...
 
template<class Point , class NurbsVector , class KnotsVector , class DoubleTriple >
void CurveDeriveCpts (ptrdiff_t p, const KnotsVector &U, const Point *P, const double *W, size_t pointCount, const NurbsVector *PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, DoubleTriple **DT, double **WT)
 Calculate all difference forms of curve. More...
 
template<class Point , class NurbsVector , class KnotsVector , class DoubleTriple >
void CurveDeriveCpts (ptrdiff_t p, const KnotsVector &U, const Point *P, const double w, size_t pointCount, const NurbsVector *PW, ptrdiff_t d, ptrdiff_t r1, ptrdiff_t r2, DoubleTriple **DT, double **WT)
 Calculate all difference forms of curve. More...
 
template<class Point , class Homogeneous >
void CurveDeriveCpts (ptrdiff_t p, const double *U, const Point *P, const double *W, size_t pointCount, ptrdiff_t r1, ptrdiff_t r2, Homogeneous *H0, Homogeneous *H1, Homogeneous *H2, Homogeneous *H3)
 Calculate all difference forms of curve. More...
 
void CheckParam (const double &tMin, const double &tMax, bool closed, double &t)
 Reduce "t" to parameter in the parametric domain of the curve. More...
 
template<class KnotsVector , class DoubleVector1 , class DoubleVector2 >
ptrdiff_t CalculateSplines (size_t degree, const KnotsVector &knots, bool closed, double &t, DoubleVector1 &nsplines, DoubleVector2 &lrVect)
 Calculate non-zero splines with a given parameter. More...
 
template<class Nurbs , class PointsVector , class DoubleVector >
bool CreateNurbsLSMClosed (SPtr< Nurbs > &nurbs, const ptrdiff_t degree, const ptrdiff_t pCount, const PointsVector &aPoints, const DoubleVector &aKnots, const DoubleVector *aParams=nullptr)
 Construction of closed spline. More...
 
template<class Nurbs , class PointsVector , class DoubleVector >
bool CreateNurbsLSM (SPtr< Nurbs > &nurbs, const ptrdiff_t degree, const ptrdiff_t pCount, const PointsVector &aPoints, const DoubleVector &aKnots, const DoubleVector *aParams=nullptr)
 Construction of non-closed spline. More...
 
template<class Curve , class Nurbs , class Point >
Nurbs * CreateLineOutRgn (const Curve &curve, double tn1, double tn2, double t1, double t2, const MbCurveIntoNurbsInfo &nci)
 Construction of line segment spline.
 

Detailed Description

The module of geometric constructions.

The base algorithms for NURBS curves and surfaces.