MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / checkGeoElementMap

Method checkGeoElementMap

src/App/Link.cpp:1610–1636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1608}
1609
1610void LinkBaseExtension::checkGeoElementMap(const App::DocumentObject* obj,
1611 const App::DocumentObject* linked,
1612 PyObject** pyObj,
1613 const char* postfix) const
1614{
1615 if (!pyObj || !*pyObj || (!postfix && obj->getDocument() == linked->getDocument())
1616 || !PyObject_TypeCheck(*pyObj, &Data::ComplexGeoDataPy::Type)) {
1617 return;
1618 }
1619
1620 // auto geoData = static_cast<Data::ComplexGeoDataPy*>(*pyObj)->getComplexGeoDataPtr();
1621 // geoData->reTagElementMap(obj->getID(),obj->getDocument()->Hasher,postfix);
1622
1623 auto geoData = static_cast<Data::ComplexGeoDataPy*>(*pyObj)->getComplexGeoDataPtr();
1624 std::string _postfix;
1625 if (linked && obj && linked->getDocument() != obj->getDocument()) {
1626 _postfix = Data::POSTFIX_EXTERNAL_TAG;
1627 if (postfix) {
1628 if (!boost::starts_with(postfix, Data::ComplexGeoData::elementMapPrefix())) {
1629 _postfix += Data::ComplexGeoData::elementMapPrefix();
1630 }
1631 _postfix += postfix;
1632 }
1633 postfix = _postfix.c_str();
1634 }
1635 geoData->reTagElementMap(obj->getID(), obj->getDocument()->getStringHasher(), postfix);
1636}
1637
1638void LinkBaseExtension::onExtendedUnsetupObject()
1639{

Callers

nothing calls this directly

Calls 5

reTagElementMapMethod · 0.80
getStringHasherMethod · 0.80
getDocumentMethod · 0.45
c_strMethod · 0.45
getIDMethod · 0.45

Tested by

no test coverage detected