chrono::geometry::ChLineCam Class Reference

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>

Inheritance diagram for chrono::geometry::ChLineCam:
Collaboration diagram for chrono::geometry::ChLineCam:

Public Member Functions

 ChLineCam (const ChLineCam &source)
 
virtual ChLineCamClone () const override
 "Virtual" copy constructor (covariant return type).
 
virtual GeometryType GetClassType () const override
 Get the class type as unique numerical ID. More...
 
virtual bool Get_closed () const override
 Tell if the curve is closed.
 
virtual void Set_closed (bool mc) override
 
void Set_Phase (double mf)
 
double Get_Phase () const
 
void Set_Rb (double mrb)
 Base radius of cam.
 
double Get_Rb () const
 
void Set_Rr (double mrr)
 Radius of contact wheel.
 
double Get_Rr () const
 
void Set_motion_law (std::shared_ptr< ChFunction > mlaw)
 The motion law, as a ChFunction.
 
std::shared_ptr< ChFunctionGet_motion_law () const
 
void Set_type (eChCamType mt)
 Type of cam (see the eChCamType enum values below).
 
eChCamType Get_type () const
 
void Set_center (ChVector<> mc)
 position of center of cam in 3d space.
 
ChVector Get_center () const
 
void Set_Negative (bool val)
 If true, creates a negative cam.
 
bool Get_Negative () const
 
void Set_Internal (bool val)
 If true, creates an internal cam.
 
bool Get_Internal () const
 
void Set_rotating_follower (double mp, double md, double mb0)
 Sets the data for the rotating follower (length, distance from cam center, initial phase mb0)
 
double Get_p () const
 
double Get_d () const
 
double Get_b0 () const
 
void Set_sliding_eccentrical (double me)
 Sets the data for the sliding follower (if eccentric, with me eccentricity)
 
double Get_e () const
 
double Get_s () const
 
void Set_flat_oscillate (double me, double md, double mb0)
 Sets the data for the flat rotating follower (length, distance from cam center, initial phase mb0)
 
void EvaluateCamPoint (double par, ChVector<> &res, double &g, double &q) const
 Evaluate at once all important properties of cam, function of rotation 'par' (par in range 0..1, since 1 means 360�!): Gets point res, pressure angle g, curvature radius q.
 
virtual void Evaluate (ChVector<> &pos, const double parU) const override
 Curve evaluation. More...
 
double Get_weight (double par) const
 Weight evaluation. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de-serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::geometry::ChLine
 ChLine (const ChLine &source)
 
virtual void Derive (ChVector<> &dir, const double parU) const
 Evaluates a tangent versor, given parametric coordinate. More...
 
virtual int Get_complexity () const
 Tell the complexity.
 
virtual void Set_complexity (int mc)
 
virtual int GetManifoldDimension () const override
 This is a line.
 
bool FindNearestLinePoint (ChVector<> &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 ChVector GetEndA () const
 Return the start point of the line. More...
 
virtual ChVector GetEndB () const
 Return the end point of the line. More...
 
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). More...
 
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). More...
 
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
 
virtual bool DrawPostscript (ChFile_ps *mfle, int markpoints, int bezier_interpolate)
 Draw into the current graph viewport of a ChFile_ps file.
 
- Public Member Functions inherited from chrono::geometry::ChGeometry
 ChGeometry (const ChGeometry &source)
 
virtual void GetBoundingBox (ChVector<> &cmin, ChVector<> &cmax, const ChMatrix33<> &rot) const
 Compute bounding box along the directions defined by the given rotation matrix. More...
 
void InflateBoundingBox (ChVector<> &cmin, ChVector<> &cmax, const ChMatrix33<> &rot) 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 ChVector Baricenter () const
 Compute center of mass.
 
virtual void Update ()
 Generic update of internal data.
 

Additional Inherited Members

- Public Types inherited from chrono::geometry::ChGeometry
enum  GeometryType {
  NONE, SPHERE, BOX, CYLINDER,
  TRIANGLE, CAPSULE, CONE, LINE,
  LINE_ARC, LINE_BEZIER, LINE_CAM, LINE_PATH,
  LINE_POLY, LINE_SEGMENT, ROUNDED_BOX, ROUNDED_CYLINDER,
  ROUNDED_CONE, TRIANGLEMESH, TRIANGLEMESH_CONNECTED, TRIANGLEMESH_SOUP
}
 Enumeration of geometric objects.
 
- Protected Attributes inherited from chrono::geometry::ChLine
bool closed
 
int complexityU
 

Member Function Documentation

◆ Evaluate()

void chrono::geometry::ChLineCam::Evaluate ( ChVector<> &  pos,
const double  parU 
) const
overridevirtual

Curve evaluation.

Given a parameter "u", finds position on line of the kind p=p(u); note that u is in the range 0...1, to make a complete cycle along the cam

Implements chrono::geometry::ChLine.

◆ Get_weight()

double chrono::geometry::ChLineCam::Get_weight ( double  par) const
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)

◆ GetClassType()

virtual GeometryType chrono::geometry::ChLineCam::GetClassType ( ) const
inlineoverridevirtual

Get the class type as unique numerical ID.

Each inherited class must return an unique ID.

Reimplemented from chrono::geometry::ChLine.


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