20 #ifndef NURBSCURVE1S_H_
21 #define NURBSCURVE1S_H_
24 #include "mbsim/mbsim_event.h"
25 #include "mbsim/contours/contour1s.h"
28 #define MY_PACKAGE_BUGREPORT PACKAGE_BUGREPORT
29 #define MY_PACKAGE_NAME PACKAGE_NAME
30 #define MY_PACKAGE_VERSION PACKAGE_VERSION
31 #define MY_PACKAGE_TARNAME PACKAGE_TARNAME
32 #define MY_PACKAGE_STRING PACKAGE_STRING
33 #undef PACKAGE_BUGREPORT
35 #undef PACKAGE_VERSION
36 #undef PACKAGE_TARNAME
39 #undef PACKAGE_BUGREPORT
41 #undef PACKAGE_VERSION
42 #undef PACKAGE_TARNAME
45 #undef PACKAGE_BUGREPORT
47 #undef PACKAGE_VERSION
48 #undef PACKAGE_TARNAME
51 #define PACKAGE_BUGREPORT MY_PACKAGE_BUGREPORT
52 #define PACKAGE_NAME MY_PACKAGE_NAME
53 #define PACKAGE_VERSION MY_PACKAGE_VERSION
54 #define PACKAGE_TARNAME MY_PACKAGE_TARNAME
55 #define PACKAGE_STRING MY_PACKAGE_STRING
58 namespace MBSimFlexibleBody {
80 virtual std::string getType()
const {
return "NurbsCurve1s"; }
84 virtual void computeRootFunctionPosition(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsCurve1s::computeRootFunctionPosition): Not implemented!"); }
85 virtual void computeRootFunctionFirstTangent(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsCurve1s::computeRootFunctionFirstTangent): Not implemented!"); }
86 virtual void computeRootFunctionNormal(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsCurve1s::computeRootFunctionNormal): Not implemented!"); }
87 virtual void computeRootFunctionSecondTangent(MBSim::ContourPointData &cp) {
throw MBSim::MBSimError(
"ERROR(NurbsCurve1s::computeRootFunctionSecondTangent): Not implemented!"); }
91 virtual void updateKinematicsForFrame(MBSim::ContourPointData &cp, MBSim::FrameFeature ff);
92 virtual void updateJacobiansForFrame(MBSim::ContourPointData &cp,
int j=0);
93 virtual MBSim::ContactKinematics *findContactPairingWith(std::string type0, std::string type1) {
throw MBSim::MBSimError(
"ERROR(NurbsCurve1s::findContactPairingWith): Not implemented!"); }
98 void setNormalRotationGrid(fmatvec::Vec normal_) { normalRotationGrid.x() = normal_(0), normalRotationGrid.y() = normal_(1),normalRotationGrid.z() = normal_(2); }
107 void initContourFromBody(MBSim::InitStage stage);
116 void computeUVector(
const int NbPts);
123 void computeCurveTranslations();
130 void computeCurveVelocities();
137 void computeCurveAngularVelocities();
144 void computeCurveJacobians();
177 PlNurbsCurved *curveTranslations;
182 PlNurbsCurved *curveVelocities;
187 PlNurbsCurved *curveAngularVelocities;
192 PLib::Point3Dd normalRotationGrid;
197 std::vector<MBSim::ContourPointData> jacobiansTrans;
202 std::vector<MBSim::ContourPointData> jacobiansRot;
207 std::vector<PlNurbsCurved> CurveJacobiansOfTranslation;
212 std::vector<PlNurbsCurved> CurveJacobiansOfRotation;
217 PLib::Vector<double> *uvec;
218 PLib::Vector<double> *uVec;