Assembly: Introduce Belt joint.

This commit is contained in:
PaddleStroke
2024-04-09 18:54:26 +02:00
committed by Yorik van Havre
parent b5a6a26166
commit d5beaf900e
8 changed files with 119 additions and 11 deletions

View File

@@ -691,7 +691,7 @@ bool AssemblyObject::isJointTypeConnecting(App::DocumentObject* joint)
{
JointType jointType = getJointType(joint);
return jointType != JointType::RackPinion && jointType != JointType::Screw
&& jointType != JointType::Gears && jointType != JointType::Pulleys;
&& jointType != JointType::Gears && jointType != JointType::Belt;
}
void AssemblyObject::removeUnconnectedJoints(std::vector<App::DocumentObject*>& joints,
@@ -855,6 +855,12 @@ std::shared_ptr<ASMTJoint> AssemblyObject::makeMbdJointOfType(App::DocumentObjec
mbdJoint->radiusJ = getJointDistance2(joint);
return mbdJoint;
}
else if (type == JointType::Belt) {
auto mbdJoint = CREATE<ASMTGearJoint>::With();
mbdJoint->radiusI = getJointDistance(joint);
mbdJoint->radiusJ = -getJointDistance2(joint);
return mbdJoint;
}
return nullptr;
}