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

Base class describing a Rod section which will define a set of beam elements. More...

#include <BaseRodSectionMaterial.h>

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

Public Types

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

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

virtual bool initSection ()
 Internal method to init the section. to be overidden by child.

Detailed Description

template<class DataTypes>
class beamadapter::BaseRodSectionMaterial< DataTypes >

Base class describing a Rod section which will define a set of beam elements.

This class provide an api to define a rod/wire section using physical and geometry parameters. The section will then be modellized by a set of beam elements. Inheriting class should provide the geometry structure:

See also
RodMeshSection to define a rod using a mesh file,
RodSpireSection or
RodStraightSection to define procedural shapes. Method
initSection and
getRestTransformOnX should be overriden to provide the correct creation and interpolation.

The rod section is described by:

Member Function Documentation

◆ getBeamSection()

template<class DataTypes>
const BeamSection & getBeamSection ( ) const
inlinenodiscard

Returns the BeamSection.

See also
m_beamSection corresponding to this section

◆ init()

template<class DataTypes>
void init ( )
override

init method from BaseComponent API. Will call internal

See also
initSection to be overriden by children

◆ initSection()

template<class DataTypes>
virtual bool initSection ( )
inlineprotectedvirtual

Internal method to init the section. to be overidden by child.

Reimplemented in RodMeshSection< DataTypes >, RodSpireSection< DataTypes >, and RodStraightSection< DataTypes >.