CompoundJoints debugged
This commit is contained in:
@@ -718,6 +718,7 @@ void MbD::ASMTAssembly::readAnimationParameters(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readTimeSeries(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
assert(lines[0] == "TimeSeries");
|
||||
lines.erase(lines.begin());
|
||||
assert(lines[0].find("Number\tInput") != std::string::npos);
|
||||
@@ -727,6 +728,7 @@ void MbD::ASMTAssembly::readTimeSeries(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readTimes(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
std::string str = lines[0];
|
||||
std::string substr = "Time\tInput";
|
||||
auto pos = str.find(substr);
|
||||
@@ -739,6 +741,7 @@ void MbD::ASMTAssembly::readTimes(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readPartSeriesMany(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
assert(lines[0].find("PartSeries") != std::string::npos);
|
||||
auto it = std::find_if(lines.begin(), lines.end(), [](const std::string& s) {
|
||||
return s.find("JointSeries") != std::string::npos;
|
||||
@@ -752,6 +755,7 @@ void MbD::ASMTAssembly::readPartSeriesMany(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readJointSeriesMany(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
assert(lines[0].find("JointSeries") != std::string::npos);
|
||||
auto it = std::find_if(lines.begin(), lines.end(), [](const std::string& s) {
|
||||
return s.find("MotionSeries") != std::string::npos;
|
||||
@@ -765,6 +769,7 @@ void MbD::ASMTAssembly::readJointSeriesMany(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readAssemblySeries(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
std::string str = lines[0];
|
||||
std::string substr = "AssemblySeries";
|
||||
auto pos = str.find(substr);
|
||||
@@ -796,6 +801,7 @@ void MbD::ASMTAssembly::readAssemblySeries(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readPartSeries(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
std::string str = lines[0];
|
||||
std::string substr = "PartSeries";
|
||||
auto pos = str.find(substr);
|
||||
@@ -811,6 +817,7 @@ void MbD::ASMTAssembly::readPartSeries(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readJointSeries(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
std::string str = lines[0];
|
||||
std::string substr = "JointSeries";
|
||||
auto pos = str.find(substr);
|
||||
@@ -834,6 +841,7 @@ void MbD::ASMTAssembly::readMotionSeriesMany(std::vector<std::string>& lines)
|
||||
|
||||
void MbD::ASMTAssembly::readMotionSeries(std::vector<std::string>& lines)
|
||||
{
|
||||
if (lines.empty()) return;
|
||||
std::string str = lines[0];
|
||||
std::string substr = "MotionSeries";
|
||||
auto pos = str.find(substr);
|
||||
|
||||
@@ -333,7 +333,7 @@ void MbD::ASMTSpatialContainer::updateFromMbD()
|
||||
auto mbdPart = std::static_pointer_cast<Part>(mbdObject);
|
||||
auto rOcmO = mbdPart->qX()->times(mbdUnts->length);
|
||||
auto aAOp = mbdPart->aAOp();
|
||||
std::cout << "aAOp" << *aAOp << std::endl;
|
||||
//std::cout << "aAOp" << *aAOp << std::endl;
|
||||
auto vOcmO = mbdPart->qXdot()->times(mbdUnts->velocity);
|
||||
auto omeOPO = mbdPart->omeOpO()->times(mbdUnts->omega);
|
||||
omega3D = omeOPO;
|
||||
@@ -356,7 +356,7 @@ void MbD::ASMTSpatialContainer::updateFromMbD()
|
||||
bryxs->push_back(bryantAngles->at(0));
|
||||
bryys->push_back(bryantAngles->at(1));
|
||||
bryzs->push_back(bryantAngles->at(2));
|
||||
std::cout << "bry " << *bryantAngles << std::endl;
|
||||
//std::cout << "bry " << *bryantAngles << std::endl;
|
||||
vxs->push_back(vOPO->at(0));
|
||||
vys->push_back(vOPO->at(1));
|
||||
vzs->push_back(vOPO->at(2));
|
||||
|
||||
@@ -21,7 +21,10 @@ std::shared_ptr<ConstVelConstraintIJ> MbD::ConstVelConstraintIJ::With(EndFrmsptr
|
||||
{
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
return std::make_shared<ConstVelConstraintIqcJqc>(frmi, frmj);
|
||||
auto constVelCon = std::make_shared<ConstVelConstraintIqcJqc>(frmi, frmj);
|
||||
constVelCon->initA01IeJe();
|
||||
constVelCon->initA10IeJe();
|
||||
return constVelCon;
|
||||
}
|
||||
|
||||
void ConstVelConstraintIJ::calcPostDynCorrectorIteration()
|
||||
|
||||
@@ -21,17 +21,17 @@ MbD::ConstantVelocityJoint::ConstantVelocityJoint()
|
||||
MbD::ConstantVelocityJoint::ConstantVelocityJoint(const char* str) : AtPointJoint(str)
|
||||
{
|
||||
}
|
||||
|
||||
void MbD::ConstantVelocityJoint::initializeLocally()
|
||||
{
|
||||
if (!constraints->empty())
|
||||
{
|
||||
auto constraint = std::static_pointer_cast<ConstVelConstraintIJ>(constraints->back());
|
||||
constraint->initA01IeJe();
|
||||
constraint->initA10IeJe();
|
||||
}
|
||||
Joint::initializeLocally();
|
||||
}
|
||||
//
|
||||
//void MbD::ConstantVelocityJoint::initializeLocally()
|
||||
//{
|
||||
// if (!constraints->empty())
|
||||
// {
|
||||
// auto constraint = std::static_pointer_cast<ConstVelConstraintIJ>(constraints->back());
|
||||
// constraint->initA01IeJe();
|
||||
// constraint->initA10IeJe();
|
||||
// }
|
||||
// Joint::initializeLocally();
|
||||
//}
|
||||
|
||||
void MbD::ConstantVelocityJoint::initializeGlobally()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MbD {
|
||||
public:
|
||||
ConstantVelocityJoint();
|
||||
ConstantVelocityJoint(const char* str);
|
||||
void initializeLocally() override;
|
||||
//void initializeLocally() override;
|
||||
void initializeGlobally() override;
|
||||
void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ) override;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void MbD::CylSphJoint::initializeGlobally()
|
||||
{
|
||||
if (constraints->empty())
|
||||
{
|
||||
auto distxyIJ = CREATE<DistancexyConstraintIJ>::With(frmI, frmJ);
|
||||
auto distxyIJ = DistancexyConstraintIJ::With(frmI, frmJ);
|
||||
distxyIJ->setConstant(distanceIJ);
|
||||
addConstraint(distxyIJ);
|
||||
this->root()->hasChanged = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ void MbD::DistIeqcJec::calcPrivate()
|
||||
if (rIeJe == 0.0) return;
|
||||
auto frmIeqc = std::static_pointer_cast<EndFrameqc>(frmI);
|
||||
auto& mprIeJeOpEI = frmIeqc->prOeOpE;
|
||||
auto mprIeJeOpEIT = mprIeJeOpEI->transpose();
|
||||
mprIeJeOpEIT = mprIeJeOpEI->transpose();
|
||||
auto& mpprIeJeOpEIpEI = frmIeqc->pprOeOpEpE;
|
||||
auto muIeJeOT = muIeJeO->transpose();
|
||||
prIeJepXI = muIeJeOT;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "DistanceConstraintIJ.h"
|
||||
#include "DistanceConstraintIqcJqc.h"
|
||||
#include "EndFrameqc.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
@@ -14,6 +16,15 @@ MbD::DistanceConstraintIJ::DistanceConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<DistanceConstraintIJ> MbD::DistanceConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
||||
{
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
auto distCon = std::make_shared<DistanceConstraintIqcJqc>(frmi, frmj);
|
||||
distCon->init_distIeJe();
|
||||
return distCon;
|
||||
}
|
||||
|
||||
void MbD::DistanceConstraintIJ::calcPostDynCorrectorIteration()
|
||||
{
|
||||
aG = distIeJe->value() - aConstant;
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace MbD {
|
||||
public:
|
||||
DistanceConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj);
|
||||
|
||||
static std::shared_ptr<DistanceConstraintIJ> With(EndFrmsptr frmi, EndFrmsptr frmj);
|
||||
|
||||
void calcPostDynCorrectorIteration() override;
|
||||
virtual void init_distIeJe();
|
||||
void initialize() override;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "DistancexyConstraintIJ.h"
|
||||
#include "DistancexyConstraintIqcJqc.h"
|
||||
#include "EndFrameqc.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
@@ -14,6 +16,15 @@ MbD::DistancexyConstraintIJ::DistancexyConstraintIJ(EndFrmsptr frmi, EndFrmsptr
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<DistancexyConstraintIJ> MbD::DistancexyConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
||||
{
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
auto distxyCon = std::make_shared<DistancexyConstraintIqcJqc>(frmi, frmj);
|
||||
distxyCon->init_xyIeJeIe();
|
||||
return distxyCon;
|
||||
}
|
||||
|
||||
void MbD::DistancexyConstraintIJ::calcPostDynCorrectorIteration()
|
||||
{
|
||||
auto x = xIeJeIe->value();
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace MbD {
|
||||
public:
|
||||
DistancexyConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj);
|
||||
|
||||
static std::shared_ptr<DistancexyConstraintIJ> With(EndFrmsptr frmi, EndFrmsptr frmj);
|
||||
|
||||
void calcPostDynCorrectorIteration() override;
|
||||
virtual void init_xyIeJeIe();
|
||||
void initialize() override;
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
MbD::DistancexyConstraintIqcJqc::DistancexyConstraintIqcJqc(EndFrmsptr frmi, EndFrmsptr frmj) : DistancexyConstraintIqcJc(frmi, frmj)
|
||||
{
|
||||
}
|
||||
|
||||
void MbD::DistancexyConstraintIqcJqc::calc_pGpXJ()
|
||||
{
|
||||
pGpXJ = (xIeJeIe->pvaluepXJ()->times(xIeJeIe->value())->plusFullRow(yIeJeIe->pvaluepXJ()->times(yIeJeIe->value())));
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace MbD {
|
||||
{
|
||||
//pGpXJ pGpEJ ppGpXIpXJ ppGpEIpXJ ppGpXJpXJ ppGpXIpEJ ppGpEIpEJ ppGpXJpEJ ppGpEJpEJ iqXJ iqEJ
|
||||
public:
|
||||
DistancexyConstraintIqcJqc(EndFrmsptr frmi, EndFrmsptr frmj);
|
||||
|
||||
void calc_pGpXJ();
|
||||
void calc_pGpEJ();
|
||||
void calc_ppGpXIpXJ();
|
||||
|
||||
@@ -20,7 +20,9 @@ std::shared_ptr<GearConstraintIJ> MbD::GearConstraintIJ::With(EndFrmsptr frmi, E
|
||||
{
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
return std::make_shared<GearConstraintIqcJqc>(frmi, frmj);
|
||||
auto gearCon = std::make_shared<GearConstraintIqcJqc>(frmi, frmj);
|
||||
gearCon->initorbitsIJ();
|
||||
return gearCon;
|
||||
}
|
||||
|
||||
void MbD::GearConstraintIJ::calcPostDynCorrectorIteration()
|
||||
|
||||
@@ -20,16 +20,16 @@ MbD::GearJoint::GearJoint()
|
||||
MbD::GearJoint::GearJoint(const char*)
|
||||
{
|
||||
}
|
||||
|
||||
void MbD::GearJoint::initializeLocally()
|
||||
{
|
||||
if (!constraints->empty())
|
||||
{
|
||||
auto constraint = std::static_pointer_cast<GearConstraintIJ>(constraints->back());
|
||||
constraint->initorbitsIJ();
|
||||
}
|
||||
Joint::initializeLocally();
|
||||
}
|
||||
//
|
||||
//void MbD::GearJoint::initializeLocally()
|
||||
//{
|
||||
// if (!constraints->empty())
|
||||
// {
|
||||
// auto constraint = std::static_pointer_cast<GearConstraintIJ>(constraints->back());
|
||||
// constraint->initorbitsIJ();
|
||||
// }
|
||||
// Joint::initializeLocally();
|
||||
//}
|
||||
|
||||
void MbD::GearJoint::initializeGlobally()
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace MbD {
|
||||
GearJoint();
|
||||
GearJoint(const char* str);
|
||||
|
||||
void initializeLocally() override;
|
||||
//void initializeLocally() override;
|
||||
void initializeGlobally() override;
|
||||
|
||||
double radiusI = 0.0, radiusJ = 0.0, aConstant = 0.0;
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace MbD {
|
||||
public:
|
||||
void parseMBDyn(std::string line) override;
|
||||
void createASMT() override;
|
||||
void readMarkerI(std::vector<std::string>& args);
|
||||
void readMarkerJ(std::vector<std::string>& args);
|
||||
void readMarkerI(std::vector<std::string>& args) override;
|
||||
void readMarkerJ(std::vector<std::string>& args) override;
|
||||
std::shared_ptr<ASMTJoint> asmtClassNew() override;
|
||||
};
|
||||
}
|
||||
@@ -14,8 +14,8 @@ namespace MbD {
|
||||
{
|
||||
public:
|
||||
void parseMBDyn(std::string line) override;
|
||||
void readMarkerI(std::vector<std::string>& args);
|
||||
void readMarkerJ(std::vector<std::string>& args);
|
||||
void readMarkerI(std::vector<std::string>& args) override;
|
||||
void readMarkerJ(std::vector<std::string>& args) override;
|
||||
void readPositionConstraints(std::vector<std::string>& args);
|
||||
void readOrientationConstraints(std::vector<std::string>& args);
|
||||
void readPositionFormulas(std::vector<std::string>& args);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "RackPinConstraintIJ.h"
|
||||
#include "RackPinConstraintIqcJqc.h"
|
||||
#include "EndFrameqc.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
@@ -17,7 +18,12 @@ MbD::RackPinConstraintIJ::RackPinConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj)
|
||||
|
||||
std::shared_ptr<RackPinConstraintIJ> MbD::RackPinConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
||||
{
|
||||
return std::make_shared<RackPinConstraintIqcJqc>(frmi, frmj);
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
auto rackPinCon = std::make_shared<RackPinConstraintIqcJqc>(frmi, frmj);
|
||||
rackPinCon->initxIeJeIe();
|
||||
rackPinCon->initthezIeJe();
|
||||
return rackPinCon;
|
||||
}
|
||||
|
||||
void MbD::RackPinConstraintIJ::calcPostDynCorrectorIteration()
|
||||
|
||||
@@ -20,17 +20,17 @@ MbD::RackPinJoint::RackPinJoint()
|
||||
MbD::RackPinJoint::RackPinJoint(const char* str) : Joint(str)
|
||||
{
|
||||
}
|
||||
|
||||
void MbD::RackPinJoint::initializeLocally()
|
||||
{
|
||||
if (!constraints->empty())
|
||||
{
|
||||
auto constraint = std::static_pointer_cast<RackPinConstraintIJ>(constraints->front());
|
||||
constraint->initxIeJeIe();
|
||||
constraint->initthezIeJe();
|
||||
}
|
||||
Joint::initializeLocally();
|
||||
}
|
||||
//
|
||||
//void MbD::RackPinJoint::initializeLocally()
|
||||
//{
|
||||
// if (!constraints->empty())
|
||||
// {
|
||||
// auto constraint = std::static_pointer_cast<RackPinConstraintIJ>(constraints->front());
|
||||
// constraint->initxIeJeIe();
|
||||
// constraint->initthezIeJe();
|
||||
// }
|
||||
// Joint::initializeLocally();
|
||||
//}
|
||||
|
||||
void MbD::RackPinJoint::initializeGlobally()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MbD {
|
||||
public:
|
||||
RackPinJoint();
|
||||
RackPinJoint(const char* str);
|
||||
void initializeLocally() override;
|
||||
//void initializeLocally() override;
|
||||
void initializeGlobally() override;
|
||||
void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ) override;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void MbD::RevCylJoint::initializeGlobally()
|
||||
{
|
||||
if (constraints->empty())
|
||||
{
|
||||
auto distxyIJ = CREATE<DistancexyConstraintIJ>::With(frmI, frmJ);
|
||||
auto distxyIJ = DistancexyConstraintIJ::With(frmI, frmJ);
|
||||
distxyIJ->setConstant(distanceIJ);
|
||||
addConstraint(distxyIJ);
|
||||
addConstraint(CREATE<DirectionCosineConstraintIJ>::ConstraintWith(frmI, frmJ, 2, 0));
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "ScrewConstraintIJ.h"
|
||||
#include "ScrewConstraintIqcJqc.h"
|
||||
#include "EndFrameqc.h"
|
||||
|
||||
using namespace MbD;
|
||||
|
||||
@@ -19,7 +20,12 @@ MbD::ScrewConstraintIJ::ScrewConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj) : Co
|
||||
|
||||
std::shared_ptr<ScrewConstraintIJ> MbD::ScrewConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
||||
{
|
||||
return std::make_shared<ScrewConstraintIqcJqc>(frmi, frmj);
|
||||
assert(frmi->isEndFrameqc());
|
||||
assert(frmj->isEndFrameqc());
|
||||
auto screwCon = std::make_shared<ScrewConstraintIqcJqc>(frmi, frmj);
|
||||
screwCon->initzIeJeIe();
|
||||
screwCon->initthezIeJe();
|
||||
return screwCon;
|
||||
}
|
||||
|
||||
void MbD::ScrewConstraintIJ::calcPostDynCorrectorIteration()
|
||||
|
||||
@@ -20,17 +20,17 @@ MbD::ScrewJoint::ScrewJoint()
|
||||
MbD::ScrewJoint::ScrewJoint(const char* str) : Joint(str)
|
||||
{
|
||||
}
|
||||
|
||||
void MbD::ScrewJoint::initializeLocally()
|
||||
{
|
||||
if (!constraints->empty())
|
||||
{
|
||||
auto constraint = std::static_pointer_cast<ScrewConstraintIJ>(constraints->front());
|
||||
constraint->initzIeJeIe();
|
||||
constraint->initthezIeJe();
|
||||
}
|
||||
Joint::initializeLocally();
|
||||
}
|
||||
//
|
||||
//void MbD::ScrewJoint::initializeLocally()
|
||||
//{
|
||||
// if (!constraints->empty())
|
||||
// {
|
||||
// auto constraint = std::static_pointer_cast<ScrewConstraintIJ>(constraints->front());
|
||||
// constraint->initzIeJeIe();
|
||||
// constraint->initthezIeJe();
|
||||
// }
|
||||
// Joint::initializeLocally();
|
||||
//}
|
||||
|
||||
void MbD::ScrewJoint::initializeGlobally()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MbD {
|
||||
public:
|
||||
ScrewJoint();
|
||||
ScrewJoint(const char* str);
|
||||
void initializeLocally() override;
|
||||
//void initializeLocally() override;
|
||||
void initializeGlobally() override;
|
||||
void connectsItoJ(EndFrmsptr frmI, EndFrmsptr frmJ) override;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void MbD::SphSphJoint::initializeGlobally()
|
||||
{
|
||||
if (constraints->empty())
|
||||
{
|
||||
auto distxyIJ = CREATE<DistanceConstraintIJ>::With(frmI, frmJ);
|
||||
auto distxyIJ = DistanceConstraintIJ::With(frmI, frmJ);
|
||||
distxyIJ->setConstant(distanceIJ);
|
||||
addConstraint(distxyIJ);
|
||||
this->root()->hasChanged = true;
|
||||
|
||||
File diff suppressed because one or more lines are too long
202
testapp/CylSphJt.asmt
Normal file
202
testapp/CylSphJt.asmt
Normal file
@@ -0,0 +1,202 @@
|
||||
OndselSolver
|
||||
Assembly
|
||||
Notes
|
||||
(Text string: '' runs: (Core.RunArray runs: #() values: #()))
|
||||
Name
|
||||
OndselAssembly
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
marker-part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Parts
|
||||
Part
|
||||
Name
|
||||
part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
FixingMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
24.73092618997876 13.40888489553289 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Part
|
||||
Name
|
||||
part32#Body002
|
||||
Position3D
|
||||
58.55961227416992 25.54718399047852 23.1300048828125
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
-22.68139865429635 -16.64244751954205 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
KinematicIJs
|
||||
ConstraintSets
|
||||
Joints
|
||||
FixedJoint
|
||||
Name
|
||||
part32#GroundedJoint
|
||||
MarkerI
|
||||
/OndselAssembly/marker-part32#Body001
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body001/FixingMarker
|
||||
CylSphJoint
|
||||
Name
|
||||
part32#CylSphJoint
|
||||
MarkerI
|
||||
/OndselAssembly/part32#Body001/part32#Distance
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body002/part32#Distance
|
||||
distanceIJ
|
||||
2
|
||||
Motions
|
||||
GeneralConstraintSets
|
||||
ForceTorques
|
||||
ConstantGravity
|
||||
0 0 0
|
||||
SimulationParameters
|
||||
tstart
|
||||
0
|
||||
tend
|
||||
1
|
||||
hmin
|
||||
1e-09
|
||||
hmax
|
||||
1000000000
|
||||
hout
|
||||
0.1
|
||||
errorTol
|
||||
1e-06
|
||||
AnimationParameters
|
||||
nframe
|
||||
1000000
|
||||
icurrent
|
||||
1
|
||||
istart
|
||||
1
|
||||
iend
|
||||
1000000
|
||||
isForward
|
||||
true
|
||||
framesPerSecond
|
||||
30
|
||||
@@ -26,6 +26,9 @@ void sharedptrTest();
|
||||
|
||||
int main()
|
||||
{
|
||||
ASMTAssembly::runFile("../testapp/RevCylJt.asmt");
|
||||
ASMTAssembly::runFile("../testapp/CylSphJt.asmt");
|
||||
ASMTAssembly::runFile("../testapp/SphSphJt.asmt");
|
||||
//MBDynSystem::runFile("../testapp/MBDynCase(Cosine-half drive).mbd");
|
||||
//MBDynSystem::runFile("../testapp/MBDynCase(Sine-forever drive).mbd");
|
||||
MBDynSystem::runFile("../testapp/MBDynCase9orig.mbd"); //SimulationStoppingError
|
||||
|
||||
202
testapp/RevCylJt.asmt
Normal file
202
testapp/RevCylJt.asmt
Normal file
@@ -0,0 +1,202 @@
|
||||
OndselSolver
|
||||
Assembly
|
||||
Notes
|
||||
(Text string: '' runs: (Core.RunArray runs: #() values: #()))
|
||||
Name
|
||||
OndselAssembly
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
marker-part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Parts
|
||||
Part
|
||||
Name
|
||||
part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
FixingMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
24.73092618997876 13.40888489553289 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Part
|
||||
Name
|
||||
part32#Body002
|
||||
Position3D
|
||||
58.55961227416992 25.54718399047852 23.1300048828125
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
-22.68139865429635 -16.64244751954205 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
KinematicIJs
|
||||
ConstraintSets
|
||||
Joints
|
||||
FixedJoint
|
||||
Name
|
||||
part32#GroundedJoint
|
||||
MarkerI
|
||||
/OndselAssembly/marker-part32#Body001
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body001/FixingMarker
|
||||
RevCylJoint
|
||||
Name
|
||||
part32#RevCylJoint
|
||||
MarkerI
|
||||
/OndselAssembly/part32#Body001/part32#Distance
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body002/part32#Distance
|
||||
distanceIJ
|
||||
2
|
||||
Motions
|
||||
GeneralConstraintSets
|
||||
ForceTorques
|
||||
ConstantGravity
|
||||
0 0 0
|
||||
SimulationParameters
|
||||
tstart
|
||||
0
|
||||
tend
|
||||
1
|
||||
hmin
|
||||
1e-09
|
||||
hmax
|
||||
1000000000
|
||||
hout
|
||||
0.1
|
||||
errorTol
|
||||
1e-06
|
||||
AnimationParameters
|
||||
nframe
|
||||
1000000
|
||||
icurrent
|
||||
1
|
||||
istart
|
||||
1
|
||||
iend
|
||||
1000000
|
||||
isForward
|
||||
true
|
||||
framesPerSecond
|
||||
30
|
||||
202
testapp/SphSphJt.asmt
Normal file
202
testapp/SphSphJt.asmt
Normal file
@@ -0,0 +1,202 @@
|
||||
OndselSolver
|
||||
Assembly
|
||||
Notes
|
||||
(Text string: '' runs: (Core.RunArray runs: #() values: #()))
|
||||
Name
|
||||
OndselAssembly
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
marker-part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Parts
|
||||
Part
|
||||
Name
|
||||
part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
FixingMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
24.73092618997876 13.40888489553289 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Part
|
||||
Name
|
||||
part32#Body002
|
||||
Position3D
|
||||
58.55961227416992 25.54718399047852 23.1300048828125
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Distance
|
||||
Position3D
|
||||
-22.68139865429635 -16.64244751954205 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
KinematicIJs
|
||||
ConstraintSets
|
||||
Joints
|
||||
FixedJoint
|
||||
Name
|
||||
part32#GroundedJoint
|
||||
MarkerI
|
||||
/OndselAssembly/marker-part32#Body001
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body001/FixingMarker
|
||||
SphSphJoint
|
||||
Name
|
||||
part32#SphSphJoint
|
||||
MarkerI
|
||||
/OndselAssembly/part32#Body001/part32#Distance
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body002/part32#Distance
|
||||
distanceIJ
|
||||
2
|
||||
Motions
|
||||
GeneralConstraintSets
|
||||
ForceTorques
|
||||
ConstantGravity
|
||||
0 0 0
|
||||
SimulationParameters
|
||||
tstart
|
||||
0
|
||||
tend
|
||||
1
|
||||
hmin
|
||||
1e-09
|
||||
hmax
|
||||
1000000000
|
||||
hout
|
||||
0.1
|
||||
errorTol
|
||||
1e-06
|
||||
AnimationParameters
|
||||
nframe
|
||||
1000000
|
||||
icurrent
|
||||
1
|
||||
istart
|
||||
1
|
||||
iend
|
||||
1000000
|
||||
isForward
|
||||
true
|
||||
framesPerSecond
|
||||
30
|
||||
200
testapp/part32.asmt
Normal file
200
testapp/part32.asmt
Normal file
@@ -0,0 +1,200 @@
|
||||
OndselSolver
|
||||
Assembly
|
||||
Notes
|
||||
(Text string: '' runs: (Core.RunArray runs: #() values: #()))
|
||||
Name
|
||||
OndselAssembly
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
marker-part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Parts
|
||||
Part
|
||||
Name
|
||||
part32#Body001
|
||||
Position3D
|
||||
-50.97707939147949 -6.651639938354492 5.976193904876709
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
FixingMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Slider
|
||||
Position3D
|
||||
15.997032 -6.973144 5
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
Part
|
||||
Name
|
||||
part32#Body002
|
||||
Position3D
|
||||
-52.32045548863208 -15.58438009010746 23.1300048828125
|
||||
RotationMatrix
|
||||
0.8660254037844387 -0.4999999999999999 0
|
||||
0.4999999999999999 0.8660254037844387 0
|
||||
0 0 1
|
||||
Velocity3D
|
||||
0 0 0
|
||||
Omega3D
|
||||
0 0 0
|
||||
FeatureOrder
|
||||
PrincipalMassMarker
|
||||
Name
|
||||
MassMarker
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Mass
|
||||
1
|
||||
MomentOfInertias
|
||||
1 1 1
|
||||
Density
|
||||
1
|
||||
RefPoints
|
||||
RefPoint
|
||||
Position3D
|
||||
0 0 0
|
||||
RotationMatrix
|
||||
1 0 0
|
||||
0 1 0
|
||||
0 0 1
|
||||
Markers
|
||||
Marker
|
||||
Name
|
||||
part32#Slider
|
||||
Position3D
|
||||
15.997032 -6.973144000000001 5
|
||||
RotationMatrix
|
||||
-0.8660254037844388 -0.4999999999999999 0
|
||||
0.4999999999999999 -0.8660254037844388 0
|
||||
0 0 1
|
||||
RefCurves
|
||||
RefSurfaces
|
||||
KinematicIJs
|
||||
ConstraintSets
|
||||
Joints
|
||||
FixedJoint
|
||||
Name
|
||||
part32#GroundedJoint
|
||||
MarkerI
|
||||
/OndselAssembly/marker-part32#Body001
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body001/FixingMarker
|
||||
TranslationalJoint
|
||||
Name
|
||||
part32#TranJoint
|
||||
MarkerI
|
||||
/OndselAssembly/part32#Body001/part32#Slider
|
||||
MarkerJ
|
||||
/OndselAssembly/part32#Body002/part32#Slider
|
||||
Motions
|
||||
GeneralConstraintSets
|
||||
ForceTorques
|
||||
ConstantGravity
|
||||
0 0 0
|
||||
SimulationParameters
|
||||
tstart
|
||||
0
|
||||
tend
|
||||
1
|
||||
hmin
|
||||
1e-09
|
||||
hmax
|
||||
1000000000
|
||||
hout
|
||||
0.1
|
||||
errorTol
|
||||
1e-06
|
||||
AnimationParameters
|
||||
nframe
|
||||
1000000
|
||||
icurrent
|
||||
1
|
||||
istart
|
||||
1
|
||||
iend
|
||||
1000000
|
||||
isForward
|
||||
true
|
||||
framesPerSecond
|
||||
30
|
||||
Reference in New Issue
Block a user