Lagrange
Loading...
Searching...
No Matches
CircularArcSweepPath< _Scalar > Class Template Referencefinal

In addition to the member function provided in SweepPath, CircularArcSweepPath also provide the following handy methods: More...

#include <lagrange/primitive/legacy/SweepPath.h>

Inheritance diagram for CircularArcSweepPath< _Scalar >:
SweepPath< _Scalar >

Public Types

using Parent = SweepPath<_Scalar>
 
using Scalar = typename Parent::Scalar
 
- Public Types inherited from SweepPath< _Scalar >
using Scalar = _Scalar
 
using TransformType = Eigen::Transform<Scalar, 3, Eigen::AffineCompact>
 
using PointType = Eigen::Matrix<Scalar, 1, 3>
 

Public Member Functions

 CircularArcSweepPath (Scalar radius, Scalar theta)
 Circular arc path constructor.
 
void set_angle_begin (Scalar theta)
 Set starting sweeping angle.
 
void set_angle_end (Scalar theta)
 Set ending sweeping angle.
 
void initialize () override
 Generate transformation matrices based on the setting provided.
 
std::unique_ptr< Parentclone () const override
 Create a deep copy of itself.
 
bool is_closed () const override
 Whether the sweep path is closed.
 
bool operator== (const SweepPath< Scalar > &other) const override
 Check if two sweep paths are the same.
 
- Public Member Functions inherited from SweepPath< _Scalar >
size_t get_num_samples () const
 The number of samples used to sample along the sweeping path.
 
void set_num_samples (size_t n)
 Set the number of samples for uniform sampling of the sweeping path.
 
const std::vector< Scalar > & get_samples () const
 Samples are always in ascending order going from 0 to 1.
 
void set_samples (std::vector< Scalar > samples)
 Set the sample points.
 
void add_samples (const std::vector< Scalar > &samples)
 Add samples to the existing samples.
 
const std::vector< TransformType > & get_transforms () const
 Retrieve the transforms generated using initialize().
 
std::vector< TransformType > & get_transforms ()
 
std::vector< Scalar > get_offsets () const
 Retrieve the sampled normal offsets.
 
Scalar get_depth_begin () const
 Start sweeping at certain depth along the path.
 
void set_depth_begin (Scalar depth)
 
Scalar get_depth_end () const
 Stop sweeping at certain depth along the path.
 
void set_depth_end (Scalar depth)
 
Scalar get_twist_begin () const
 Twisting angle at the beginning of the sweep path.
 
void set_twist_begin (Scalar twist)
 
Scalar get_twist_end () const
 Twisting angle at the end of the sweep path.
 
void set_twist_end (Scalar twist)
 
Scalar get_taper_begin () const
 Scaling factor at the beginning of the sweep path.
 
void set_taper_begin (Scalar taper)
 
Scalar get_taper_end () const
 Scaling factor at the beginning of the sweep path.
 
void set_taper_end (Scalar taper)
 
const PointType & get_pivot () const
 Twisting and tapering are all with respect to a pivot point.
 
void set_pivot (const PointType &p)
 
void set_offset_fn (std::function< Scalar(Scalar)> fn)
 Offset function provides a mapping from the relative depth (from 0 to 1) to a normal offset amount (measured in 3D Euclidean distance).
 
bool has_offsets () const
 
void set_normalization_transform (const TransformType &transform)
 Sometimes one may want to sweep a normalized profile curve, and update normalization from time to time.
 
const TransformType & get_normalization_transform () const
 

Additional Inherited Members

- Protected Member Functions inherited from SweepPath< _Scalar >
void clone_settings (SweepPath< Scalar > &other) const
 
- Protected Attributes inherited from SweepPath< _Scalar >
std::vector< TransformType > m_transforms
 
std::vector< Scalar > m_samples
 should be sorted in ascending order from 0 to 1.
 
TransformType m_normalization = TransformType::Identity()
 
Scalar m_depth_begin = 0
 
Scalar m_depth_end = 1
 
Scalar m_twist_begin = 0
 
Scalar m_twist_end = 0
 
Scalar m_taper_begin = 1
 
Scalar m_taper_end = 1
 
PointType m_pivot {0, 0, 0}
 
std::function< Scalar(Scalar)> m_offset_fn
 

Detailed Description

template<typename _Scalar>
class lagrange::primitive::legacy::CircularArcSweepPath< _Scalar >

In addition to the member function provided in SweepPath, CircularArcSweepPath also provide the following handy methods:

path->set_angle_begin(0); // Set the arc angle at the beginning.
path->set_angle_end(lagrange::internal::pi); // Set the arc angle at the end.

Constructor & Destructor Documentation

◆ CircularArcSweepPath()

template<typename _Scalar>
CircularArcSweepPath ( Scalar radius,
Scalar theta )
inline

Circular arc path constructor.

The circular arc is embedded in a plane perpendicular to the XY plane.

Parameters
[in]radiusRadius of the circle.
[in]thetaRotation angle around Z axis. 0 means the circular arc is embedded in the XZ plane.

Member Function Documentation

◆ set_angle_begin()

template<typename _Scalar>
void set_angle_begin ( Scalar theta)
inline

Set starting sweeping angle.

This is an alternative way of setting depth at the beginning of the sweep.

◆ set_angle_end()

template<typename _Scalar>
void set_angle_end ( Scalar theta)
inline

Set ending sweeping angle.

This is an alternative way of setting depth at the end of the sweep.

◆ initialize()

template<typename _Scalar>
void initialize ( )
inlineoverridevirtual

Generate transformation matrices based on the setting provided.

The generated transforms can be retrieved using get_transforms() method.

Implements SweepPath< _Scalar >.

◆ clone()

template<typename _Scalar>
std::unique_ptr< Parent > clone ( ) const
inlineoverridevirtual

Create a deep copy of itself.

Implements SweepPath< _Scalar >.

◆ is_closed()

template<typename _Scalar>
bool is_closed ( ) const
inlineoverridevirtual

Whether the sweep path is closed.

Implements SweepPath< _Scalar >.

◆ operator==()

template<typename _Scalar>
bool operator== ( const SweepPath< Scalar > & other) const
inlineoverridevirtual

Check if two sweep paths are the same.

Reimplemented from SweepPath< _Scalar >.


The documentation for this class was generated from the following file: