diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
new file mode 100644
index 000000000000..4fa8413ccf6c
--- /dev/null
+++ b/.github/workflows/makefile.yml
@@ -0,0 +1,262 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# ***************************************************************************
+# * *
+# * Copyright (c) 2023 0penBrain. *
+# * *
+# * This file is part of FreeCAD. *
+# * *
+# * FreeCAD is free software: you can redistribute it and/or modify it *
+# * under the terms of the GNU Lesser General Public License as *
+# * published by the Free Software Foundation, either version 2.1 of the *
+# * License, or (at your option) any later version. *
+# * *
+# * FreeCAD is distributed in the hope that it will be useful, but *
+# * WITHOUT ANY WARRANTY; without even the implied warranty of *
+# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+# * Lesser General Public License for more details. *
+# * *
+# * You should have received a copy of the GNU Lesser General Public *
+# * License along with FreeCAD. If not, see *
+# * . *
+# * *
+# ***************************************************************************
+
+# This is a build and test workflow for CI of FreeCAD.
+# This workflow aims at building and testing FreeCAD on Ubuntu 22.04 using Clang.
+
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+# Thanks to realthunder for making this!
+
+name: Build Ubuntu 22.04
+on:
+ workflow_call:
+ inputs:
+ artifactBasename:
+ type: string
+ required: true
+ testOnBuildDir:
+ default: false
+ type: boolean
+ required: false
+ allowedToFail:
+ default: false
+ type: boolean
+ required: false
+ outputs:
+ reportFile:
+ value: ${{ jobs.Build.outputs.reportFile }}
+
+jobs:
+ Build:
+ runs-on: ubuntu-22.04
+ continue-on-error: ${{ inputs.allowedToFail }}
+ env:
+ CCACHE_DIR: ${{ github.workspace }}/ccache
+ CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
+ CCACHE_MAXSIZE: 1G
+ CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
+ CCACHE_COMPRESS: true
+ CCACHE_COMPRESSLEVEL: 1
+ #CC: /usr/bin/gcc
+ #CXX: /usr/bin/g++
+ CC: /usr/bin/clang
+ CXX: /usr/bin/clang++
+ builddir: ${{ github.workspace }}/build/
+ logdir: /tmp/logs/
+ reportdir: /tmp/report/
+ reportfilename: ${{ inputs.artifactBasename }}-report.md
+ defaults:
+ run:
+ shell: bash
+ outputs:
+ reportFile: ${{ steps.Init.outputs.reportFile }}
+
+ steps:
+ - name: Checking out source code
+ uses: actions/checkout@v3
+ - name: Install FreeCAD dependencies
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -y --no-install-recommends \
+ doxygen \
+ graphviz \
+ imagemagick \
+ libboost-date-time-dev \
+ libboost-dev \
+ libboost-filesystem-dev \
+ libboost-graph-dev \
+ libboost-iostreams-dev \
+ libboost-program-options-dev \
+ libboost-python-dev \
+ libboost-regex-dev \
+ libboost-serialization-dev \
+ libboost-thread-dev \
+ libcoin-dev \
+ libeigen3-dev \
+ libgts-bin \
+ libgts-dev \
+ libkdtree++-dev \
+ libmedc-dev \
+ libocct-data-exchange-dev \
+ libocct-ocaf-dev \
+ libocct-visualization-dev \
+ libopencv-dev \
+ libproj-dev \
+ libpyside2-dev \
+ libqt5opengl5-dev \
+ libqt5svg5-dev \
+ libqt5x11extras5-dev \
+ libqt5xmlpatterns5-dev \
+ libshiboken2-dev \
+ libspnav-dev \
+ libvtk7-dev \
+ libx11-dev \
+ libxerces-c-dev \
+ libzipios++-dev \
+ netgen \
+ netgen-headers \
+ occt-draw \
+ pyqt5-dev-tools \
+ pyside2-tools \
+ python3-dev \
+ python3-git \
+ python3-markdown \
+ python3-matplotlib \
+ python3-packaging \
+ python3-pivy \
+ python3-ply \
+ python3-pyside2.qtcore \
+ python3-pyside2.qtgui \
+ python3-pyside2.qtnetwork \
+ python3-pyside2.qtsvg \
+ python3-pyside2.qtwebengine \
+ python3-pyside2.qtwebenginecore \
+ python3-pyside2.qtwebenginewidgets \
+ python3-pyside2.qtwebchannel \
+ python3-pyside2.qtwidgets \
+ qtbase5-dev \
+ qttools5-dev \
+ qtwebengine5-dev \
+ shiboken2 \
+ swig \
+ ccache \
+ xvfb
+ - name: Make needed directories, files and initializations
+ id: Init
+ run: |
+ mkdir -p ${{ env.CCACHE_DIR }}
+ mkdir -p ${{ env.CCACHE_CONFIGPATH }}
+ mkdir -p ${{ env.builddir }}
+ mkdir -p ${{ env.logdir }}
+ mkdir -p ${{ env.reportdir }}
+ echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
+ - name: Generate cache key
+ id: genCacheKey
+ uses: ./.github/workflows/actions/linux/generateCacheKey
+ with:
+ compiler: ${{ env.CXX }}
+ - name: Restore Compiler Cache
+ uses: pat-s/always-upload-cache@v3
+ with:
+ path: ${{ env.CCACHE_DIR }}
+ key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
+ restore-keys: |
+ FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
+ FC-${{ steps.genCacheKey.outputs.cacheKey }}-
+ - name: Print CCache statistics before build, reset stats and print config
+ run: |
+ ccache -s
+ ccache -z
+ ccache -p
+ - name: CMake Configure
+ uses: ./.github/workflows/actions/linux/configure
+ with:
+ builddir: ${{ env.builddir }}
+ logFile: ${{ env.logdir }}Cmake.log
+ errorFile: ${{ env.logdir }}CmakeErrors.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: CMake Build
+ uses: ./.github/workflows/actions/linux/build
+ with:
+ builddir: ${{ env.builddir }}
+ logFile: ${{ env.logdir }}Build.log
+ errorFile: ${{ env.logdir }}BuildErrors.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: Print ccache statistics after Build
+ run: |
+ ccache -s
+ - name: FreeCAD CLI tests on build dir
+ if: inputs.testOnBuildDir
+ timeout-minutes: 10
+ uses: ./.github/workflows/actions/runPythonTests
+ with:
+ testDescription: "CLI tests on build dir"
+ testCommand: ${{ env.builddir }}bin/FreeCADCmd -t 0
+ logFile: ${{ env.logdir }}TestCLIBuild.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: FreeCAD GUI tests on build dir
+ if: inputs.testOnBuildDir
+ timeout-minutes: 15
+ uses: ./.github/workflows/actions/runPythonTests
+ with:
+ testDescription: "GUI tests on build dir"
+ testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
+ logFile: ${{ env.logdir }}TestGUIBuild.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: C++ tests
+ timeout-minutes: 1
+ uses: ./.github/workflows/actions/runCPPTests/runAllTests
+ with:
+ reportdir: ${{ env.reportdir }}
+ builddir: ${{ env.builddir }}
+ reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
+ - name: CMake Install
+ uses: ./.github/workflows/actions/linux/install
+ with:
+ builddir: ${{ env.builddir }}
+ logFile: ${{ env.logdir }}Install.log
+ errorFile: ${{ env.logdir }}InstallErrors.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: FreeCAD CLI tests on install
+ timeout-minutes: 10
+ uses: ./.github/workflows/actions/runPythonTests
+ with:
+ testDescription: "CLI tests on install"
+ testCommand: FreeCADCmd -t 0
+ logFile: ${{ env.logdir }}TestCLIInstall.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: FreeCAD GUI tests on install
+ timeout-minutes: 15
+ uses: ./.github/workflows/actions/runPythonTests
+ with:
+ testDescription: "GUI tests on install"
+ testCommand: xvfb-run FreeCAD -t 0
+ logFile: ${{ env.logdir }}TestGUIInstall.log
+ reportFile: ${{env.reportdir}}${{ env.reportfilename }}
+ - name: Upload logs
+ if: always()
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ inputs.artifactBasename }}-Logs
+ path: |
+ ${{ env.logdir }}
+ /var/crash/*FreeCAD*
+ - name: Upload report
+ if: always()
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.reportfilename }}
+ path: |
+ ${{env.reportdir}}${{ env.reportfilename }}
diff --git a/README.md b/README.md
index b53c4926ef68..b474e808479e 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,16 @@
+# FreeCAD Context Fork
+This is my small fork to get features into FreeCAD Link Stage 3 and to implement features to make my life easier.
+
+This fork has the Ondsel Assembly Workbench built in now.
+
+It also supports a new tool I made called the "assembly context creator". This lets you create assembly contexts in your part. This makes designing considerably easier. A gif will be provided soon.
+
+![](https://github.com/drwho495/FreeCAD-Context-Fork/blob/LinkStable/lb3-oa-context-ex2.gif)
+
+
+ Original FreeCAD Link Stage 3 ReadMe. Click to Expand.
+
+
![Logo](https://github.com/realthunder/FreeCADMakeImage/raw/master/conda/branding/asm3/icons/hicolor/64x64/apps/freecad_link.png)
This is the Link branch FreeCAD, with lots of new features and enhancement.
diff --git a/build-for-linux.sh b/build-for-linux.sh
new file mode 100755
index 000000000000..b3b81e3b4d0b
--- /dev/null
+++ b/build-for-linux.sh
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+mkdir build
+cd ./build
+
+#install deps
+packages=(
+ "cmake"
+ "cmake-gui"
+ "libboost-date-time-dev"
+ "libboost-dev"
+ "libboost-filesystem-dev"
+ "libboost-graph-dev"
+ "libboost-iostreams-dev"
+ "libboost-program-options-dev"
+ "libboost-python-dev"
+ "libboost-regex-dev"
+ "libboost-serialization-dev"
+ "libboost-thread-dev"
+ "libcoin-dev"
+ "libeigen3-dev"
+ "libgts-bin"
+ "libgts-dev"
+ "libkdtree++-dev"
+ "libmedc-dev"
+ "libocct-data-exchange-dev"
+ "libocct-ocaf-dev"
+ "libocct-visualization-dev"
+ "libopencv-dev"
+ "libproj-dev"
+ "libpyside2-dev"
+ "libqt5opengl5-dev"
+ "libqt5svg5-dev"
+ "qtwebengine5-dev"
+ "libqt5x11extras5-dev"
+ "libqt5xmlpatterns5-dev"
+ "libshiboken2-dev"
+ "libspnav-dev"
+ "libvtk7-dev"
+ "libx11-dev"
+ "libxerces-c-dev"
+ "libzipios++-dev"
+ "occt-draw"
+ "pyside2-tools"
+ "python3-dev"
+ "python3-matplotlib"
+ "python3-packaging"
+ "python3-pivy"
+ "python3-ply"
+ "python3-pyside2.qtcore"
+ "python3-pyside2.qtgui"
+ "python3-pyside2.qtsvg"
+ "python3-pyside2.qtwidgets"
+ "python3-pyside2.qtnetwork"
+ "python3-pyside2.qtwebengine"
+ "python3-pyside2.qtwebenginecore"
+ "python3-pyside2.qtwebenginewidgets"
+ "python3-pyside2.qtwebchannel"
+ "python3-markdown"
+ "python3-git"
+ "python3-pyside2uic"
+ "qtbase5-dev"
+ "qttools5-dev"
+ "swig"
+ "libyaml-cpp-dev"
+)
+
+installable_deps=()
+
+for dep in "${packages[@]}"
+do
+ if apt-cache showpkg "$dep" &> /dev/null; then
+ installable_deps+=("$dep")
+ echo "$dep is installable"
+
+ else
+ echo "$dep is not installable"
+ fi
+done
+
+sudo apt-get install $installable_deps
+
+sudo cmake ../
+sudo make -j$(nproc --ignore=4)
+
diff --git a/lb3-oa-context-ex2.gif b/lb3-oa-context-ex2.gif
new file mode 100644
index 000000000000..0fd2a1b8170b
Binary files /dev/null and b/lb3-oa-context-ex2.gif differ
diff --git a/src/3rdParty/CMakeLists.txt b/src/3rdParty/CMakeLists.txt
index d87b5a880920..e3fac9ba2b50 100644
--- a/src/3rdParty/CMakeLists.txt
+++ b/src/3rdParty/CMakeLists.txt
@@ -19,3 +19,4 @@ endif()
add_subdirectory(lazy_loader)
add_subdirectory(libE57Format)
+add_subdirectory(OndselSolver)
diff --git a/src/3rdParty/OndselSolver/CMakeLists.txt b/src/3rdParty/OndselSolver/CMakeLists.txt
new file mode 100644
index 000000000000..e4da2f6ce9eb
--- /dev/null
+++ b/src/3rdParty/OndselSolver/CMakeLists.txt
@@ -0,0 +1,681 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(OndselSolver VERSION 1.0.1 DESCRIPTION "Assembly Constraints and Multibody Dynamics code")
+
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED True)
+
+include(GNUInstallDirs)
+
+if( UNIX )
+ set( ONDSELSOLVER_BUILD_SHARED ON )
+ELSEIF ( APPLE )
+ set( ONDSELSOLVER_BUILD_SHARED ON )
+ELSE()
+ set( ONDSELSOLVER_BUILD_SHARED OFF )
+ENDIF ()
+
+if ( ONDSELSOLVER_BUILD_SHARED )
+ message( STATUS "[OndselSolver] Building shared library" )
+ add_library(OndselSolver SHARED)
+else()
+ message( STATUS "[OndselSolver] Building static library" )
+ add_library(OndselSolver STATIC)
+endif()
+
+
+set(ONDSELSOLVER_SRC
+ OndselSolver/Array.cpp
+ OndselSolver/FullVector.cpp
+ OndselSolver/RowTypeMatrix.cpp
+ OndselSolver/FullColumn.cpp
+ OndselSolver/FullMatrix.cpp
+ OndselSolver/FullRow.cpp
+ OndselSolver/Abs.cpp
+ OndselSolver/AbsConstraint.cpp
+ OndselSolver/AccICKineNewtonRaphson.cpp
+ OndselSolver/AccICNewtonRaphson.cpp
+ OndselSolver/AccKineNewtonRaphson.cpp
+ OndselSolver/AccNewtonRaphson.cpp
+ OndselSolver/AngleJoint.cpp
+ OndselSolver/AngleZIecJec.cpp
+ OndselSolver/AngleZIeqcJec.cpp
+ OndselSolver/AngleZIeqcJeqc.cpp
+ OndselSolver/AnyGeneralSpline.cpp
+ OndselSolver/AnyPosICNewtonRaphson.cpp
+ OndselSolver/ArcSine.cpp
+ OndselSolver/ArcTan.cpp
+ OndselSolver/ArcTan2.cpp
+ OndselSolver/Arguments.cpp
+ OndselSolver/ASMTAngleJoint.cpp
+ OndselSolver/ASMTAnimationParameters.cpp
+ OndselSolver/ASMTAssembly.cpp
+ OndselSolver/ASMTCompoundJoint.cpp
+ OndselSolver/ASMTConstantGravity.cpp
+ OndselSolver/ASMTConstantVelocityJoint.cpp
+ OndselSolver/ASMTConstraintSet.cpp
+ OndselSolver/ASMTCylindricalJoint.cpp
+ OndselSolver/ASMTCylSphJoint.cpp
+ OndselSolver/ASMTExtrusion.cpp
+ OndselSolver/ASMTFixedJoint.cpp
+ OndselSolver/ASMTForceTorque.cpp
+ OndselSolver/ASMTGearJoint.cpp
+ OndselSolver/ASMTGeneralMotion.cpp
+ OndselSolver/ASMTInPlaneJoint.cpp
+ OndselSolver/ASMTItem.cpp
+ OndselSolver/ASMTItemIJ.cpp
+ OndselSolver/ASMTJoint.cpp
+ OndselSolver/ASMTKinematicIJ.cpp
+ OndselSolver/ASMTLineInPlaneJoint.cpp
+ OndselSolver/ASMTMarker.cpp
+ OndselSolver/ASMTMotion.cpp
+ OndselSolver/ASMTNoRotationJoint.cpp
+ OndselSolver/ASMTParallelAxesJoint.cpp
+ OndselSolver/ASMTPart.cpp
+ OndselSolver/ASMTPerpendicularJoint.cpp
+ OndselSolver/ASMTPlanarJoint.cpp
+ OndselSolver/ASMTPointInLineJoint.cpp
+ OndselSolver/ASMTPointInPlaneJoint.cpp
+ OndselSolver/ASMTPrincipalMassMarker.cpp
+ OndselSolver/ASMTRackPinionJoint.cpp
+ OndselSolver/ASMTRefCurve.cpp
+ OndselSolver/ASMTRefItem.cpp
+ OndselSolver/ASMTRefPoint.cpp
+ OndselSolver/ASMTRefSurface.cpp
+ OndselSolver/ASMTRevCylJoint.cpp
+ OndselSolver/ASMTRevoluteJoint.cpp
+ OndselSolver/ASMTRevRevJoint.cpp
+ OndselSolver/ASMTRotationalMotion.cpp
+ OndselSolver/ASMTScrewJoint.cpp
+ OndselSolver/ASMTSimulationParameters.cpp
+ OndselSolver/ASMTSpatialContainer.cpp
+ OndselSolver/ASMTSpatialItem.cpp
+ OndselSolver/ASMTSphericalJoint.cpp
+ OndselSolver/ASMTSphSphJoint.cpp
+ OndselSolver/ASMTTime.cpp
+ OndselSolver/ASMTTranslationalJoint.cpp
+ OndselSolver/ASMTTranslationalMotion.cpp
+ OndselSolver/ASMTUniversalJoint.cpp
+ OndselSolver/AtPointConstraintIJ.cpp
+ OndselSolver/AtPointConstraintIqcJc.cpp
+ OndselSolver/AtPointConstraintIqcJqc.cpp
+ OndselSolver/AtPointConstraintIqctJqc.cpp
+ OndselSolver/AtPointJoint.cpp
+ OndselSolver/BasicIntegrator.cpp
+ OndselSolver/BasicQuasiIntegrator.cpp
+ OndselSolver/BasicUserFunction.cpp
+ OndselSolver/CADSystem.cpp
+ OndselSolver/CartesianFrame.cpp
+ OndselSolver/CompoundJoint.cpp
+ OndselSolver/Constant.cpp
+ OndselSolver/ConstantGravity.cpp
+ OndselSolver/ConstantVelocityJoint.cpp
+ OndselSolver/Constraint.cpp
+ OndselSolver/ConstraintIJ.cpp
+ OndselSolver/ConstVelConstraintIJ.cpp
+ OndselSolver/ConstVelConstraintIqcJc.cpp
+ OndselSolver/ConstVelConstraintIqcJqc.cpp
+ OndselSolver/Cosine.cpp
+ OndselSolver/CREATE.cpp
+ OndselSolver/CylindricalJoint.cpp
+ OndselSolver/CylSphJoint.cpp
+ OndselSolver/DiagonalMatrix.cpp
+ OndselSolver/DifferenceOperator.cpp
+ OndselSolver/DifferentiatedGeneralSpline.cpp
+ OndselSolver/DirectionCosineConstraintIJ.cpp
+ OndselSolver/DirectionCosineConstraintIqcJc.cpp
+ OndselSolver/DirectionCosineConstraintIqcJqc.cpp
+ OndselSolver/DirectionCosineConstraintIqctJqc.cpp
+ OndselSolver/DirectionCosineIecJec.cpp
+ OndselSolver/DirectionCosineIeqcJec.cpp
+ OndselSolver/DirectionCosineIeqcJeqc.cpp
+ OndselSolver/DirectionCosineIeqctJeqc.cpp
+ OndselSolver/DiscontinuityError.cpp
+ OndselSolver/DispCompIecJecIe.cpp
+ OndselSolver/DispCompIecJecKec.cpp
+ OndselSolver/DispCompIecJecKeqc.cpp
+ OndselSolver/DispCompIecJecO.cpp
+ OndselSolver/DispCompIeqcJecIe.cpp
+ OndselSolver/DispCompIeqcJecKeqc.cpp
+ OndselSolver/DispCompIeqcJecO.cpp
+ OndselSolver/DispCompIeqcJeqcIe.cpp
+ OndselSolver/DispCompIeqcJeqcKeqc.cpp
+ OndselSolver/DispCompIeqcJeqcKeqct.cpp
+ OndselSolver/DispCompIeqcJeqcO.cpp
+ OndselSolver/DispCompIeqctJeqcIe.cpp
+ OndselSolver/DispCompIeqctJeqcKeqct.cpp
+ OndselSolver/DispCompIeqctJeqcO.cpp
+ OndselSolver/DistanceConstraintIJ.cpp
+ OndselSolver/DistanceConstraintIqcJc.cpp
+ OndselSolver/DistanceConstraintIqcJqc.cpp
+ OndselSolver/DistanceConstraintIqctJqc.cpp
+ OndselSolver/DistancexyConstraintIJ.cpp
+ OndselSolver/DistancexyConstraintIqcJc.cpp
+ OndselSolver/DistancexyConstraintIqcJqc.cpp
+ OndselSolver/DistIecJec.cpp
+ OndselSolver/DistIeqcJec.cpp
+ OndselSolver/DistIeqcJeqc.cpp
+ OndselSolver/DistIeqctJeqc.cpp
+ OndselSolver/DistxyIecJec.cpp
+ OndselSolver/DistxyIeqcJec.cpp
+ OndselSolver/DistxyIeqcJeqc.cpp
+ OndselSolver/DistxyIeqctJeqc.cpp
+ OndselSolver/EigenDecomposition.cpp
+ OndselSolver/EndFramec.cpp
+ OndselSolver/EndFrameqc.cpp
+ OndselSolver/EndFrameqct.cpp
+ OndselSolver/EndFrameqct2.cpp
+ OndselSolver/EulerAngles.cpp
+ OndselSolver/EulerAnglesDDot.cpp
+ OndselSolver/EulerAnglesDot.cpp
+ OndselSolver/EulerAngleszxz.cpp
+ OndselSolver/EulerAngleszxzDDot.cpp
+ OndselSolver/EulerAngleszxzDot.cpp
+ OndselSolver/EulerArray.cpp
+ OndselSolver/EulerConstraint.cpp
+ OndselSolver/EulerParameters.cpp
+ OndselSolver/EulerParametersDDot.cpp
+ OndselSolver/EulerParametersDot.cpp
+ OndselSolver/Exponential.cpp
+ OndselSolver/ExpressionX.cpp
+ OndselSolver/ExternalSystem.cpp
+ OndselSolver/FixedJoint.cpp
+ OndselSolver/ForceTorqueData.cpp
+ OndselSolver/ForceTorqueItem.cpp
+ OndselSolver/FullMotion.cpp
+ OndselSolver/Function.cpp
+ OndselSolver/FunctionFromData.cpp
+ OndselSolver/FunctionWithManyArgs.cpp
+ OndselSolver/FunctionX.cpp
+ OndselSolver/FunctionXcParameter.cpp
+ OndselSolver/FunctionXY.cpp
+ OndselSolver/GearConstraintIJ.cpp
+ OndselSolver/GearConstraintIqcJc.cpp
+ OndselSolver/GearConstraintIqcJqc.cpp
+ OndselSolver/GearJoint.cpp
+ OndselSolver/GEFullMat.cpp
+ OndselSolver/GEFullMatFullPv.cpp
+ OndselSolver/GEFullMatParPv.cpp
+ OndselSolver/GeneralSpline.cpp
+ OndselSolver/GESpMat.cpp
+ OndselSolver/GESpMatFullPv.cpp
+ OndselSolver/GESpMatFullPvPosIC.cpp
+ OndselSolver/GESpMatParPv.cpp
+ OndselSolver/GESpMatParPvMarko.cpp
+ OndselSolver/GESpMatParPvMarkoFast.cpp
+ OndselSolver/GESpMatParPvPrecise.cpp
+ OndselSolver/ICKineIntegrator.cpp
+ OndselSolver/IndependentVariable.cpp
+ OndselSolver/InLineJoint.cpp
+ OndselSolver/InPlaneJoint.cpp
+ OndselSolver/Integral.cpp
+ OndselSolver/Integrator.cpp
+ OndselSolver/IntegratorInterface.cpp
+ OndselSolver/Item.cpp
+ OndselSolver/Joint.cpp
+ OndselSolver/KineIntegrator.cpp
+ OndselSolver/KinematicIeJe.cpp
+ OndselSolver/LDUFullMat.cpp
+ OndselSolver/LDUFullMatParPv.cpp
+ OndselSolver/LDUSpMat.cpp
+ OndselSolver/LDUSpMatParPv.cpp
+ OndselSolver/LDUSpMatParPvMarko.cpp
+ OndselSolver/LDUSpMatParPvPrecise.cpp
+ OndselSolver/LinearMultiStepMethod.cpp
+ OndselSolver/LineInPlaneJoint.cpp
+ OndselSolver/Ln.cpp
+ OndselSolver/Log10.cpp
+ OndselSolver/LogN.cpp
+ OndselSolver/MarkerFrame.cpp
+ OndselSolver/MatrixDecomposition.cpp
+ OndselSolver/MatrixGaussElimination.cpp
+ OndselSolver/MatrixLDU.cpp
+ OndselSolver/MatrixSolver.cpp
+ OndselSolver/MaximumIterationError.cpp
+ OndselSolver/MbDMath.cpp
+ OndselSolver/MBDynAxialRotationJoint.cpp
+ OndselSolver/MBDynClampJoint.cpp
+ OndselSolver/MBDynDriveHingeJoint.cpp
+ OndselSolver/MBDynInLineJoint.cpp
+ OndselSolver/MBDynInPlaneJoint.cpp
+ OndselSolver/MBDynPrismaticJoint.cpp
+ OndselSolver/MBDynRevoluteHingeJoint.cpp
+ OndselSolver/MBDynRevolutePinJoint.cpp
+ OndselSolver/MBDynSphericalHingeJoint.cpp
+ OndselSolver/MBDynTotalJoint.cpp
+ OndselSolver/MBDynBlock.cpp
+ OndselSolver/MBDynBody.cpp
+ OndselSolver/MBDynControlData.cpp
+ OndselSolver/MBDynData.cpp
+ OndselSolver/MBDynDrive.cpp
+ OndselSolver/MBDynElement.cpp
+ OndselSolver/MBDynGravity.cpp
+ OndselSolver/MBDynInitialValue.cpp
+ OndselSolver/MBDynItem.cpp
+ OndselSolver/MBDynJoint.cpp
+ OndselSolver/MBDynMarker.cpp
+ OndselSolver/MBDynNode.cpp
+ OndselSolver/MBDynReference.cpp
+ OndselSolver/MBDynStructural.cpp
+ OndselSolver/MBDynSystem.cpp
+ OndselSolver/MomentOfInertiaSolver.cpp
+ OndselSolver/Negative.cpp
+ OndselSolver/NewtonRaphson.cpp
+ OndselSolver/NewtonRaphsonError.cpp
+ OndselSolver/NoRotationJoint.cpp
+ OndselSolver/NotKinematicError.cpp
+ OndselSolver/Numeric.cpp
+ OndselSolver/OrbitAngleZIecJec.cpp
+ OndselSolver/OrbitAngleZIeqcJec.cpp
+ OndselSolver/OrbitAngleZIeqcJeqc.cpp
+ OndselSolver/Orientation.cpp
+ OndselSolver/ParallelAxesJoint.cpp
+ OndselSolver/Part.cpp
+ OndselSolver/PartFrame.cpp
+ OndselSolver/PerpendicularJoint.cpp
+ OndselSolver/PiecewiseFunction.cpp
+ OndselSolver/PlanarJoint.cpp
+ OndselSolver/PointInLineJoint.cpp
+ OndselSolver/PointInPlaneJoint.cpp
+ OndselSolver/Polynomial.cpp
+ OndselSolver/PosICDragNewtonRaphson.cpp
+ OndselSolver/PosICKineNewtonRaphson.cpp
+ OndselSolver/PosICNewtonRaphson.cpp
+ OndselSolver/PosKineNewtonRaphson.cpp
+ OndselSolver/PosNewtonRaphson.cpp
+ OndselSolver/PosVelAccData.cpp
+ OndselSolver/Power.cpp
+ OndselSolver/PrescribedMotion.cpp
+ OndselSolver/Product.cpp
+ OndselSolver/QuasiIntegrator.cpp
+ OndselSolver/RackPinConstraintIJ.cpp
+ OndselSolver/RackPinConstraintIqcJc.cpp
+ OndselSolver/RackPinConstraintIqcJqc.cpp
+ OndselSolver/RackPinJoint.cpp
+ OndselSolver/RampStepFunction.cpp
+ OndselSolver/Reciprocal.cpp
+ OndselSolver/RedundantConstraint.cpp
+ OndselSolver/RevCylJoint.cpp
+ OndselSolver/RevoluteJoint.cpp
+ OndselSolver/RevRevJoint.cpp
+ OndselSolver/ScalarNewtonRaphson.cpp
+ OndselSolver/ScrewConstraintIJ.cpp
+ OndselSolver/ScrewConstraintIqcJc.cpp
+ OndselSolver/ScrewConstraintIqcJqc.cpp
+ OndselSolver/ScrewJoint.cpp
+ OndselSolver/SimulationStoppingError.cpp
+ OndselSolver/Sine.cpp
+ OndselSolver/SingularMatrixError.cpp
+ OndselSolver/Solver.cpp
+ OndselSolver/SparseColumn.cpp
+ OndselSolver/SparseMatrix.cpp
+ OndselSolver/SparseRow.cpp
+ OndselSolver/SparseVector.cpp
+ OndselSolver/SphericalJoint.cpp
+ OndselSolver/SphSphJoint.cpp
+ OndselSolver/StableBackwardDifference.cpp
+ OndselSolver/StateData.cpp
+ OndselSolver/Sum.cpp
+ OndselSolver/Symbolic.cpp
+ OndselSolver/SymbolicParser.cpp
+ OndselSolver/SyntaxError.cpp
+ OndselSolver/System.cpp
+ OndselSolver/SystemNewtonRaphson.cpp
+ OndselSolver/SystemSolver.cpp
+ OndselSolver/Time.cpp
+ OndselSolver/TooManyTriesError.cpp
+ OndselSolver/TooSmallStepSizeError.cpp
+ OndselSolver/Translation.cpp
+ OndselSolver/TranslationalJoint.cpp
+ OndselSolver/TranslationConstraintIJ.cpp
+ OndselSolver/TranslationConstraintIqcJc.cpp
+ OndselSolver/TranslationConstraintIqcJqc.cpp
+ OndselSolver/TranslationConstraintIqctJqc.cpp
+ OndselSolver/Units.cpp
+ OndselSolver/UniversalJoint.cpp
+ OndselSolver/UserFunction.cpp
+ OndselSolver/Variable.cpp
+ OndselSolver/VectorNewtonRaphson.cpp
+ OndselSolver/VelICKineSolver.cpp
+ OndselSolver/VelICSolver.cpp
+ OndselSolver/VelKineSolver.cpp
+ OndselSolver/VelSolver.cpp
+ OndselSolver/ZRotation.cpp
+ OndselSolver/ZTranslation.cpp
+)
+
+set(ONDSELSOLVER_HEADERS
+ OndselSolver/Array.h
+ OndselSolver/FullVector.h
+ OndselSolver/RowTypeMatrix.h
+ OndselSolver/FullRow.h
+ OndselSolver/FullColumn.h
+ OndselSolver/FullMatrix.h
+ OndselSolver/Abs.h
+ OndselSolver/AbsConstraint.h
+ OndselSolver/AccICKineNewtonRaphson.h
+ OndselSolver/AccICNewtonRaphson.h
+ OndselSolver/AccKineNewtonRaphson.h
+ OndselSolver/AccNewtonRaphson.h
+ OndselSolver/AngleJoint.h
+ OndselSolver/AngleZIecJec.h
+ OndselSolver/AngleZIeqcJec.h
+ OndselSolver/AngleZIeqcJeqc.h
+ OndselSolver/AnyGeneralSpline.h
+ OndselSolver/AnyPosICNewtonRaphson.h
+ OndselSolver/ArcSine.h
+ OndselSolver/ArcTan.h
+ OndselSolver/ArcTan2.h
+ OndselSolver/Arguments.h
+ OndselSolver/ASMTAngleJoint.h
+ OndselSolver/ASMTAnimationParameters.h
+ OndselSolver/ASMTAssembly.h
+ OndselSolver/ASMTCylSphJoint.h
+ OndselSolver/ASMTCompoundJoint.h
+ OndselSolver/ASMTConstantGravity.h
+ OndselSolver/ASMTConstantVelocityJoint.h
+ OndselSolver/ASMTConstraintSet.h
+ OndselSolver/ASMTCylindricalJoint.h
+ OndselSolver/ASMTExtrusion.h
+ OndselSolver/ASMTFixedJoint.h
+ OndselSolver/ASMTForceTorque.h
+ OndselSolver/ASMTGearJoint.h
+ OndselSolver/ASMTGeneralMotion.h
+ OndselSolver/ASMTInPlaneJoint.h
+ OndselSolver/ASMTItem.h
+ OndselSolver/ASMTItemIJ.h
+ OndselSolver/ASMTJoint.h
+ OndselSolver/ASMTKinematicIJ.h
+ OndselSolver/ASMTLineInPlaneJoint.h
+ OndselSolver/ASMTMarker.h
+ OndselSolver/ASMTMotion.h
+ OndselSolver/ASMTNoRotationJoint.h
+ OndselSolver/ASMTParallelAxesJoint.h
+ OndselSolver/ASMTPart.h
+ OndselSolver/ASMTPerpendicularJoint.h
+ OndselSolver/ASMTPlanarJoint.h
+ OndselSolver/ASMTPointInLineJoint.h
+ OndselSolver/ASMTPointInPlaneJoint.h
+ OndselSolver/ASMTPrincipalMassMarker.h
+ OndselSolver/ASMTRackPinionJoint.h
+ OndselSolver/ASMTRefCurve.h
+ OndselSolver/ASMTRefItem.h
+ OndselSolver/ASMTRefPoint.h
+ OndselSolver/ASMTRefSurface.h
+ OndselSolver/ASMTRevCylJoint.h
+ OndselSolver/ASMTRevoluteJoint.h
+ OndselSolver/ASMTRevRevJoint.h
+ OndselSolver/ASMTRotationalMotion.h
+ OndselSolver/ASMTScrewJoint.h
+ OndselSolver/ASMTSimulationParameters.h
+ OndselSolver/ASMTSpatialContainer.h
+ OndselSolver/ASMTSpatialItem.h
+ OndselSolver/ASMTSphericalJoint.h
+ OndselSolver/ASMTSphSphJoint.h
+ OndselSolver/ASMTTime.h
+ OndselSolver/ASMTTranslationalJoint.h
+ OndselSolver/ASMTTranslationalMotion.h
+ OndselSolver/ASMTUniversalJoint.h
+ OndselSolver/AtPointConstraintIJ.h
+ OndselSolver/AtPointConstraintIqcJc.h
+ OndselSolver/AtPointConstraintIqcJqc.h
+ OndselSolver/AtPointConstraintIqctJqc.h
+ OndselSolver/AtPointJoint.h
+ OndselSolver/BasicIntegrator.h
+ OndselSolver/BasicQuasiIntegrator.h
+ OndselSolver/BasicUserFunction.h
+ OndselSolver/CADSystem.h
+ OndselSolver/CartesianFrame.h
+ OndselSolver/CompoundJoint.h
+ OndselSolver/Constant.h
+ OndselSolver/ConstantGravity.h
+ OndselSolver/ConstantVelocityJoint.h
+ OndselSolver/Constraint.h
+ OndselSolver/ConstraintIJ.h
+ OndselSolver/ConstVelConstraintIJ.h
+ OndselSolver/ConstVelConstraintIqcJc.h
+ OndselSolver/ConstVelConstraintIqcJqc.h
+ OndselSolver/corecrt_math_defines.h
+ OndselSolver/Cosine.h
+ OndselSolver/CREATE.h
+ OndselSolver/CylindricalJoint.h
+ OndselSolver/CylSphJoint.h
+ OndselSolver/DiagonalMatrix.h
+ OndselSolver/DifferenceOperator.h
+ OndselSolver/DifferentiatedGeneralSpline.h
+ OndselSolver/DirectionCosineConstraintIJ.h
+ OndselSolver/DirectionCosineConstraintIqcJc.h
+ OndselSolver/DirectionCosineConstraintIqcJqc.h
+ OndselSolver/DirectionCosineConstraintIqctJqc.h
+ OndselSolver/DirectionCosineIecJec.h
+ OndselSolver/DirectionCosineIeqcJec.h
+ OndselSolver/DirectionCosineIeqcJeqc.h
+ OndselSolver/DirectionCosineIeqctJeqc.h
+ OndselSolver/DiscontinuityError.h
+ OndselSolver/DispCompIecJecIe.h
+ OndselSolver/DispCompIecJecKec.h
+ OndselSolver/DispCompIecJecKeqc.h
+ OndselSolver/DispCompIecJecO.h
+ OndselSolver/DispCompIeqcJecIe.h
+ OndselSolver/DispCompIeqcJecKeqc.h
+ OndselSolver/DispCompIeqcJecO.h
+ OndselSolver/DispCompIeqcJeqcIe.h
+ OndselSolver/DispCompIeqcJeqcKeqc.h
+ OndselSolver/DispCompIeqcJeqcKeqct.h
+ OndselSolver/DispCompIeqcJeqcO.h
+ OndselSolver/DispCompIeqctJeqcIe.h
+ OndselSolver/DispCompIeqctJeqcKeqct.h
+ OndselSolver/DispCompIeqctJeqcO.h
+ OndselSolver/DistanceConstraintIJ.h
+ OndselSolver/DistanceConstraintIqcJc.h
+ OndselSolver/DistanceConstraintIqcJqc.h
+ OndselSolver/DistanceConstraintIqctJqc.h
+ OndselSolver/DistancexyConstraintIJ.h
+ OndselSolver/DistancexyConstraintIqcJc.h
+ OndselSolver/DistancexyConstraintIqcJqc.h
+ OndselSolver/DistIecJec.h
+ OndselSolver/DistIeqcJec.h
+ OndselSolver/DistIeqcJeqc.h
+ OndselSolver/DistIeqctJeqc.h
+ OndselSolver/DistxyIecJec.h
+ OndselSolver/DistxyIeqcJec.h
+ OndselSolver/DistxyIeqcJeqc.h
+ OndselSolver/DistxyIeqctJeqc.h
+ OndselSolver/EigenDecomposition.h
+ OndselSolver/EndFramec.h
+ OndselSolver/EndFrameqc.h
+ OndselSolver/EndFrameqct.h
+ OndselSolver/EndFrameqct2.h
+ OndselSolver/enum.h
+ OndselSolver/EulerAngles.h
+ OndselSolver/EulerAnglesDDot.h
+ OndselSolver/EulerAnglesDot.h
+ OndselSolver/EulerAngleszxz.h
+ OndselSolver/EulerAngleszxzDDot.h
+ OndselSolver/EulerAngleszxzDot.h
+ OndselSolver/EulerArray.h
+ OndselSolver/EulerConstraint.h
+ OndselSolver/EulerParameters.h
+ OndselSolver/EulerParametersDDot.h
+ OndselSolver/EulerParametersDot.h
+ OndselSolver/Exponential.h
+ OndselSolver/ExpressionX.h
+ OndselSolver/ExternalSystem.h
+ OndselSolver/FixedJoint.h
+ OndselSolver/ForceTorqueData.h
+ OndselSolver/ForceTorqueItem.h
+ OndselSolver/FullMotion.h
+ OndselSolver/FullRow.h
+ OndselSolver/Function.h
+ OndselSolver/FunctionFromData.h
+ OndselSolver/FunctionWithManyArgs.h
+ OndselSolver/FunctionX.h
+ OndselSolver/FunctionXcParameter.h
+ OndselSolver/FunctionXY.h
+ OndselSolver/GearConstraintIJ.h
+ OndselSolver/GearConstraintIqcJc.h
+ OndselSolver/GearConstraintIqcJqc.h
+ OndselSolver/GearJoint.h
+ OndselSolver/GEFullMat.h
+ OndselSolver/GEFullMatFullPv.h
+ OndselSolver/GEFullMatParPv.h
+ OndselSolver/GeneralSpline.h
+ OndselSolver/GESpMat.h
+ OndselSolver/GESpMatFullPv.h
+ OndselSolver/GESpMatFullPvPosIC.h
+ OndselSolver/GESpMatParPv.h
+ OndselSolver/GESpMatParPvMarko.h
+ OndselSolver/GESpMatParPvMarkoFast.h
+ OndselSolver/GESpMatParPvPrecise.h
+ OndselSolver/ICKineIntegrator.h
+ OndselSolver/IndependentVariable.h
+ OndselSolver/InLineJoint.h
+ OndselSolver/InPlaneJoint.h
+ OndselSolver/Integrator.h
+ OndselSolver/IntegratorInterface.h
+ OndselSolver/Item.h
+ OndselSolver/Joint.h
+ OndselSolver/KineIntegrator.h
+ OndselSolver/KinematicIeJe.h
+ OndselSolver/LDUFullMat.h
+ OndselSolver/LDUFullMatParPv.h
+ OndselSolver/LDUSpMat.h
+ OndselSolver/LDUSpMatParPv.h
+ OndselSolver/LDUSpMatParPvMarko.h
+ OndselSolver/LDUSpMatParPvPrecise.h
+ OndselSolver/LinearMultiStepMethod.h
+ OndselSolver/LineInPlaneJoint.h
+ OndselSolver/Ln.h
+ OndselSolver/Log10.h
+ OndselSolver/LogN.h
+ OndselSolver/MarkerFrame.h
+ OndselSolver/MatrixDecomposition.h
+ OndselSolver/MatrixGaussElimination.h
+ OndselSolver/MatrixLDU.h
+ OndselSolver/MatrixSolver.h
+ OndselSolver/MaximumIterationError.h
+ OndselSolver/MbDMath.h
+ OndselSolver/MBDynAxialRotationJoint.h
+ OndselSolver/MBDynClampJoint.h
+ OndselSolver/MBDynDriveHingeJoint.h
+ OndselSolver/MBDynInLineJoint.h
+ OndselSolver/MBDynInPlaneJoint.h
+ OndselSolver/MBDynPrismaticJoint.h
+ OndselSolver/MBDynRevoluteHingeJoint.h
+ OndselSolver/MBDynRevolutePinJoint.h
+ OndselSolver/MBDynSphericalHingeJoint.h
+ OndselSolver/MBDynTotalJoint.h
+ OndselSolver/MBDynBlock.h
+ OndselSolver/MBDynBody.h
+ OndselSolver/MBDynControlData.h
+ OndselSolver/MBDynData.h
+ OndselSolver/MBDynElement.h
+ OndselSolver/MBDynGravity.h
+ OndselSolver/MBDynInitialValue.h
+ OndselSolver/MBDynItem.h
+ OndselSolver/MBDynJoint.h
+ OndselSolver/MBDynMarker.h
+ OndselSolver/MBDynNode.h
+ OndselSolver/MBDynReference.h
+ OndselSolver/MBDynStructural.h
+ OndselSolver/MBDynSystem.h
+ OndselSolver/MomentOfInertiaSolver.h
+ OndselSolver/Negative.h
+ OndselSolver/NewtonRaphson.h
+ OndselSolver/NewtonRaphsonError.h
+ OndselSolver/NoRotationJoint.h
+ OndselSolver/NotKinematicError.h
+ OndselSolver/Numeric.h
+ OndselSolver/OrbitAngleZIecJec.h
+ OndselSolver/OrbitAngleZIeqcJec.h
+ OndselSolver/OrbitAngleZIeqcJeqc.h
+ OndselSolver/Orientation.h
+ OndselSolver/ParallelAxesJoint.h
+ OndselSolver/Part.h
+ OndselSolver/PartFrame.h
+ OndselSolver/PerpendicularJoint.h
+ OndselSolver/PlanarJoint.h
+ OndselSolver/PointInLineJoint.h
+ OndselSolver/PointInPlaneJoint.h
+ OndselSolver/PosICDragNewtonRaphson.h
+ OndselSolver/PosICKineNewtonRaphson.h
+ OndselSolver/PosICNewtonRaphson.h
+ OndselSolver/PosKineNewtonRaphson.h
+ OndselSolver/PosNewtonRaphson.h
+ OndselSolver/PosVelAccData.h
+ OndselSolver/Power.h
+ OndselSolver/PrescribedMotion.h
+ OndselSolver/Product.h
+ OndselSolver/QuasiIntegrator.h
+ OndselSolver/RackPinConstraintIJ.h
+ OndselSolver/RackPinConstraintIqcJc.h
+ OndselSolver/RackPinConstraintIqcJqc.h
+ OndselSolver/RackPinJoint.h
+ OndselSolver/Reciprocal.h
+ OndselSolver/RedundantConstraint.h
+ OndselSolver/resource.h
+ OndselSolver/RevCylJoint.h
+ OndselSolver/RevoluteJoint.h
+ OndselSolver/RevRevJoint.h
+ OndselSolver/ScalarNewtonRaphson.h
+ OndselSolver/ScrewConstraintIJ.h
+ OndselSolver/ScrewConstraintIqcJc.h
+ OndselSolver/ScrewConstraintIqcJqc.h
+ OndselSolver/ScrewJoint.h
+ OndselSolver/SimulationStoppingError.h
+ OndselSolver/Sine.h
+ OndselSolver/SingularMatrixError.h
+ OndselSolver/Solver.h
+ OndselSolver/SparseColumn.h
+ OndselSolver/SparseMatrix.h
+ OndselSolver/SparseRow.h
+ OndselSolver/SparseVector.h
+ OndselSolver/SphericalJoint.h
+ OndselSolver/SphSphJoint.h
+ OndselSolver/StableBackwardDifference.h
+ OndselSolver/StateData.h
+ OndselSolver/Sum.h
+ OndselSolver/Symbolic.h
+ OndselSolver/SymbolicParser.h
+ OndselSolver/SyntaxError.h
+ OndselSolver/System.h
+ OndselSolver/SystemNewtonRaphson.h
+ OndselSolver/SystemSolver.h
+ OndselSolver/Time.h
+ OndselSolver/TooManyTriesError.h
+ OndselSolver/TooSmallStepSizeError.h
+ OndselSolver/Translation.h
+ OndselSolver/TranslationalJoint.h
+ OndselSolver/TranslationConstraintIJ.h
+ OndselSolver/TranslationConstraintIqcJc.h
+ OndselSolver/TranslationConstraintIqcJqc.h
+ OndselSolver/TranslationConstraintIqctJqc.h
+ OndselSolver/Units.h
+ OndselSolver/UniversalJoint.h
+ OndselSolver/UserFunction.h
+ OndselSolver/Variable.h
+ OndselSolver/VectorNewtonRaphson.h
+ OndselSolver/VelICKineSolver.h
+ OndselSolver/VelICSolver.h
+ OndselSolver/VelKineSolver.h
+ OndselSolver/VelSolver.h
+ OndselSolver/ZRotation.h
+ OndselSolver/ZTranslation.h
+)
+
+target_sources(OndselSolver PRIVATE
+ "${ONDSELSOLVER_SRC}"
+ "${ONDSELSOLVER_HEADERS}")
+
+set_target_properties(OndselSolver
+ PROPERTIES VERSION ${PROJECT_VERSION}
+ SOVERSION 1
+ PUBLIC_HEADER "${ONDSELSOLVER_HEADERS}"
+)
+
+configure_file(OndselSolver.pc.in ${CMAKE_BINARY_DIR}/OndselSolver.pc @ONLY)
+install(TARGETS OndselSolver
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OndselSolver)
+install(FILES ${CMAKE_BINARY_DIR}/OndselSolver.pc
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
diff --git a/src/3rdParty/OndselSolver/LICENSE b/src/3rdParty/OndselSolver/LICENSE
new file mode 100644
index 000000000000..9f9b88d3f864
--- /dev/null
+++ b/src/3rdParty/OndselSolver/LICENSE
@@ -0,0 +1,177 @@
+GNU LESSER GENERAL PUBLIC LICENSE
+
+Version 2.1, February 1999
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+
+When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+
+To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+
+To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+
+Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+
+When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+
+We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+
+For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+
+In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+
+Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+ b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+ c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+ d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+ b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+ c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+ d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+ e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+ b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+END OF TERMS AND CONDITIONS
+How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+one line to give the library's name and an idea of what it does.
+Copyright (C) year name of author
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+the library `Frob' (a library for tweaking knobs) written
+by James Random Hacker.
+
+signature of Ty Coon, 1 April 1990
+Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/src/3rdParty/OndselSolver/OndselSolver.pc.in b/src/3rdParty/OndselSolver/OndselSolver.pc.in
new file mode 100644
index 000000000000..076f352c6abc
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver.pc.in
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: @PROJECT_NAME@
+Description: @PROJECT_DESCRIPTION@
+Version: @PROJECT_VERSION@
+
+Requires:
+Libs: -L${libdir} -lOndselSolver
+Cflags: -I${includedir}
\ No newline at end of file
diff --git a/src/3rdParty/OndselSolver/OndselSolver.sln b/src/3rdParty/OndselSolver/OndselSolver.sln
new file mode 100644
index 000000000000..2d4c7344e447
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33530.505
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OndselSolver", "OndselSolver\OndselSolver.vcxproj", "{80F56CBC-B685-4C36-B834-A2DCDF0A98B7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x64.ActiveCfg = Debug|x64
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x64.Build.0 = Debug|x64
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x86.ActiveCfg = Debug|Win32
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Debug|x86.Build.0 = Debug|Win32
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x64.ActiveCfg = Release|x64
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x64.Build.0 = Release|x64
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x86.ActiveCfg = Release|Win32
+ {80F56CBC-B685-4C36-B834-A2DCDF0A98B7}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BD48A6EF-4E93-4C09-BCE1-84F0439DB2D9}
+ EndGlobalSection
+EndGlobal
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.cpp b/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.cpp
new file mode 100644
index 000000000000..baac67572499
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.cpp
@@ -0,0 +1,50 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+#include
+
+#include "ASMTAngleJoint.h"
+#include "AngleJoint.h"
+
+using namespace MbD;
+
+std::shared_ptr MbD::ASMTAngleJoint::mbdClassNew()
+{
+ return CREATE::With();
+}
+
+void MbD::ASMTAngleJoint::parseASMT(std::vector& lines)
+{
+ ASMTJoint::parseASMT(lines);
+ readTheIzJz(lines);
+}
+
+void MbD::ASMTAngleJoint::readTheIzJz(std::vector& lines)
+{
+ if (lines[0].find("theIzJz") == std::string::npos) {
+ theIzJz = 0.0;
+ }
+ else {
+ lines.erase(lines.begin());
+ theIzJz = readDouble(lines[0]);
+ lines.erase(lines.begin());
+ }
+}
+
+void MbD::ASMTAngleJoint::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits)
+{
+ ASMTJoint::createMbD(mbdSys, mbdUnits);
+ auto angleJoint = std::static_pointer_cast(mbdObject);
+ angleJoint->theIzJz = theIzJz;
+}
+
+void MbD::ASMTAngleJoint::storeOnLevel(std::ofstream& os, int level)
+{
+ ASMTJoint::storeOnLevel(os, level);
+ storeOnLevelString(os, level + 1, "theIzJz");
+ storeOnLevelDouble(os, level + 2, theIzJz);
+}
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.h b/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.h
new file mode 100644
index 000000000000..f49618ac4d72
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAngleJoint.h
@@ -0,0 +1,27 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+
+#pragma once
+
+#include "ASMTJoint.h"
+
+namespace MbD {
+ class ASMTAngleJoint : public ASMTJoint
+ {
+ //
+ public:
+ std::shared_ptr mbdClassNew() override;
+ void parseASMT(std::vector& lines) override;
+ void readTheIzJz(std::vector& lines);
+ void createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) override;
+ void storeOnLevel(std::ofstream& os, int level) override;
+
+ double theIzJz = 0.0;
+ };
+}
+
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.cpp b/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.cpp
new file mode 100644
index 000000000000..853f115db915
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.cpp
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+
+#include "ASMTAnimationParameters.h"
+
+using namespace MbD;
+
+void MbD::ASMTAnimationParameters::parseASMT(std::vector& lines)
+{
+ //int nframe, icurrent, istart, iend, framesPerSecond;
+ //bool isForward;
+ int pos = (int)lines[0].find_first_not_of("\t");
+ auto leadingTabs = lines[0].substr(0, pos);
+ assert(lines[0] == (leadingTabs + "nframe"));
+ lines.erase(lines.begin());
+ nframe = readInt(lines[0]);
+ lines.erase(lines.begin());
+ assert(lines[0] == (leadingTabs + "icurrent"));
+ lines.erase(lines.begin());
+ icurrent = readInt(lines[0]);
+ lines.erase(lines.begin());
+ assert(lines[0] == (leadingTabs + "istart"));
+ lines.erase(lines.begin());
+ istart = readInt(lines[0]);
+ lines.erase(lines.begin());
+ assert(lines[0] == (leadingTabs + "iend"));
+ lines.erase(lines.begin());
+ iend = readInt(lines[0]);
+ lines.erase(lines.begin());
+ assert(lines[0] == (leadingTabs + "isForward"));
+ lines.erase(lines.begin());
+ isForward = readBool(lines[0]);
+ lines.erase(lines.begin());
+ assert(lines[0] == (leadingTabs + "framesPerSecond"));
+ lines.erase(lines.begin());
+ framesPerSecond = readInt(lines[0]);
+ lines.erase(lines.begin());
+
+}
+
+void MbD::ASMTAnimationParameters::storeOnLevel(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "AnimationParameters");
+ storeOnLevelString(os, level + 1, "nframe");
+ storeOnLevelInt(os, level + 2, nframe);
+ storeOnLevelString(os, level + 1, "icurrent");
+ storeOnLevelInt(os, level + 2, icurrent);
+ storeOnLevelString(os, level + 1, "istart");
+ storeOnLevelInt(os, level + 2, istart);
+ storeOnLevelString(os, level + 1, "iend");
+ storeOnLevelInt(os, level + 2, iend);
+ storeOnLevelString(os, level + 1, "isForward");
+ storeOnLevelBool(os, level + 2, isForward);
+ storeOnLevelString(os, level + 1, "framesPerSecond");
+ storeOnLevelInt(os, level + 2, framesPerSecond);
+}
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.h b/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.h
new file mode 100644
index 000000000000..181a0f8ccafc
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAnimationParameters.h
@@ -0,0 +1,27 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+
+#pragma once
+
+#include "ASMTItem.h"
+
+namespace MbD {
+ class ASMTAnimationParameters : public ASMTItem
+ {
+ //
+ public:
+ void parseASMT(std::vector& lines) override;
+ void storeOnLevel(std::ofstream& os, int level) override;
+
+ int nframe = 1000000, icurrent = 1, istart = 1, iend = 1000000, framesPerSecond = 30;
+ bool isForward = true;
+
+
+ };
+}
+
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.cpp b/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.cpp
new file mode 100644
index 000000000000..68194b7d3d2a
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.cpp
@@ -0,0 +1,1388 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "ASMTAssembly.h"
+#include "CREATE.h"
+#include "ASMTRevoluteJoint.h"
+#include "ASMTCylindricalJoint.h"
+#include "ASMTRotationalMotion.h"
+#include "ASMTTranslationalMotion.h"
+#include "ASMTMarker.h"
+#include "ASMTPart.h"
+#include "ASMTTranslationalJoint.h"
+#include "ASMTSphericalJoint.h"
+#include "ASMTFixedJoint.h"
+#include "ASMTGeneralMotion.h"
+#include "ASMTUniversalJoint.h"
+#include "ASMTPointInPlaneJoint.h"
+#include "ASMTPrincipalMassMarker.h"
+#include "ASMTForceTorque.h"
+#include "ASMTConstantGravity.h"
+#include "ASMTSimulationParameters.h"
+#include "ASMTAnimationParameters.h"
+#include "Part.h"
+#include "ASMTTime.h"
+#include "ASMTItemIJ.h"
+#include "ASMTAngleJoint.h"
+#include "ASMTConstantVelocityJoint.h"
+#include "ASMTCylSphJoint.h"
+#include "ASMTGearJoint.h"
+#include "ASMTPointInLineJoint.h"
+#include "ASMTRevCylJoint.h"
+#include "ASMTSphSphJoint.h"
+#include "ASMTLineInPlaneJoint.h"
+#include "ASMTPlanarJoint.h"
+#include "ASMTNoRotationJoint.h"
+#include "ASMTParallelAxesJoint.h"
+#include "ASMTPerpendicularJoint.h"
+#include "ASMTRackPinionJoint.h"
+#include "ASMTScrewJoint.h"
+#include "SimulationStoppingError.h"
+#include "ASMTKinematicIJ.h"
+#include "ASMTRefPoint.h"
+#include "ASMTRefCurve.h"
+#include "ASMTRefSurface.h"
+#include "ExternalSystem.h"
+#include "SystemSolver.h"
+#include "ASMTRevRevJoint.h"
+
+using namespace MbD;
+
+MbD::ASMTAssembly::ASMTAssembly() : ASMTSpatialContainer()
+{
+ times = std::make_shared>();
+}
+
+std::shared_ptr MbD::ASMTAssembly::With()
+{
+ auto assembly = std::make_shared();
+ return assembly;
+}
+
+void MbD::ASMTAssembly::runSinglePendulumSuperSimplified()
+{
+ //In this version we skip declaration of variables that don't need as they use default values.
+ auto assembly = CREATE::With();
+
+ assembly->setName("Assembly1");
+
+ auto mkr = CREATE::With();
+ mkr->setName("Marker1");
+ assembly->addMarker(mkr);
+
+ auto part = CREATE::With();
+ part->setName("Part1");
+ part->setPosition3D(-0.1, -0.1, -0.1);
+ assembly->addPart(part);
+
+ mkr = CREATE::With();
+ mkr->setName("Marker1");
+ mkr->setPosition3D(0.1, 0.1, 0.1);
+ part->addMarker(mkr);
+
+ auto joint = CREATE::With();
+ joint->setName("Joint1");
+ joint->setMarkerI("/Assembly1/Marker1");
+ joint->setMarkerJ("/Assembly1/Part1/Marker1");
+ assembly->addJoint(joint);
+
+ auto simulationParameters = CREATE::With();
+ simulationParameters->settstart(0.0);
+ simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
+ simulationParameters->sethmin(1.0e-9);
+ simulationParameters->sethmax(1.0);
+ simulationParameters->sethout(0.04);
+ simulationParameters->seterrorTol(1.0e-6);
+ assembly->setSimulationParameters(simulationParameters);
+
+ assembly->runKINEMATIC();
+}
+
+void MbD::ASMTAssembly::runSinglePendulumSuperSimplified2()
+{
+ //In this version we skip declaration of variables that don't need as they use default values.
+ auto assembly = CREATE::With();
+ assembly->setName("OndselAssembly");
+
+ auto mkr = CREATE::With();
+ mkr->setName("marker1");
+ assembly->addMarker(mkr);
+
+ auto part = CREATE::With();
+ part->setName("part1");
+ assembly->addPart(part);
+
+ auto marker1 = CREATE::With();
+ marker1->setName("FixingMarker");
+ part->addMarker(marker1);
+
+ auto marker2 = CREATE::With();
+ marker2->setName("marker2");
+ marker2->setPosition3D(20.0, 10.0, 0.0);
+ part->addMarker(marker2);
+
+ auto part2 = CREATE::With();
+ part2->setName("part2");
+ part2->setPosition3D(20.0, 10.0, 0.0);
+ assembly->addPart(part2);
+
+ auto marker3 = CREATE::With();
+ marker3->setName("marker2");
+ marker3->setPosition3D(50.0, 10.0, 0.0);
+ part2->addMarker(marker3);
+
+ /*Ground joint*/
+ auto joint = CREATE::With();
+ joint->setName("Joint1");
+ joint->setMarkerI("/OndselAssembly/marker1");
+ joint->setMarkerJ("/OndselAssembly/part1/FixingMarker");
+ assembly->addJoint(joint);
+
+ auto joint2 = CREATE::With();
+ joint2->setName("Joint2");
+ joint2->setMarkerI("/OndselAssembly/part1/marker2");
+ joint2->setMarkerJ("/OndselAssembly/part2/marker2");
+ assembly->addJoint(joint2);
+
+ auto simulationParameters = CREATE::With();
+ simulationParameters->settstart(0.0);
+ simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
+ simulationParameters->sethmin(1.0e-9);
+ simulationParameters->sethmax(1.0);
+ simulationParameters->sethout(0.04);
+ simulationParameters->seterrorTol(1.0e-6);
+ assembly->setSimulationParameters(simulationParameters);
+
+ assembly->runKINEMATIC();
+}
+
+void MbD::ASMTAssembly::runSinglePendulumSimplified()
+{
+ auto assembly = CREATE::With();
+
+ assembly->setNotes("");
+ assembly->setName("Assembly1");
+ assembly->setPosition3D(0, 0, 0);
+ assembly->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ assembly->setVelocity3D(0, 0, 0);
+ assembly->setOmega3D(0, 0, 0);
+
+ auto massMarker = std::make_shared();
+ massMarker->setMass(0.0);
+ massMarker->setDensity(0.0);
+ massMarker->setMomentOfInertias(0, 0, 0);
+ massMarker->setPosition3D(0, 0, 0);
+ massMarker->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ assembly->setPrincipalMassMarker(massMarker);
+
+ auto mkr = CREATE::With();
+ mkr->setName("Marker1");
+ mkr->setPosition3D(0, 0, 0);
+ mkr->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ assembly->addMarker(mkr);
+
+ auto part = CREATE::With();
+ part->setName("Part1");
+ part->setPosition3D(-0.1, -0.1, -0.1);
+ part->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ part->setVelocity3D(0, 0, 0);
+ part->setOmega3D(0, 0, 0);
+ assembly->addPart(part);
+
+ massMarker = std::make_shared();
+ massMarker->setMass(0.2);
+ massMarker->setDensity(10.0);
+ massMarker->setMomentOfInertias(8.3333333333333e-4, 0.016833333333333, 0.017333333333333);
+ massMarker->setPosition3D(0.5, 0.1, 0.05);
+ massMarker->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ part->setPrincipalMassMarker(massMarker);
+
+ mkr = CREATE::With();
+ mkr->setName("Marker1");
+ mkr->setPosition3D(0.1, 0.1, 0.1);
+ mkr->setRotationMatrix(
+ 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1);
+ part->addMarker(mkr);
+
+ auto joint = CREATE::With();
+ joint->setName("Joint1");
+ joint->setMarkerI("/Assembly1/Marker1");
+ joint->setMarkerJ("/Assembly1/Part1/Marker1");
+ assembly->addJoint(joint);
+
+ auto motion = CREATE::With();
+ motion->setName("Motion1");
+ motion->setMotionJoint("/Assembly1/Joint1");
+ motion->setRotationZ("0.0");
+ assembly->addMotion(motion);
+
+ auto constantGravity = CREATE::With();
+ constantGravity->setg(0.0, 0.0, 0.0);
+ assembly->setConstantGravity(constantGravity);
+
+ auto simulationParameters = CREATE::With();
+ simulationParameters->settstart(0.0);
+ simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
+ simulationParameters->sethmin(1.0e-9);
+ simulationParameters->sethmax(1.0);
+ simulationParameters->sethout(0.04);
+ simulationParameters->seterrorTol(1.0e-6);
+ assembly->setSimulationParameters(simulationParameters);
+
+ assembly->runKINEMATIC();
+}
+
+void MbD::ASMTAssembly::runSinglePendulum()
+{
+ auto assembly = CREATE::With();
+ std::string str = "";
+ assembly->setNotes(str);
+ str = "Assembly1";
+ assembly->setName(str);
+ auto pos3D = std::make_shared>(ListD{ 0, 0, 0 });
+ assembly->setPosition3D(pos3D);
+ auto rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ assembly->setRotationMatrix(rotMat);
+ auto vel3D = std::make_shared>(ListD{ 0, 0, 0 });
+ assembly->setVelocity3D(vel3D);
+ auto ome3D = std::make_shared>(ListD{ 0, 0, 0 });
+ assembly->setOmega3D(ome3D);
+ //
+ auto massMarker = std::make_shared();
+ massMarker->setMass(0.0);
+ massMarker->setDensity(0.0);
+ auto aJ = std::make_shared>(ListD{ 0, 0, 0 });
+ massMarker->setMomentOfInertias(aJ);
+ pos3D = std::make_shared>(ListD{ 0, 0, 0 });
+ massMarker->setPosition3D(pos3D);
+ rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ massMarker->setRotationMatrix(rotMat);
+ assembly->setPrincipalMassMarker(massMarker);
+ //
+ auto mkr = CREATE::With();
+ str = "Marker1";
+ mkr->setName(str);
+ pos3D = std::make_shared>(ListD{ 0, 0, 0 });
+ mkr->setPosition3D(pos3D);
+ rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ mkr->setRotationMatrix(rotMat);
+ assembly->addMarker(mkr);
+ //
+ auto part = CREATE::With();
+ str = "Part1";
+ part->setName(str);
+ pos3D = std::make_shared>(ListD{ -0.1, -0.1, -0.1 });
+ part->setPosition3D(pos3D);
+ rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ part->setRotationMatrix(rotMat);
+ vel3D = std::make_shared>(ListD{ 0, 0, 0 });
+ part->setVelocity3D(vel3D);
+ ome3D = std::make_shared>(ListD{ 0, 0, 0 });
+ part->setOmega3D(ome3D);
+ assembly->addPart(part);
+ //
+ massMarker = std::make_shared();
+ massMarker->setMass(0.2);
+ massMarker->setDensity(10.0);
+ aJ = std::make_shared>(ListD{ 8.3333333333333e-4, 0.016833333333333, 0.017333333333333 });
+ massMarker->setMomentOfInertias(aJ);
+ pos3D = std::make_shared>(ListD{ 0.5, 0.1, 0.05 });
+ massMarker->setPosition3D(pos3D);
+ rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ massMarker->setRotationMatrix(rotMat);
+ part->setPrincipalMassMarker(massMarker);
+ //
+ mkr = CREATE::With();
+ str = "Marker1";
+ mkr->setName(str);
+ pos3D = std::make_shared>(ListD{ 0.1, 0.1, 0.1 });
+ mkr->setPosition3D(pos3D);
+ rotMat = std::make_shared>(ListListD{
+ { 1, 0, 0 },
+ { 0, 1, 0 },
+ { 0, 0, 1 }
+ });
+ mkr->setRotationMatrix(rotMat);
+ part->addMarker(mkr);
+ //
+ auto joint = CREATE::With();
+ str = "Joint1";
+ joint->setName(str);
+ str = "/Assembly1/Marker1";
+ joint->setMarkerI(str);
+ str = "/Assembly1/Part1/Marker1";
+ joint->setMarkerJ(str);
+ assembly->addJoint(joint);
+ //
+ auto motion = CREATE::With();
+ str = "Motion1";
+ motion->setName(str);
+ str = "/Assembly1/Joint1";
+ motion->setMotionJoint(str);
+ str = "0.0";
+ motion->setRotationZ(str);
+ assembly->addMotion(motion);
+ //
+ auto constantGravity = CREATE::With();
+ auto gAcceleration = std::make_shared>(ListD{ 0.0, 0.0, 0.0 });
+ constantGravity->setg(gAcceleration);
+ assembly->setConstantGravity(constantGravity);
+ //
+ auto simulationParameters = CREATE::With();
+ simulationParameters->settstart(0.0);
+ simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
+ simulationParameters->sethmin(1.0e-9);
+ simulationParameters->sethmax(1.0);
+ simulationParameters->sethout(0.04);
+ simulationParameters->seterrorTol(1.0e-6);
+ assembly->setSimulationParameters(simulationParameters);
+ //
+ assembly->runKINEMATIC();
+}
+
+std::shared_ptr MbD::ASMTAssembly::assemblyFromFile(const char* fileName)
+{
+ std::ifstream stream(fileName);
+ if (stream.fail()) {
+ throw std::invalid_argument("File not found.");
+ }
+ std::string line;
+ std::vector lines;
+ while (std::getline(stream, line)) {
+ lines.push_back(line);
+ }
+ auto assembly = ASMTAssembly::With();
+ auto str = assembly->popOffTop(lines);
+ bool bool1 = str == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
+ bool bool2 = str == "OndselSolver";
+ assert(bool1 || bool2);
+ assert(assembly->readStringOffTop(lines) == "Assembly");
+ assembly->setFilename(fileName);
+ assembly->parseASMT(lines);
+ return assembly;
+}
+
+void MbD::ASMTAssembly::runFile(const char* fileName)
+{
+ std::ifstream stream(fileName);
+ if (stream.fail()) {
+ throw std::invalid_argument("File not found.");
+ }
+ std::string line;
+ std::vector lines;
+ while (std::getline(stream, line)) {
+ lines.push_back(line);
+ }
+ bool bool1 = lines[0] == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
+ bool bool2 = lines[0] == "OndselSolver";
+ assert(bool1 || bool2);
+ lines.erase(lines.begin());
+
+ if (lines[0] == "Assembly") {
+ lines.erase(lines.begin());
+ auto assembly = CREATE::With();
+ assembly->setFilename(fileName);
+ assembly->parseASMT(lines);
+ assembly->runKINEMATIC();
+ }
+}
+
+void MbD::ASMTAssembly::runDraggingTest()
+{
+ auto assembly = ASMTAssembly::assemblyFromFile("../testapp/dragCrankSlider.asmt");
+ auto dragPart = assembly->parts->at(0);
+ auto dragParts = std::make_shared>>();
+ dragParts->push_back(dragPart);
+ assembly->runPreDrag(); //Do this before first drag
+ FColDsptr pos3D, delta;
+ pos3D = dragPart->position3D;
+ delta = std::make_shared>(ListD{ 0.1, 0.2, 0.3 });
+ dragPart->updateMbDFromPosition3D(pos3D->plusFullColumn(delta));
+ assembly->runDragStep(dragParts);
+ pos3D = dragPart->position3D;
+ delta = std::make_shared>(ListD{ 0.3, 0.2, 0.1 });
+ dragPart->updateMbDFromPosition3D(pos3D->plusFullColumn(delta));
+ assembly->runDragStep(dragParts);
+ assembly->runPostDrag(); //Do this after last drag
+}
+
+void MbD::ASMTAssembly::readWriteFile(const char* fileName)
+{
+ std::ifstream stream(fileName);
+ if (stream.fail()) {
+ throw std::invalid_argument("File not found.");
+ }
+ std::string line;
+ std::vector lines;
+ while (std::getline(stream, line)) {
+ lines.push_back(line);
+ }
+ bool bool1 = lines[0] == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
+ bool bool2 = lines[0] == "OndselSolver";
+ assert(bool1 || bool2);
+ lines.erase(lines.begin());
+
+ if (lines[0] == "Assembly") {
+ lines.erase(lines.begin());
+ auto assembly = CREATE::With();
+ assembly->parseASMT(lines);
+ assembly->runKINEMATIC();
+ assembly->outputFile("assembly.asmt");
+ ASMTAssembly::runFile("assembly.asmt");
+ }
+}
+
+void MbD::ASMTAssembly::initialize()
+{
+ ASMTSpatialContainer::initialize();
+ times = std::make_shared>();
+}
+
+ASMTAssembly* MbD::ASMTAssembly::root()
+{
+ return this;
+}
+
+void MbD::ASMTAssembly::setNotes(std::string str)
+{
+ notes = str;
+}
+
+void MbD::ASMTAssembly::parseASMT(std::vector& lines)
+{
+ readNotes(lines);
+ readName(lines);
+ readPosition3D(lines);
+ readRotationMatrix(lines);
+ readVelocity3D(lines);
+ readOmega3D(lines);
+ initprincipalMassMarker();
+ readRefPoints(lines);
+ readRefCurves(lines);
+ readRefSurfaces(lines);
+ readParts(lines);
+ readKinematicIJs(lines);
+ readConstraintSets(lines);
+ readForcesTorques(lines);
+ readConstantGravity(lines);
+ readSimulationParameters(lines);
+ readAnimationParameters(lines);
+ readTimeSeries(lines);
+ readAssemblySeries(lines);
+ readPartSeriesMany(lines);
+ readJointSeriesMany(lines);
+ readMotionSeriesMany(lines);
+}
+
+void MbD::ASMTAssembly::readNotes(std::vector& lines)
+{
+ assert(lines[0] == "\tNotes");
+ lines.erase(lines.begin());
+ notes = readString(lines[0]);
+ lines.erase(lines.begin());
+}
+
+void MbD::ASMTAssembly::readParts(std::vector& lines)
+{
+ assert(lines[0] == "\tParts");
+ lines.erase(lines.begin());
+ parts->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\tKinematicIJs");
+ std::vector partsLines(lines.begin(), it);
+ while (!partsLines.empty()) {
+ readPart(partsLines);
+ }
+ lines.erase(lines.begin(), it);
+
+}
+
+void MbD::ASMTAssembly::readPart(std::vector& lines)
+{
+ assert(lines[0] == "\t\tPart");
+ lines.erase(lines.begin());
+ auto part = CREATE::With();
+ part->parseASMT(lines);
+ parts->push_back(part);
+ part->owner = this;
+}
+
+void MbD::ASMTAssembly::readKinematicIJs(std::vector& lines)
+{
+ assert(lines[0] == "\tKinematicIJs");
+ lines.erase(lines.begin());
+ kinematicIJs->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\tConstraintSets");
+ std::vector kinematicIJsLines(lines.begin(), it);
+ while (!kinematicIJsLines.empty()) {
+ readKinematicIJ(kinematicIJsLines);
+ }
+ lines.erase(lines.begin(), it);
+
+}
+
+void MbD::ASMTAssembly::readKinematicIJ(std::vector&)
+{
+ assert(false);
+}
+
+void MbD::ASMTAssembly::readConstraintSets(std::vector& lines)
+{
+ assert(lines[0] == "\tConstraintSets");
+ lines.erase(lines.begin());
+ readJoints(lines);
+ readMotions(lines);
+ readGeneralConstraintSets(lines);
+}
+
+void MbD::ASMTAssembly::readJoints(std::vector& lines)
+{
+ assert(lines[0] == "\t\tJoints");
+ lines.erase(lines.begin());
+ joints->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\t\tMotions");
+ std::vector jointsLines(lines.begin(), it);
+ std::shared_ptr joint;
+ while (!jointsLines.empty()) {
+ if (jointsLines[0] == "\t\t\tAngleJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tGearJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tNoRotationJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tParallelAxesJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tPerpendicularJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tRackPinionJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tScrewJoint") {
+ joint = CREATE::With();
+ }
+ //AtPointJoints
+ else if (jointsLines[0] == "\t\t\tConstantVelocityJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tFixedJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tRevoluteJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tSphericalJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tUniversalJoint") {
+ joint = CREATE::With();
+ }
+ //CompoundJoints
+ else if (jointsLines[0] == "\t\t\tSphSphJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tCylSphJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tRevCylJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tRevRevJoint") {
+ joint = CREATE::With();
+ }
+ //InLineJoints
+ else if (jointsLines[0] == "\t\t\tCylindricalJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tPointInLineJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tTranslationalJoint") {
+ joint = CREATE::With();
+ }
+ //InPlaneJoints
+ else if (jointsLines[0] == "\t\t\tLineInPlaneJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tPlanarJoint") {
+ joint = CREATE::With();
+ }
+ else if (jointsLines[0] == "\t\t\tPointInPlaneJoint") {
+ joint = CREATE::With();
+ }
+ else {
+ assert(false);
+ }
+ jointsLines.erase(jointsLines.begin());
+ joint->parseASMT(jointsLines);
+ joints->push_back(joint);
+ joint->owner = this;
+ }
+ lines.erase(lines.begin(), it);
+
+}
+
+void MbD::ASMTAssembly::readMotions(std::vector& lines)
+{
+ assert(lines[0] == "\t\tMotions");
+ lines.erase(lines.begin());
+ motions->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\t\tGeneralConstraintSets");
+ std::vector motionsLines(lines.begin(), it);
+ std::shared_ptr motion;
+ while (!motionsLines.empty()) {
+ if (motionsLines[0] == "\t\t\tRotationalMotion") {
+ motion = CREATE::With();
+ }
+ else if (motionsLines[0] == "\t\t\tTranslationalMotion") {
+ motion = CREATE::With();
+ }
+ else if (motionsLines[0] == "\t\t\tGeneralMotion") {
+ motion = CREATE::With();
+ }
+ else {
+ assert(false);
+ }
+ motionsLines.erase(motionsLines.begin());
+ motion->parseASMT(motionsLines);
+ motions->push_back(motion);
+ motion->owner = this;
+ motion->initMarkers();
+ }
+ lines.erase(lines.begin(), it);
+
+}
+
+void MbD::ASMTAssembly::readGeneralConstraintSets(std::vector& lines)
+{
+ assert(lines[0] == "\t\tGeneralConstraintSets");
+ lines.erase(lines.begin());
+ constraintSets->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\tForceTorques");
+ std::vector generalConstraintSetsLines(lines.begin(), it);
+ while (!generalConstraintSetsLines.empty()) {
+ assert(false);
+ }
+ lines.erase(lines.begin(), it);
+}
+
+void MbD::ASMTAssembly::readForcesTorques(std::vector& lines)
+{
+ assert(lines[0] == "\tForceTorques"); //Spelling is not consistent in asmt file.
+ lines.erase(lines.begin());
+ forcesTorques->clear();
+ auto it = std::find(lines.begin(), lines.end(), "\tConstantGravity");
+ std::vector forcesTorquesLines(lines.begin(), it);
+ while (!forcesTorquesLines.empty()) {
+ if (forcesTorquesLines[0] == "\t\tForceTorque") {
+ forcesTorquesLines.erase(forcesTorquesLines.begin());
+ auto forceTorque = CREATE::With();
+ forceTorque->parseASMT(forcesTorquesLines);
+ forcesTorques->push_back(forceTorque);
+ forceTorque->owner = this;
+ }
+ else {
+ assert(false);
+ }
+ }
+ lines.erase(lines.begin(), it);
+}
+
+void MbD::ASMTAssembly::readConstantGravity(std::vector& lines)
+{
+ assert(lines[0] == "\tConstantGravity");
+ lines.erase(lines.begin());
+ constantGravity = CREATE::With();
+ constantGravity->parseASMT(lines);
+ constantGravity->owner = this;
+}
+
+void MbD::ASMTAssembly::readSimulationParameters(std::vector& lines)
+{
+ assert(lines[0] == "\tSimulationParameters");
+ lines.erase(lines.begin());
+ simulationParameters = CREATE::With();
+ simulationParameters->parseASMT(lines);
+ simulationParameters->owner = this;
+}
+
+void MbD::ASMTAssembly::readAnimationParameters(std::vector& lines)
+{
+ assert(lines[0] == "\tAnimationParameters");
+ lines.erase(lines.begin());
+ animationParameters = CREATE::With();
+ animationParameters->parseASMT(lines);
+ animationParameters->owner = this;
+}
+
+void MbD::ASMTAssembly::readTimeSeries(std::vector& lines)
+{
+ if (lines.empty()) return;
+ assert(lines[0] == "TimeSeries");
+ lines.erase(lines.begin());
+ assert(lines[0].find("Number\tInput") != std::string::npos);
+ lines.erase(lines.begin());
+ readTimes(lines);
+}
+
+void MbD::ASMTAssembly::readTimes(std::vector& lines)
+{
+ if (lines.empty()) return;
+ std::string str = lines[0];
+ std::string substr = "Time\tInput";
+ auto pos = str.find(substr);
+ assert(pos != std::string::npos);
+ str.erase(0, pos + substr.length());
+ times = readRowOfDoubles(str);
+ times->insert(times->begin(), times->at(0)); //The first element is the input state.
+ lines.erase(lines.begin());
+}
+
+void MbD::ASMTAssembly::readPartSeriesMany(std::vector& lines)
+{
+ if (lines.empty()) return;
+ assert(lines[0].find("PartSeries") != std::string::npos);
+ auto it = std::find_if(lines.begin(), lines.end(), [](const std::string& s) {
+ return s.find("JointSeries") != std::string::npos;
+ });
+ std::vector partSeriesLines(lines.begin(), it);
+ while (!partSeriesLines.empty()) {
+ readPartSeries(partSeriesLines);
+ }
+ lines.erase(lines.begin(), it);
+}
+
+void MbD::ASMTAssembly::readJointSeriesMany(std::vector& lines)
+{
+ if (lines.empty()) return;
+ assert(lines[0].find("JointSeries") != std::string::npos);
+ auto it = std::find_if(lines.begin(), lines.end(), [](const std::string& s) {
+ return s.find("MotionSeries") != std::string::npos;
+ });
+ std::vector jointSeriesLines(lines.begin(), it);
+ while (!jointSeriesLines.empty()) {
+ readJointSeries(jointSeriesLines);
+ }
+ lines.erase(lines.begin(), it);
+}
+
+void MbD::ASMTAssembly::readAssemblySeries(std::vector& lines)
+{
+ if (lines.empty()) return;
+ std::string str = lines[0];
+ std::string substr = "AssemblySeries";
+ auto pos = str.find(substr);
+ assert(pos != std::string::npos);
+ str.erase(0, pos + substr.length());
+ auto seriesName = readString(str);
+ assert(fullName("") == seriesName);
+ lines.erase(lines.begin());
+ //xs, ys, zs, bryxs, bryys, bryzs
+ readXs(lines);
+ readYs(lines);
+ readZs(lines);
+ readBryantxs(lines);
+ readBryantys(lines);
+ readBryantzs(lines);
+ readVXs(lines);
+ readVYs(lines);
+ readVZs(lines);
+ readOmegaXs(lines);
+ readOmegaYs(lines);
+ readOmegaZs(lines);
+ readAXs(lines);
+ readAYs(lines);
+ readAZs(lines);
+ readAlphaXs(lines);
+ readAlphaYs(lines);
+ readAlphaZs(lines);
+}
+
+void MbD::ASMTAssembly::readPartSeries(std::vector& lines)
+{
+ if (lines.empty()) return;
+ std::string str = lines[0];
+ std::string substr = "PartSeries";
+ auto pos = str.find(substr);
+ assert(pos != std::string::npos);
+ str.erase(0, pos + substr.length());
+ auto seriesName = readString(str);
+ auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr& prt) {
+ return prt->fullName("") == seriesName;
+ });
+ auto& part = *it;
+ part->readPartSeries(lines);
+}
+
+void MbD::ASMTAssembly::readJointSeries(std::vector& lines)
+{
+ if (lines.empty()) return;
+ std::string str = lines[0];
+ std::string substr = "JointSeries";
+ auto pos = str.find(substr);
+ assert(pos != std::string::npos);
+ str.erase(0, pos + substr.length());
+ auto seriesName = readString(str);
+ auto it = std::find_if(joints->begin(), joints->end(), [&](const std::shared_ptr& jt) {
+ return jt->fullName("") == seriesName;
+ });
+ auto& joint = *it;
+ joint->readJointSeries(lines);
+}
+
+void MbD::ASMTAssembly::readMotionSeriesMany(std::vector& lines)
+{
+ while (!lines.empty()) {
+ assert(lines[0].find("MotionSeries") != std::string::npos);
+ readMotionSeries(lines);
+ }
+}
+
+void MbD::ASMTAssembly::readMotionSeries(std::vector& lines)
+{
+ if (lines.empty()) return;
+ std::string str = lines[0];
+ std::string substr = "MotionSeries";
+ auto pos = str.find(substr);
+ assert(pos != std::string::npos);
+ str.erase(0, pos + substr.length());
+ auto seriesName = readString(str);
+ auto it = std::find_if(motions->begin(), motions->end(), [&](const std::shared_ptr& jt) {
+ return jt->fullName("") == seriesName;
+ });
+ auto& motion = *it;
+ motion->readMotionSeries(lines);
+}
+
+void MbD::ASMTAssembly::outputFor(AnalysisType)
+{
+ assert(false);
+}
+
+void MbD::ASMTAssembly::preMbDrun(std::shared_ptr mbdSys)
+{
+ calcCharacteristicDimensions();
+ deleteMbD();
+ createMbD(mbdSys, mbdUnits);
+ std::static_pointer_cast(mbdObject)->asFixed();
+}
+
+void MbD::ASMTAssembly::postMbDrun()
+{
+ assert(false);
+}
+
+void MbD::ASMTAssembly::calcCharacteristicDimensions()
+{
+ auto unitTime = this->calcCharacteristicTime();
+ auto unitMass = this->calcCharacteristicMass();
+ auto unitLength = this->calcCharacteristicLength();
+ auto unitAngle = 1.0;
+ this->mbdUnits = std::make_shared(unitTime, unitMass, unitLength, unitAngle);
+ this->mbdUnits = std::make_shared(1.0, 1.0, 1.0, 1.0); //for debug
+}
+
+double MbD::ASMTAssembly::calcCharacteristicTime()
+{
+ return std::abs(simulationParameters->hout);
+}
+
+double MbD::ASMTAssembly::calcCharacteristicMass()
+{
+ auto n = (int)parts->size();
+ double sumOfSquares = 0.0;
+ for (int i = 0; i < n; i++)
+ {
+ auto mass = parts->at(i)->principalMassMarker->mass;
+ sumOfSquares += mass * mass;
+ }
+ auto unitMass = std::sqrt(sumOfSquares / n);
+ if (unitMass <= 0) unitMass = 1.0;
+ return unitMass;
+}
+
+double MbD::ASMTAssembly::calcCharacteristicLength()
+{
+ auto markerMap = this->markerMap();
+ auto lengths = std::make_shared>();
+ auto connectorList = this->connectorList();
+ for (auto& connector : *connectorList) {
+ auto& mkrI = markerMap->at(connector->markerI);
+ lengths->push_back(mkrI->rpmp()->length());
+ auto& mkrJ = markerMap->at(connector->markerJ);
+ lengths->push_back(mkrJ->rpmp()->length());
+ }
+ auto n = (int)lengths->size();
+ double sumOfSquares = std::accumulate(lengths->begin(), lengths->end(), 0.0, [](double sum, double l) { return sum + l * l; });
+ auto unitLength = std::sqrt(sumOfSquares / std::max((int)n, 1));
+ if (unitLength <= 0) unitLength = 1.0;
+ return unitLength;
+}
+
+std::shared_ptr>> MbD::ASMTAssembly::connectorList()
+{
+ auto list = std::make_shared>>();
+ list->insert(list->end(), joints->begin(), joints->end());
+ list->insert(list->end(), motions->begin(), motions->end());
+ list->insert(list->end(), kinematicIJs->begin(), kinematicIJs->end());
+ list->insert(list->end(), forcesTorques->begin(), forcesTorques->end());
+ return list;
+}
+
+std::shared_ptr>> MbD::ASMTAssembly::markerMap()
+{
+ auto answer = std::make_shared>>();
+ for (auto& refPoint : *refPoints) {
+ for (auto& marker : *refPoint->markers) {
+ answer->insert(std::make_pair(marker->fullName(""), marker));
+ }
+ }
+ for (auto& part : *parts) {
+ for (auto& refPoint : *part->refPoints) {
+ for (auto& marker : *refPoint->markers) {
+ answer->insert(std::make_pair(marker->fullName(""), marker));
+ }
+ }
+ }
+ return answer;
+}
+
+void MbD::ASMTAssembly::deleteMbD()
+{
+ ASMTSpatialContainer::deleteMbD();
+ constantGravity->deleteMbD();
+ asmtTime->deleteMbD();
+ for (auto& part : *parts) { part->deleteMbD(); }
+ for (auto& joint : *joints) { joint->deleteMbD(); }
+ for (auto& motion : *motions) { motion->deleteMbD(); }
+ for (auto& forceTorque : *forcesTorques) { forceTorque->deleteMbD(); }
+
+
+}
+
+void MbD::ASMTAssembly::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits)
+{
+ ASMTSpatialContainer::createMbD(mbdSys, mbdUnits);
+ constantGravity->createMbD(mbdSys, mbdUnits);
+ asmtTime->createMbD(mbdSys, mbdUnits);
+ std::sort(parts->begin(), parts->end(), [](std::shared_ptr a, std::shared_ptr b) { return a->name < b->name; });
+ auto jointsMotions = std::make_shared>>();
+ jointsMotions->insert(jointsMotions->end(), joints->begin(), joints->end());
+ jointsMotions->insert(jointsMotions->end(), motions->begin(), motions->end());
+ std::sort(jointsMotions->begin(), jointsMotions->end(), [](std::shared_ptr a, std::shared_ptr b) { return a->name < b->name; });
+ std::sort(forcesTorques->begin(), forcesTorques->end(), [](std::shared_ptr a, std::shared_ptr b) { return a->name < b->name; });
+ for (auto& part : *parts) { part->createMbD(mbdSys, mbdUnits); }
+ for (auto& joint : *jointsMotions) { joint->createMbD(mbdSys, mbdUnits); }
+ for (auto& forceTorque : *forcesTorques) { forceTorque->createMbD(mbdSys, mbdUnits); }
+
+ auto& mbdSysSolver = mbdSys->systemSolver;
+ mbdSysSolver->errorTolPosKine = simulationParameters->errorTolPosKine;
+ mbdSysSolver->errorTolAccKine = simulationParameters->errorTolAccKine;
+ mbdSysSolver->iterMaxPosKine = simulationParameters->iterMaxPosKine;
+ mbdSysSolver->iterMaxAccKine = simulationParameters->iterMaxAccKine;
+ mbdSysSolver->tstart = simulationParameters->tstart / mbdUnits->time;
+ mbdSysSolver->tend = simulationParameters->tend / mbdUnits->time;
+ mbdSysSolver->hmin = simulationParameters->hmin / mbdUnits->time;
+ mbdSysSolver->hmax = simulationParameters->hmax / mbdUnits->time;
+ mbdSysSolver->hout = simulationParameters->hout / mbdUnits->time;
+ mbdSysSolver->corAbsTol = simulationParameters->corAbsTol;
+ mbdSysSolver->corRelTol = simulationParameters->corRelTol;
+ mbdSysSolver->intAbsTol = simulationParameters->intAbsTol;
+ mbdSysSolver->intRelTol = simulationParameters->intRelTol;
+ mbdSysSolver->iterMaxDyn = simulationParameters->iterMaxDyn;
+ mbdSysSolver->orderMax = simulationParameters->orderMax;
+ mbdSysSolver->translationLimit = simulationParameters->translationLimit / mbdUnits->length;
+ mbdSysSolver->rotationLimit = simulationParameters->rotationLimit;
+ //animationParameters = nullptr;
+}
+
+void MbD::ASMTAssembly::outputFile(std::string filename)
+{
+ std::ofstream os(filename);
+ os << std::setprecision(static_cast(std::numeric_limits::digits10) + 1);
+ // try {
+ os << "OndselSolver" << std::endl;
+ storeOnLevel(os, 0);
+ os.close();
+ // }
+ // catch (...) {
+ // os.close();
+ // }
+}
+
+void MbD::ASMTAssembly::storeOnLevel(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "Assembly");
+ storeOnLevelNotes(os, level + 1);
+ storeOnLevelName(os, level + 1);
+ ASMTSpatialContainer::storeOnLevel(os, level);
+
+ storeOnLevelParts(os, level + 1);
+ storeOnLevelKinematicIJs(os, level + 1);
+ storeOnLevelConstraintSets(os, level + 1);
+ storeOnLevelForceTorques(os, level + 1);
+ constantGravity->storeOnLevel(os, level + 1);
+ simulationParameters->storeOnLevel(os, level + 1);
+ animationParameters->storeOnLevel(os, level + 1);
+ storeOnTimeSeries(os);
+}
+
+void MbD::ASMTAssembly::solve()
+{
+ auto simulationParameters = CREATE::With();
+ simulationParameters->settstart(0.0);
+ simulationParameters->settend(0.0); //tstart == tend Initial Conditions only.
+ simulationParameters->sethmin(1.0e-9);
+ simulationParameters->sethmax(1.0);
+ simulationParameters->sethout(0.04);
+ simulationParameters->seterrorTol(1.0e-6);
+ setSimulationParameters(simulationParameters);
+
+ runKINEMATIC();
+}
+
+void MbD::ASMTAssembly::runPreDrag()
+{
+ mbdSystem = std::make_shared();
+ mbdSystem->externalSystem->asmtAssembly = this;
+ try {
+ mbdSystem->runPreDrag(mbdSystem);
+ }
+ catch (SimulationStoppingError ex) {
+
+ }
+}
+
+void MbD::ASMTAssembly::runDragStep(std::shared_ptr>> dragParts)
+{
+ auto dragMbDParts = std::make_shared>>();
+ for (auto& dragPart : *dragParts) {
+ auto dragMbDPart = std::static_pointer_cast(dragPart->mbdObject);
+ dragMbDParts->push_back(dragMbDPart);
+ }
+ mbdSystem->runDragStep(dragMbDParts);
+}
+
+void MbD::ASMTAssembly::runPostDrag()
+{
+ runPreDrag();
+}
+
+void MbD::ASMTAssembly::runKINEMATIC()
+{
+ mbdSystem = std::make_shared();
+ mbdSystem->externalSystem->asmtAssembly = this;
+ try {
+ mbdSystem->runKINEMATIC(mbdSystem);
+ }
+ catch (SimulationStoppingError ex) {
+
+ }
+}
+
+void MbD::ASMTAssembly::initprincipalMassMarker()
+{
+ principalMassMarker = std::make_shared();
+ principalMassMarker->mass = 0.0;
+ principalMassMarker->density = 0.0;
+ principalMassMarker->momentOfInertias = std::make_shared>(3, 0);
+ //principalMassMarker->position3D = std::make_shared>(3, 0);
+ //principalMassMarker->rotationMatrix = FullMatrix>::identitysptr(3);
+}
+
+std::shared_ptr MbD::ASMTAssembly::spatialContainerAt(std::shared_ptr self, std::string& longname)
+{
+ if ((self->fullName("")) == longname) return self;
+ auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr& prt) {
+ return prt->fullName("") == longname;
+ });
+ auto& part = *it;
+ return part;
+}
+
+std::shared_ptr MbD::ASMTAssembly::markerAt(std::string& longname)
+{
+ for (auto& refPoint : *refPoints) {
+ for (auto& marker : *refPoint->markers) {
+ if (marker->fullName("") == longname) return marker;
+ }
+ }
+ for (auto& part : *parts) {
+ for (auto& refPoint : *part->refPoints) {
+ for (auto& marker : *refPoint->markers) {
+ if (marker->fullName("") == longname) return marker;
+ }
+ }
+ }
+ return nullptr;
+}
+
+std::shared_ptr MbD::ASMTAssembly::jointAt(std::string& longname)
+{
+ auto it = std::find_if(joints->begin(), joints->end(), [&](const std::shared_ptr& jt) {
+ return jt->fullName("") == longname;
+ });
+ auto& joint = *it;
+ return joint;
+}
+
+std::shared_ptr MbD::ASMTAssembly::motionAt(std::string& longname)
+{
+ auto it = std::find_if(motions->begin(), motions->end(), [&](const std::shared_ptr& mt) {
+ return mt->fullName("") == longname;
+ });
+ auto& motion = *it;
+ return motion;
+}
+
+std::shared_ptr MbD::ASMTAssembly::forceTorqueAt(std::string& longname)
+{
+ auto it = std::find_if(forcesTorques->begin(), forcesTorques->end(), [&](const std::shared_ptr& mt) {
+ return mt->fullName("") == longname;
+ });
+ auto& forceTorque = *it;
+ return forceTorque;
+}
+
+FColDsptr MbD::ASMTAssembly::vOcmO()
+{
+ return std::make_shared>(3, 0.0);
+}
+
+FColDsptr MbD::ASMTAssembly::omeOpO()
+{
+ return std::make_shared>(3, 0.0);
+}
+
+std::shared_ptr MbD::ASMTAssembly::geoTime()
+{
+ return asmtTime;
+}
+
+void MbD::ASMTAssembly::updateFromMbD()
+{
+ ASMTSpatialContainer::updateFromMbD();
+ auto time = asmtTime->getValue();
+ times->push_back(time);
+ std::cout << "Time = " << time << std::endl;
+ for (auto& part : *parts) part->updateFromMbD();
+ for (auto& joint : *joints) joint->updateFromMbD();
+ for (auto& motion : *motions) motion->updateFromMbD();
+ for (auto& forceTorque : *forcesTorques) forceTorque->updateFromMbD();
+}
+
+void MbD::ASMTAssembly::compareResults(AnalysisType type)
+{
+ ASMTSpatialContainer::compareResults(type);
+ for (auto& part : *parts) part->compareResults(type);
+ for (auto& joint : *joints) joint->compareResults(type);
+ for (auto& motion : *motions) motion->compareResults(type);
+ for (auto& forceTorque : *forcesTorques) forceTorque->compareResults(type);
+}
+
+void MbD::ASMTAssembly::outputResults(AnalysisType type)
+{
+ //ASMTSpatialContainer::outputResults(type);
+ //for (auto& part : *parts) part->outputResults(type);
+ //for (auto& joint : *joints) joint->outputResults(type);
+ //for (auto& motion : *motions) motion->outputResults(type);
+ //for (auto& forceTorque : *forcesTorques) forceTorque->outputResults(type);
+}
+
+void MbD::ASMTAssembly::addPart(std::shared_ptr part)
+{
+ parts->push_back(part);
+ part->owner = this;
+}
+
+void MbD::ASMTAssembly::addJoint(std::shared_ptr joint)
+{
+ joints->push_back(joint);
+ joint->owner = this;
+}
+
+void MbD::ASMTAssembly::addMotion(std::shared_ptr motion)
+{
+ motions->push_back(motion);
+ motion->owner = this;
+ motion->initMarkers();
+}
+
+void MbD::ASMTAssembly::setConstantGravity(std::shared_ptr gravity)
+{
+ constantGravity = gravity;
+ gravity->owner = this;
+}
+
+void MbD::ASMTAssembly::setSimulationParameters(std::shared_ptr parameters)
+{
+ simulationParameters = parameters;
+ parameters->owner = this;
+}
+
+std::shared_ptr MbD::ASMTAssembly::partNamed(std::string partName)
+{
+ auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr& prt) {
+ return prt->fullName("") == partName;
+ });
+ auto& part = *it;
+ return part;
+}
+
+std::shared_ptr MbD::ASMTAssembly::partPartialNamed(std::string partialName)
+{
+ auto it = std::find_if(parts->begin(), parts->end(), [&](const std::shared_ptr& prt) {
+ auto fullName = prt->fullName("");
+ return fullName.find(partialName) != std::string::npos;
+ });
+ auto& part = *it;
+ return part;
+}
+
+void MbD::ASMTAssembly::storeOnLevelNotes(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "Notes");
+ storeOnLevelString(os, level + 1, notes);
+}
+
+void MbD::ASMTAssembly::storeOnLevelParts(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "Parts");
+ for (auto& part : *parts) {
+ part->storeOnLevel(os, level + 1);
+ }
+}
+
+void MbD::ASMTAssembly::storeOnLevelKinematicIJs(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "KinematicIJs");
+ for (auto& kinematicIJ : *kinematicIJs) {
+ kinematicIJ->storeOnLevel(os, level);
+ }
+}
+
+void MbD::ASMTAssembly::storeOnLevelConstraintSets(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "ConstraintSets");
+ storeOnLevelJoints(os, level + 1);
+ storeOnLevelMotions(os, level + 1);
+ storeOnLevelGeneralConstraintSets(os, level + 1);
+}
+
+void MbD::ASMTAssembly::storeOnLevelForceTorques(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "ForceTorques");
+ for (auto& forceTorque : *forcesTorques) {
+ forceTorque->storeOnLevel(os, level + 1);
+ }
+}
+
+void MbD::ASMTAssembly::storeOnLevelJoints(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "Joints");
+ for (auto& joint : *joints) {
+ joint->storeOnLevel(os, level + 1);
+ }
+}
+
+void MbD::ASMTAssembly::storeOnLevelMotions(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "Motions");
+ for (auto& motion : *motions) {
+ motion->storeOnLevel(os, level + 1);
+ }
+}
+
+void MbD::ASMTAssembly::storeOnLevelGeneralConstraintSets(std::ofstream& os, int level)
+{
+ storeOnLevelString(os, level, "GeneralConstraintSets");
+ //for (auto& generalConstraintSet : *generalConstraintSets) {
+ // generalConstraintSet->storeOnLevel(os, level);
+ //}
+}
+
+void MbD::ASMTAssembly::storeOnTimeSeries(std::ofstream& os)
+{
+ if (times->empty()) return;
+ os << "TimeSeries" << std::endl;
+ os << "Number\tInput\t";
+ for (int i = 1; i < (int)times->size(); i++)
+ {
+ os << i << '\t';
+ }
+ os << std::endl;
+ os << "Time\tInput\t";
+ for (int i = 1; i < (int)times->size(); i++)
+ {
+ os << times->at(i) << '\t';
+ }
+ os << std::endl;
+ os << "AssemblySeries\t" << fullName("") << std::endl;
+ ASMTSpatialContainer::storeOnTimeSeries(os);
+ for (auto& part : *parts) part->storeOnTimeSeries(os);
+ for (auto& joint : *joints) joint->storeOnTimeSeries(os);
+ for (auto& motion : *motions) motion->storeOnTimeSeries(os);
+}
+
+void MbD::ASMTAssembly::setFilename(std::string str)
+{
+ std::stringstream ss;
+ ss << "FileName = " << str << std::endl;
+ auto str2 = ss.str();
+ logString(str2);
+ filename = str;
+}
+
+
diff --git a/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.h b/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.h
new file mode 100644
index 000000000000..3cf4af51af90
--- /dev/null
+++ b/src/3rdParty/OndselSolver/OndselSolver/ASMTAssembly.h
@@ -0,0 +1,141 @@
+/***************************************************************************
+ * Copyright (c) 2023 Ondsel, Inc. *
+ * *
+ * This file is part of OndselSolver. *
+ * *
+ * See LICENSE file for details about copyright. *
+ ***************************************************************************/
+
+#pragma once
+#include
+
+#include "ASMTSpatialContainer.h"
+//Required for initialization
+#include "ASMTConstantGravity.h"
+#include "ASMTSimulationParameters.h"
+#include "ASMTAnimationParameters.h"
+#include "ASMTTime.h"
+#include "Units.h"
+
+namespace MbD {
+ class ASMTPart;
+ class ASMTKinematicIJ;
+ class ASMTConstraintSet;
+ class ASMTForceTorque;
+ class ASMTJoint;
+ class ASMTMotion;
+ class SystemSolver;
+ class ASMTItemIJ;
+ class MBDynSystem;
+
+ class ASMTAssembly : public ASMTSpatialContainer
+ {
+ //
+ public:
+ ASMTAssembly();
+ static std::shared_ptr With();
+ static void runSinglePendulumSuperSimplified();
+ static void runSinglePendulumSuperSimplified2();
+ static void runSinglePendulumSimplified();
+ static void runSinglePendulum();
+ static std::shared_ptr assemblyFromFile(const char* chars);
+ static void runFile(const char* chars);
+ static void runDraggingTest();
+ static void readWriteFile(const char* chars);
+ void initialize() override;
+ ASMTAssembly* root() override;
+ void setNotes(std::string str);
+ void parseASMT(std::vector& lines) override;
+ void readNotes(std::vector& lines);
+ void readParts(std::vector& lines);
+ void readPart(std::vector& lines);
+ void readKinematicIJs(std::vector& lines);
+ void readKinematicIJ(std::vector& lines);
+ void readConstraintSets(std::vector& lines);
+ void readJoints(std::vector& lines);
+ void readMotions(std::vector& lines);
+ void readGeneralConstraintSets(std::vector& lines);
+ void readForcesTorques(std::vector& lines);
+ void readConstantGravity(std::vector& lines);
+ void readSimulationParameters(std::vector& lines);
+ void readAnimationParameters(std::vector& lines);
+ void readTimeSeries(std::vector& lines);
+ void readTimes(std::vector& lines);
+ void readAssemblySeries(std::vector& lines);
+ void readPartSeriesMany(std::vector& lines);
+ void readPartSeries(std::vector& lines);
+ void readJointSeriesMany(std::vector& lines);
+ void readJointSeries(std::vector& lines);
+ void readMotionSeriesMany(std::vector& lines);
+ void readMotionSeries(std::vector& lines);
+
+ void outputFor(AnalysisType type);
+ void preMbDrun(std::shared_ptr mbdSys);
+ void postMbDrun();
+ void calcCharacteristicDimensions();
+ double calcCharacteristicTime();
+ double calcCharacteristicMass();
+ double calcCharacteristicLength();
+ std::shared_ptr>> connectorList();
+ std::shared_ptr>>markerMap();
+ void deleteMbD() override;
+ void createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) override;
+ void outputFile(std::string filename);
+ void storeOnLevel(std::ofstream& os, int level) override;
+
+ /* This function performs a one shot solve of the assembly.*/
+ void solve();
+
+ void runPreDrag();
+ void runDragStep(std::shared_ptr>> dragParts);
+ void runPostDrag();
+ void runKINEMATIC();
+ void initprincipalMassMarker();
+ std::shared_ptr spatialContainerAt(std::shared_ptr self, std::string& longname);
+ std::shared_ptr markerAt(std::string& longname);
+ std::shared_ptr jointAt(std::string& longname);
+ std::shared_ptr motionAt(std::string& longname);
+ std::shared_ptr forceTorqueAt(std::string& longname);
+ FColDsptr vOcmO() override;
+ FColDsptr omeOpO() override;
+ std::shared_ptr geoTime();
+ void updateFromMbD() override;
+ void compareResults(AnalysisType type) override;
+ void outputResults(AnalysisType type) override;
+ void addPart(std::shared_ptr part);
+ void addJoint(std::shared_ptr joint);
+ void addMotion(std::shared_ptr motion);
+ void setConstantGravity(std::shared_ptr constantGravity);
+ void setSimulationParameters(std::shared_ptr simulationParameters);
+ std::shared_ptr partNamed(std::string partName);
+ std::shared_ptr partPartialNamed(std::string partialName);
+ void storeOnLevelNotes(std::ofstream& os, int level);
+ void storeOnLevelParts(std::ofstream& os, int level);
+ void storeOnLevelKinematicIJs(std::ofstream& os, int level);
+ void storeOnLevelConstraintSets(std::ofstream& os, int level);
+ void storeOnLevelForceTorques(std::ofstream& os, int level);
+ void storeOnLevelJoints(std::ofstream& os, int level);
+ void storeOnLevelMotions(std::ofstream& os, int level);
+ void storeOnLevelGeneralConstraintSets(std::ofstream& os, int level);
+ void storeOnTimeSeries(std::ofstream& os) override;
+ void setFilename(std::string filename);
+
+ std::string filename = "";
+ std::string notes = "(Text string: '' runs: (Core.RunArray runs: #() values: #()))";
+ std::shared_ptr