TwistGeometry is the class that applies a twist to a given geometry patch. More...
#include <TwistGeometry.hpp>
Public Member Functions | |
TwistGeometry (const bitpit::Config::Section &rootXML) | |
TwistGeometry (const TwistGeometry &other) | |
TwistGeometry (darray3E origin={ {0, 0, 0} }, darray3E direction={ {0, 0, 0} }) | |
~TwistGeometry () | |
virtual void | absorbSectionXML (const bitpit::Config::Section &slotXML, std::string name="") |
void | apply () |
void | buildPorts () |
void | execute () |
virtual void | flushSectionXML (bitpit::Config::Section &slotXML, std::string name="") |
dmpvecarr3E * | getDisplacements () |
TwistGeometry & | operator= (TwistGeometry other) |
void | setAxis (darray3E origin, darray3E direction) |
void | setDirection (darray3E direction) |
void | setFilter (dmpvector1D *filter) |
void | setMaxDistance (double distance) |
void | setOrigin (darray3E origin) |
void | setSym (bool sym) |
void | setTwist (double alpha) |
Public Member Functions inherited from mimmo::BaseManipulation | |
BaseManipulation () | |
BaseManipulation (const BaseManipulation &other) | |
virtual | ~BaseManipulation () |
void | activate () |
bool | arePortsBuilt () |
void | clear () |
void | disable () |
void | exec () |
BaseManipulation * | getChild (int i=0) |
ConnectionType | getConnectionType () |
MimmoSharedPointer< MimmoObject > | getGeometry () |
MimmoSharedPointer< MimmoObject > & | getGeometryReference () |
int | getId () |
bitpit::Logger & | getLog () |
std::string | getName () |
int | getNChild () |
int | getNParent () |
int | getNPortsIn () |
int | getNPortsOut () |
BaseManipulation * | getParent (int i=0) |
std::unordered_map< PortID, PortIn * > | getPortsIn () |
std::unordered_map< PortID, PortOut * > | getPortsOut () |
uint | getPriority () |
virtual std::vector< BaseManipulation * > | getSubBlocksEmbedded () |
bool | isActive () |
bool | isApply () |
bool | isChild (BaseManipulation *, int &) |
bool | isParent (BaseManipulation *, int &) |
bool | isPlotInExecution () |
BaseManipulation & | operator= (const BaseManipulation &other) |
void | removePins () |
void | removePinsIn () |
void | removePinsOut () |
void | setApply (bool flag=true) |
void | setGeometry (MimmoSharedPointer< MimmoObject > geometry) |
void | setId (int) |
void | setLog (bitpit::Logger &log) |
void | setName (std::string name) |
void | setOutputPlot (std::string path) |
void | setPlotInExecution (bool) |
void | setPriority (uint priority) |
void | unsetGeometry () |
Protected Member Functions | |
void | checkFilter () |
void | swap (TwistGeometry &x) noexcept |
Protected Member Functions inherited from mimmo::BaseManipulation | |
void | _apply (MimmoPiercedVector< darray3E > &displacements) |
void | addChild (BaseManipulation *child) |
void | addParent (BaseManipulation *parent) |
void | addPinIn (BaseManipulation *objIn, PortID portR) |
void | addPinOut (BaseManipulation *objOut, PortID portS, PortID portR) |
void | cleanBufferIn (PortID port) |
template<typename T , typename O > | |
bool | createPortIn (O *obj, void(O::*setVar_)(T), PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortIn (T *var_, PortID portR, bool mandatory=false, int family=0) |
template<typename T , typename O > | |
bool | createPortOut (O *obj, T(O::*getVar_)(), PortID portS) |
template<typename T , typename O > | |
bool | createPortOut (T *var_, PortID portS) |
void | deletePorts () |
PortID | findPinIn (PortIn &pin) |
PortID | findPinOut (PortOut &pin) |
void | initializeLogger (bool logexists) |
virtual void | plotOptionalResults () |
void | readBufferIn (PortID port) |
void | removePinIn (BaseManipulation *objIn, PortID portR) |
void | removePinIn (PortID portR, int j) |
void | removePinOut (BaseManipulation *objOut, PortID portS) |
void | removePinOut (PortID portS, int j) |
void | setBufferIn (PortID port, mimmo::IBinaryStream &input) |
void | swap (BaseManipulation &x) noexcept |
void | unsetChild (BaseManipulation *child) |
void | unsetParent (BaseManipulation *parent) |
void | write (MimmoSharedPointer< MimmoObject > geometry) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, MimmoPiercedVector< mpv_t > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t > * > &data, Args ... args) |
template<typename mpv_t > | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data) |
template<typename mpv_t , typename... Args> | |
void | write (MimmoSharedPointer< MimmoObject > geometry, std::vector< MimmoPiercedVector< mpv_t >> &data, Args ... args) |
Additional Inherited Members | |
Public Types inherited from mimmo::BaseManipulation | |
typedef std::unordered_map< BaseManipulation *, int > | bmumap |
typedef pin::ConnectionType | ConnectionType |
typedef std::string | PortID |
Protected Attributes inherited from mimmo::BaseManipulation | |
bool | m_active |
bool | m_apply |
bool | m_arePortsBuilt |
bmumap | m_child |
int | m_counter |
bool | m_execPlot |
MimmoSharedPointer< MimmoObject > | m_geometry |
bitpit::Logger * | m_log |
std::string | m_name |
std::string | m_outputPlot |
bmumap | m_parent |
std::unordered_map< PortID, PortIn * > | m_portIn |
std::unordered_map< PortID, PortOut * > | m_portOut |
ConnectionType | m_portsType |
uint | m_priority |
Static Protected Attributes inherited from mimmo::BaseManipulation | |
static int | sm_baseManipulationCounter |
Detailed Description
TwistGeometry is the class that applies a twist to a given geometry patch.
The used parameters are:
- twist max reference value in radians
- twist axis
- origin of the twist axis
- distance from the origin (and along the axis) where the max twist is applied
The twist is applied following the right-hand rule w.r.t its reference axis.
Ports available in TwistGeometry Class :
Port Input | ||
---|---|---|
PortType | variable/function | DataType |
M_POINT | setOrigin | (MC_ARRAY3, MD_FLOAT) |
M_AXIS | setDirection | (MC_ARRAY3, MD_FLOAT) |
M_VALUED | setTwist | (MC_SCALAR, MD_FLOAT) |
M_VALUED2 | setMaxDistance | (MC_SCALAR, MD_FLOAT) |
M_FILTER | setFilter | (MC_SCALAR, MD_MPVECFLOAT_) |
M_GEOM | setGeometry | (MC_SCALAR, MD_MIMMO_) |
Port Output | ||
---|---|---|
PortType | variable/function | DataType |
M_GDISPLS | getDisplacements | (MC_SCALAR, MD_MPVECARR3FLOAT_) |
M_GEOM | getGeometry | (MC_SCALAR,MD_MIMMO_) |
The xml available parameters, sections and subsections are the following :
Inherited from BaseManipulation:
- ClassName: name of the class as
mimmo.TwistGeometry
; - Priority: uint marking priority in multi-chain execution;
- Apply: boolean 0/1 activate apply result directly in execution;
Proper of the class:
- Origin: twist axis origin coordinates (space separated);
- Direction: axis direction coordinates (space separated);
- Twist: twist angle in radians. Positive on counterclockwise twists around reference axis;
- Distance: distance from the origin (on twist axis) where the twist angle is reached.
- Symmetric: boolean 0/1 deactive/activate a symmetric twisting w.r.t the plane defined by twist axis
Geometry has to be mandatorily passed through port.
- Examples
- manipulators_example_00001.cpp.
Definition at line 85 of file TwistGeometry.hpp.
Constructor & Destructor Documentation
◆ TwistGeometry() [1/3]
mimmo::TwistGeometry::TwistGeometry | ( | darray3E | origin = { {0, 0, 0} } , |
darray3E | direction = { {0, 0, 0} } |
||
) |
Default constructor of TwistGeometry
Definition at line 32 of file TwistGeometry.cpp.
◆ TwistGeometry() [2/3]
mimmo::TwistGeometry::TwistGeometry | ( | const bitpit::Config::Section & | rootXML | ) |
Custom constructor reading xml data
- Parameters
-
[in] rootXML reference to your xml tree section
Definition at line 45 of file TwistGeometry.cpp.
◆ ~TwistGeometry()
mimmo::TwistGeometry::~TwistGeometry | ( | ) |
Default destructor of TwistGeometry
Definition at line 66 of file TwistGeometry.cpp.
◆ TwistGeometry() [3/3]
mimmo::TwistGeometry::TwistGeometry | ( | const TwistGeometry & | other | ) |
Copy constructor of TwistGeometry. No result geometry displacements are copied.
Definition at line 70 of file TwistGeometry.cpp.
Member Function Documentation
◆ absorbSectionXML()
|
virtual |
It sets infos reading from a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 289 of file TwistGeometry.cpp.
◆ apply()
|
virtual |
Directly apply deformation field to target geometry.
Reimplemented from mimmo::BaseManipulation.
Definition at line 253 of file TwistGeometry.cpp.
◆ buildPorts()
|
virtual |
It builds the input/output ports of the object
Implements mimmo::BaseManipulation.
Definition at line 104 of file TwistGeometry.cpp.
◆ checkFilter()
|
protected |
Check if the filter is related to the target geometry. If not create a unitary filter field.
Definition at line 262 of file TwistGeometry.cpp.
◆ execute()
|
virtual |
Execution command. It saves in "rot"-terms the modified axes and origin, by the twist conditions. This terms can be recovered and passed by a pin to a child object by the related get-methods.
Implements mimmo::BaseManipulation.
Definition at line 194 of file TwistGeometry.cpp.
◆ flushSectionXML()
|
virtual |
It sets infos from class members in a XML bitpit::Config::section.
- Parameters
-
[in] slotXML bitpit::Config::Section of XML file [in] name name associated to the slot
Reimplemented from mimmo::BaseManipulation.
Definition at line 358 of file TwistGeometry.cpp.
◆ getDisplacements()
dmpvecarr3E * mimmo::TwistGeometry::getDisplacements | ( | ) |
Return actual computed displacements field (if any) for the geometry linked.
- Returns
- deformation field
Definition at line 185 of file TwistGeometry.cpp.
◆ operator=()
TwistGeometry & mimmo::TwistGeometry::operator= | ( | TwistGeometry | other | ) |
Assignment operator of TwistGeometry. No result geometry displacements are copied.
Definition at line 81 of file TwistGeometry.cpp.
◆ setAxis()
It sets the origin and direction of the twist axis.
- Parameters
-
[in] origin Origin of twist axis. [in] direction Direction of twist axis.
Definition at line 122 of file TwistGeometry.cpp.
◆ setDirection()
void mimmo::TwistGeometry::setDirection | ( | darray3E | direction | ) |
It sets the direction of the twist axis.
- Parameters
-
[in] direction Direction of twist axis.
- Examples
- manipulators_example_00001.cpp.
Definition at line 139 of file TwistGeometry.cpp.
◆ setFilter()
void mimmo::TwistGeometry::setFilter | ( | dmpvector1D * | filter | ) |
It sets the filter field to modulate the displacements of the vertices of the target geometry.
- Parameters
-
[in] filter Filter field defined on geometry vertices.
Definition at line 175 of file TwistGeometry.cpp.
◆ setMaxDistance()
void mimmo::TwistGeometry::setMaxDistance | ( | double | distance | ) |
It sets the value of the distance (on the twist axis) where the maximum twist is reached.
- Parameters
-
[in] distance Value of the maximum distance on the twist axis.
- Examples
- manipulators_example_00001.cpp.
Definition at line 166 of file TwistGeometry.cpp.
◆ setOrigin()
void mimmo::TwistGeometry::setOrigin | ( | darray3E | origin | ) |
It sets the origin of the twist axis.
- Parameters
-
[in] origin Origin of twist axis.
Definition at line 131 of file TwistGeometry.cpp.
◆ setSym()
void mimmo::TwistGeometry::setSym | ( | bool | sym | ) |
It sets if the twist has to be performed for negative local coordinates.
- Parameters
-
[in] sym Symmetric twist?
Definition at line 158 of file TwistGeometry.cpp.
◆ setTwist()
void mimmo::TwistGeometry::setTwist | ( | double | alpha | ) |
It sets the value of the maximum twist.
- Parameters
-
[in] alpha Value of maximum twist.
- Examples
- manipulators_example_00001.cpp.
Definition at line 150 of file TwistGeometry.cpp.
◆ swap()
|
protectednoexcept |
The documentation for this class was generated from the following files:
- src/manipulators/TwistGeometry.hpp
- src/manipulators/TwistGeometry.cpp