Skip to content

Commit

Permalink
Merge pull request FreeCAD#12804 from bgbsww/bgbsww-toponamingPartFea…
Browse files Browse the repository at this point in the history
…ture

Toponaming/Part: methods in part feature and dependencies for correct elementMaps
  • Loading branch information
chennes authored Mar 11, 2024
2 parents 0b761c1 + 3df2582 commit 52fffaf
Show file tree
Hide file tree
Showing 10 changed files with 1,016 additions and 236 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 52fffaf

Please sign in to comment.