Merge pull request #24162 from PaddleStroke/asm_linkgroup_asmlink

Assembly: Add support to Link groups in sub-assemblies.
This commit is contained in:
PaddleStroke
2025-09-30 20:02:47 +02:00
committed by GitHub
parent 60c8c51d49
commit db00a9b8e2
3 changed files with 113 additions and 25 deletions

View File

@@ -726,5 +726,17 @@ App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
return getMovingPartFromRef(assemblyObject, prop);
}
void syncPlacements(App::DocumentObject* src, App::DocumentObject* to)
{
auto* plcPropSource =
dynamic_cast<App::PropertyPlacement*>(src->getPropertyByName("Placement"));
auto* plcPropLink = dynamic_cast<App::PropertyPlacement*>(to->getPropertyByName("Placement"));
if (plcPropSource && plcPropLink) {
if (!plcPropSource->getValue().isSame(plcPropLink->getValue())) {
plcPropLink->setValue(plcPropSource->getValue());
}
}
}
} // namespace Assembly