diff --git a/GaitSymQt/GaitSym2017.pro.user b/GaitSymQt/GaitSym2017.pro.user index b181893..9eb7f36 100644 --- a/GaitSymQt/GaitSym2017.pro.user +++ b/GaitSymQt/GaitSym2017.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -55,20 +55,24 @@ ProjectExplorer.Project.PluginSettings + + -fno-delayed-template-parsing + + true ProjectExplorer.Project.Target.0 - Desktop Qt 5.11.1 MSVC2017 64bit - Desktop Qt 5.11.1 MSVC2017 64bit - qt.qt5.5111.win64_msvc2017_64_kit + Desktop Qt 5.11.2 MSVC2017 64bit + Desktop Qt 5.11.2 MSVC2017 64bit + qt.qt5.5112.win64_msvc2017_64_kit 0 0 0 - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit-Debug true @@ -122,7 +126,7 @@ true - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_MSVC2017_64bit-Release + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit-Release true @@ -176,7 +180,7 @@ true - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_MSVC2017_64bit-Profile + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit-Profile true @@ -292,9 +296,8 @@ true GaitSym2017.pro - false - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit-Debug 3768 false true @@ -308,14 +311,14 @@ ProjectExplorer.Project.Target.1 - Desktop Qt 5.11.1 Static MSVC2017 64bit - Desktop Qt 5.11.1 Static MSVC2017 64bit - {f19f27c3-93c6-4074-bda1-f664c073e274} + Desktop Qt 5.11.2 MSVC2017 64bit static + Desktop Qt 5.11.2 MSVC2017 64bit static + {238f8513-5c10-4e3e-aeb8-c852775f1f42} 0 0 0 - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_Static_MSVC2017_64bit-Debug + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit_static-Debug true @@ -369,7 +372,7 @@ true - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_Static_MSVC2017_64bit-Release + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit_static-Release true @@ -423,7 +426,7 @@ true - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_Static_MSVC2017_64bit-Profile + D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_2_MSVC2017_64bit_static-Profile true @@ -533,15 +536,13 @@ 2 - GaitSym2017 + + + + + Custom Executable - Qt4ProjectManager.Qt4RunConfiguration:D:/Unix/cvs/GaitSym2017/GaitSymQt/GaitSym2017.pro - true - - GaitSym2017.pro - false - - D:/Unix/cvs/GaitSym2017/build-GaitSym2017-Desktop_Qt_5_11_1_MSVC2017_64bit-Debug + ProjectExplorer.CustomExecutableRunConfiguration 3768 false true diff --git a/GaitSymQt/MainWindow.cpp b/GaitSymQt/MainWindow.cpp index 69f847d..06a3e27 100644 --- a/GaitSymQt/MainWindow.cpp +++ b/GaitSymQt/MainWindow.cpp @@ -225,11 +225,7 @@ void MainWindow::newFromGeometry() void MainWindow::open() { - QFileInfo info = m_preferences->valueQString("LastFileOpened"); - while (info.exists() == false) - { - info = QFileInfo(info.dir().absolutePath()); - } + QString lastFileOpened = m_preferences->valueQString("LastFileOpened"); QString fileName; QStringList geometryFileNames; @@ -237,11 +233,11 @@ void MainWindow::open() if (m_newFromGeometryFlag) { - geometryFileNames = QFileDialog::getOpenFileNames(this, tr("Select the geometry files required"), info.absoluteFilePath(), tr("Geometry Files (*.obj)"), 0); + geometryFileNames = QFileDialog::getOpenFileNames(this, tr("Select the geometry files required"), lastFileOpened, tr("Geometry Files (*.obj)"), 0); } else { - fileName = QFileDialog::getOpenFileName(this, tr("Open Config File"), info.absoluteFilePath(), tr("Config Files (*.xml)"), 0); + fileName = QFileDialog::getOpenFileName(this, tr("Open Config File"), lastFileOpened, tr("Config Files (*.xml)"), 0); } if (fileName.isNull() == false || geometryFileNames.size() > 0) diff --git a/makefile b/makefile index 1f7147a..aeae201 100644 --- a/makefile +++ b/makefile @@ -482,6 +482,7 @@ gaitsym_distribution_extras: cp -rf libgwavi distribution/ cp -rf ode-0.15 distribution/ cp -rf rapidxml-1.13 distribution/ + cp -rf GaitSymGaul distribution/ cp makefile distribution/ find distribution -depth -type d -name CVS -print -exec rm -rf {} \; rm -rf distribution/GaitSymQt/GaitSymQt.pro.* diff --git a/src/PlaneGeom.cpp b/src/PlaneGeom.cpp index ce60d50..46263d9 100644 --- a/src/PlaneGeom.cpp +++ b/src/PlaneGeom.cpp @@ -171,7 +171,7 @@ void PlaneGeom::Draw(SimulationWindow *window) floorTexture->unlock(); #endif - irr::u32 xRange = 100, yRange = 100; + irr::u32 xRange = 250, yRange = 250; irr::core::dimension2d tileSize(2.f, 2.f); // for a 2x2 checkerboard irr::core::dimension2d tileCount(xRange, yRange); irr::video::SMaterial material; diff --git a/src/Simulation.cpp b/src/Simulation.cpp index 2f2dbf5..56a67d2 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -600,12 +600,18 @@ void Simulation::UpdateSimulation() #ifdef DEBUG_CHECK_FORCES pgd::Vector force(0, 0, 0); #endif - for (unsigned int i = 0; i < pointForceList->size(); i++) + // this check is for the special case of a 2 point strap with both points attached to the same muscle + // we use this hack to generate uncoupled point forces e.g. when simulating a jet + // this is a hack for NASA SpaceApps 2018 + size_t numPointForces = pointForceList->size(); + if (pointForceList->size() == 2 && pointForceList->at(0)->body->GetBodyID() == pointForceList->at(1)->body->GetBodyID()) + numPointForces = 1; + for (size_t i = 0; i < numPointForces; i++) { pointForce = (*pointForceList)[i]; dBodyAddForceAtPos(pointForce->body->GetBodyID(), pointForce->vector[0] * tension, pointForce->vector[1] * tension, pointForce->vector[2] * tension, - pointForce->point[0], pointForce->point[1], pointForce->point[2]); + pointForce->point[0], pointForce->point[1], pointForce->point[2]); #ifdef DEBUG_CHECK_FORCES force += pgd::Vector(pointForce->vector[0] * tension, pointForce->vector[1] * tension, pointForce->vector[2] * tension); #endif @@ -3225,7 +3231,7 @@ void Simulation::ParseDataTarget(rapidxml::xml_node * cur) THROWIFZERO(buf = DoXmlGetProp(cur, "TargetValues")); count = DataFile::CountTokens((char *)buf); Util::Double(buf, count, m_DoubleList); - dataTargetVector->SetTargetValues(count, m_DoubleList); + dataTargetVector->SetTargetValues(count / 3, m_DoubleList); // HACK - FIX ME // check presence of AbortThreshold buf = DoXmlGetProp(cur, "AbortThreshold");