BeamAdapter
Loading...
Searching...
No Matches
RodMeshSection< DataTypes > Class Template Reference

Specialization class of. More...

#include <RodMeshSection.h>

Inheritance diagram for RodMeshSection< DataTypes >:
BaseRodSectionMaterial< DataTypes >

Public Types

using Real = typename DataTypes::Real
using Transform = typename sofa::defaulttype::SolidTypes<Real>::Transform
using Coord = typename DataTypes::Coord
using Quat = sofa::type::Quat<Real>
Public Types inherited from BaseRodSectionMaterial< DataTypes >
using Coord = typename DataTypes::Coord
using Real = typename Coord::value_type
using Transform = typename sofa::defaulttype::SolidTypes<Real>::Transform
using Vec3 = sofa::type::Vec<3, Real>
using Quat = sofa::type::Quat<Real>
using Size = sofa::Size

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE(RodMeshSection, DataTypes), SOFA_TEMPLATE(BaseRodSectionMaterial, DataTypes))
 RodMeshSection ()
 Default Constructor.
void getRestTransformOnX (Transform &global_H_local, const Real x_used, const Real x_start) override
 Override method to get the rest position of the beam. In this implementation, it will interpolate along the loaded mesh geometry.
Public Member Functions inherited from BaseRodSectionMaterial< DataTypes >
 SOFA_CLASS (SOFA_TEMPLATE(BaseRodSectionMaterial, DataTypes), core::objectmodel::BaseComponent)
 BaseRodSectionMaterial ()
 Default Constructor.
void init () override
 init method from BaseComponent API. Will call internal
auto getNbVisualEdges () const
 Returns the number of visual edges of this section. To be set or computed by child.
auto getNbCollisionEdges () const
 Returns the number of collision edges of this section. To be set or computed by child.
auto getNbBeams () const
 Returns the number of collision edges of this section. To be set or computed by child.
auto getLength () const
 Returns the total length of this section. To be set or computed by child.
const BeamSection & getBeamSection () const
 Returns the BeamSection.
void getInterpolationParameters (Real &_A, Real &_Iy, Real &_Iz, Real &_Asy, Real &_Asz, Real &_J) const
 Returns the mass density and the BeamSection of this section.
void getMechanicalParameters (Real &youngModulus, Real &cPoisson, Real &massDensity) const
 Returns the Young modulus, Poisson's and massDensity coefficient of this section.
virtual void getRestTransformOnX (Transform &global_H_local, const Real x_used, const Real x_start)
 This function is called to get the rest position of the beam depending on the current curved abscisse given in parameter.

Public Attributes

SingleLink< RodMeshSection< DataTypes >, MeshLoader, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > l_loader
 Link to be set to the topology container in the component graph.
Public Attributes inherited from BaseRodSectionMaterial< DataTypes >
Data< Real > d_poissonRatio
 Data defining the mehcanical Poisson ratio of this section.
Data< Real > d_youngModulus
 Data defining the mehcanical Young Modulus of this section.
Data< Real > d_massDensity
 Data defining the mehcanical mass density of this section.
Data< Real > d_radius
 Data defining the geometry radius of this section.
Data< Real > d_innerRadius
 Data defining the geometry internal radius of this section is hollow.
Data< Real > d_length
 Data defining the geometry length of this section.
Data< Size > d_nbBeams
 Data defining the number of (mechanical) beams composing this section.
Data< Size > d_nbEdgesVisu
 Data defining the number of visual edges composing this section.
Data< Size > d_nbEdgesCollis
 Data defining the number of collision edges composing this section.

Protected Member Functions

bool initSection () override
 Internal method to init the section. Called by.
bool initFromLoader ()
 Internal method called by initSection to init from a linked MeshLoader.
void initRestConfig ()
 Internal method called by initFromLoader to compute.
bool checkLoaderTopology ()
 Method to check if the given loader has a edge set structure.
void rotateFrameForAlignX (const type::Quat< Real > &input, type::Vec3 &x, type::Quat< Real > &output)
 Tool method to rotate the input frame.

Detailed Description

template<class DataTypes>
class beamadapter::RodMeshSection< DataTypes >

Specialization class of.

See also
BaseRodSectionMaterial describing a rod section created using a Mesh file

This class will describe a rod section defined by a mesh file structure using the link

See also
l_loader Method
initFromLoader and
initRestConfig will define the beam structure using the geometry of the given mesh as well as the Length. Mechanical parameters are set using the
BaseRodSectionMaterial Data Method
getRestTransformOnX will return the current position of the curviline abscisse along the mesh structure.

Member Function Documentation

◆ initFromLoader()

template<class DataTypes>
bool initFromLoader ( )
protected

Internal method called by initSection to init from a linked MeshLoader.

See also
l_loader

renumber the vertices

◆ initRestConfig()

template<class DataTypes>
void initRestConfig ( )
protected

Internal method called by initFromLoader to compute.

See also
m_localRestPositions and
m_localRestTransforms given the mesh structure

◆ initSection()

template<class DataTypes>
bool initSection ( )
overrideprotectedvirtual

Internal method to init the section. Called by.

See also
BaseRodSectionMaterial::init() method

Reimplemented from BaseRodSectionMaterial< DataTypes >.

◆ rotateFrameForAlignX()

template<class DataTypes>
void rotateFrameForAlignX ( const type::Quat< Real > & input,
type::Vec3 & x,
type::Quat< Real > & output )
protected

Tool method to rotate the input frame.

Parameters
inputgiven an axis
x.Result is set in
output