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

@@ -50,6 +50,7 @@
#include "PartPyCXX.h"
#include "PropertyTopoShape.h"
#include "TopoShapePy.h"
#include "PartFeature.h"
FC_LOG_LEVEL_INIT("App", true, true)
@@ -103,14 +104,15 @@ TopoShape PropertyPartShape::getShape() const
{
_Shape.initCache(-1);
auto res = _Shape;
// March, 2024 Toponaming project: There was originally an unused feature to disable elementMapping
// that has not been kept:
// March, 2024 Toponaming project: There was originally an unused feature to disable
// elementMapping that has not been kept:
// if (Feature::isElementMappingDisabled(getContainer()))
if ( false )
res.Tag = -1;
else if (!res.Tag) {
if (auto parent = Base::freecad_dynamic_cast<App::DocumentObject>(getContainer()))
// res.Tag = -1;
// else if (!res.Tag) {
if (!res.Tag) {
if (auto parent = Base::freecad_dynamic_cast<App::DocumentObject>(getContainer())) {
res.Tag = parent->getID();
}
}
return res;
}