Toponaming: Remove all FC_USE_TNP_FIX protected old code

This commit is contained in:
bgbsww
2024-05-20 21:57:39 -04:00
committed by Chris Hennes
parent 60640fa441
commit ecf7e51ab3
52 changed files with 22 additions and 4760 deletions

View File

@@ -58,45 +58,6 @@ App::DocumentObjectExecReturn *Compound::execute()
// See also ViewProviderCompound::updateData
std::set<DocumentObject*> tempLinks;
#ifndef FC_USE_TNP_FIX
std::vector<ShapeHistory> history;
int countFaces = 0;
BRep_Builder builder;
TopoDS_Compound comp;
builder.MakeCompound(comp);
const std::vector<DocumentObject*>& links = Links.getValues();
for (auto link : links) {
if (link) {
auto pos = tempLinks.insert(link);
if (pos.second) {
const TopoDS_Shape& sh = Feature::getShape(link);
if (!sh.IsNull()) {
builder.Add(comp, sh);
TopTools_IndexedMapOfShape faceMap;
TopExp::MapShapes(sh, TopAbs_FACE, faceMap);
ShapeHistory hist;
hist.type = TopAbs_FACE;
for (int i=1; i<=faceMap.Extent(); i++) {
hist.shapeMap[i-1].push_back(countFaces++);
}
history.push_back(hist);
}
}
}
}
this->Shape.setValue(comp);
// make sure the 'PropertyShapeHistory' is not safed in undo/redo (#0001889)
PropertyShapeHistory prop;
prop.setValues(history);
prop.setContainer(this);
prop.touch();
return App::DocumentObject::StdReturn;
#else
std::vector<TopoShape> shapes;
for (auto obj : Links.getValues()) {
if (!tempLinks.insert(obj).second) {
@@ -109,7 +70,6 @@ App::DocumentObjectExecReturn *Compound::execute()
}
this->Shape.setValue(TopoShape().makeElementCompound(shapes));
return Part::Feature::execute();
#endif
}
catch (Standard_Failure& e) {
return new App::DocumentObjectExecReturn(e.GetMessageString());