Hide menu
Loading...
Searching...
No Matches

Base class for 2D curves. More...

#include <cadex/Geom/Curve2d.hxx>

Inheritance diagram for cadex::Geom::Curve2d:
cadex::Geom::Geometry cadex::BaseObject cadex::Geom::BSplineCurve2d cadex::Geom::BezierCurve2d cadex::Geom::Conic2d cadex::Geom::Line2d cadex::Geom::OffsetCurve2d cadex::Geom::Circle2d cadex::Geom::Ellipse2d cadex::Geom::Hyperbola2d cadex::Geom::Parabola2d

Public Member Functions

 Curve2d ()
 Constructor.
 
CurveType Type () const
 Returns a curve type.
 
Geom::Continuity Continuity () const
 Returns a continuity type of the curve.
 
Geom::Point2d Value (double theParameter) const
 Evaluates a point on the curve.
 
Geom::Direction2d Normal (double theParameter) const
 Returns the normal direction theNormal of parameter theParam.
 
double Curvature (double theParameter) const
 Returns the curvature value of parameter theParam.
 
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.
 
bool IsTrimmed () const
 Returns whether curve is trimmed or not.
 
void SetTrim (double theFirst, double theLast)
 Trims curve with [theFirst, theLast] section.
 
void D0 (double theParameter, Point2d &theValue) const
 Returns the point theValue of parameter theParam.
 
void D1 (double theParameter, Point2d &theValue, Vector2d &theD1) const
 Returns the point theValue of parameter theParam and the first derivative theD1.
 
void D2 (double theParameter, Point2d &theValue, Vector2d &theD1, Vector2d &theD2) const
 Returns the point theValue of parameter theParam and second derivatives theD1 and theD2.
 
bool DN (double theParameter, size_t theDerivativeOrder, Geom::Point2d &theValue, std::vector< Geom::Vector2d > &theD) const
 
void Transform (const Transformation2d &theTransformation)
 Applies transformation matrix to this object.
 
Curve2d Transformed (const Transformation2d &theTransformation) const
 Returns a copy this object after applying transformation.
 
- Public Member Functions inherited from cadex::BaseObject
size_t Id () const
 Return unique identifier of public object.
 
internal::BaseObjectImpl * Impl () const
 
bool IsNull () const
 
 operator bool () const
 
template<typename T >
bool IsOfType () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static bool CompareType (const BaseObject &theObject)
 
- Static Public Member Functions inherited from cadex::Geom::Geometry
static bool CompareType (const BaseObject &theObject)
 

Protected Member Functions

 Curve2d (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::Geom::Geometry
 Geometry (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Additional Inherited Members

- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 

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 Curve.

See also
Curves.

Member Function Documentation

◆ D0()

void cadex::Geom::Curve2d::D0 ( double theParameter,
Point2d & theValue ) const

Returns the point theValue of parameter theParam.

Throws exception only for the 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::Geom::Curve2d::D1 ( double theParameter,
Point2d & theValue,
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::Geom::Curve2d::D2 ( double theParameter,
Point2d & theValue,
Vector2d & theD1,
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::Geom::Curve2d::DN ( double theParameter,
size_t theDerivativeOrder,
Geom::Point2d & theValue,
std::vector< Geom::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::Geom::Curve2d::Domain ( double & theUMin,
double & theUMax ) const

Returns a definition domain.

See also
UMin(), UMax().

◆ Transform()

void cadex::Geom::Curve2d::Transform ( const Transformation2d & theTransformation)

Applies transformation matrix to this object.

Results depends on the actual curve type.

See also
Transformed().

◆ Transformed()

Curve2d cadex::Geom::Curve2d::Transformed ( const 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::Geom::Curve2d::UMax ( ) const

Returns a maximum parameter of a definition domain.

See also
UMin(), Domain().

◆ UMin()

double cadex::Geom::Curve2d::UMin ( ) const

Returns a minimum parameter of a definition domain.

See also
UMax(), Domain().

◆ Value()

Geom::Point2d cadex::Geom::Curve2d::Value ( double theParameter) const

Evaluates a point on the curve.

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