Assembly: Change the joint placements to be relative to the object rather than to the doc origin.

This enable 'detaching' them, so that they are not recomputed
This commit is contained in:
Paddle
2023-12-20 23:32:29 +01:00
committed by PaddleStroke
parent 4a119c43f1
commit 22e4d7f2dd
4 changed files with 178 additions and 47 deletions

View File

@@ -104,6 +104,7 @@ public:
std::string handleOneSideOfJoint(App::DocumentObject* joint,
const char* propObjLinkName,
const char* propPartName,
const char* propPlcName);
void jointParts(std::vector<App::DocumentObject*> joints);
std::vector<App::DocumentObject*> getJoints();
@@ -124,6 +125,7 @@ public:
void swapJCS(App::DocumentObject* joint);
void setNewPlacements();
void redrawJointPlacements(std::vector<App::DocumentObject*> joints);
void recomputeJointPlacements(std::vector<App::DocumentObject*> joints);
bool isPartConnected(App::DocumentObject* obj);
@@ -141,9 +143,10 @@ public:
JointType getJointType(App::DocumentObject* joint);
const char* getElementFromProp(App::DocumentObject* obj, const char* propName);
std::string getElementTypeFromProp(App::DocumentObject* obj, const char* propName);
Base::Placement getPlacementFromProp(App::DocumentObject* obj, const char* propName);
App::DocumentObject* getLinkObjFromProp(App::DocumentObject* joint, const char* propName);
App::DocumentObject*
getObjFromNameProp(App::DocumentObject* joint, const char* pObjName, const char* pPart);
App::DocumentObject*
getLinkedObjFromNameProp(App::DocumentObject* joint, const char* pObjName, const char* pPart);
private: