-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe99ad2
commit 2c737d4
Showing
285 changed files
with
1,854 additions
and
1,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/*************************************************************************** | ||
* Copyright (c) 2023 Ondsel, Inc. * | ||
* * | ||
* This file is part of OndselSolver. * | ||
* * | ||
* See LICENSE file for details about copyright. * | ||
***************************************************************************/ | ||
|
||
#include "ASMTAllowRotation.h" | ||
#include "ASMTAssembly.h" | ||
#include "ASMTJoint.h" | ||
#include "AllowZRotation.h" | ||
|
||
using namespace MbD; | ||
|
||
std::shared_ptr<ASMTAllowRotation> MbD::ASMTAllowRotation::With() | ||
{ | ||
auto asmtAllowRotation = std::make_shared<ASMTAllowRotation>(); | ||
return asmtAllowRotation; | ||
} | ||
|
||
void MbD::ASMTAllowRotation::parseASMT(std::vector<std::string>& lines) | ||
{ | ||
readName(lines); | ||
if (lines[0].find("MarkerI") != std::string::npos) { | ||
readMarkerI(lines); | ||
readMarkerJ(lines); | ||
} | ||
readMotionJoint(lines); | ||
} | ||
|
||
void MbD::ASMTAllowRotation::readMotionJoint(std::vector<std::string>& lines) | ||
{ | ||
assert(lines[0].find("MotionJoint") != std::string::npos); | ||
lines.erase(lines.begin()); | ||
motionJoint = readString(lines[0]); | ||
lines.erase(lines.begin()); | ||
} | ||
|
||
void MbD::ASMTAllowRotation::initMarkers() | ||
{ | ||
if (motionJoint == "") { | ||
assert(markerI != ""); | ||
assert(markerJ != ""); | ||
} | ||
else { | ||
auto jt = root()->jointAt(motionJoint); | ||
markerI = jt->markerI; | ||
markerJ = jt->markerJ; | ||
} | ||
} | ||
|
||
std::shared_ptr<Joint> MbD::ASMTAllowRotation::mbdClassNew() | ||
{ | ||
return AllowZRotation::With(); | ||
} | ||
|
||
void MbD::ASMTAllowRotation::setMotionJoint(std::string motionJoint) | ||
{ | ||
} | ||
|
||
void MbD::ASMTAllowRotation::storeOnLevel(std::ofstream& os, size_t level) | ||
{ | ||
storeOnLevelString(os, level, "AllowRotation"); | ||
storeOnLevelString(os, level + 1, "Name"); | ||
storeOnLevelString(os, level + 2, name); | ||
ASMTItemIJ::storeOnLevel(os, level); | ||
storeOnLevelString(os, level + 1, "MotionJoint"); | ||
storeOnLevelString(os, level + 2, motionJoint); | ||
} | ||
|
||
void MbD::ASMTAllowRotation::storeOnTimeSeries(std::ofstream& os) | ||
{ | ||
os << "AllowRotationSeries\t" << fullName("") << std::endl; | ||
ASMTItemIJ::storeOnTimeSeries(os); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*************************************************************************** | ||
* Copyright (c) 2023 Ondsel, Inc. * | ||
* * | ||
* This file is part of OndselSolver. * | ||
* * | ||
* See LICENSE file for details about copyright. * | ||
***************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "ASMTMotion.h" | ||
|
||
namespace MbD { | ||
class ASMTAllowRotation : public ASMTMotion | ||
{ | ||
// | ||
public: | ||
static std::shared_ptr<ASMTAllowRotation> With(); | ||
void parseASMT(std::vector<std::string>& lines) override; | ||
void readMotionJoint(std::vector<std::string>& lines); | ||
void initMarkers() override; | ||
std::shared_ptr<Joint> mbdClassNew() override; | ||
void setMotionJoint(std::string motionJoint); | ||
void storeOnLevel(std::ofstream& os, size_t level) override; | ||
void storeOnTimeSeries(std::ofstream& os) override; | ||
|
||
std::string motionJoint, rotationZ; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.