Description
Base class to represent the geometric 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 | TypeFollower { TypeFollower::TRANSLATING_INLINE, TypeFollower::TRANSLATING_OFFSET, TypeFollower::TRANSLATING_FLAT, TypeFollower::OSCILLATING_ROLLER, TypeFollower::OSCILLATING_FLAT } |
| Follower types. More... | |
Public Types inherited from chrono::ChGeometry | |
| enum | 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 Type | GetType () const override |
| Get the line class type as an enum. | |
| virtual void | SetClosed (bool state) override |
| Assume the cam as closed by definition. | |
| virtual bool | IsClosed () const override |
| Get if the curve is closed. | |
| TypeFollower | GetFollowerType () const |
| Get follower type. | |
| void | SetOrigin (const ChVector2d &pt) |
| Set position of cam origin in XY plane. | |
| const ChVector2d & | GetOrigin () const |
| Get position of cam origin in XY plane. | |
| double | GetBaseRadius () const |
| Get cam base radius. More... | |
| void | SetPhase (double ang) |
| Set cam phase in [0, 2PI]. | |
| double | GetPhase () const |
| Get cam phase in [0, 2PI]. | |
| void | SetMotionLaw (std::shared_ptr< ChFunction > motion_law) |
| Set motion law produced by cam, as function of angle in [0, 2PI]. | |
| std::shared_ptr< ChFunction > | GetMotionLaw () const |
| Get motion law produced by cam, as function of angle in [0, 2PI]. | |
| void | SetNegative (bool val) |
| If true, create a negative cam. | |
| bool | IsNegative () const |
| Check if the cam is negative (true) or not (false). | |
| void | SetInternal (bool val) |
| If true, create an internal cam. | |
| bool | IsInternal () const |
| Check if cam is internal (true) or not (false). | |
| virtual ChVector3d | Evaluate (double U) const override |
| Return a point on cam profile corresponding to parametric coordinate U in [0, 1]. | |
| virtual ChVector3d | EvaluateCam (double U, double &theta, double &rho) const =0 |
| Return a point on cam profile corresponding to parametric coordinate U in [0, 1]. More... | |
| double | GetWeight (double U) const |
| Weight evaluation at U in [0, 1]. More... | |
| 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. | |
Public Member Functions inherited from chrono::ChLine | |
| ChLine (const ChLine &source) | |
| virtual ChVector3d | GetTangent (double parU) const |
| Return the tangent unit vector at the parametric coordinate U (in [0,1]). More... | |
| virtual int | GetComplexity () const |
| Get the complexity. | |
| virtual void | SetComplexity (int mc) |
| virtual int | GetManifoldDimension () const override |
| Return dimensionality of this object. More... | |
| bool | FindNearestLinePoint (const 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. More... | |
| virtual ChVector3d | GetEndB () const |
| Return the end point of the line. More... | |
| double | CurveCurveDist (const ChLine *compline, int samples) const |
| Return adimensional information on "how much" this curve is similar to another in its overall shape. More... | |
| double | CurveSegmentDist (const 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). More... | |
| double | CurveCurveDistMax (const 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 (const ChLine *complinesegm, int samples) const |
Public Member Functions inherited from chrono::ChGeometry | |
| ChGeometry (const ChGeometry &other) | |
| virtual ChGeometry * | Clone () const =0 |
| "Virtual" copy constructor. | |
| virtual ChAABB | GetBoundingBox () const |
| Compute bounding box along the directions of the shape definition frame. More... | |
| 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. More... | |
| virtual ChVector3d | Barycenter () const |
| Compute center of mass. | |
| virtual void | Update () |
| Generic update of internal data. | |
Protected Member Functions | |
| ChVector3d | CalcProfilePoint (double r, double phi) const |
Protected Attributes | |
| TypeFollower | type = TypeFollower::TRANSLATING_INLINE |
| type of cam | |
| ChVector2d | origin |
| cam origin in XY plane | |
| std::shared_ptr< ChFunction > | motlaw |
| follower motion law as function of angle in [0, 2PI] | |
| double | phase = 0 |
| cam phase (rotation) in [0, 2PI]; default=0, neutral position | |
| double | Rb = 0 |
| cam base radius | |
| bool | negative = false |
| negative cam: for desmodromic applications (cam is also Y or X mirrored, depending on type) | |
| bool | internal = false |
| follower roller is inside the cam | |
Protected Attributes inherited from chrono::ChLine | |
| bool | closed |
| int | complexityU |
Member Enumeration Documentation
◆ TypeFollower
|
strong |
Follower types.
Member Function Documentation
◆ EvaluateCam()
|
pure virtual |
Return a point on cam profile corresponding to parametric coordinate U in [0, 1].
Additionally return pressure angle theta and curvature radius rho in U.
Implemented in chrono::ChLineCamOscillatingFlat, chrono::ChLineCamOscillatingRoller, chrono::ChLineCamTranslatingFlat, chrono::ChLineCamTranslatingOffset, and chrono::ChLineCamTranslatingInline.
◆ GetBaseRadius()
|
inline |
Get cam base radius.
User-defined for the TRANSLATING_INLINE, TRANSLATING_OFFSET, and TRANSLATING_FLAT cases. Autocomputed for OSCILLATING_ROLLER and OSCILLATING_FLAT cases during initialize.
◆ GetWeight()
|
inline |
Weight evaluation at U in [0, 1].
Given that the shape is defined by a ChFunction, the returned weight is the weight of the function (ChFunctionSequence can have different 'weight' values depending on the function segment).
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/geometry/ChLineCam.h
- /builds/uwsbel/chrono/src/chrono/geometry/ChLineCam.cpp
Public Types inherited from