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

Describe the shape functions on multiple segments. More...

#include <WireRestShape.h>

Inheritance diagram for WireRestShape< 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>

Public Member Functions

 SOFA_CLASS (WireRestShape, core::objectmodel::BaseComponent)
 WireRestShape ()
 Default Constructor.
virtual ~WireRestShape ()=default
 Default Destructor.
void init () override
void getRestTransformOnX (Transform &global_H_local, const Real x)
 This function is called by the force field to evaluate the rest position of each beam.
const BeamSection & getBeamSectionAtX (const Real x_curv) const
 Returns the BeamSection.
void getInterpolationParametersAtX (const Real x_curv, Real &_A, Real &_Iy, Real &_Iz, Real &_Asy, Real &_Asz, Real &_J) const
 Returns the BeamSection data depending on the beam position at the given curvilinear abscissa, will call.
void getMechanicalParametersAtX (const Real x_curv, Real &youngModulus, Real &cPoisson, Real &massDensity) const
 Returns the Young modulus, Poisson's ratio and massDensity coefficient of the section at the given curvilinear abscissa, will call.
void getSamplingParameters (type::vector< Real > &xP_noticeable, type::vector< sofa::Size > &nbP_density) const
void computeOrientation (const Vec3 &AB, const Quat &Q, Quat &result)
 Functions enabling to load and use a geometry given from OBJ external file.
Real getLength ()
void getMechanicalSampling (Real &dx, const Real x_localcurv_abs)
void getCollisionSampling (Real &dx, const Real x_curv)
void getNumberOfCollisionSegment (Real &dx, sofa::Size &numLines)
sofa::Size getTotalNumberOfBeams () const
Real getReleaseCurvAbs () const
 For coils: a part of the coil instrument can be brokenIn2 (by default the point of release is the end of the straight length).
void releaseWirePart ()

Public Attributes

Data< type::vector< sofa::Size > > d_density
Data< type::vector< Real > > d_keyPoints
MultiLink< WireRestShape< DataTypes >, BaseRodSectionMaterial< DataTypes >, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > l_sectionMaterials
 Vector or links to the Wire section material. The order of the linked material will define the WireShape structure.

Protected Member Functions

void initLengths ()
 Internal method to init Lengths vector.
bool initTopology ()
 Internal method to init Edge Topology.

Detailed Description

template<class DataTypes>
class beamadapter::WireRestShape< DataTypes >

Describe the shape functions on multiple segments.

Describe the full shape of a Wire with a given set of

See also
BaseRodSectionMaterial. The wire is discretized by a set of beams (given by the keyPoints and the relatives Beam density)
d_keyPoints and @d_density are computed by method
initLengths using the set of rod sections description. This component compute the beam discretization and the shape functions on multiple segments using curvilinear abscissa.

Member Function Documentation

◆ getBeamSectionAtX()

template<class DataTypes>
const BeamSection & getBeamSectionAtX ( const Real x_curv) const
nodiscard

Returns the BeamSection.

See also
m_beamSection corresponding to the given curvilinear abscissa, will call
BaseRodSectionMaterial::getBeamSection

◆ getInterpolationParametersAtX()

template<class DataTypes>
void getInterpolationParametersAtX ( const Real x_curv,
Real & _A,
Real & _Iy,
Real & _Iz,
Real & _Asy,
Real & _Asz,
Real & _J ) const

Returns the BeamSection data depending on the beam position at the given curvilinear abscissa, will call.

See also
BaseRodSectionMaterial::getInterpolationParameters

◆ getMechanicalParametersAtX()

template<class DataTypes>
void getMechanicalParametersAtX ( const Real x_curv,
Real & youngModulus,
Real & cPoisson,
Real & massDensity ) const

Returns the Young modulus, Poisson's ratio and massDensity coefficient of the section at the given curvilinear abscissa, will call.

See also
BaseRodSectionMaterial::getMechanicalParameters

◆ getSamplingParameters()

template<class DataTypes>
void getSamplingParameters ( type::vector< Real > & xP_noticeable,
type::vector< sofa::Size > & nbP_density ) const

This function provides a type::vector with the curviliar abscissa of the noticeable point(s) and the minimum density (number of points) between them. (Nb. nbP_density.size() == xP_noticeable.size() - 1)

◆ initLengths()

template<class DataTypes>
void initLengths ( )
protected

Internal method to init Lengths vector.

See also
d_keyPoints using the length of each materials
l_sectionMaterials.

◆ initTopology()

template<class DataTypes>
bool initTopology ( )
protected

Internal method to init Edge Topology.

See also
_topology using the list of materials
l_sectionMaterials. Returns false if init can't be performed.

fill topology :