CFx SDK Documentation  2020SP3
Public Member Functions | Protected Member Functions | Friends | List of all members
OdGeNurbCurve2d Class Reference

#include <GeNurbCurve2d.h>

Inheritance diagram for OdGeNurbCurve2d:
OdGeSplineEnt2d OdGeCurve2d OdGeEntity2d

Public Member Functions

 OdGeNurbCurve2d ()
 
 OdGeNurbCurve2d (const OdGeNurbCurve2d &source)
 
 OdGeNurbCurve2d (int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, bool isPeriodic=false)
 
 OdGeNurbCurve2d (int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
 
 OdGeNurbCurve2d (int degree, const OdGePolyline2d &fitPolyline, bool isPeriodic=false)
 
 OdGeNurbCurve2d (const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined=true, bool endTangentDefined=true, const OdGeTol &fitTolerance=OdGeContext::gTol)
 
 OdGeNurbCurve2d (const OdGePoint2dArray &fitPoints, const OdGeTol &fitTolerance=OdGeContext::gTol)
 
 OdGeNurbCurve2d (const OdGePoint2dArray &fitPoints, const OdGeVector2dArray &fitTangents, const OdGeTol &fitTolerance=OdGeContext::gTol, bool isPeriodic=false)
 
 OdGeNurbCurve2d (const OdGeEllipArc2d &ellipse)
 
 OdGeNurbCurve2d (const OdGeLineSeg2d &linSeg)
 
 OdGeNurbCurve2d (const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined, bool endTangentDefined, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
 
int numFitPoints () const
 
bool getFitPointAt (int index, OdGePoint2d &point) const
 
bool getFitTolerance (OdGeTol &fitTolerance) const
 
bool getFitTangents (OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
 
bool getFitData (OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
 
bool getFitData (OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent, OdGeKnotParameterization &knotParam) const
 
bool getFitKnotParameterization (OdGeKnotParameterization &knotParam) const
 
void getDefinitionData (int &degree, bool &rational, bool &periodic, OdGeKnotVector &knots, OdGePoint2dArray &controlPoints, OdGeDoubleArray &weights) const
 
int numWeights () const
 
double weightAt (int weightIndex) const
 
bool evalMode () const
 
bool getParamsOfC1Discontinuity (OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
 
bool getParamsOfG1Discontinuity (OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
 
bool setFitPointAt (int index, const OdGePoint2d &point)
 
bool addFitPointAt (int index, const OdGePoint2d &point)
 
bool deleteFitPointAt (int index)
 
bool setFitTolerance (const OdGeTol &fitTol=OdGeContext::gTol)
 
bool setFitTangents (const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
 
bool setFitKnotParameterization (OdGeKnotParameterization knotParam)
 
OdGeNurbCurve2dsetFitData (const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol)
 
OdGeNurbCurve2dsetFitData (const OdGeKnotVector &fitKnots, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol, bool isPeriodic=false)
 
OdGeNurbCurve2dsetFitData (int degree, const OdGePoint2dArray &fitPoints, const OdGeTol &fitTol=OdGeContext::gTol)
 
OdGeNurbCurve2dsetFitData (const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
 
bool purgeFitData ()
 
OdGeNurbCurve2daddKnot (double newKnot)
 
OdGeNurbCurve2dinsertKnot (double newKnot)
 
OdGeSplineEnt2dsetWeightAt (int controlPointIndex, double weight)
 
OdGeNurbCurve2dsetEvalMode (bool evalMode=false)
 
OdGeNurbCurve2djoinWith (const OdGeNurbCurve2d &curve)
 
OdGeNurbCurve2dhardTrimByParams (double newStartParam, double newEndParam)
 
OdGeNurbCurve2dmakeRational (double weight=1.0)
 
OdGeNurbCurve2dmakeClosed ()
 
OdGeNurbCurve2dmakePeriodic ()
 
OdGeNurbCurve2dmakeNonPeriodic ()
 
OdGeNurbCurve2dmakeOpen ()
 
OdGeNurbCurve2delevateDegree (int plusDegree)
 
OdGeNurbCurve2doperator= (const OdGeNurbCurve2d &spline)
 
bool addControlPointAt (double newKnot, const OdGePoint2d &point, double weight=1.0)
 
bool deleteControlPointAt (int index)
 
bool intersectWith (const OdGeLine2d &line2d, OdGePoint2dArray &pnts2d, const OdGeTol &tol=OdGeContext::gTol, OdGeDoubleArray *params=NULL) const
 
void set (int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
 
- Public Member Functions inherited from OdGeSplineEnt2d
bool isRational () const
 
int degree () const
 
int order () const
 
int numKnots () const
 
const OdGeKnotVectorknots () const
 
int numControlPoints () const
 
int continuityAtKnot (int knotIndex, const OdGeTol &tol=OdGeContext::gTol) const
 
double startParam () const
 
double endParam () const
 
OdGePoint2d startPoint () const
 
OdGePoint2d endPoint () const
 
bool hasFitData () const
 
double knotAt (int knotIndex) const
 
OdGeSplineEnt2dsetKnotAt (int knotIndex, double val)
 
OdGePoint2d controlPointAt (int controlPointIndex) const
 
OdGeSplineEnt2dsetControlPointAt (int controlPointIndex, const OdGePoint2d &point)
 
OdGeSplineEnt2doperator= (const OdGeSplineEnt2d &spline)
 
- Public Member Functions inherited from OdGeCurve2d
void getInterval (OdGeInterval &interval) const
 
void getInterval (OdGeInterval &interval, OdGePoint2d &start, OdGePoint2d &end) const
 
OdGeCurve2dreverseParam ()
 
OdGeCurve2dsetInterval ()
 
bool setInterval (const OdGeInterval &interval)
 
double distanceTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGeCurve2d &otherCur, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGeCurve2d &curve2d, OdGePoint2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGeCurve2d &curve2d, OdGePointOnCurve2d &pntOnThisCrv, OdGePointOnCurve2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
bool getNormalPoint (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity2d::isOn)
 
bool isOn (const OdGePoint2d &point, double &param, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isOn (double param, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
void getTrimmedOffset (double distance, OdGeCurve2dPtrArray &offsetCurveList, OdGe::OffsetCrvExtType extensionType=OdGe::kFillet, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isPeriodic (double &period) const
 
bool isLinear (OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
double length (double fromParam, double toParam, double tol=OdGeContext::gTol.equalPoint()) const
 
double length (double tol=OdGeContext::gTol.equalPoint()) const
 
double paramAtLength (double datumParam, double length, bool posParamDir=true, double tol=OdGeContext::gTol.equalPoint()) const
 
bool area (double startParam, double endParam, double &value, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGe::EntityId &degenerateType, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGeEntity2d *&pConvertedEntity, const OdGeTol &tol=OdGeContext::gTol) const
 
void getSplitCurves (double param, OdGeCurve2d *&piece1, OdGeCurve2d *&piece2) const
 
bool explode (OdGeCurve2dPtrArray &explodedCurves, OdGeIntArray &newExplodedCurve, const OdGeInterval *interval=NULL) const
 
void getLocalClosestPoints (const OdGePoint2d &point, OdGePointOnCurve2d &approxPnt, const OdGeInterval *nbhd=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
void getLocalClosestPoints (const OdGeCurve2d &otherCurve, OdGePointOnCurve2d &approxPntOnThisCrv, OdGePointOnCurve2d &approxPntOnOtherCrv, const OdGeInterval *nbhd1=NULL, const OdGeInterval *nbhd2=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeBoundBlock2d boundBlock () const
 
OdGeBoundBlock2d boundBlock (const OdGeInterval &range) const
 
OdGeBoundBlock2d orthoBoundBlock () const
 
OdGeBoundBlock2d orthoBoundBlock (const OdGeInterval &range) const
 
bool hasStartPoint (OdGePoint2d &startPoint) const
 
bool hasEndPoint (OdGePoint2d &endPoint) const
 
OdGePoint2d evalPoint (double param) const
 
OdGePoint2d evalPoint (double param, int numDeriv, OdGeVector2dArray &derivatives) const
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray &paramArray) const
 
void getSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
OdGeCurve2doperator= (const OdGeCurve2d &curve)
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
- Public Member Functions inherited from OdGeEntity2d
 ODRX_HEAP_OPERATORS ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity2dcopy () const
 
OdGeEntity2doperator= (const OdGeEntity2d &entity)
 
bool operator== (const OdGeEntity2d &entity) const
 
bool operator!= (const OdGeEntity2d &entity) const
 
bool isEqualTo (const OdGeEntity2d &other, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity2dtransformBy (const OdGeMatrix2d &xfm)
 
OdGeEntity2dtranslateBy (const OdGeVector2d &translateVec)
 
OdGeEntity2drotateBy (double angle, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
OdGeEntity2dmirror (const OdGeLine2d &line)
 
OdGeEntity2dscaleBy (double scaleFactor, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
bool isOn (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
 ~OdGeEntity2d ()
 

Protected Member Functions

void set (int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &cntrlPnts, const OdGeDoubleArray &weights, bool isPeriodic, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
 
- Protected Member Functions inherited from OdGeSplineEnt2d
 OdGeSplineEnt2d ()
 
 OdGeSplineEnt2d (const OdGeSplineEnt2d &spline)
 
- Protected Member Functions inherited from OdGeCurve2d
 OdGeCurve2d ()
 
 OdGeCurve2d (const OdGeCurve2d &source)
 
- Protected Member Functions inherited from OdGeEntity2d
 OdGeEntity2d ()
 
 OdGeEntity2d (const OdGeEntity2d &)
 
void connectTo (OdGeEntity2dImpl *)
 

Friends

class OdDbGeEdgesDwgIO
 
class OdDbGeEdgesDxfIO
 

Detailed Description

This class represents non-uniform rational B-splines (NURBS) in 2D space.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeNurbCurve3d.html, Working with NURBS curves>

Definition at line 49 of file GeNurbCurve2d.h.

Constructor & Destructor Documentation

◆ OdGeNurbCurve2d() [1/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( )
Parameters
degree[in] Degree of spline.
knots[in] Knot vector.
controlPoints[in] Array of 2D control points.
weights[in] Array of weights
isPeriodic[in] True if and only if the spline is to be periodic.
source[in] Object to be cloned.
Remarks
If weights is not specified, a non-rational spline is constructed. If weights is specified, then a rational spline is constructed, and controlPoints.length() must equal weights.length() If isPeriodic is false, then knots.length() must equal controlPoints.length() + degree + 1 If isPeriodic is true, then knots.length() must equal controlPoints.length(), the first and last controlPoints must be equal and the first and last weights (if provided) must be equal.

◆ OdGeNurbCurve2d() [2/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGeNurbCurve2d source)

◆ OdGeNurbCurve2d() [3/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( int  degree,
const OdGeKnotVector knots,
const OdGePoint2dArray controlPoints,
bool  isPeriodic = false 
)

◆ OdGeNurbCurve2d() [4/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( int  degree,
const OdGeKnotVector knots,
const OdGePoint2dArray controlPoints,
const OdGeDoubleArray weights,
bool  isPeriodic = false 
)

◆ OdGeNurbCurve2d() [5/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( int  degree,
const OdGePolyline2d fitPolyline,
bool  isPeriodic = false 
)

◆ OdGeNurbCurve2d() [6/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent,
bool  startTangentDefined = true,
bool  endTangentDefined = true,
const OdGeTol fitTolerance = OdGeContext::gTol 
)

◆ OdGeNurbCurve2d() [7/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGePoint2dArray fitPoints,
const OdGeTol fitTolerance = OdGeContext::gTol 
)

◆ OdGeNurbCurve2d() [8/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGePoint2dArray fitPoints,
const OdGeVector2dArray fitTangents,
const OdGeTol fitTolerance = OdGeContext::gTol,
bool  isPeriodic = false 
)

◆ OdGeNurbCurve2d() [9/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGeEllipArc2d ellipse)

◆ OdGeNurbCurve2d() [10/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGeLineSeg2d linSeg)

◆ OdGeNurbCurve2d() [11/11]

OdGeNurbCurve2d::OdGeNurbCurve2d ( const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent,
bool  startTangentDefined,
bool  endTangentDefined,
OdGeKnotParameterization  knotParam,
const OdGeTol fitTol = OdGeContext::gTol 
)

Member Function Documentation

◆ addControlPointAt()

bool OdGeNurbCurve2d::addControlPointAt ( double  newKnot,
const OdGePoint2d point,
double  weight = 1.0 
)

Adds a control point at the specified knot.

Parameters
newKnot[in] The knot parameter to add the control point at.
point[in] Coordinates of the control point to be added.
weight[in] The weight to be assigned to the control point.
Remarks
When called for a non-rational spline, weight is ignored.
Currently not implemented.

◆ addFitPointAt()

bool OdGeNurbCurve2d::addFitPointAt ( int  index,
const OdGePoint2d point 
)

Returns true if and only if this spline was created with fit data, and inserts the fit point at the specified index.

Parameters
fitPointIndex[in] Fit point index.
point[in] Fit point.

◆ addKnot()

OdGeNurbCurve2d& OdGeNurbCurve2d::addKnot ( double  newKnot)

Adds new knot to the spline knot array and returns reference to this spline object.

Parameters
newKnot[in] New knot.

◆ deleteControlPointAt()

bool OdGeNurbCurve2d::deleteControlPointAt ( int  index)

Deletes a control point at the specified index.

Parameters
index[in] The index of the control point to be deleted.
Remarks
Currently not implemented.

◆ deleteFitPointAt()

bool OdGeNurbCurve2d::deleteFitPointAt ( int  index)

Removes a fit point with the specified index. The index must be greater than or equal to 0 and less than or equal to the number of fit points.

Parameters
index[in] The index of fit point that is to be removed.
Returns
Returns true if the fit point is successfully deleted and false otherwise.

◆ elevateDegree()

OdGeNurbCurve2d& OdGeNurbCurve2d::elevateDegree ( int  plusDegree)

Increases spline degree by the specified value and returns a reference to this spline object.

Parameters
plusDegree[in] Degree increment value.

◆ evalMode()

bool OdGeNurbCurve2d::evalMode ( ) const

Returns the current evaluation mode.

Remarks
Currently not implemented.

◆ getDefinitionData()

void OdGeNurbCurve2d::getDefinitionData ( int &  degree,
bool &  rational,
bool &  periodic,
OdGeKnotVector knots,
OdGePoint2dArray controlPoints,
OdGeDoubleArray weights 
) const

Returns all the data that define the spline.

Parameters
degree[out] Receives the degree of spline.
knots[out] Receives the knot vector.
controlPoints[out] Receives an array of 2D control points.
weights[out] Receives an array of weights.
rational[out] Receives true if and only if the spline is rational.
periodic[out] Receives true true if and only if the spline is periodic.
Remarks
The weights array will be empty if the spline is not rational.

◆ getFitData() [1/2]

bool OdGeNurbCurve2d::getFitData ( OdGePoint2dArray fitPoints,
OdGeTol fitTolerance,
bool &  tangentsExist,
OdGeVector2d startTangent,
OdGeVector2d endTangent 
) const

Returns true if and only if this spline was constructed with fit data, and returns all the fit data used to construct this spline.

Parameters
fitPoints[out] Receives the interpolation points.
fitTolerance[out] Receives the geometric tolerance.
tangentsExist[out] Receives true if and only if tangents were used in constructing this spline.
startTangent[out] Receives the starting tangent
endTangent[out] Receives the ending tangent.
Remarks
Currently not implemented.

◆ getFitData() [2/2]

bool OdGeNurbCurve2d::getFitData ( OdGePoint2dArray fitPoints,
OdGeTol fitTolerance,
bool &  tangentsExist,
OdGeVector2d startTangent,
OdGeVector2d endTangent,
OdGeKnotParameterization knotParam 
) const

Returns true if and only if this spline was constructed with fit data, and returns all the fit data used to construct this spline.

Parameters
fitPoints[out] Receives the interpolation points.
fitTolerance[out] Receives the geometric tolerance.
tangentsExist[out] Receives true if and only if tangents were used in constructing this spline.
startTangent[out] Receives the starting tangent
endTangent[out] Receives the ending tangent.
knotParam[out] Receives the knot parameterization.
Remarks
startTangent and endTangent are meaningful if and only if tangentsExist == true.
Currently not implemented.

◆ getFitKnotParameterization()

bool OdGeNurbCurve2d::getFitKnotParameterization ( OdGeKnotParameterization knotParam) const

Gets the knot parametrization of the spline created with fit points and returns true if successful.

Parameters
knotParam[out] Receives the knot parametrization.
Remarks
Currently not implemented.

◆ getFitPointAt()

bool OdGeNurbCurve2d::getFitPointAt ( int  index,
OdGePoint2d point 
) const

Returns true if and only if 0 <= index < numFitPoints(), and returns the fit point at the specified index.

Parameters
fitPointIndex[in] Fit point index.
point[out] Receives the fit point.

◆ getFitTangents()

bool OdGeNurbCurve2d::getFitTangents ( OdGeVector2d startTangent,
OdGeVector2d endTangent 
) const

Descripton: Returns true if and only if this spline was constructed with fit data, and returns the starting and ending tangents.

Parameters
startTangent[out] Receives the starting tangent
endTangent[out] Receives the ending tangent.

◆ getFitTolerance()

bool OdGeNurbCurve2d::getFitTolerance ( OdGeTol fitTolerance) const

Returns true if and only if this spline was constructed with fit points, and gets the fit tolerance that is used to construct this spline.

Parameters
fitTolerance[out] Recieves the geometric tolerance.

◆ getParamsOfC1Discontinuity()

bool OdGeNurbCurve2d::getParamsOfC1Discontinuity ( OdGeDoubleArray params,
const OdGeTol tol = OdGeContext::gTol 
) const
Remarks
Currently not implemented.

◆ getParamsOfG1Discontinuity()

bool OdGeNurbCurve2d::getParamsOfG1Discontinuity ( OdGeDoubleArray params,
const OdGeTol tol = OdGeContext::gTol 
) const
Remarks
Currently not implemented.

◆ hardTrimByParams()

OdGeNurbCurve2d& OdGeNurbCurve2d::hardTrimByParams ( double  newStartParam,
double  newEndParam 
)

Trims the spline by the new start and end parameters, and returns a reference to the recalculated spline.

Parameters
newStartParam[in] New start parameter.
newEndParam[in] New end parameter.

◆ insertKnot()

OdGeNurbCurve2d& OdGeNurbCurve2d::insertKnot ( double  newKnot)

Inserts new knot to the spline knot array and returns reference to this spline object. If there is already such knot, then the multiplicity of the knot is increased by 1.

Parameters
newKnot[in] New knot.

◆ intersectWith()

bool OdGeNurbCurve2d::intersectWith ( const OdGeLine2d line2d,
OdGePoint2dArray pnts2d,
const OdGeTol tol = OdGeContext::gTol,
OdGeDoubleArray params = NULL 
) const

Gets the intersection points well as the parameters of this spline said points.

Returns
Returns true if and only if this spline intersects with the specified linear entity.
Parameters
line[in] Any 2D linear entity.
pnts2D[out] Receives an array of 2D points.
tol[in] Geometric tolerance.
params[out] Receives an array of parameters.

◆ joinWith()

OdGeNurbCurve2d& OdGeNurbCurve2d::joinWith ( const OdGeNurbCurve2d curve)

Joins the specified spline with this spline and returns a reference to the recomputed spline. Both splines must be open and the start point of the input spline must be equal to the endpoint of the initial spline.

Parameters
curve[in] Spline to be joined with this spline.

◆ makeClosed()

OdGeNurbCurve2d& OdGeNurbCurve2d::makeClosed ( )

Makes the opened spline closed, and returns a reference to this spline. Closed spline is made by creating a smooth spline between the first and the end points and joining it with the initial spline.

Remarks
If this spline is already closed, then the method does nothing.

◆ makeNonPeriodic()

OdGeNurbCurve2d& OdGeNurbCurve2d::makeNonPeriodic ( )

Makes periodic spline non-periodic.

Remarks
Currently not implemented.

◆ makeOpen()

OdGeNurbCurve2d& OdGeNurbCurve2d::makeOpen ( )

Makes closed spline open.

Remarks
Currently not implemented.

◆ makePeriodic()

OdGeNurbCurve2d& OdGeNurbCurve2d::makePeriodic ( )

Makes non-periodic spline periodic.

Remarks
Currently not implemented.

◆ makeRational()

OdGeNurbCurve2d& OdGeNurbCurve2d::makeRational ( double  weight = 1.0)

Makes this spline rational.

Parameters
weight[in] The weight to be assigned to each control point.
Remarks
When called for a non-rational spline, this spline is made rational, and the specified weight is assigned to each control point.

When called for a rational spline, the weight at each control point is multiplied by the specified weight.

◆ numFitPoints()

int OdGeNurbCurve2d::numFitPoints ( ) const

◆ numWeights()

int OdGeNurbCurve2d::numWeights ( ) const

Returns the number of weights in the spline.

Remarks
Feturns numControlPoints() if this spline is rational, 0 if it is not.

◆ operator=()

OdGeNurbCurve2d& OdGeNurbCurve2d::operator= ( const OdGeNurbCurve2d spline)

◆ purgeFitData()

bool OdGeNurbCurve2d::purgeFitData ( )

Deletes all the fit data used to construct this spline. Returns true if and only if the spline was constructed with fit data.

Remarks
The definition of the spline is unchanged.

◆ set() [1/2]

void OdGeNurbCurve2d::set ( int  degree,
const OdGeKnotVector knots,
const OdGePoint2dArray cntrlPnts,
const OdGeDoubleArray weights,
bool  isPeriodic,
const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent 
)
protected

◆ set() [2/2]

void OdGeNurbCurve2d::set ( int  degree,
const OdGeKnotVector knots,
const OdGePoint2dArray controlPoints,
const OdGeDoubleArray weights,
bool  isPeriodic = false 
)

Sets the parameters for this spline according to the arguments, and returns a reference to this spline.

Parameters
degree[in] Degree of spline.
knots[in] Knot vector.
controlPoints[in] Array of 2D control points.
weights[in] Array of weights
isPeriodic[in] True if and only if the spline is to be periodic (closed).
Remarks
If weights is not specified, a non-rational spline is constructed. If weights is specified, then a rational spline is constructed, and controlPoints.length() must equal weights.length() If isPeriodic is false, then knots.length() must equal controlPoints.length() + degree + 1 If isPeriodic is true, then knots.length() must equal controlPoints.length(), the first and last controlPoints must be equal, and the first and last weights (if provided) must be equal.

◆ setEvalMode()

OdGeNurbCurve2d& OdGeNurbCurve2d::setEvalMode ( bool  evalMode = false)

Sets the evaluation mode.

Remarks
Currently not implemented.

◆ setFitData() [1/4]

OdGeNurbCurve2d& OdGeNurbCurve2d::setFitData ( const OdGeKnotVector fitKnots,
const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent,
const OdGeTol fitTol = OdGeContext::gTol,
bool  isPeriodic = false 
)

Sets the fit data for this spline.

Parameters
fitPoints[in] Interpolation points.
fitTol[in] Geometric tolerance.
startTangent[in] Starting tangent.
endTangent[in] Ending tangent.

◆ setFitData() [2/4]

OdGeNurbCurve2d& OdGeNurbCurve2d::setFitData ( const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent,
const OdGeTol fitTol = OdGeContext::gTol 
)

Sets the fit data for this spline.

Parameters
fitPoints[in] Interpolation points.
fitTol[in] Geometric tolerance.
startTangent[in] Starting tangent.
endTangent[in] Ending tangent.

◆ setFitData() [3/4]

OdGeNurbCurve2d& OdGeNurbCurve2d::setFitData ( const OdGePoint2dArray fitPoints,
const OdGeVector2d startTangent,
const OdGeVector2d endTangent,
OdGeKnotParameterization  knotParam,
const OdGeTol fitTol = OdGeContext::gTol 
)

Sets the fit data for this spline.

Parameters
fitPoints[in] Interpolation points.
fitTol[in] Geometric tolerance.
startTangent[in] Starting tangent.
endTangent[in] Ending tangent.

◆ setFitData() [4/4]

OdGeNurbCurve2d& OdGeNurbCurve2d::setFitData ( int  degree,
const OdGePoint2dArray fitPoints,
const OdGeTol fitTol = OdGeContext::gTol 
)

Sets the fit data for this spline.

Parameters
fitPoints[in] Interpolation points.
fitTol[in] Geometric tolerance.

◆ setFitKnotParameterization()

bool OdGeNurbCurve2d::setFitKnotParameterization ( OdGeKnotParameterization  knotParam)

Sets the specified knot parameterization if the spline is created by fit points and returns true if the knot parameterization is successfully set.

Parameters
knotParam[in] The knot parameterization to be set.
Remarks
Currently not implemented.

◆ setFitPointAt()

bool OdGeNurbCurve2d::setFitPointAt ( int  index,
const OdGePoint2d point 
)

Sets the fit point at the specified index.

Parameters
fitPointIndex[in] Fit point index.
point[in] Fit point.

◆ setFitTangents()

bool OdGeNurbCurve2d::setFitTangents ( const OdGeVector2d startTangent,
const OdGeVector2d endTangent 
)

Sets the fit tangents for this spline.

Parameters
startTangent[in] Starting tangent.
endTangent[in] Ending tangent.
Returns
Returns true if and only if this spline was constructed with fit data.

◆ setFitTolerance()

bool OdGeNurbCurve2d::setFitTolerance ( const OdGeTol fitTol = OdGeContext::gTol)

Sets the fit tolerance that is used for interpolating fit points.

Parameters
fitTol[in] Geometric tolerance.
Returns
Returns true if the tolerance value is successfully set. false is returned if the spline doesn't contain fit data.

◆ setWeightAt()

OdGeSplineEnt2d& OdGeNurbCurve2d::setWeightAt ( int  controlPointIndex,
double  weight 
)

Sets the weight at the specified control point.

Parameters
controlPointIndex[in] Control point index.
weight[in] The weight to be assigned to that control point.

◆ weightAt()

double OdGeNurbCurve2d::weightAt ( int  weightIndex) const

Returns the weight at the specified index.

Parameters
weightIndex[in] Weight index.

Friends And Related Function Documentation

◆ OdDbGeEdgesDwgIO

friend class OdDbGeEdgesDwgIO
friend

Definition at line 580 of file GeNurbCurve2d.h.

◆ OdDbGeEdgesDxfIO

friend class OdDbGeEdgesDxfIO
friend

Definition at line 581 of file GeNurbCurve2d.h.


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