Toposhape/Part:: fix, relocate and test element methods in ComplexGeoData and TopoShape
This commit is contained in:
@@ -5002,23 +5002,22 @@ bool TopoShape::isSame(const Data::ComplexGeoData &_other) const
|
||||
&& Hasher == other.Hasher
|
||||
&& _Shape.IsEqual(other._Shape);
|
||||
}
|
||||
|
||||
void TopoShape::cacheRelatedElements(const Data::MappedName &name,
|
||||
bool sameType,
|
||||
HistoryTraceType sameType,
|
||||
const QVector<Data::MappedElement> & names) const
|
||||
{
|
||||
INIT_SHAPE_CACHE();
|
||||
_Cache->insertRelation(ShapeRelationKey(name,sameType), names);
|
||||
initCache();
|
||||
_cache->insertRelation(ShapeRelationKey(name,sameType), names);
|
||||
}
|
||||
|
||||
bool TopoShape::getRelatedElementsCached(const Data::MappedName &name,
|
||||
bool sameType,
|
||||
HistoryTraceType sameType,
|
||||
QVector<Data::MappedElement> &names) const
|
||||
{
|
||||
if(!_Cache)
|
||||
if(!_cache)
|
||||
return false;
|
||||
auto it = _Cache->relations.find(ShapeRelationKey(name,sameType));
|
||||
if(it == _Cache->relations.end())
|
||||
auto it = _cache->relations.find(ShapeRelationKey(name,sameType));
|
||||
if(it == _cache->relations.end())
|
||||
return false;
|
||||
names = it->second;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user