Assembly: Solver message taskbox. UI setup, App not implemented yet. (#23420)
* Assembly: Solver message taskbox. UI setup, App not implemented yet. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update TaskAssemblyMessages.cpp * Update ViewProviderAssembly.cpp --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -541,7 +541,7 @@ AssemblyObject* AssemblyLink::getParentAssembly() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool AssemblyLink::isRigid()
|
||||
bool AssemblyLink::isRigid() const
|
||||
{
|
||||
auto* prop = dynamic_cast<App::PropertyBool*>(getPropertyByName("Rigid"));
|
||||
if (!prop) {
|
||||
@@ -559,3 +559,18 @@ std::vector<App::DocumentObject*> AssemblyLink::getJoints()
|
||||
}
|
||||
return jointGroup->getJoints();
|
||||
}
|
||||
|
||||
bool AssemblyLink::allowDuplicateLabel() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int AssemblyLink::numberOfComponents() const
|
||||
{
|
||||
return isRigid() ? 1 : getLinkedAssembly()->numberOfComponents();
|
||||
}
|
||||
|
||||
bool AssemblyLink::isEmpty() const
|
||||
{
|
||||
return numberOfComponents() == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user