Skip to content

Commit

Permalink
Toposhape/Part:: Fix, relocate and test element methods in ComplexGeo…
Browse files Browse the repository at this point in the history
…Data and TopoShape
  • Loading branch information
bgbsww committed Mar 8, 2024
1 parent ae5c0a6 commit 3df2582
Show file tree
Hide file tree
Showing 9 changed files with 684 additions and 329 deletions.
10 changes: 9 additions & 1 deletion src/App/MappedElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# include <unordered_set>
#endif

#include "DocumentObject.h"
#include "MappedElement.h"

using namespace Data;
Expand Down Expand Up @@ -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();
}
9 changes: 9 additions & 0 deletions src/App/MappedElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Loading

0 comments on commit 3df2582

Please sign in to comment.