From ff4f8c8fbb055b48ab0f521d74e238335b284a64 Mon Sep 17 00:00:00 2001 From: Aik-Siong Koh Date: Tue, 14 Nov 2023 08:41:30 -0700 Subject: [PATCH] 2023-11-14 changes --- OndselSolver/ASMTPointInPlaneJoint.cpp | 13 ++++++++----- OndselSolver/OndselSolver.cpp | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OndselSolver/ASMTPointInPlaneJoint.cpp b/OndselSolver/ASMTPointInPlaneJoint.cpp index fb47516..3750aab 100644 --- a/OndselSolver/ASMTPointInPlaneJoint.cpp +++ b/OndselSolver/ASMTPointInPlaneJoint.cpp @@ -25,11 +25,14 @@ void MbD::ASMTPointInPlaneJoint::parseASMT(std::vector& lines) void MbD::ASMTPointInPlaneJoint::readOffset(std::vector& lines) { - assert(lines[0].find("offset") != std::string::npos); - lines.erase(lines.begin()); - offset = readDouble(lines[0]); - lines.erase(lines.begin()); - + if (lines[0].find("offset") == std::string::npos) { + offset = 0.0; + } + else { + lines.erase(lines.begin()); + offset = readDouble(lines[0]); + lines.erase(lines.begin()); + } } void MbD::ASMTPointInPlaneJoint::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) diff --git a/OndselSolver/OndselSolver.cpp b/OndselSolver/OndselSolver.cpp index c787551..7ecceee 100644 --- a/OndselSolver/OndselSolver.cpp +++ b/OndselSolver/OndselSolver.cpp @@ -26,6 +26,7 @@ void sharedptrTest(); int main() { + ASMTAssembly::readWriteFile("failingsolve.asmt"); ASMTAssembly::runFile("cirpendu2.asmt"); //Under constrained. Testing ICKine. ASMTAssembly::runFile("quasikine.asmt"); //Under constrained. Testing ICKine. ASMTAssembly::readWriteFile("piston.asmt");