Assembly: Exploded view refactoring
This commit is contained in:
committed by
Yorik van Havre
parent
971355e1dc
commit
8fd15eaf28
@@ -75,6 +75,7 @@
|
||||
#include "AssemblyObject.h"
|
||||
#include "AssemblyObjectPy.h"
|
||||
#include "JointGroup.h"
|
||||
#include "ViewGroup.h"
|
||||
|
||||
namespace PartApp = Part;
|
||||
|
||||
@@ -398,6 +399,22 @@ JointGroup* AssemblyObject::getJointGroup()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ViewGroup* AssemblyObject::getExplodedViewGroup()
|
||||
{
|
||||
App::Document* doc = getDocument();
|
||||
|
||||
std::vector<DocumentObject*> viewGroups = doc->getObjectsOfType(ViewGroup::getClassTypeId());
|
||||
if (viewGroups.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
for (auto viewGroup : viewGroups) {
|
||||
if (hasObject(viewGroup)) {
|
||||
return dynamic_cast<ViewGroup*>(viewGroup);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> AssemblyObject::getJoints(bool updateJCS, bool delBadJoints)
|
||||
{
|
||||
std::vector<App::DocumentObject*> joints = {};
|
||||
|
||||
Reference in New Issue
Block a user