- Move existing OndselSolver, GNN ML layer, and tooling into GNN/ directory for integration in later phases - Add Create addon scaffold: package.xml, Init.py - Add expression DAG with eval, symbolic diff, simplification - Add parameter table with fixed/free variable tracking - Add quaternion rotation as polynomial Expr trees - Add RigidBody entity (7 DOF: position + unit quaternion) - Add constraint classes: Coincident, DistancePointPoint, Fixed - Add Newton-Raphson solver with symbolic Jacobian + numpy lstsq - Add pre-solve passes: substitution + single-equation - Add DOF counting via Jacobian SVD rank - Add KindredSolver IKCSolver bridge for kcsolve integration - Add 82 unit tests covering all modules Registers as 'kindred' solver via kcsolve.register_solver() when loaded by Create's addon_loader.
38 lines
917 B
C++
38 lines
917 B
C++
|
|
#include "ASMTInPlaneJoint.h"
|
|
#include "InPlaneJoint.h"
|
|
|
|
using namespace MbD;
|
|
|
|
void MbD::ASMTInPlaneJoint::parseASMT(std::vector<std::string>& lines)
|
|
{
|
|
ASMTJoint::parseASMT(lines);
|
|
readOffset(lines);
|
|
}
|
|
|
|
void MbD::ASMTInPlaneJoint::readOffset(std::vector<std::string>& lines)
|
|
{
|
|
if (lines[0].find("offset") == std::string::npos) {
|
|
offset = 0.0;
|
|
}
|
|
else {
|
|
lines.erase(lines.begin());
|
|
offset = readDouble(lines[0]);
|
|
lines.erase(lines.begin());
|
|
}
|
|
}
|
|
|
|
void MbD::ASMTInPlaneJoint::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
|
|
{
|
|
ASMTJoint::createMbD(mbdSys, mbdUnits);
|
|
auto inPlaneJoint = std::static_pointer_cast<InPlaneJoint>(mbdObject);
|
|
inPlaneJoint->offset = offset;
|
|
}
|
|
|
|
void MbD::ASMTInPlaneJoint::storeOnLevel(std::ofstream& os, size_t level)
|
|
{
|
|
ASMTJoint::storeOnLevel(os, level);
|
|
storeOnLevelString(os, level + 1, "offset");
|
|
storeOnLevelDouble(os, level + 2, offset);
|
|
}
|