Hide menu
Loading...
Searching...
No Matches
cadex::Geom::OffsetCurve Class Reference

Defines 3D offset curve. More...

#include <cadex/Geom/OffsetCurve.hxx>

Inheritance diagram for cadex::Geom::OffsetCurve:
cadex::Geom::Curve cadex::Geom::Geometry cadex::BaseObject

Public Member Functions

 OffsetCurve ()
 Constructor.
 
 OffsetCurve (const Curve &theBasicCurve, double theOffset, const Geom::Direction &theDirection)
 Constructor.
 
Curve BasisCurve () const
 Returns basis curve.
 
double Offset () const
 Returns offset value.
 
Geom::Direction Direction () const
 Returns reference direction.
 
- Public Member Functions inherited from cadex::Geom::Curve
 Curve ()
 Constructor.
 
CurveType Type () const
 
Geom::Continuity Continuity () const
 Returns a continuity type of the curve.
 
Point Value (double theParameter) const
 Evaluates a point on the curve.
 
Direction Normal (double theParameter) const
 Returns the normal direction theNormal of parameter theParam.
 
double Curvature (double theParameter) const
 Returns the curvature value of parameter theParam.
 
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.
 
bool IsTrimmed () const
 Returns whether curve is trimmed or not.
 
void SetTrim (double theFirst, double theLast)
 Trims curve with [theFirst, theLast] section.
 
void Transform (const Transformation &theTransformation)
 Applies transformation matrix to this object.
 
Curve Transformed (const Transformation &theTransformation) const
 Returns a copy this object after applying transformation.
 
void D0 (double theParameter, Point &theValue) const
 Returns the point theValue of parameter theParam.
 
void D1 (double theParameter, Point &theValue, Vector &theD1) const
 Returns the point theValue of parameter theParam and the first derivative theD1.
 
void D2 (double theParameter, Point &theValue, Vector &theD1, Vector &theD2) const
 Returns the point theValue of parameter theParam, the first theD1 and second theD2 derivatives.
 
bool DN (double theParameter, size_t theDerivativeOrder, Geom::Point &theValue, std::vector< Geom::Vector > &theD) const
 
void Mirror (const Point &thePoint)
 
void Mirror (const Axis1d &theAxis)
 
void Mirror (const Axis3d &theAxis)
 
Curve Mirrored (const Point &theRef) const
 
Curve Mirrored (const Axis1d &theAxis) const
 
Curve Mirrored (const Axis3d &theAxis) const
 
void Rotate (const Axis1d &theAxis, double theAngle)
 
Curve Rotated (const Axis1d &theAxis, double theAngle) const
 
void Translate (const Vector &theVector)
 
Curve Translated (const Vector &theVector) const
 
void Scale (const Point &thePoint, double theScale)
 
Curve Scaled (const Point &thePoint, double theScale) const
 
- 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::Curve
static bool CompareType (const BaseObject &theObject)
 
- Static Public Member Functions inherited from cadex::Geom::Geometry
static bool CompareType (const BaseObject &theObject)
 

Additional Inherited Members

- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 
- Protected Member Functions inherited from cadex::Geom::Curve
 Curve (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)
 

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

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: \(\mathbf{C}(t) = \mathbf{B}(t) + \mathrm{offset}\cdot\mathbf{V}(t)\), where

  • \(\mathbf{B}(t)\) is a point on a basis curve at parameter \(t\);
  • \(\mathrm{offset}\) is an offset value;
  • \(\mathbf{V}(t)\) is a unit vector defined as \(\frac{\mathbf{B}'(t) \times \mathbf{D}}{\|\mathbf{B}'(t) \times \mathbf{D}\|}\),
  • \(\mathbf{D}\) is a specified reference direction,
  • \(\mathbf{B}'(t)\) is first derivative vector computed on a basis curve at parameter \(t\).

If the basis curve is planar and reference direction \(\mathbf{D}\) is perpendicular to a plane of the basis curve, then the offset curve also belongs to that plane and is shifted by \(\mathrm{offset}\) value from the basis curve.

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

See also
OffsetCurve2d.

Constructor & Destructor Documentation

◆ OffsetCurve()

cadex::Geom::OffsetCurve::OffsetCurve ( const Curve & theBasicCurve,
double theOffset,
const Geom::Direction & theDirection )

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()

Direction cadex::Geom::OffsetCurve::Direction ( ) const

Returns reference direction.

Returns the value specified in constructor.

◆ Offset()

double cadex::Geom::OffsetCurve::Offset ( ) const

Returns offset value.

Returns the value specified in constructor.