CAD Exchanger SDK
cadex::ModelData_OffsetCurve Class Reference

Defines 3D offset curve. More...

Inheritance diagram for cadex::ModelData_OffsetCurve:
cadex::ModelData_Curve

Public Member Functions

 ModelData_OffsetCurve ()
 Constructor. More...
 
 ModelData_OffsetCurve (const ModelData_Curve &theBasisCurve, double theOffset, const ModelData_Direction &theDir)
 Constructor. More...
 
 ModelData_OffsetCurve (const Handle_C &)
 Constructor.
 
ModelData_Curve BasisCurve () const
 Returns basis curve.
 
const ModelData_Direction & Direction () const
 Returns reference direction. More...
 
double Offset () const
 Returns offset value. More...
 
 operator const Handle_C & () const
 Cast operator.
 
- Public Member Functions inherited from cadex::ModelData_Curve
 ModelData_Curve ()
 Constructor.
 
 ModelData_Curve (const ModelData_Curve &theOther)
 Constructor.
 
 ModelData_Curve (ModelData_Curve &&theOther)
 Constructor.
 
 ~ModelData_Curve ()
 Destructor.
 
ModelData_Curveoperator= (const ModelData_Curve &theOther)
 Assignment operator.
 
ModelData_Curveoperator= (ModelData_Curve &&theOther)
 Move assignment operator.
 
 operator const Handle_C & () const
 Cast operator.
 
ModelData_CurveType Type () const
 Returns a curve type.
 
bool IsNull () const
 Returns true if the object has not been initialized yet.
 
 operator bool () const
 Returns if the object has been initialized. More...
 
bool IsPeriodic () const
 Returns true if the curve is periodic.
 
double UMin () const
 Returns a minimum parameter of a definition domain. More...
 
double UMax () const
 Returns a maximum parameter of a definition domain. More...
 
void Domain (double &theUMin, double &theUMax) const
 Returns a definition domain. More...
 
ModelData_Point Value (double theParameter) const
 Evaluates a point on the curve. More...
 
ModelData_Curve Reversed () const
 Returns a curve with reversed orientation. More...
 
void Transform (const ModelData_Transformation &theTransformation)
 Applies transformation matrix to this object. More...
 
ModelData_Curve Transformed (const ModelData_Transformation &theTransformation) const
 Returns a copy this object after applying transformation. More...
 
ModelData_Continuity Continuity () const
 Returns a continuity type of the curve.
 
void D0 (double theParameter, ModelData_Point &theValue) const
 Returns the point theValue of parameter theParam. More...
 
void D1 (double theParameter, ModelData_Point &theValue, ModelData_Vector &theD1) const
 Returns the point theValue of parameter theParam and the first derivative theD1. More...
 
void D2 (double theParameter, ModelData_Point &theValue, ModelData_Vector &theD1, ModelData_Vector &theD2) const
 Returns the point theValue of parameter theParam and second derivatives theD1 and theD2. More...
 
bool DN (double theParameter, size_t theDerivativeOrder, ModelData_Point &theValue, ModelData_Vector theD[]) const
 
double Curvature (double theParameter) const
 Returns the curvature value of parameter theParam.
 
void Normal (double theParameter, ModelData_Direction &theNormal) const
 Returns the normal direction theNormal of parameter theParam.
 
void Mirror (const ModelData_Point &thePoint)
 Mirrors the curve relative to the point.
 
void Mirror (const ModelData_Axis1Placement &theAxis)
 Mirrors the curve relative to the axis placement.
 
void Mirror (const ModelData_Axis2Placement &theAxis)
 Mirrors the curve relative to the axis placement.
 
template<typename T >
ModelData_Curve Mirrored (const T &theRef) const
 Returns a copy this curve translated along the vector. More...
 
void Rotate (const ModelData_Axis1Placement &theAxis, double theAngle)
 Rotates the curve around the axis.
 
ModelData_Curve Rotated (const ModelData_Axis1Placement &theAxis, double theAngle)
 Returns a copy this curve rotated along the axis. More...
 
void Translate (const ModelData_Vector &theVector)
 Translates the curve along the vector.
 
ModelData_Curve Translated (const ModelData_Vector &theVector)
 Returns a copy this curve translated along the vector. More...
 
void Scale (const ModelData_Point &thePoint, double theScale)
 Scales the curve with respect to the point.
 
ModelData_Curve Scaled (const ModelData_Point &thePoint, double theScale)
 Returns a copy this curve scaled with respect to the point. More...
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_Curve
 ModelData_Curve (const Handle_C &, ModelData_CurveType)
 Constructor.
 
internal::ModelData_CurveImpl & Impl ()
 Returns internal implementation object.
 

Detailed Description

Defines 3D offset curve.

An offset curve is defined by a basis curve, reference direction and offset value.

The following image depicts an example of a planar offset curve:

offset_curve_2d.png
Offset Curve

A basis curve must be at least G1-continous, otherwise behavior is undefined (most likely an exception will be thrown).

An offset curve is parametrized as follows: C(t) = B(t) + offset * V(t), where

  • B(t) is a point on a basis curve at parameter t;
  • offset is an offset value;
  • V(t) is a unit vector defined as D1(t) ^ Dir / | D1(t) ^ Dir |,
  • Dir is a specified reference direction,
  • D1(t) is first derivative vector computed on a basis curve at parameter t.

If the basis curve is planar and reference direction Dir is perpendicular to a plane of the basis curve, then the offset also belongs to that plane is shifted by offset value from the basis curve.

IsPeriodic() returns a value returned by the basis curve.

See also
ModelData_OffsetCurve2d.

Constructor & Destructor Documentation

◆ ModelData_OffsetCurve() [1/2]

cadex::ModelData_OffsetCurve::ModelData_OffsetCurve ( )
inline

Constructor.

Empty constructor.

◆ ModelData_OffsetCurve() [2/2]

cadex::ModelData_OffsetCurve::ModelData_OffsetCurve ( const ModelData_Curve theBasisCurve,
double  theOffset,
const ModelData_Direction &  theDir 
)

Constructor.

If theBasisCurve is an offset curve then its basis curve will be used as a basis curve and offset will be a sum of theOffset and the offset value of the theBasisCurve.

theBasisCurve must be at least G1-continuous, otherwise behavior is undefined.

Member Function Documentation

◆ Direction()

const ModelData_Direction & cadex::ModelData_OffsetCurve::Direction ( ) const

Returns reference direction.

Returns the value specified in constructor.

◆ Offset()

double cadex::ModelData_OffsetCurve::Offset ( ) const

Returns offset value.

Returns the value specified in constructor.