AssemblyObject: Use std::unordered_set instead of vector.

This commit is contained in:
PaddleStroke
2024-12-11 09:57:04 +01:00
parent 1806857c42
commit 7dcd2610f0
2 changed files with 17 additions and 22 deletions

View File

@@ -157,8 +157,8 @@ public:
std::vector<App::DocumentObject*> getJointsOfPart(App::DocumentObject* part);
App::DocumentObject* getJointOfPartConnectingToGround(App::DocumentObject* part,
std::string& name);
std::vector<App::DocumentObject*> getGroundedParts();
std::vector<App::DocumentObject*> fixGroundedParts();
std::unordered_set<App::DocumentObject*> getGroundedParts();
std::unordered_set<App::DocumentObject*> fixGroundedParts();
void fixGroundedPart(App::DocumentObject* obj, Base::Placement& plc, std::string& jointName);
bool isJointConnectingPartToGround(App::DocumentObject* joint, const char* partPropName);
@@ -166,7 +166,7 @@ public:
bool isObjInSetOfObjRefs(App::DocumentObject* obj, const std::vector<ObjRef>& pairs);
void removeUnconnectedJoints(std::vector<App::DocumentObject*>& joints,
std::vector<App::DocumentObject*> groundedObjs);
std::unordered_set<App::DocumentObject*> groundedObjs);
void traverseAndMarkConnectedParts(App::DocumentObject* currentPart,
std::vector<ObjRef>& connectedParts,
const std::vector<App::DocumentObject*>& joints);