Assembly: Fix infinite loop with subassembly. Fix #19319 (#22685)

* Assembly: Fix infinite loop with subassembly. Fix #19319

* squash

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update AssemblyObject.h

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
PaddleStroke
2025-07-25 00:11:24 +02:00
committed by GitHub
parent 5a8b042fda
commit e54984504a
3 changed files with 28 additions and 40 deletions

View File

@@ -154,8 +154,10 @@ public:
std::vector<App::DocumentObject*> getGroundedJoints();
std::vector<App::DocumentObject*> getJointsOfObj(App::DocumentObject* obj);
std::vector<App::DocumentObject*> getJointsOfPart(App::DocumentObject* part);
App::DocumentObject* getJointOfPartConnectingToGround(App::DocumentObject* part,
std::string& name);
App::DocumentObject*
getJointOfPartConnectingToGround(App::DocumentObject* part,
std::string& name,
const std::vector<App::DocumentObject*>& excludeJoints = {});
std::unordered_set<App::DocumentObject*> getGroundedParts();
std::unordered_set<App::DocumentObject*> fixGroundedParts();
void fixGroundedPart(App::DocumentObject* obj, Base::Placement& plc, std::string& jointName);
@@ -176,10 +178,11 @@ public:
std::vector<ObjRef> getDownstreamParts(App::DocumentObject* part,
App::DocumentObject* joint = nullptr);
std::vector<App::DocumentObject*> getUpstreamParts(App::DocumentObject* part, int limit = 0);
App::DocumentObject* getUpstreamMovingPart(App::DocumentObject* part,
App::DocumentObject*& joint,
std::string& name);
App::DocumentObject*
getUpstreamMovingPart(App::DocumentObject* part,
App::DocumentObject*& joint,
std::string& name,
std::vector<App::DocumentObject*> excludeJoints = {});
double getObjMass(App::DocumentObject* obj);
void setObjMasses(std::vector<std::pair<App::DocumentObject*, double>> objectMasses);