All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bevel_gear.h
1 /* Copyright (C) 2004-2019 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef BEVELGEAR_H_
21 #define BEVELGEAR_H_
22 
23 #include "mbsim/contours/rigid_contour.h"
24 #include "mbsim/utils/boost_parameters.h"
25 #include <mbsim/utils/openmbv_utils.h>
26 #include <openmbvcppinterface/bevelgear.h>
27 
28 namespace MBSim {
29 
34  class BevelGear : public RigidContour {
35  public:
36 
37  BevelGear(const std::string& name="", Frame *R=nullptr) : RigidContour(name,R) { }
38 
42  ~BevelGear() override = default;
43 
44  /* INHERITED INTERFACE OF ELEMENT */
45  void init(InitStage stage, const InitConfigSet &config) override;
46  /***************************************************/
47 
48  /* GETTER / SETTER */
49  void setNumberOfTeeth(int N_) { N = N_; }
50  int getNumberOfTeeth() { return N; }
51  void setWidth(double w_) { w = w_; }
52  double getWidth() { return w; }
53  void setHelixAngle(double be_) { be = be_; }
54  double getHelixAngle() { return be; }
55  void setPitchAngle(double ga_) { ga = ga_; }
56  double getPitchAngle() { return ga; }
57  void setModule(double m_) { m = m_; }
58  double getModule() { return m; }
59  void setPressureAngle(double al_) { al = al_; }
60  double getPressureAngle() { return al; }
61  void setBacklash(double b_) { b = b_; }
62  double getBacklash() { return b; }
63  /***************************************************/
64 
65  BOOST_PARAMETER_MEMBER_FUNCTION( (void), enableOpenMBV, tag, (optional (diffuseColor,(const fmatvec::Vec3&),"[-1;1;1]")(transparency,(double),0)(pointSize,(double),0)(lineWidth,(double),0))) {
66  OpenMBVColoredBody ombv(diffuseColor,transparency,pointSize,lineWidth);
67  openMBVRigidBody=ombv.createOpenMBV<OpenMBV::BevelGear>();
68  }
69 
70  void initializeUsingXML(xercesc::DOMElement *element) override;
71 
72  protected:
73  int N{15};
74  double w{5e-2};
75  double be{0};
76  double ga{0};
77  double m{16e-3};
78  double al{0.349065850398866};
79  double b{0};
80  };
81 
82 }
83 
84 #endif
basic class for rigid contours
Definition: rigid_contour.h:37
~BevelGear() override=default
destructor
bevel gear contour
Definition: bevel_gear.h:34
RigidContour(const std::string &name, Frame *R_=nullptr)
constructor
Definition: rigid_contour.h:43
Definition: openmbv_utils.h:49
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:235
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: bevel_gear.cc:33
Frame * R
coordinate system of contour
Definition: rigid_contour.h:130

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Home