From 9e9a9306222dc3900c9c0289e3070366fadeff8f 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 ++++++++----- testapp/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/testapp/OndselSolver.cpp b/testapp/OndselSolver.cpp index ce75f42..2d628d8 100644 --- a/testapp/OndselSolver.cpp +++ b/testapp/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");