[Mod] assembly clean
clean code
This commit is contained in:
@@ -159,7 +159,6 @@ void AssemblyLink::onChanged(const App::Property* prop)
|
||||
propPlc->setValue(movePlc);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
App::Part::onChanged(prop);
|
||||
@@ -175,7 +174,6 @@ void AssemblyLink::updateContents()
|
||||
else {
|
||||
synchronizeJoints();
|
||||
}
|
||||
|
||||
purgeTouched();
|
||||
}
|
||||
|
||||
@@ -220,7 +218,6 @@ void AssemblyLink::synchronizeComponents()
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (linkedObj == obj) {
|
||||
found = true;
|
||||
link = obj2;
|
||||
@@ -272,24 +269,6 @@ void AssemblyLink::synchronizeComponents()
|
||||
if (objLinkMap.find(link) != objLinkMap.end()) {
|
||||
doc->removeObject(link->getNameInDocument());
|
||||
}
|
||||
|
||||
/*if (!link->isDerivedFrom<App::Link>() && !link->isDerivedFrom<AssemblyLink>()) {
|
||||
// AssemblyLink should contain only Links or assembly links.
|
||||
continue;
|
||||
}
|
||||
|
||||
auto* linkedObj = link->getLinkedObject(false); // not recursive
|
||||
|
||||
bool found = false;
|
||||
for (auto* obj2 : assemblyGroup) {
|
||||
if (obj2 == linkedObj) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
doc->removeObject(link->getNameInDocument());
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,7 +546,6 @@ bool AssemblyLink::isRigid()
|
||||
if (!prop) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return prop->getValue();
|
||||
}
|
||||
|
||||
@@ -578,6 +556,5 @@ std::vector<App::DocumentObject*> AssemblyLink::getJoints()
|
||||
if (!jointGroup) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return jointGroup->getJoints();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user