OndselSolver can read and write *.asmt files

This commit is contained in:
Aik-Siong Koh
2023-10-19 10:51:51 -06:00
parent 95cd91c9d1
commit 4360daddf3
61 changed files with 1383 additions and 107 deletions

View File

@@ -5,6 +5,7 @@
* *
* See LICENSE file for details about copyright. *
***************************************************************************/
#include <fstream>
#include "ASMTRotationalMotion.h"
#include "ASMTAssembly.h"
@@ -20,6 +21,10 @@ using namespace MbD;
void MbD::ASMTRotationalMotion::parseASMT(std::vector<std::string>& lines)
{
readName(lines);
if (lines[0].find("MarkerI") != std::string::npos) {
readMarkerI(lines);
readMarkerJ(lines);
}
readMotionJoint(lines);
readRotationZ(lines);
}
@@ -82,3 +87,21 @@ void MbD::ASMTRotationalMotion::setRotationZ(std::string rotZ)
{
rotationZ = rotZ;
}
void MbD::ASMTRotationalMotion::storeOnLevel(std::ofstream& os, int level)
{
storeOnLevelString(os, level, "RotationalMotion");
storeOnLevelString(os, level + 1, "Name");
storeOnLevelString(os, level + 2, name);
ASMTItemIJ::storeOnLevel(os, level);
storeOnLevelString(os, level + 1, "MotionJoint");
storeOnLevelString(os, level + 2, motionJoint);
storeOnLevelString(os, level + 1, "RotationZ");
storeOnLevelString(os, level + 2, rotationZ);
}
void MbD::ASMTRotationalMotion::storeOnTimeSeries(std::ofstream& os)
{
os << "RotationalMotionSeries\t" << fullName("") << std::endl;
ASMTItemIJ::storeOnTimeSeries(os);
}