Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_Curve2d Class Reference

Base class for 2D curves. More...

#include <cadex/ModelData_Curve2d.hxx>

Inheritance diagram for cadex::ModelData_Curve2d:
cadex::ModelData_BSplineCurve2d cadex::ModelData_BezierCurve2d cadex::ModelData_Conic2d cadex::ModelData_Line2d cadex::ModelData_OffsetCurve2d cadex::ModelData_TrimmedCurve2d cadex::ModelData_Circle2d cadex::ModelData_Ellipse2d cadex::ModelData_Hyperbola2d cadex::ModelData_Parabola2d

Public Member Functions

 ModelData_Curve2d ()
 Constructor.
 
 ModelData_Curve2d (const ModelData_Curve2d &theOther)
 Constructor.
 
 ModelData_Curve2d (ModelData_Curve2d &&theOther)
 Constructor.
 
 ~ModelData_Curve2d ()
 Destructor.
 
ModelData_Curve2doperator= (const ModelData_Curve2d &theOther)
 Assignment operator.
 
ModelData_Curve2doperator= (ModelData_Curve2d &&theOther)
 Move assignment operator.
 
ModelData_CurveType Type () const
 Returns a curve type.
 
bool IsNull () const
 Returns true if the object has not been initialized yet.
 
void Nullify ()
 Resets the object.
 
 operator bool () const
 Returns if the object has been initialized.
 
bool IsPeriodic () const
 Returns true if the curve is periodic.
 
double UMin () const
 Returns a minimum parameter of a definition domain.
 
double UMax () const
 Returns a maximum parameter of a definition domain.
 
void Domain (double &theUMin, double &theUMax) const
 Returns a definition domain.
 
ModelData_Point2d Value (double theParameter) const
 Evaluates a point on the curve.
 
ModelData_Curve2d Reversed () const
 Returns a curve with reversed orientation.
 
void Transform (const ModelData_Transformation2d &theTransformation)
 Applies transformation matrix to this object.
 
ModelData_Curve2d Transformed (const ModelData_Transformation2d &theTransformation) const
 Returns a copy this object after applying transformation.
 
ModelData_Continuity Continuity () const
 Returns a continuity type of the curve.
 
void D0 (double theParameter, ModelData_Point2d &theValue) const
 Returns the point theValue of parameter theParam.
 
void D1 (double theParameter, ModelData_Point2d &theValue, ModelData_Vector2d &theD1) const
 Returns the point theValue of parameter theParam and the first derivative theD1.
 
void D2 (double theParameter, ModelData_Point2d &theValue, ModelData_Vector2d &theD1, ModelData_Vector2d &theD2) const
 Returns the point theValue of parameter theParam and second derivatives theD1 and theD2.
 
bool DN (double theParameter, size_t theDerivativeOrder, ModelData_Point2d &theValue, ModelData_Vector2d theD[]) const
 
double Curvature (double theParameter) const
 Returns the curvature value of parameter theParam.
 
void Normal (double theParameter, ModelData_Direction2d &theNormal) const
 Returns the normal direction theNormal of parameter theParam.
 

Public Attributes

 operator Handle_C const
 

Detailed Description

Base class for 2D curves.

2D curves are used to represent curves in surface parametric domains (p-curves). They are used by edges owned by faces.

For detailed description refer to 3D counterpart ModelData_Curve.

See also
Curves.
Examples
exploring/brepgeometry/Program.cs, exploring/brepgeometry/main.cxx, exploring/drawings/Program.cs, and exploring/drawings/main.cxx.

Member Function Documentation

◆ D0()

void cadex::ModelData_Curve2d::D0 ( double  theParam,
ModelData_Point2d theValue 
) const

Returns the point theValue of parameter theParam.

Throws exception only for the ModelData_OffsetCurve if it is not possible to compute the current point. For example when the first derivative on the basis curve and the offset direction are parallel.

◆ D1()

void cadex::ModelData_Curve2d::D1 ( double  theParam,
ModelData_Point2d theValue,
ModelData_Vector2d theD1 
) const

Returns the point theValue of parameter theParam and the first derivative theD1.

Throws exception if the continuity of the curve is not C1.

◆ D2()

void cadex::ModelData_Curve2d::D2 ( double  theParam,
ModelData_Point2d theValue,
ModelData_Vector2d theD1,
ModelData_Vector2d theD2 
) const

Returns the point theValue of parameter theParam and second derivatives theD1 and theD2.

Throws exception if the continuity of the curve is not C2.

◆ DN()

bool cadex::ModelData_Curve2d::DN ( double  theParam,
size_t  theDerivativeOrder,
ModelData_Point2d theValue,
ModelData_Vector2d  theD[] 
) const

Returns true if calculation was passed succsesfully, the returned vectors gives the value of the derivative for the order of derivation theDerivativeOrder. Otherwise returns false. Throws exception if the continuity of the curve is not CN.

Parameters:

  • theDerivativeOrder must belong to range [0, 3].
  • theD should have enough size to store theDerivativeOrder derivatives.

◆ Domain()

void cadex::ModelData_Curve2d::Domain ( double &  theUMin,
double &  theUMax 
) const

Returns a definition domain.

See also
UMin(), UMax().

◆ IsNull()

bool cadex::ModelData_Curve2d::IsNull ( ) const

Returns true if the object has not been initialized yet.

See also
Nullify().

◆ Nullify()

void cadex::ModelData_Curve2d::Nullify ( )

Resets the object.

IsNull() will return true after calling this method.

◆ operator bool()

cadex::ModelData_Curve2d::operator bool ( ) const
inline

Returns if the object has been initialized.

Returns the value opposite to IsNull().

◆ Reversed()

ModelData_Curve2d cadex::ModelData_Curve2d::Reversed ( ) const

Returns a curve with reversed orientation.

Creates a deep copy of the curve which does not share any definition with this object.

◆ Transform()

void cadex::ModelData_Curve2d::Transform ( const ModelData_Transformation2d theTransformation)

Applies transformation matrix to this object.

Results depends on the actual curve type.

See also
Transformed().

◆ Transformed()

ModelData_Curve2d cadex::ModelData_Curve2d::Transformed ( const ModelData_Transformation2d theTransformation) const

Returns a copy this object after applying transformation.

The contents of this object is not modified.

See also
Transform().

◆ UMax()

double cadex::ModelData_Curve2d::UMax ( ) const

Returns a maximum parameter of a definition domain.

See also
UMin(), Domain().
Examples
exploring/brepgeometry/Program.cs, and exploring/brepgeometry/main.cxx.

◆ UMin()

double cadex::ModelData_Curve2d::UMin ( ) const

Returns a minimum parameter of a definition domain.

See also
UMax(), Domain().
Examples
exploring/brepgeometry/Program.cs, and exploring/brepgeometry/main.cxx.

◆ Value()

ModelData_Point2d cadex::ModelData_Curve2d::Value ( double  theParameter) const

Evaluates a point on the curve.

theParameter must be within Domain() if the curve is not periodic.