Toposhape/Part:: Fix, relocate and test element methods in ComplexGeoData and TopoShape

This commit is contained in:
bgbsww
2024-02-28 15:56:45 -05:00
parent ae5c0a6d9c
commit 3df25821e5
9 changed files with 691 additions and 336 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
*