C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
NURBS curve in three-dimensional space. More...
#include <cur_nurbs3d.h>
Public Member Functions | |
void | Init (const MbNurbs3D &) |
Set parameters of the spline. | |
bool | Init (size_t degree, const SArray< MbCartPoint3D > &points, bool closed, const SArray< double > *weights=nullptr) |
Initialization. More... | |
bool | Init (size_t degree, bool closed, const SArray< MbCartPoint3D > &points, const SArray< double > &knots) |
Initialization. More... | |
template<class PointsVector , class DoubleVector > | |
bool | Init (size_t initDegree, bool initClosed, const PointsVector &initPoints, const DoubleVector &initWeights, const DoubleVector &initKnots, MbeNurbsCurveForm initForm=ncf_Unspecified) |
Initialization. More... | |
bool | Init (size_t degree, const SArray< MbCartPoint3D > &points, const SArray< double > &weights, c3d::PntMatingData3D &begData, c3d::PntMatingData3D &endData) |
Initialization. More... | |
bool | Init (size_t degree, bool closed, const CcArray< double > &points, const CcArray< double > &knots, size_t nPoints, size_t nKnots) |
Initialization. More... | |
bool | InitThrough (size_t degree, bool cls, const SArray< MbCartPoint3D > &points, const SArray< double > ¶ms, SArray< double > *aKnots=nullptr) |
Initialization. More... | |
bool | InitThrough (size_t degree, bool cls, const c3d::SpacePointsVector &points, const c3d::DoubleVector ¶ms, c3d::DoubleVector *aKnots=nullptr) |
Initialization. More... | |
void | SetFormType (MbeNurbsCurveForm f) |
Set the type of shape. | |
MbeSpaceType | IsA () const override |
Get the type of the object. | |
MbSpaceItem & | Duplicate (MbRegDuplicate *=nullptr) const override |
Create a copy of the object. More... | |
bool | IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const override |
Determine whether an object is equal. More... | |
bool | SetEqual (const MbSpaceItem &) override |
Make objects equal if they are similar. More... | |
void | Transform (const MbMatrix3D &, MbRegTransform *=nullptr) override |
Convert the object according to the matrix. More... | |
void | Move (const MbVector3D &, MbRegTransform *=nullptr) override |
Move an object along a vector. More... | |
void | Rotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) override |
Rotate an object around an axis at a given angle. More... | |
void | GetProperties (MbProperties &) override |
Outstanding properties of the object. More... | |
void | SetProperties (const MbProperties &) override |
Change the properties of an object. More... | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
double | GetTMin () const override |
Get the minimum value of parameter. | |
double | GetTMax () const override |
Get the maximum value of parameter. | |
bool | IsClosed () const override |
Define whether the curve is periodic. More... | |
bool | IsPeriodic () const override |
Define whether the curve is periodic. More... | |
bool | IsStraight (bool ignoreParams=false) const override |
Whether the line is straight? | |
void | PointOn (double &t, MbCartPoint3D &) const override |
Calculate a point on the curve. More... | |
void | FirstDer (double &t, MbVector3D &) const override |
Calculate first derivative. | |
void | SecondDer (double &t, MbVector3D &) const override |
Calculate second derivative. | |
void | ThirdDer (double &t, MbVector3D &) const override |
Calculate third derivative. | |
void | Explore (double &t, bool ext, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec, MbVector3D *thir) const override |
Calculate point and derivatives of object for given parameter. More... | |
double | Step (double t, double sag) const override |
Calculate parameter step. More... | |
double | DeviationStep (double t, double angle) const override |
Calculate parameter step. More... | |
MbNurbs3D * | NurbsCurve (const MbCurveIntoNurbsInfo &) const override |
Construct a NURBS copy of a curve. More... | |
MbCurve3D * | NurbsCurve (const MbNurbsParameters &) const override |
Construct a NURBS copy of a curve. More... | |
MbCurve3D * | Trimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const override |
Construct a trimmed curve with the given two-dimensional accuracy. More... | |
double | GetRadius (double accuracy=METRIC_REGION) const override |
Get the physical radius of the curve or zero if it impossible. More... | |
bool | GetCircleAxis (MbAxis3D &) const override |
Get an axis of a circle which is geometrically coincident to the given curve. More... | |
bool | GetPlaneCurve (MbCurve *&curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const override |
Get planar curve and placement if the space curve is planar. More... | |
bool | NearPointProjection (const MbCartPoint3D &, double &t, bool ext, MbRect1D *tRange=nullptr) const override |
Find the point projection to the curve. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
void | Inverse (MbRegTransform *iReg=nullptr) override |
Change direction of a curve. | |
bool | IsReparamSame (const MbCurve3D &curve, double &factor) const override |
Define whether a reparameterized curve is the same. More... | |
bool | IsDegenerate (double eps=METRIC_PRECISION) const override |
Check whether the curve is degenerated.calculate. | |
MbNurbs3D * | Trimm (double t1, double t2, int sense) const |
Trim the curve. | |
void | CalculateGabarit (MbCube &cube) const override |
Calculate bounding box of a curve. | |
double | CalculateMetricLength () const override |
Calculate the metric length of a curve. | |
bool | DistanceAlong (double &t, double len, int curveDir, double eps=Math::metricPrecision, VERSION version=Math::DefaultMathVersion()) const override |
Translate parameter along the curve. More... | |
double | CalculateLength (double t1, double t2) const override |
Calculate the metric length of a curve. More... | |
void | GetAnalyticalFunctionsBounds (std::vector< double > ¶ms) const override |
Get the boundaries of the curve sections that are described by one analytical function. | |
void | ResetTCalc () const override |
Reset the current value of parameter. | |
bool | IsContinuousDerivative (bool &contLength, bool &contDirect, c3d::DoubleVector *params=nullptr, double epsilon=EPSILON) const override |
Have the first derivative of the curve the continuous length and direction? More... | |
bool | SetContinuousDerivativeLength (VERSION version, double epsilon=EPSILON) override |
Eliminate the discontinuities of the first derivative at length. More... | |
MbNurbs3D * | Break (double t1, double t2) const |
Extract a piece of a curve. | |
void | SetWeight (ptrdiff_t pointNumber, double newWeight) |
Set weight for a control point. | |
void | AddPoint (ptrdiff_t index, const MbCartPoint3D &pnt, double weight) |
Add a point with weight. | |
void | InsertKnots (double &newKnot, size_t multiplicity, double relEps=Math::paramEpsilon) |
Add a new knot with the given multiplicity. | |
void | InsertKnotsInRegion (ptrdiff_t idBegin) |
Add new equally spaced knots into the range from idBegin to idBegin+1. | |
ptrdiff_t | RemoveKnot (ptrdiff_t id, ptrdiff_t num, double relEps=Math::paramEpsilon, double absEps=Math::lengthEpsilon) |
Remove multiple internal 'id' knot 'num' times, return count of removals which were successfully made. | |
bool | RemoveKnotAlways (ptrdiff_t id) |
Remove knot 'id' once without checking the accuracy of the curve modification. | |
void | RemoveAllKnots (double relEps=Math::paramEpsilon, double absEps=Math::lengthEpsilon) |
Remove all the internal knots if it is possible. | |
bool | DecomposeCurve () |
Transform current NURBS into Bezier curve. | |
bool | RaiseDegree (size_t newDegree, double relEps=Math::paramEpsilon) |
Increase order of curve without changing its geometric shape and parametrization. More... | |
bool | ReductionDegree (double relEps=Math::paramEpsilon) |
Decrease order of nurbs curve by 1 without changing its geometric shape and parametrization. More... | |
size_t | KnotMultiplicity (size_t knotIndex) const |
Get multiplicity of a knot with a given index. | |
void | DefineKnotsVector () |
Definition of the basis knot vector. | |
bool | OpenKnotsVector () |
Redefine the basis knot vector from Close to Open. | |
bool | CloseKnotsVector () |
Redefine the basis knot vector from Open to Close. | |
bool | SetLimitParam (double pmin, double pmax) |
Set the range of parameter. | |
void | AddCurve (MbNurbs3D &, bool bmerge=true) |
Add a curve to the end. | |
void | AddCurves (const RPArray< MbNurbs3D > &) |
Add curves to the end. | |
bool | ReparamCurveInBezierForm () |
Reparameterize a curve according to the length if the curve is obtained from a set of Bezier curves. | |
MbeNurbsCurveForm | GetFormType () const |
Get the form of B-spline. | |
size_t | GetDegree () const |
Get the order of B-spline. | |
bool | IsRational () const |
Get the attribute of rationality, but not regularity of a curve. | |
size_t | GetWeightsCount () const |
Get a size of weights vector. | |
template<class WeightsVector > | |
void | GetWeights (WeightsVector &wts, bool justSet=true) const |
Get a weights vector. | |
double | GetWeight (size_t ind) const |
Get a weights vector element value by index. | |
double & | SetWeight (size_t ind) |
Get a weights vector element value by index. | |
size_t | GetKnotsCount () const |
Get a size of knots vector. | |
template<class KnotsVector > | |
void | GetKnots (KnotsVector &kts, bool justSet=true) const |
Get a knots vector. | |
double | GetKnot (size_t ind) const |
Get a knots vector element value by index. | |
double & | SetKnot (size_t ind) |
Get a knots vector element value by index. | |
ptrdiff_t | GetUppKnotsIndex () const |
Get the maximal index of knots vector. | |
MbCurve * | GetMap (const MbMatrix3D &, MbRect1D *pRgn=nullptr, VERSION version=Math::DefaultMathVersion(), bool *coincParams=nullptr) const override |
Construct a planar projection of a piece of a space curve. More... | |
size_t | GetCount () const override |
Define the number of splittings for one passage in operations. | |
bool | AttachG (c3d::PntMatingData3D &connectData, bool beg, bool isWrongAttachG1_K12=false) |
Set conjugation at the end. | |
bool | BreakC0NURBS4 (RPArray< MbCurve3D > &, bool bline=true) const |
Split the curve. More... | |
bool | ExtendNurbs (double, double, bool bmerge=false) |
Extend an open NURBS-curve by tangents. | |
MbResultType | Extend (const MbCurveExtensionParameters3D ¶meters, c3d::SpaceCurveSPtr &resCurve) const override |
Extend the curve. | |
bool | UnClamped (bool clm, bool savePointsCount=false) |
Transform knot vector to a clamped one (if the curve is closed and clm = false) or unclamped one (if the curve is open and clm = true). | |
MbCurve3D * | ConvertToConic () |
Transform a curve into a conic section if it is possible. | |
bool | BreakC0 (c3d::SpaceCurvesSPtrVector &, double metricAcc=METRIC_EPSILON, VERSION version=Math::DefaultMathVersion()) |
Split a NURBS-curve at places where the curve is non-differentiable. If the curve is differentiable, then the curve copy is added. | |
void | FixClosedNurbs () |
Make the curve closed. More... | |
double | GetBSplineParameter (size_t num) const |
Get value of the parameter corresponding to a knot point with 'num' index. | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const |
Construct a trimmed curve. More... | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, const MbDimAccuracy &xyzEps, bool saveParamLenAndLaw) const |
Construct a trimmed curve with the given two-dimensional accuracy. More... | |
![]() | |
MbeSpaceType | Type () const override |
Get the group object type. | |
void | AddYourGabaritTo (MbCube &) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | PrepareIntegralData (const bool forced) const override |
Calculate temporary (mutable) data of an object. More... | |
void | GetBasisItems (RPArray< MbSpaceItem > &) override |
Outstanding reference objects in a container sent. | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
bool | IsClosed () const override |
Define whether the curve is periodic. More... | |
double | GetMetricLength () const override |
Calculate the metric length of a curve. | |
double | GetLengthEvaluation () const override |
Calculate the metric length of a curve. More... | |
bool | IsPlanar (double accuracy=METRIC_EPSILON) const override |
Is a curve planar? | |
bool | GetPlacement (MbPlacement3D &place, PlanarCheckParams params=PlanarCheckParams()) const override |
Fill the placement if a curve is planar. | |
size_t | GetCount () const override |
Define the number of splittings for one passage in operations. | |
template<class PointsVector > | |
void | GetPoints (PointsVector &pnts) const |
Get array of control points. | |
template<class SegmentsVector > | |
void | GetLineSegments (SegmentsVector &segments, double eps=PARAM_REGION) const |
Get the array of segments. | |
![]() | |
virtual | ~MbCurve3D () |
Destructor. | |
virtual void | Accept (Visitor &visitor) |
Implementation of a function initializing a visit of an object. | |
size_t | size () const |
Size of curve interpreted as vector of curves. | |
const MbCurve3D * | operator[] (size_t) const |
An access operator. | |
MbeSpaceType | Type () const override |
Get the group object type. | |
MbeSpaceType | Family () const override |
Get family of objects. | |
virtual MbCurve3D & | InverseDuplicate () const |
Create a copy with changed direction. | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
void | AddYourGabaritTo (MbCube &) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
virtual bool | IsSpaceSame (const MbSpaceItem &item, double eps=METRIC_REGION) const |
Are the objects identical in space? | |
virtual double | GetPeriod () const |
Return period. If a curve is not periodic then 0. | |
bool | IsTouch (double eps=Math::metricPrecision) const |
Determine whether a curve is closed regardless of the smoothness of the closure. More... | |
virtual void | Tangent (double &t, MbVector3D &) const |
Calculate tangent vector (normalized). | |
virtual void | Normal (double &t, MbVector3D &) const |
Calculate main normal vector. | |
virtual void | BNormal (double &t, MbVector3D &) const |
Calculate binormal vector. | |
virtual void | _PointOn (double t, MbCartPoint3D &p) const |
Calculate point at curve and its extension. More... | |
virtual void | _FirstDer (double t, MbVector3D &) const |
Calculate first derivative at curve and its extension. | |
virtual void | _SecondDer (double t, MbVector3D &) const |
Calculate second derivative at curve and its extension. | |
virtual void | _ThirdDer (double t, MbVector3D &) const |
Calculate third derivative at curve and its extension. | |
virtual void | _Tangent (double t, MbVector3D &) const |
Calculate tangent vector (normalized) at curve and its extension. | |
virtual void | _Normal (double t, MbVector3D &) const |
Calculate main normal vector (normalized) at curve and its extension. | |
virtual void | _BNormal (double t, MbVector3D &) const |
Calculate binormal vector (normalized) at curve and its extension. | |
virtual void | FastApproxExplore (double &t, MbCartPoint3D &pnt, MbVector3D &fir, MbVector3D *sec) const |
Calculate point and derivatives on the curve. More... | |
virtual double | MetricStep (double t, double length) const |
Calculate parameter step. More... | |
double | CurveStep (const double &t, const MbStepData &stepData) const |
Calculate parameter step. More... | |
virtual const MbCurve3D & | GetBasisCurve () const |
Returns the base curve if exists or itself. | |
virtual MbCurve3D & | SetBasisCurve () |
Returns the base curve if exists or itself. | |
virtual double | Curvature (double t) const |
Calculate curvature of curve. | |
virtual void | ThirdMetricDer (double t, MbVector3D &vect) const |
Calculate second derivative of tangent. | |
MbNurbs3D * | NurbsCurve (const MbCurveIntoNurbsInfo *nInfo=nullptr) const |
Construct a NURBS copy of a curve. More... | |
virtual size_t | NurbsCurveMinPoints (const MbNurbsParameters &tParameters, double epsilon=c3d::METRIC_DELTA) const |
Define the number of knots of a NURBS curve which is required to approximate the curve with the given tolerance. More... | |
virtual MbCurve3D * | Trimmed (double t1, double t2, int sense, bool saveParamLenAndLaw=false) const |
Construct a trimmed curve. More... | |
double | GetParamLength () const |
Return the parametric length of a curve. | |
void | CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override |
To compute bounding box in a local coordinate system. More... | |
virtual bool | IsSmoothConnected (double angleEps) const |
Are joints of contour/curve smooth? | |
virtual void | ChangeCarrier (const MbSpaceItem &item, MbSpaceItem &init) |
Change the carrier. For surface curves. | |
virtual bool | ChangeCarrierBorne (const MbSpaceItem &item, MbSpaceItem &init, const MbMatrix &matr) |
Change the carrier. More... | |
MbProperty & | CreateProperty (MbePrompt name) const override |
Create your own property with the name. | |
void | CalculateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const override |
Build polygonal copy mesh. More... | |
virtual void | CalculatePolygon (const MbStepData &stepData, MbPolygon3D &polygon) const |
Calculate an array of points for drawing. More... | |
virtual void | GetCentre (MbCartPoint3D &) const |
Give the curve center. | |
virtual void | GetWeightCentre (MbCartPoint3D &) const |
Give the gravity center of a curve. | |
virtual MbeNewtonResult | PointProjectionNewton (const MbCartPoint3D &p, size_t iterLimit, double &t, bool ext) const |
Find the point projection to the curve. More... | |
virtual MbeNewtonResult | IsoclinalNewton (const MbVector3D &dir, size_t iterLimit, double &t) const |
Find isoclines of a curve. More... | |
virtual void | GetIsoclinal (const MbVector3D &nor, SArray< double > &tIso) const |
Find all isoclines of a curve. More... | |
virtual double | DistanceToCurve (const MbCurve3D &curve2, double &t1, double &t2) const |
Calculate the nearest distance to a curve. | |
virtual double | DistanceToPlace (const MbPlacement3D &place, double &t0, double &angle) const |
The nearest point of a curve by the placement. | |
virtual MbCurve * | GetMapPsp (const MbMatrix3D &into, double zNear, MbRect1D *pRegion=nullptr) const |
Construct a planar projection of a piece of a space curve. More... | |
virtual MbCurve * | GetProjection (const MbPlacement3D &place, VERSION version) const |
Construct a planar projection of a space curve to a plane. More... | |
void | GetPointsByEvenParamDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const |
Get n points of a curve with equal intervals by parameter. | |
void | GetPointsByEvenParamDelta (size_t n, SArray< MbCartPoint3D > &pnts) const |
virtual void | GetPointsByEvenLengthDelta (size_t n, std::vector< MbCartPoint3D > &pnts) const |
Get n points of a curve with equal intervals by arc length. | |
void | GetPointsByEvenLengthDelta (size_t n, SArray< MbCartPoint3D > &pnts) const |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
bool | IsSpaceNear (const MbCurve3D &curve, double eps, bool ext, double devSag=5.0 *Math::deviateSag) const |
Check whether the two curves are metrically close. More... | |
bool | IsPointOn (const MbCartPoint3D &, double eps=METRIC_PRECISION) const |
Check whether a point is on a curve or not. | |
double | GetTMid () const |
Return the middle of parametric range of a curve. | |
double | GetTRange () const |
Return the parametric length of a curve. | |
MbCartPoint3D | PointOn (double &t) const |
Calculate point on the curve. | |
MbVector3D | FirstDer (double &t) const |
Calculate first derivative. | |
MbVector3D | SecondDer (double &t) const |
Calculate second derivative. | |
MbVector3D | ThirdDer (double &t) const |
Calculate third derivative. | |
virtual void | GetCurvatureSpecialPoints (std::vector< c3d::DoublePair > &points) const |
Find all the special points of the curvature function of the curve. More... | |
virtual void | BreakPoints (std::vector< double > &vBreaks, double precision=ANGLE_REGION) const |
\ ru Определение точек излома кривой. The determination of curve smoothness break points. | |
MbCartPoint3D | GetLimitPoint (ptrdiff_t number) const |
Calculate the boundary point. More... | |
void | GetLimitPoint (ptrdiff_t number, MbCartPoint3D &pnt) const |
Calculate the boundary point. More... | |
MbVector3D | GetLimitTangent (ptrdiff_t number) const |
Calculate a tangent vector to the boundary point. More... | |
void | GetLimitTangent (ptrdiff_t number, MbVector3D &v) const |
Calculate a tangent vector to the boundary point. More... | |
bool | AreLimitPointsEqual () const |
Are boundary points equal? More... | |
bool | SetInParamRegion (double &t) const |
Move to the parametric region. | |
bool | IsParamOn (double t, double eps) const |
Check whether a parameter is in the range of the curve. | |
bool | IsInverseSame (const MbCurve3D &curve, double accuracy=LENGTH_EPSILON) const |
Whether an inversed curve is the same. | |
virtual double | GetParamToUnit () const |
Get increment of parameter, corresponding to the unit length in space. | |
virtual double | GetParamToUnit (double t) const |
Get increment of parameter, corresponding to the unit length in space. | |
double | GetTEpsilon () const |
Get the minimum distinguishable value of parameter. | |
double | GetTEpsilon (double t) const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion () const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion (double t) const |
Get the minimum distinguishable value of parameter. | |
double | GetTRegion (double t, const MbDimAccuracy &xyzEps) const |
Get the minimum distinguishable value of parameter with the given three-dimensional accuracy according to parameter. | |
virtual const MbCurve3D & | GetSubstrate () const |
Get a substrate or itself. | |
virtual MbCurve3D & | SetSubstrate () |
Get a substrate or itself. | |
virtual int | SubstrateCurveDirection () const |
Direction of a substrate relative to a curve or vice versa. | |
virtual void | SubstrateToCurve (double &) const |
Transform a substrate parameter to the curve parameter. | |
virtual void | CurveToSubstrate (double &) const |
Transform a curve parameter to the substrate parameter. | |
bool | GetPlaneCurve (SPtr< MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const |
Get planar curve and placement if the space curve is planar. More... | |
bool | GetPlaneCurve (SPtr< const MbCurve > &curve2d, MbPlacement3D &place, bool saveParams, PlanarCheckParams params=PlanarCheckParams()) const |
Get planar curve and placement if the space curve is planar. More... | |
virtual bool | GetSurfaceCurve (MbCurve *&curve2d, MbSurface *&surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
bool | GetSurfaceCurve (SPtr< MbCurve > &curve2d, SPtr< MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
bool | GetSurfaceCurve (SPtr< const MbCurve > &curve2d, SPtr< const MbSurface > &surface, VERSION version=Math::DefaultMathVersion()) const |
Get surface curve if the space curve is surface (after the using call DeleteItem for arguments) | |
virtual bool | IsShift (const MbSpaceItem &, MbVector3D &, bool &isSame, double accuracy=LENGTH_EPSILON) const |
Is the object is a shift? | |
virtual bool | IsSimilarToCurve (const MbCurve3D &other, double precision=METRIC_PRECISION) const |
Whether the curves to union (joining) are similar. | |
void | CalculateGrid (double radius, const MbStepData &stepData, MbMesh &mesh) const |
Approximation of a curve by the flat tube with the given radius. | |
SimpleName | GetCurveName () const |
A curve name. | |
void | SetCurveName (SimpleName newName) |
Set a curve name. | |
![]() | |
virtual | ~MbSpaceItem () |
Destructor. | |
void | PrepareWrite () const |
Register object. More... | |
MbeRefType | RefType () const override |
Get a registration type (for copying, duplication). | |
bool | IsFamilyRegistrable () const override |
Whether the object belongs to a registrable family. | |
virtual bool | IsSimilar (const MbSpaceItem &item) const |
Determine whether an object is similar. More... | |
void | CalculateWire (const MbStepData &stepData, MbMesh &mesh) const |
void | CalculateWire (double sag, MbMesh &mesh) const |
![]() | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
![]() | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
![]() | |
void | Lock () const |
Switch lock on (locking happens only in parallel region). | |
void | Unlock () const |
Switch lock off if locking has been set. | |
CommonRecursiveMutex * | GetLock () const |
Get a pointer to the mutex object. Return nullptr if no parallelism. For use in ScopedLock. | |
Static Public Member Functions | |
static MbNurbs3D * | Create (const MbNurbs3D &) |
Create copy of spline. More... | |
static MbNurbs3D * | Create (const MbNurbs &nurbs, const MbPlacement3D &place) |
Create spline. More... | |
static MbNurbs3D * | Create (size_t degree, const SArray< MbCartPoint3D > &points, bool closed, const SArray< double > *weights=nullptr) |
Create spline. More... | |
static MbNurbs3D * | Create (size_t degree, bool closed, const SArray< MbCartPoint3D > &points, const SArray< double > &knots) |
Create spline. More... | |
template<class PointsVector , class DoubleVector > | |
static MbNurbs3D * | Create (size_t initDegree, bool initClosed, const PointsVector &initPoints, const DoubleVector &initWeights, const DoubleVector &initKnots, MbeNurbsCurveForm initForm=ncf_Unspecified) |
Create spline. More... | |
static MbNurbs3D * | CreateThrough (size_t degree, bool cls, const SArray< MbCartPoint3D > &points, const SArray< double > ¶ms, SArray< double > *aKnots=nullptr) |
Create spline. More... | |
static MbNurbs3D * | CreateThrough (size_t degree, bool cls, const c3d::SpacePointsVector &points, const c3d::DoubleVector ¶ms, c3d::DoubleVector *aKnots=nullptr) |
Create spline. More... | |
static MbNurbs3D * | CreateParasolid (size_t degree, bool closed, bool rational, ptrdiff_t count, const CcArray< double > &verts, ptrdiff_t vertsCount, const CcArray< ptrdiff_t > &mul, ptrdiff_t mulCount, const CcArray< double > &knots, ptrdiff_t knotsCount, double scl) |
Fill NURBS by parasolid data. More... | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &points, MbeSplineParamType spType, const c3d::PntMatingData3D &begData, const c3d::PntMatingData3D &endData, MbeSplineCreateType useInitThrough) |
Create cubic NURBS by parameters of conjugation and points which it passes through. | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &points, MbeSplineParamType spType, bool closed, RPArray< c3d::PntMatingData3D > &matingData, MbeSplineCreateType useInitThrough) |
Create cubic NURBS by interpolation points and data of conjugation at each point. | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &, const SArray< double > &, bool closed, RPArray< c3d::PntMatingData3D > &, MbeSplineCreateType useInitThrough) |
Create cubic NURBS by interpolation points, parameters and data of conjugation at each point. | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &, bool cls, MbeSplineParamType spType, MbeSplineCreateType useInitThrough=sct_Version2) |
Create a cubic NURBS by the attribute of closedness and points which it passes through. | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &points, const SArray< double > ¶ms, bool cls, MbeSplineCreateType useInitThrough=sct_Version2) |
Interpolation. More... | |
static MbNurbs3D * | CreateNURBS4 (const SArray< double > &weights, const SArray< MbCartPoint3D > &points, SArray< double > ¶ms, bool cls) |
Interpolation. More... | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &, const SArray< double > &, const MbVector3D &, const MbVector3D &, bool cls, bool bfstS=true, bool bfstN=true) |
Interpolation. More... | |
static MbNurbs3D * | CreateNURBS4 (const SArray< MbCartPoint3D > &points, const SArray< MbVector3D > &vectors, const SArray< double > ¶ms, bool cls) |
Interpolation. More... | |
static MbNurbs3D * | CreateNURBS4WithBreak (const SArray< MbCartPoint3D > &, const SArray< MbVector3D > &, const SArray< double > &, bool cls) |
Create a spline of the fourth order taking breaks of curve into account. | |
static MbNurbs3D * | CreateNURBS4 (const MbBezier3D &) |
Interpolation. More... | |
static MbNurbs3D * | CreateNURBS (size_t initDegree, const SArray< MbCartPoint3D > &initPoints, const SArray< double > &initParams, bool initClosed, RPArray< c3d::PntMatingData3D > &matingData) |
Create NURBS. More... | |
Protected Member Functions | |
MbNurbs3D (const MbNurbs &, const MbPlacement3D &) | |
Constructor. More... | |
MbNurbs3D (size_t deg, bool cls, const SArray< MbCartPoint3D > &points, const SArray< double > *weights=nullptr, const SArray< double > *knots=nullptr) | |
Constructor. More... | |
![]() | |
MbCurve3D () | |
Default constructor. | |
MbCurve3D (const MbCurve3D &other) | |
Copy-constructor. | |
![]() | |
MbSpaceItem () | |
Default constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
Additional Inherited Members | |
![]() | |
ptrdiff_t | uppIndex |
Count of curve pieces (is equal to count of control points minus one). | |
SArray< MbCartPoint3D > | pointList |
Set of control points. | |
bool | closed |
An attribute of curve closedness. | |
atomic_double | metricLength |
Metric length of curve. | |
atomic_double | lengthEvaluation |
Estimated length of a curve. | |
MbCube | cube |
Bounding box of curve. | |
![]() | |
SimpleName | name |
A curve name. The object data is temporary and used internally. | |
NURBS curve in three-dimensional space.
NURBS curve is defined by 'pointList' control points, 'weights' weights of control points, 'knots' knot vector and 'degree' spline order.
Abbreviation of NURBS is obtained from the first letters of the Non-Uniform Rational B-Spline phrase. NURBS curve doesn't pass through its control points. 'knots' knot vector has to be nondecreasing sequence of real numbers. 'pointList' and 'weights' sets have to contain the same count of elements. For not closed curve knot vector 'knots' has to contain the count of elements of 'pointList' set plus 'degree'. For closed curve knot vector 'knots' has to contain the count of elements of 'pointList' set plus 2*degree-1. Minimal value of spline parameter is equal to value of the element of knot vector with degree-1 index. Maximal value of spline parameter is equal to the value of element of knot vector with index, which is equal to index of the last element minus degree-1. Curve calculation at each point is performed using normalized non-uniform B-splines.
Family of B-splines is defined by the given nondecreasing sequence of knot parameters and the given order of B-spline.
|
protected |
Constructor.
Constructor of planar spline in space.
|
protected |
Constructor.
Constructor by order, points, parameters and an attribute of closedness.
[in] | deg | - A spline order. Must be greater than unity. Shouldn't exceed the count of control points. |
[in] | cls | - Closedness attribute. |
[in] | points | - Set of control points. Count of points must be greater than or equal to two. |
[in] | weights | - Set of weights for control points. Count of weights must be equal to count of points. |
[in] | knots | - Sequence of knot parameters. |
Create copy of spline.
Create copy of spline.
|
static |
Create spline.
Create spline and set parameters of spline.
[in] | nurbs | - The two-dimensional spline. |
[in] | place | - Local coordinate system of spline. |
|
static |
Create spline.
Create spline and set parameters of spline.
[in] | degree | - A spline order. |
[in] | points | - Set of control points. |
[in] | closed | - Closedness attribute. |
[in] | weights | - Set of weights for control points. |
|
static |
Create spline.
Create spline and set parameters of spline.
[in] | degree | - A spline order. |
[in] | closed | - Closedness attribute. |
[in] | points | - Set of control points. |
[in] | knots | - Nondecreasing sequence of knots. |
|
inlinestatic |
Create spline.
Create spline and set parameters of spline.
[in] | initDegree | - A spline order. |
[in] | initClosed | - Closedness attribute. |
[in] | initPoints | - Set of control points. |
[in] | initWeights | - Set of weights for control points. |
[in] | initKnots | - Nondecreasing sequence of knots. |
[in] | initForm | - Type of construction. |
|
static |
Create spline.
Spline passing through the given points at the given parameters.
In case of closedness it is necessary to pass the array with coincidence of the first and the last points.
[in] | degree | - A spline order. |
[in] | cls | - Closedness attribute. |
[in] | points | - Set of points which the spline passes through. |
[in] | params | - Sequence of knot parameters. |
[in] | aKnots | - Nondecreasing sequence of knots. |
|
static |
Create spline.
Spline passing through the given points at the given parameters.
In case of closedness it is necessary to pass the array with coincidence of the first and the last points.
[in] | degree | - A spline order. |
[in] | cls | - Closedness attribute. |
[in] | points | - Set of points which the spline passes through. |
[in] | params | - Sequence of knot parameters. |
[in] | aKnots | - Nondecreasing sequence of knots. |
|
static |
Fill NURBS by parasolid data.
Fill NURBS by parasolid data.
[in] | degree | - Order of spline. |
[in] | closed | - Closedness attribute. |
[in] | rational | - Whether the curve is rational. if true - NURBS is created, false - Bezier curve. |
[in] | count | - Count of control points. |
[in] | verts | - An array of coordinates of points. If spline is rational, then the fourth coordinate is the weight of a point. |
[in] | vertsCount | - Count of elements in 'verts' array. |
[in] | mul | - Array with multiplicity of each knot. |
[in] | mulCount | - Count of elements in 'mul' array. |
[in] | knots | - Array with values of parameters at knots. Each value is presented only once. Information about knot multiplicity is in the element of 'mul' array with the same index. |
[in] | knotsCount | - Count of elements in 'knots' array. |
[in] | scl | - Scale factor. |
bool MbNurbs3D::Init | ( | size_t | degree, |
const SArray< MbCartPoint3D > & | points, | ||
bool | closed, | ||
const SArray< double > * | weights = nullptr |
||
) |
Initialization.
Set parameters of the spline.
[in] | degree | - A spline order. |
[in] | points | - Set of control points. |
[in] | weights | - Set of weights for control points. |
[in] | closed | - Closedness attribute. |
bool MbNurbs3D::Init | ( | size_t | degree, |
bool | closed, | ||
const SArray< MbCartPoint3D > & | points, | ||
const SArray< double > & | knots | ||
) |
Initialization.
Set parameters of the spline.
[in] | degree | - A spline order. |
[in] | closed | - Closedness attribute. |
[in] | points | - Set of control points. |
[in] | knots | - Nondecreasing sequence of knots. |
|
inline |
Initialization.
Set parameters of the spline.
[in] | degree | - A spline order. |
[in] | closed | - Closedness attribute. |
[in] | points | - Set of control points. |
[in] | weights | - Set of weights for control points. |
[in] | knots | - Nondecreasing sequence of knots. |
[in] | initForm | - Type of construction. |
bool MbNurbs3D::Init | ( | size_t | degree, |
const SArray< MbCartPoint3D > & | points, | ||
const SArray< double > & | weights, | ||
c3d::PntMatingData3D & | begData, | ||
c3d::PntMatingData3D & | endData | ||
) |
Initialization.
Set parameters of the spline.
[in] | degree | - A spline order. |
[in] | points | - Set of control points. |
[in] | weights | - Set of weights for control points. |
[in] | begData | - Parameter of conjugation at the start point of the spline. |
[in] | endData | - Parameter of conjugation at the end point of the spline. |
bool MbNurbs3D::Init | ( | size_t | degree, |
bool | closed, | ||
const CcArray< double > & | points, | ||
const CcArray< double > & | knots, | ||
size_t | nPoints, | ||
size_t | nKnots | ||
) |
Initialization.
Set parameters of the spline.
[in] | degree | - A spline order. |
[in] | closed | - Closedness attribute. |
[in] | points | - Set of control points. |
[in] | knots | - Nondecreasing sequence of knots. |
[in] | nPoints | - The number of control points. |
[in] | endData | - Count of knots. |
bool MbNurbs3D::InitThrough | ( | size_t | degree, |
bool | cls, | ||
const SArray< MbCartPoint3D > & | points, | ||
const SArray< double > & | params, | ||
SArray< double > * | aKnots = nullptr |
||
) |
Initialization.
Spline passing through the given points at the given parameters.
In case of closedness it is necessary to pass the array with coincidence of the first and the last points.
[in] | degree | - A spline order. |
[in] | cls | - Closedness attribute. |
[in] | points | - Set of points which the spline passes through. |
[in] | params | - Sequence of knot parameters. |
[in] | aKnots | - Nondecreasing sequence of knots. |
bool MbNurbs3D::InitThrough | ( | size_t | degree, |
bool | cls, | ||
const c3d::SpacePointsVector & | points, | ||
const c3d::DoubleVector & | params, | ||
c3d::DoubleVector * | aKnots = nullptr |
||
) |
Initialization.
Spline passing through the given points at the given parameters.
In case of closedness it is necessary to pass the array with coincidence of the first and the last points.
[in] | degree | - A spline order. |
[in] | cls | - Closedness attribute. |
[in] | points | - Set of points which the spline passes through. |
[in] | params | - Sequence of knot parameters. |
[in] | aKnots | - Nondecreasing sequence of knots. |
|
overridevirtual |
Create a copy of the object.
Create a copy of an object using the registrator. Registrator is used to prevent multiple copy of the object. If the object contains references to the other objects, then nested objects are copied as well. It is allowed not to pass registrator into the function. Then new copy of object will be created. While copying of single object or set of not connected objects, it is allowed not to use registrator. Registrator should be used if it is required to copy several connected objects. It is possible, that objects connection is based on the references to common objects. Then, while copying without using of registrator, it is possible to obtain set of copies, that contain references to the different copies of the same nested object, that leads to loss of connection between copies.
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is equal.
Still considered objects of the same type, all data is the same (equal).
[in] | item | - The object to compare. |
[in] | accuracy | - The accuracy to compare. |
Implements MbSpaceItem.
|
overridevirtual |
Make objects equal if they are similar.
You can still make only a similar objects.
[in] | item | - The object to initialize. |
Implements MbSpaceItem.
|
overridevirtual |
Convert the object according to the matrix.
Convert the original object according to the matrix using the registrator. If object contains references to the other geometric objects, then nested objects are transformed according to the matrix. Registrator is needed to prevent multiple object copying. It is allowed to use function without registrator, if it is needed to transform single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be transformed.
[in] | matr | - Transformation matrix. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Move an object along a vector.
Move an object along a geometric vector using the registrator. If object contains references to the other geometric objects then the move operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be moved.
[in] | to | - Shift vector. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Rotate an object around an axis at a given angle.
Rotate an object around an axis at a given angle with the registrator. If object contains references to the other geometric objects then the rotation operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be rotated.
[in] | axis | - The axis of rotation. |
[in] | angle | - Rotation. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Outstanding properties of the object.
Issue internal data (properties) of the object for viewing and modification.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Change the properties of an object.
Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.
[in] | properties | - Container for the internal data of the object. |
Implements MbSpaceItem.
|
overridevirtual |
Define whether the curve is periodic.
Define whether the curve is periodic.
A periodic curve is closed. A curve is considered as periodic if:
Implements MbCurve3D.
|
overridevirtual |
Define whether the curve is periodic.
Define whether the curve is periodic.
A curve is considered as periodic if:
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate a point on the curve.
Correct parameter when getting out of domain bounds and calculate a point on the curve.
[in] | t | - Curve parameter. |
[out] | p | - A point on the curve. |
Implements MbCurve3D.
|
overridevirtual |
Calculate point and derivatives of object for given parameter.
Values of point and derivatives are calculated on parameter area and on extended curve.
[in] | t | - Parameter. |
[in] | ext | - On parameters area (false), on extended curve (true). |
[out] | pnt | - Point. |
[out] | fir | - Derivative with respect to t. |
[out] | sec | - Second derivative with respect to t, if not nullptr. |
[out] | thir | - Third derivative with respect to t, if not nullptr. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the curve's approximation by its sag value. Calculation of the step is performed with consideration of curvature radius. A step of curve's approximation is chosen in such way, that the deviation from its polygon does not exceed the given value of sag.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | sag | - Maximum feasible sag value. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate parameter step.
Calculate parameter step for the curve's approximation by the deviation angle of the tangent vector. A step of curve's approximation is chosen in such way, that angular deviation of the tangent curve at the next point does not exceed the given value ang.
[in] | t | - A parameter defining the point on a curve, at which a step should be calculated. |
[in] | ang | - The maximum feasible deviation angle of tangent. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a NURBS copy of a curve.
Constructs a NURBS curve which approximates a given curve inside the range [t1, t2]. with a given direction. If it is possible, constructs the accurate curve, perhaps with multiple knots. The number of knots for NURBS is defined depending on the curve.
[in] | t1 | - Parameter corresponding to start of approximated part of a curve. |
[in] | t2 | - Parameter corresponding to end of approximated part of a curve. |
[in] | sense | - Does the direction of parameter increasing along the NURBS curve coincide with direction of the initial curve. 'sense' > 0 - direction coincide. |
[in] | nInfo | - Parameters of conversion of a curve to NURBS. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a NURBS copy of a curve.
Constructs a NURBS curve which approximates a given curve with the given parameters. In parameters the degree and the number of knots of a spline and the range of curve's parameters changing may be set. If the flag of accurate approximation is not set in parameters then NURBS without multiple knots is constructed.
[in] | tParameters | - Parameters for the construction of a NURBS copy of the curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Construct a trimmed curve with the given two-dimensional accuracy.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | xyzEps | - Three-dimensional accuracy. |
[in] | saveParLenAndLaw | - Save parametric length and law. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Get the physical radius of the curve or zero if it impossible.
Generally returns 0. A non-zero value may be obtained only when the curve is an arc or is equal to an arc with the set precision (METRIC_REGION by default). \params[in] accuracy - The maximum curve deviation from an arc (METRIC_REGION by default).
Reimplemented from MbCurve3D.
|
overridevirtual |
Get an axis of a circle which is geometrically coincident to the given curve.
Get an axis of a circle which is geometrically coincident to the given curve.
[out] | axis | - An axis with the origin at circle's center and direction along the normal of circle's plane. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Get planar curve and placement if the space curve is planar.
Get planar curve and placement if the space curve is planar (after the using call DeleteItem for two-dimensional curves).
[out] | curve2d | - The resulting flat curve. |
[out] | place | - The coordinate system of the resulting 2D curve. |
[in] | saveParams | - The parameter specifying the preservation of the correspondence of the parameterization for the two-dimensional curve. If true - parameterization of curve2d curve must match the parameterization of the original curve this. If false - curve parameterizations may not correspond. The curve2d is more likely to be detected than with the true flag. |
[in] | params | - Validation parameters. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Find the point projection to the curve.
Find the nearest projection of a point on a curve (in the range of the curve) or on its continuation by the given initial approximation. If the parameter ext = true, then also search for a projection on the continuation of the curve. If the range of change of the 'tRange' parameter is specified, then find the projection in the specified range. A range of parameter may not belong to the domain of a curve. The Newton method is used.
[in] | pnt | - A given point. |
[in,out] | t | - Input - initial approximation, output - parameter of a curve corresponding to the nearest projection. |
[in] | ext | - A flag defining whether to seek projection on the extension of the curve. |
[in] | tRange | - A range of parameter changing in which the solution should be found. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Define whether a reparameterized curve is the same.
Define whether a reparameterized curve is the same.
[in] | curve | - A curve for comparison. |
[out] | factor | - Coefficient of compression of parametric region at the time of transition to the pointed curve. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Translate parameter along the curve.
Translate parameter along the curve by the given distance at the given direction. The new value of parameter is saved in the variable t. If the curve is not closed and the length of its part from the point with parameter t to the end at the given direction is less than the required shift, then calculations are performed on extension of the curve, if it possible to construct such extension.
[in,out] | t | - Input - the initial value of parameter. Output - the new value of parameter. |
[in] | len | - The value of shift along the curve. |
[in] | curveDir | - The offset direction. If curveDir is non-negative, then the shift is directed to the side of increasing of parameter. Otherwise - to the side of decreasing of parameter. |
[in] | eps | - Computational tolerance. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Calculate the metric length of a curve.
Calculate the metric length of unclosed curve from parameter t1 to parameter t2. The condition t1 < t2 should satisfied.
[in] | t1 | - Start parameter of a curve section. |
[in] | t2 | - End parameter of a curve section. |
Reimplemented from MbCurve3D.
|
overridevirtual |
Have the first derivative of the curve the continuous length and direction?
Are absent any discontinuities at length or at direction of first derivative of the curve?
[out] | contLength | - The length is continuous (true/false). |
[out] | contDirect | - The direction of the first derivative is continuous (true/false). |
[in] | epsilon | - The accuracy of the calculation. |
Reimplemented from MbCurve3D.
bool MbNurbs3D::RaiseDegree | ( | size_t | newDegree, |
double | relEps = Math::paramEpsilon |
||
) |
Increase order of curve without changing its geometric shape and parametrization.
Increase order of curve without changing its geometric shape and parametrization.
[in] | newDegree | - New order of spline. |
[in] | relEps | - Permissible shape error. |
bool MbNurbs3D::ReductionDegree | ( | double | relEps = Math::paramEpsilon | ) |
Decrease order of nurbs curve by 1 without changing its geometric shape and parametrization.
Decrease order of nurbs curve by 1 without changing its geometric shape and parametrization.
[in] | relEps | - Permissible shape error. |
|
overridevirtual |
Construct a planar projection of a piece of a space curve.
Construct a planar projection of a piece of a space curve.
[in] | into | - The transformation matrix from the global coordinate system into a plane of view. |
[in] | pRegion | - A mapped piece of a curve (paramRegion.x = t1, paramRegion.y = t2), by default - the whole curve.. |
[in] | version | - Version, last by default. |
[in,out] | coincParams | - A flag of coincidence between parameterization of initial curve and its projection if coincParams != nullptr then the function tries to create a projection with coincident parameterization if *coincParams = true then parameterization of projection coincides with parameterization of initial curve. |
Reimplemented from MbCurve3D.
|
static |
Interpolation.
Create an open spline of fourth order by points, parameters and the attribute of closedness.
Used boundary condition of knot absence.
|
static |
Interpolation.
Create an open spline of fourth order by points, parameters and the attribute of closedness.
Used boundary condition of knot absence.
|
static |
Interpolation.
Create a spline of the fourth order by points, parameters and the attribute of closedness with boundary conditions - given vectors of the first or the second derivatives.
Has 2 multiple internal knots, belongs to the class of differentiable (but not twice differentiable) functions.
[in] | bfstS | - If true, then start boundary condition is the vector of the first derivative, otherwise - the vector of the second derivative. |
[in] | bfstN | - If true, then end boundary condition - vector of first derivative, otherwise - vector of second derivative. |
|
static |
Interpolation.
Create a spline of the fourth order by points, derivatives, parameters and the attribute of closedness.
Has 2 multiple internal knots, belongs to the class of differentiable (but not twice differentiable) functions.
|
static |
Interpolation.
Create a spline of the fourth order by a composite Bezier spline of the fourth order.
Attention! Parameterization is different from the parameterization of the source Bezier curve.
|
static |
Create NURBS.
Create a spline of any order containing the given points with managing of tangent and curvature at these points.
Split the curve.
Split the non-differentiable NURBS-curve of the fourth degree at an internal knot with multiplicity of three.
If there is no internal knots with multiplicity of three, then a copy of the curve is added to the array.
If bline = true, then check the curve for degeneration into a line, if it is a line - transform to a line.
void MbNurbs3D::FixClosedNurbs | ( | ) |
Make the curve closed.
Make the actually closed curve closed.
That is, if the first and the last points of curve are coincident, but curve was implemented as open, then one of the coincident points is took away and the curve becomes closed.
virtual MbCurve3D* MbCurve3D::Trimmed |
Construct a trimmed curve.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | saveParLenAndLaw | - Save parametric length and law. |
virtual MbCurve3D* MbCurve3D::Trimmed |
Construct a trimmed curve with the given two-dimensional accuracy.
Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and an end point corresponds to a point with parameter t2. Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'. If the curve is closed, then there may be obtained a trimmed curve, passing through the start of a curve.
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly define the result. In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:
1) if sense == 1, then t1 < t2,
2) if sense == -1, then t1 > t2,
If there is a discrepancy between 'sense' and parameters of trimming, then 'sense' parameter has higher priority. If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained.
[in] | t1 | - Parameter corresponding to start of a trimmed curve. |
[in] | t2 | - Parameter corresponding to end of a trimmed curve. |
[in] | sense | - Direction of a trimmed curve in relation to an initial curve. sense = 1 - direction does not change. sense = -1 - direction changes to the opposite value. |
[in] | xyzEps | - Three-dimensional accuracy. |
[in] | saveParLenAndLaw | - Save parametric length and law. |