Merge pull request #12804 from bgbsww/bgbsww-toponamingPartFeature

Toponaming/Part: methods in part feature and dependencies for correct elementMaps
This commit is contained in:
Chris Hennes
2024-03-11 13:35:59 -05:00
committed by GitHub
10 changed files with 1023 additions and 243 deletions

View File

@@ -28,6 +28,7 @@
# include <unordered_set>
#endif
#include "DocumentObject.h"
#include "MappedElement.h"
using namespace Data;
@@ -161,4 +162,11 @@ bool ElementNameComparator::operator()(const MappedName& leftName,
}
}
return leftName.size() < rightName.size();
}
}
HistoryItem::HistoryItem(App::DocumentObject *obj, const Data::MappedName &name)
:obj(obj),tag(0),element(name)
{
if(obj)
tag = obj->getID();
}

View File

@@ -99,6 +99,15 @@ struct AppExport MappedElement
}
};
struct AppExport HistoryItem {
App::DocumentObject *obj;
long tag;
Data::MappedName element;
Data::IndexedName index;
std::vector<Data::MappedName> intermediates;
HistoryItem(App::DocumentObject *obj, const Data::MappedName &name);
};
struct AppExport ElementNameComparator {
/** Comparison function to make topo name more stable
*