Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
Curve Creation

Curve creation by points to connect (Boundary Value Problem). The methods try to create the simplest curve that will comply with the given parameters. If a tangent is missing for either the start or end position, this means that there is no restriction on it; the method will deliver the simplest curve with any tangent. If a tangent is supplied by a VectorBundle, it should carry a reasonable cubic overshoot as its length, in case a Cubic can get produced. The Arc will always be coplanar to the up - direction; the Helix always upright with respect to up. The error margins control what deviation in the start and end positions and tangents is acceptable. The resulting curve is guaranteed to deliver values that deviate no more than these from the parameters used for creation. More...

Functions

std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (const spat::Position< Length > &start, const spat::Position< Length > &end, const spat::Vector< One > &up)
 Will create a Line. Guarantees start and end.
std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (spat::VectorBundle< Length, One > start, const spat::Position< Length > &end, const spat::Vector< One > &up, Length e_length=epsilon__length)
 Will create a Line, an Arc or a Helix. Guarantees start for Line; guarantees start.T to be perpendicular to start.T % up for Arc and Helix. end.P will be in the margin of e_length.
std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (const spat::Position< Length > &start, spat::VectorBundle< Length, One > end, const spat::Vector< One > &up, Length e_length=epsilon__length)
 Will create a Line, an Arc or a Helix. Guarantees end for Line. Guarantees end.T to be perpendicular to end.T % up for Arc and Helix. end.P will be in the margin of e_length.
std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (const spat::VectorBundle< Length, One > &start, const spat::VectorBundle< Length, One > &end, const spat::Vector< One > &up, Length e_length=epsilon__length, Angle e_angle=epsilon__angle)
 Will create a Line, an Arc, a Helix or a Cubic.
std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (Curve::CurveType type, std::pair< std::shared_ptr< const Curve >, common::Interval< Length > > fromCurve)
std::pair< std::unique_ptr< Curve >, common::Interval< Length > > dclspc trax::CreateCurve (Curve::CurveType type, const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Line >, common::Interval< Length > > dclspc trax::CreateLine (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< LineP >, common::Interval< Length > > dclspc trax::CreateLineP (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Arc >, common::Interval< Length > > dclspc trax::CreateArc (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< ArcP >, common::Interval< Length > > dclspc trax::CreateArcP (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Helix >, common::Interval< Length > > dclspc trax::CreateHelix (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< HelixP >, common::Interval< Length > > dclspc trax::CreateHelixP (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Cubic >, common::Interval< Length > > dclspc trax::CreateCubic (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Spline >, common::Interval< Length > > dclspc trax::CreateSpline (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Clothoid >, common::Interval< Length > > dclspc trax::CreateClothoid (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Rotator >, common::Interval< Length > > dclspc trax::CreateRotator (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< Rotator >, common::Interval< Length > > dclspc trax::CreateRotatorWithOffset (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< RotatorChain >, common::Interval< Length > > dclspc trax::CreateRotatorChain (const Curve &fromCurve, common::Interval< Length > range)
std::pair< std::unique_ptr< PolygonalChain >, common::Interval< Length > > dclspc trax::CreatePolygonalChain (const Curve &fromCurve, common::Interval< Length > range)

Detailed Description

Curve creation by points to connect (Boundary Value Problem). The methods try to create the simplest curve that will comply with the given parameters. If a tangent is missing for either the start or end position, this means that there is no restriction on it; the method will deliver the simplest curve with any tangent. If a tangent is supplied by a VectorBundle, it should carry a reasonable cubic overshoot as its length, in case a Cubic can get produced. The Arc will always be coplanar to the up - direction; the Helix always upright with respect to up. The error margins control what deviation in the start and end positions and tangents is acceptable. The resulting curve is guaranteed to deliver values that deviate no more than these from the parameters used for creation.

Curve creation from other curves. Creator methods to create 'most similar' curves of a certain type from existing curves. In general it can not be guaranteed that the resulting curve will be the same as the template curve, rather the opposite.

Parameters
startstarting point and tangent vector of the curve. If a tangent is supplied it should carry the cubic overshoot as its length.
endend point and tangent of the curve. If a tangent is supplied it should carry the cubic overshoot as its length.
upVector pointing in up direction. Must be of unit length.
e_lengtherror margin for the positional values.
e_angleerror margin for the directional values.
Returns
a pointer to the created curve and the range of the curve from start to end.
Exceptions
std::invalid_argumentif no curve could get created, e.g. because start and end are collocated.
Parameters
typeThe type of the curve to create.
fromCurveThe curve to create the new curve from.
rangeThe range of the curve to create.
Returns
A unique pointer to the newly created curve and a valid range, similar to the given one.
Exceptions
std::invalid_argumentif the curve can not created from the input values.