20#ifndef CYLINDRICAL_GEAR_H_
21#define CYLINDRICAL_GEAR_H_
23#include "mbsim/contours/rigid_contour.h"
24#include "mbsim/utils/boost_parameters.h"
25#include "mbsim/utils/openmbv_utils.h"
26#include <openmbvcppinterface/cylindricalgear.h>
45 void init(
InitStage stage,
const InitConfigSet &config)
override;
49 fmatvec::Vec3 evalKrPS(
const fmatvec::Vec2 &zeta)
override;
50 fmatvec::Vec3 evalKs(
const fmatvec::Vec2 &zeta)
override;
51 fmatvec::Vec3 evalKt(
const fmatvec::Vec2 &zeta)
override;
52 fmatvec::Vec3 evalParDer1Ks(
const fmatvec::Vec2 &zeta)
override;
53 fmatvec::Vec3 evalParDer2Ks(
const fmatvec::Vec2 &zeta)
override;
54 fmatvec::Vec3 evalParDer1Kt(
const fmatvec::Vec2 &zeta)
override;
55 fmatvec::Vec3 evalParDer2Kt(
const fmatvec::Vec2 &zeta)
override;
59 void setNumberOfTeeth(
int N_) { N = N_; }
60 int getNumberOfTeeth() {
return N; }
61 void setWidth(
double w_) { w = w_; }
62 double getWidth() {
return w; }
63 void setHelixAngle(
double be_) { be = be_; }
64 double getHelixAngle() {
return be; }
65 void setModule(
double m_) { m = m_; }
66 double getModule() {
return m; }
67 void setPressureAngle(
double al_) { al = al_; }
68 double getPressureAngle() {
return al; }
69 void setBacklash(
double b_) { b = b_; }
70 double getBacklash() {
return b; }
71 void setExternalToothed(
bool ext_=
true) { ext = ext_; }
72 double getOutsideRadius()
const {
return R; }
73 void setOutsideRadius(
double R_) { R = R_; }
74 bool getExternalToothed()
const {
return ext; }
75 void setFlank(
int flank) { signi = flank; }
76 void setTooth(
int tooth) { k = tooth; }
77 double getEtaMax(
double r,
double s);
78 double getPhiMaxHigh(
int i) {
return phiHigh[i]; }
79 double getPhiMaxLow(
int i) {
return phiLow[i]; }
80 double getPhiMinHigh(
int i) {
return -phiHigh[not i]; }
81 double getPhiMinLow(
int i) {
return -phiLow[not i]; }
82 double getSPhiMaxHigh(
int i) {
return sPhiHigh; }
83 double getSPhiMinHigh(
int i) {
return -sPhiHigh; }
86 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBV, tag, (optional (diffuseColor,(
const fmatvec::Vec3&),fmatvec::Vec3(std::vector<double>{-1,1,1}))(transparency,(
double),0)(pointSize,(
double),0)(lineWidth,(
double),0))) {
87 OpenMBVColoredBody ombv(diffuseColor,transparency,pointSize,lineWidth);
91 void initializeUsingXML(xercesc::DOMElement *element)
override;
98 double al{0.349065850398866};
108 double phiHigh[2], phiLow[2], sPhiHigh;
cylindrical gear contour
Definition: cylindrical_gear.h:34
~CylindricalGear() override=default
destructor
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: cylindrical_gear.cc:122
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:260
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
basic class for rigid contours
Definition: rigid_contour.h:37
RigidContour(const std::string &name, Frame *R_=nullptr)
constructor
Definition: rigid_contour.h:43
namespace MBSim
Definition: bilateral_constraint.cc:30