Merge branch 'main' into core_LCS3

This commit is contained in:
PaddleStroke
2024-12-13 18:48:35 +01:00
committed by GitHub
20 changed files with 636 additions and 364 deletions

View File

@@ -95,27 +95,9 @@ FC_LOG_LEVEL_INIT("Assembly", true, true, true)
using namespace Assembly;
using namespace MbD;
namespace PartApp = Part;
/*
static void printPlacement(Base::Placement plc, const char* name)
{
Base::Vector3d pos = plc.getPosition();
Base::Vector3d axis;
double angle;
Base::Rotation rot = plc.getRotation();
rot.getRawValue(axis, angle);
Base::Console().Warning(
"placement %s : position (%.1f, %.1f, %.1f) - axis (%.1f, %.1f, %.1f) angle %.1f\n",
name,
pos.x,
pos.y,
pos.z,
axis.x,
axis.y,
axis.z,
angle);
}*/
// ================================ Assembly Object ============================
@@ -1617,8 +1599,6 @@ std::string AssemblyObject::handleOneSideOfJoint(App::DocumentObject* joint,
// containing Part.
if (obj->getNameInDocument() != part->getNameInDocument()) {
// Make plc relative to the containing part
// plc = objPlc * plc; // this would not work for nested parts.
auto* ref = dynamic_cast<App::PropertyXLinkSub*>(joint->getPropertyByName(propRefName));
if (!ref) {
@@ -1861,9 +1841,6 @@ AssemblyObject::makeMbdPart(std::string& name, Base::Placement plc, double mass)
Base::Vector3d r1 = mat.getRow(1);
Base::Vector3d r2 = mat.getRow(2);
mbdPart->setRotationMatrix(r0.x, r0.y, r0.z, r1.x, r1.y, r1.z, r2.x, r2.y, r2.z);
/*double q0, q1, q2, q3;
rot.getValue(q0, q1, q2, q3);
mbdPart->setQuarternions(q0, q1, q2, q3);*/
return mbdPart;
}
@@ -1884,9 +1861,7 @@ std::shared_ptr<ASMTMarker> AssemblyObject::makeMbdMarker(std::string& name, Bas
Base::Vector3d r1 = mat.getRow(1);
Base::Vector3d r2 = mat.getRow(2);
mbdMarker->setRotationMatrix(r0.x, r0.y, r0.z, r1.x, r1.y, r1.z, r2.x, r2.y, r2.z);
/*double q0, q1, q2, q3;
rot.getValue(q0, q1, q2, q3);
mbdMarker->setQuarternions(q0, q1, q2, q3);*/
return mbdMarker;
}