1#ifndef SimTK_SIMBODY_CABLE_SPAN_H_
2#define SimTK_SIMBODY_CABLE_SPAN_H_
122class MultibodySystem;
124class CableSubsystemTestHelper;
213 const
Vec3& originStation,
215 const
Vec3& terminationStation);
247 const
Vec3& contactPointHint_S);
250 int getNumObstacles() const;
258 const
Vec3& station_B);
261 int getNumViaPoints() const;
291 void setOriginStation(const
Vec3& originStation);
294 Vec3 getTerminationStation() const;
297 void setTerminationStation(const
Vec3& terminationStation);
320 void calcOriginUnitForce(
340 void calcTerminationUnitForce(
360 void setObstacleMobilizedBodyIndex(
377 void setObstacleTransformSurfaceToBody(
390 void setObstacleContactGeometry(
408 void setObstacleContactPointHint(
410 Vec3 contactPointHint_S);
428 void setViaPointMobilizedBodyIndex(
440 void setViaPointStation(
442 const
Vec3& station_B);
453 Real getCurveSegmentAccuracy() const;
459 void setCurveSegmentAccuracy(
Real accuracy);
463 int getSolverMaxIterations() const;
467 void setSolverMaxIterations(
int maxIterations);
475 int getNumSolverIterations(const
State& state) const;
483 Real getSmoothnessTolerance() const;
488 void setSmoothnessTolerance(
Real tolerance);
506 bool getUseWarmStart() const;
513 void setUseWarmStart(
bool useWarmStart);
538 void applyBodyForces(
555 void calcDecorativePathPoints(
557 const std::function<
void(
Vec3 point_G)>& sink) const;
574 void calcResampledDecorativePathPoints(
576 int numCurveSegmentSamples,
577 const std::function<
void(
Vec3 point_G)>& sink) const;
625 Real calcCurveSegmentArcLength(
650 void calcCurveSegmentResampledPoints(
654 const std::function<
void(
Vec3 point_G)>& sink) const;
663 void calcCurveSegmentUnitForce(
689 void calcViaPointUnitForce(
719 const Impl& getImpl()
const
729 std::shared_ptr<Impl> m_impl;
731 friend CableSubsystem;
734 friend CableSubsystemTestHelper;
770 const Impl& getImpl()
const;
773 friend CableSubsystemTestHelper;
812 CableSubsystemTestHelper();
813 ~CableSubsystemTestHelper() noexcept;
814 CableSubsystemTestHelper(const CableSubsystemTestHelper&);
815 CableSubsystemTestHelper& operator=(const CableSubsystemTestHelper&);
816 CableSubsystemTestHelper(CableSubsystemTestHelper&&) noexcept;
817 CableSubsystemTestHelper& operator=(CableSubsystemTestHelper&&) noexcept;
826 void testCurrentPath(
829 std::ostream& testReport) const;
834 std::unique_ptr<Impl> m_impl;
This defines the MobilizedBody class, which associates a new body (the "child", "outboard",...
#define SimTK_DEFINE_UNIQUE_INDEX_TYPE(NAME)
Use this macro to define a unique "Index" type which is just a type-safe non-negative int,...
Definition SimTKcommon/include/SimTKcommon/internal/common.h:445
#define SimTK_PIMPL_DOWNCAST(Derived, Parent)
Similar to the above but for private implementation abstract classes, that is, abstract class hierarc...
Definition SimTKcommon/include/SimTKcommon/internal/common.h:613
Every Simbody header and source file should include this header before any other Simbody header.
#define SimTK_SIMBODY_EXPORT
Definition Simbody/include/simbody/internal/common.h:68
This is a unique integer type for quickly identifying specific cables for fast lookup purposes.
This is a unique integer type for identifying obstacles within a particular CableSpan.
This is a unique integer type for identifying via points within a particular CableSpan.
This class represents the path of a frictionless cable from an origin point fixed to a body,...
Definition CableSpan.h:182
CableSpan()
Construct a new cable that can be configured later.
~CableSpan() noexcept=default
Delete the cable if this handle was the last reference to it.
This subsystem manages cables spanning between two points in a system.
Definition CableSpan.h:747
const MultibodySystem & getMultibodySystem() const
int getNumCables() const
Get the number of cables being managed by this subsystem.
const CableSpan & getCable(CableSpanIndex ix) const
Get const access to a particular cable.
CableSpan & updCable(CableSpanIndex ix)
Get writeable access to a particular cable.
CableSubsystem(MultibodySystem &)
This is for arrays indexed by mobilized body number within a subsystem (typically the SimbodyMatterSu...
The job of the MultibodySystem class is to coordinate the activities of various subsystems which can ...
Definition MultibodySystem.h:48
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition State.h:280
A Subsystem is expected to be part of a larger System and to have interdependencies with other subsys...
Definition Subsystem.h:55
This is the vector class intended to appear in user code for large, variable size column vectors.
Definition Vector_.h:52
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition Assembler.h:37
CableSpanAlgorithm
These are the different solver options for computing the optimal path of a CableSpan.
Definition CableSpan.h:49
@ Scholz2015
This is the original algorithm as described in:
@ MinimumLength
The Minimal length algorithm finds the optimal path by minimizing the total cable length directly,...
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition SimTKcommon/include/SimTKcommon/internal/common.h:626