Solve dragging (#47)

runPreDrag, runDragStep, runPostDrag, PosICDragNewtonRaphson
This commit is contained in:
aiksiongkoh
2024-01-11 06:28:38 -07:00
committed by GitHub
parent 737152273e
commit fe99ad2593
29 changed files with 4204 additions and 107 deletions

View File

@@ -20,7 +20,7 @@
using namespace MbD;
MbD::ASMTSpatialContainer::ASMTSpatialContainer()
MbD::ASMTSpatialContainer::ASMTSpatialContainer() : ASMTSpatialItem()
{
refPoints = std::make_shared<std::vector<std::shared_ptr<ASMTRefPoint>>>();
refCurves = std::make_shared<std::vector<std::shared_ptr<ASMTRefCurve>>>();
@@ -293,6 +293,14 @@ void MbD::ASMTSpatialContainer::createMbD(std::shared_ptr<System> mbdSys, std::s
}
}
void MbD::ASMTSpatialContainer::updateMbDFromPosition3D(FColDsptr vec)
{
position3D = vec;
auto mbdPart = std::static_pointer_cast<Part>(mbdObject);
auto mbdUnits = this->mbdUnits();
mbdPart->qX(rOcmO()->times(1.0 / mbdUnits->length));
}
FColDsptr MbD::ASMTSpatialContainer::rOcmO()
{
auto& rOPO = position3D;