App/Toponaming: Add addition TNP methods
This commit is contained in:
committed by
Yorik van Havre
parent
c59bced261
commit
979090169f
@@ -184,6 +184,11 @@ bool ComplexGeoData::getCenterOfGravity(Base::Vector3d& unused) const
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string &ComplexGeoData::elementMapPrefix() {
|
||||
static std::string prefix(";");
|
||||
return prefix;
|
||||
}
|
||||
|
||||
size_t ComplexGeoData::getElementMapSize(bool flush) const
|
||||
{
|
||||
if (flush) {
|
||||
@@ -621,6 +626,25 @@ unsigned int ComplexGeoData::getMemSize() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void ComplexGeoData::setMappedChildElements(const std::vector<Data::ElementMap::MappedChildElements> & children)
|
||||
{
|
||||
// DO NOT reset element map if there is one. Because we allow mixing child
|
||||
// mapping and normal mapping
|
||||
if (!_elementMap) {
|
||||
resetElementMap(std::make_shared<Data::ElementMap>());
|
||||
}
|
||||
_elementMap->addChildElements(Tag, children);
|
||||
}
|
||||
|
||||
std::vector<Data::ElementMap::MappedChildElements> ComplexGeoData::getMappedChildElements() const
|
||||
{
|
||||
if (!_elementMap) {
|
||||
return {};
|
||||
}
|
||||
return _elementMap->getChildElements();
|
||||
}
|
||||
|
||||
void ComplexGeoData::beforeSave() const
|
||||
{
|
||||
flushElementMap();
|
||||
|
||||
@@ -176,6 +176,7 @@ public:
|
||||
virtual bool getCenterOfGravity(Base::Vector3d& center) const;
|
||||
//@}
|
||||
|
||||
static const std::string &elementMapPrefix();
|
||||
|
||||
/** @name Element name mapping */
|
||||
//@{
|
||||
@@ -247,6 +248,9 @@ public:
|
||||
|
||||
// NOTE: getElementHistory is now in ElementMap
|
||||
|
||||
void setMappedChildElements(const std::vector<Data::ElementMap::MappedChildElements> & children);
|
||||
std::vector<Data::ElementMap::MappedChildElements> getMappedChildElements() const;
|
||||
|
||||
char elementType(const Data::MappedName &) const;
|
||||
char elementType(const Data::IndexedName &) const;
|
||||
char elementType(const char *name) const;
|
||||
|
||||
3
tests/src/Mod/Part/App/TopoShapeExpansion.cpp
Normal file
3
tests/src/Mod/Part/App/TopoShapeExpansion.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
//
|
||||
// Created by Chris Hennes on 1/11/24.
|
||||
//
|
||||
Reference in New Issue
Block a user