| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef ASSEMBLY_AssemblyLink_H |
| | #define ASSEMBLY_AssemblyLink_H |
| |
|
| | #include <unordered_map> |
| |
|
| | #include <Mod/Assembly/AssemblyGlobal.h> |
| |
|
| | #include <App/FeaturePython.h> |
| | #include <App/Part.h> |
| | #include <App/PropertyLinks.h> |
| |
|
| |
|
| | namespace Assembly |
| | { |
| | class AssemblyObject; |
| | class JointGroup; |
| |
|
| | class AssemblyExport AssemblyLink: public App::Part |
| | { |
| | PROPERTY_HEADER_WITH_OVERRIDE(Assembly::AssemblyLink); |
| |
|
| | public: |
| | AssemblyLink(); |
| | ~AssemblyLink() override; |
| |
|
| | PyObject* getPyObject() override; |
| |
|
| | |
| | const char* getViewProviderName() const override |
| | { |
| | return "AssemblyGui::ViewProviderAssemblyLink"; |
| | } |
| |
|
| | App::DocumentObjectExecReturn* execute() override; |
| |
|
| | |
| | AssemblyObject* getLinkedAssembly() const; |
| | |
| | AssemblyObject* getParentAssembly() const; |
| |
|
| | |
| | |
| | App::DocumentObject* getLinkedObject2(bool recurse = true) const; |
| |
|
| | bool isRigid() const; |
| |
|
| | |
| | |
| | |
| | void updateContents(); |
| |
|
| | void synchronizeComponents(); |
| | void synchronizeJoints(); |
| | void handleJointReference( |
| | App::DocumentObject* joint, |
| | App::DocumentObject* lJoint, |
| | const char* refName |
| | ); |
| | void ensureNoJointGroup(); |
| | JointGroup* ensureJointGroup(); |
| | std::vector<App::DocumentObject*> getJoints(); |
| |
|
| | bool allowDuplicateLabel() const override; |
| |
|
| | bool isEmpty() const; |
| | int numberOfComponents() const; |
| |
|
| | App::PropertyXLink LinkedObject; |
| | App::PropertyBool Rigid; |
| |
|
| | std::unordered_map<App::DocumentObject*, App::DocumentObject*> objLinkMap; |
| |
|
| | protected: |
| | |
| | void onChanged(const App::Property* prop) override; |
| | }; |
| |
|
| |
|
| | } |
| |
|
| |
|
| | #endif |
| |
|