Description
Geometric object describing the profile of a cam.
The shape of a cam is specified through a ChFunction which defines the motion law of the follower.
#include <ChLineCam.h>


Public Types | |
enum class | CamType { SLIDEFOLLOWER , ROTATEFOLLOWER , ECCENTRICFOLLOWER , FLAT , FLATOSCILLATE } |
Cam types. | |
![]() | |
enum class | Type { NONE , SPHERE , ELLIPSOID , BOX , CYLINDER , TRIANGLE , CAPSULE , CONE , LINE , LINE_ARC , LINE_BEZIER , LINE_CAM , LINE_PATH , LINE_POLY , LINE_SEGMENT , ROUNDED_BOX , ROUNDED_CYLINDER , TRIANGLEMESH , TRIANGLEMESH_CONNECTED , TRIANGLEMESH_SOUP } |
Enumeration of geometric object types. | |
Public Member Functions | |
ChLineCam (const ChLineCam &source) | |
virtual ChLineCam * | Clone () const override |
"Virtual" copy constructor (covariant return type). | |
virtual Type | GetType () const override |
Get the class type as an enum. | |
void | SetCamType (CamType t) |
Set the cam type. | |
CamType | GetCamType () const |
Get the cam type. | |
virtual void | SetClosed (bool closed) override |
virtual bool | IsClosed () const override |
Tell if the curve is closed. | |
void | SetPhase (double f) |
double | GetPhase () const |
void | SetCamRadius (double r) |
Base radius of cam. | |
double | GetCamRadius () const |
void | SetWheelRadius (double r) |
Radius of contact wheel. | |
double | GetWheelRadius () const |
void | SetMotionLaw (std::shared_ptr< ChFunction > motion_law) |
The motion law, as a ChFunction. | |
std::shared_ptr< ChFunction > | GetMotionLaw () const |
void | SetCenter (ChVector3d mc) |
Position of center of cam in 3d space. | |
ChVector3d | GetCenter () const |
void | SetNegative (bool val) |
If true, create a negative cam. | |
bool | IsNegative () const |
void | SetInternal (bool val) |
If true, creates an internal cam. | |
bool | IsInternal () const |
void | SetRotatingFollower (double mp, double md, double mb0) |
Sets the data for the rotating follower (length, distance from cam center, initial phase mb0) | |
double | GetVal () const |
double | GetFollowerDistance () const |
double | GetFollowerInitPhase () const |
void | SetSlidingEccentrical (double me) |
Sets the data for the sliding follower (if eccentric, with me eccentricity) | |
void | SetFlatOscillate (double me, double md, double mb0) |
Sets the data for the flat rotating follower (length, distance from cam center, initial phase mb0) | |
ChVector3d | EvaluateCamPoint (double par, double &g, double &q) const |
Evaluate at once all important properties of cam, function of rotation 'par' (par in range 0..1, with 1 corresponding to 360 degrees): Also returns the pressure angle g and curvature radius q. | |
virtual ChVector3d | Evaluate (double U) const override |
Return a point on the line, given parametric coordinate U (in [0,1]). | |
double | GetWeight (double par) const |
Weight evaluation. | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) override |
Method to allow de-serialization of transient data from archives. | |
![]() | |
ChLine (const ChLine &source) | |
virtual ChVector3d | GetTangent (double parU) const |
Return the tangent unit vector at the parametric coordinate U (in [0,1]). | |
virtual int | GetComplexity () const |
Tell the complexity. | |
virtual void | SetComplexity (int mc) |
virtual int | GetManifoldDimension () const override |
This is a line. | |
bool | FindNearestLinePoint (ChVector3d &point, double &resU, double approxU, double tol) const |
Find the parameter resU for the nearest point on curve to "point". | |
virtual double | Length (int sampling) const |
Returns curve length. Typical sampling 1..5 (1 already gives correct result with degree1 curves) | |
virtual ChVector3d | GetEndA () const |
Return the start point of the line. | |
virtual ChVector3d | GetEndB () const |
Return the end point of the line. | |
double | CurveCurveDist (ChLine *compline, int samples) const |
Returns adimensional information on "how much" this curve is similar to another in its overall shape (does not matter parametrization or start point). | |
double | CurveSegmentDist (ChLine *complinesegm, int samples) const |
Same as before, but returns "how near" is complinesegm to whatever segment of this line (does not matter the percentual of line). | |
double | CurveCurveDistMax (ChLine *compline, int samples) const |
Same as above, but instead of making average of the distances, these functions return the maximum of the distances... | |
double | CurveSegmentDistMax (ChLine *complinesegm, int samples) const |
![]() | |
ChGeometry (const ChGeometry &other) | |
virtual ChAABB | GetBoundingBox () const |
Compute bounding box along the directions of the shape definition frame. | |
void | InflateBoundingBox (ChAABB &bbox) const |
Enlarge the given existing bounding box with the bounding box of this object. | |
virtual double | GetBoundingSphereRadius () const |
Returns the radius of a bounding sphere for this geometry. | |
virtual ChVector3d | Baricenter () const |
Compute center of mass. | |
virtual void | Update () |
Generic update of internal data. | |
Additional Inherited Members | |
![]() | |
bool | closed |
int | complexityU |
Member Function Documentation
◆ ArchiveIn()
|
overridevirtual |
Method to allow de-serialization of transient data from archives.
Reimplemented from chrono::ChLine.
◆ ArchiveOut()
|
overridevirtual |
Method to allow serialization of transient data to archives.
Reimplemented from chrono::ChLine.
◆ Clone()
|
inlineoverridevirtual |
"Virtual" copy constructor (covariant return type).
Implements chrono::ChGeometry.
◆ Evaluate()
|
overridevirtual |
Return a point on the line, given parametric coordinate U (in [0,1]).
Implements chrono::ChLine.
◆ GetType()
|
inlineoverridevirtual |
Get the class type as an enum.
Reimplemented from chrono::ChLine.
◆ GetWeight()
|
inline |
Weight evaluation.
Given that the shape is defined by a Ch_function, the returned weight is the weight of the function (Ch_function_sequence can have different 'weight' values depending on the function segment)
◆ IsClosed()
|
inlineoverridevirtual |
Tell if the curve is closed.
Reimplemented from chrono::ChLine.
◆ SetClosed()
|
inlineoverridevirtual |
Reimplemented from chrono::ChLine.
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono/geometry/ChLineCam.h
- C:/M/B/src/chrono-9.0.1/src/chrono/geometry/ChLineCam.cpp