AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
CableDamage.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxCable/export.h>
20
21#include <agxCable/Cable.h>
22#include <agxCable/Direction.h>
26
28
29
30namespace agxCable
31{
33
34
58 {
59 public:
65
75
84
94
104
114
121
128
135
142
149
156
157
158
165
172
173
189 void setThreshold(agxCable::Direction direction, agx::Real threshold);
190
191
201
211
212
222
223
224
230
236
242
248
254
260
261
268
274
280
286
292
298
304
305
311
317
318
325#ifndef SWIG
327#endif
329
336#ifndef SWIG
338#endif
340
347 size_t getNumDamages() const;
348
357 const agxCable::SegmentDamage& getCurrentDamageAt(size_t index) const;
358
368
376
383 const agxCable::Cable* getCable() const;
384
392
394
395 protected:
396 virtual ~CableDamage();
397
398 virtual void onAddNotification(agxSDK::LinkedStructure* linkedStructure) override;
399 virtual void onAddNotification(agxSDK::Simulation* simulation) override;
400 virtual void onPreStep() override;
401 virtual void onPostStep() override;
402
403 private:
404 CableDamage(const CableDamage&) = delete;
405 void operator=(const CableDamage&) = delete;
406
407 void recomputeCurrentDamages();
408
409 private:
412
415
416 agxCable::SegmentDamageVector m_currentDamages;
417 agxCable::SegmentDamageVector m_accumulatedDamages;
418 };
419}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXCABLE_EXPORT
The CableDamage class is used to estimate damage caused to a cable during a simulation.
Definition CableDamage.h:58
void setTwistRateWeight(agx::Real weight)
Set the weight to use for damage caused by twist rate.
const agxCable::Cable * getCable() const
Get the cable that this CableDamage is estimating damage for.
void setStretchDeformationWeight(agx::Real weight)
Set the weight to use for damage caused by stretch deformation.
agx::Real getNormalForceWeight()
void setFrictionForceWeight(agx::Real weight)
Set the weight to use for damage caused by friction forces from contacts.
agx::Real getTwistRateWeight()
CableDamage()
Create a new CableDamage instance.
const agxCable::SegmentDamage & getCurrentDamageAt(size_t index) const
Provides access to the last time step's damage contribution for a particular cable segment.
void setWeight(agxCable::DamageTypes::DamageType type, agx::Real weight)
Set the weight, or scaling, to use for the given damage source when summing it with all the other dam...
void setBendDeformationWeight(agx::Real weight)
Set the weight to use for damage caused by bend deformation.
virtual void onAddNotification(agxSDK::LinkedStructure *linkedStructure) override
Called when this component is added to a linked structure.
agxCable::Cable * getCable()
Get the cable that this CableDamage is estimating damage for.
void setNormalForceWeight(agx::Real weight)
Set the weight to use for damage caused by normal forces from contacts.
void setStretchThreshold(agx::Real threshold)
Set the stretch deformation threshold that must be surpassed before the stretch deformation begin to ...
void setTwistThreshold(agx::Real threshold)
Set the twist deformation threshold that must be surpassed before the twist deformation begin to cont...
void setStretchTensionWeight(agx::Real weight)
Set the weight to use for damage caused by stretch tension.
agx::Real getStretchDeformationWeight() const
agx::Real getStretchRateWeight()
const agxCable::SegmentDamageVector & getAccumulatedDamages() const
Provides access to the per-segment damage estimates that has been accumulated over the simulation so ...
agx::Real getThreshold(agxCable::Direction direction) const
agx::Real getTwistThreshold()
virtual void onPreStep() override
Called on simulation pre step event - after user preStep.
const agxCable::SegmentDamageVector & getCurrentDamages() const
Provides access to the per-segment damage estimate contributions that the last time step produced.
virtual void onAddNotification(agxSDK::Simulation *simulation) override
Called when addNotification is executed when this linked structure is added to the simulation.
void setTwistDeformationWeight(agx::Real weight)
Set the weight to use for damage caused by twist deformation.
void setBendTensionWeight(agx::Real weight)
Set the weight to use for damage caused by bend tension.
void setBendRateWeight(agx::Real weight)
Set the weight to use for damage caused by bend rate.
static agxCable::CableDamage * getCableDamage(agxCable::Cable *cable)
Find the CableDamage instances that estimate damage for the given cable.
void setTwistTensionWeight(agx::Real weight)
Set the weight to use for damage caused by twist tension.
agx::Real getStretchThreshold()
agx::Real getBendRateWeight()
agx::Real getTwistDeformationWeight() const
void setThreshold(agxCable::Direction direction, agx::Real threshold)
Set the deformation threshold for the given direction that must be surpassed before the deformation b...
agx::Real getStretchTensionWeight()
agx::Real getBendThreshold()
agx::Real getFrictionForceWeight()
agxCable::SegmentDamagePtrVector getAccumulatedDamagePtrs() const
size_t getNumDamages() const
May return zero until the cable for which damage is estimated has been fully initialized.
void setStretchRateWeight(agx::Real weight)
Set the weight to use for damage caused by stretch rate.
agx::Real getBendTensionWeight()
agxCable::SegmentDamagePtrVector getCurrentDamagePtrs() const
agx::Real getWeight(agxCable::DamageTypes::DamageType type) const
Get the weight, or scaling, used for the given damage source when summing it with all the other damag...
const agxCable::SegmentDamage & getAccumulatedDamageAt(size_t index) const
Provides access to the accumulated damage estimation for a particular cable segment.
void setBendThreshold(agx::Real threshold)
Set the bend deformation threshold that must be surpassed before the bend deformation begin to contri...
agx::Real getBendDeformationWeight() const
virtual void onPostStep() override
Called on simulation post step event - after user postStep.
agx::Real getTwistTensionWeight()
A model of a cable using a lumped elements model.
Definition Cable.h:44
A SegmentDamage instance records damages estimates computed for a single cable segment.
Base implementation of a component (e.g., specific functionality) in linked structures.
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Vector containing 'raw' data.
Definition agx/Vector.h:246
DamageType
Listing of all the cable damage sources that is used by the cable damage estimation model.
Contain classes for 6 DOF lumped element cables/wires/ropes.
Direction
The different directions in which a cable can be deformed.
Definition Direction.h:32
@ NUM_DIRECTIONS
Definition Direction.h:36
double Real
Definition Real.h:42