TopTools_MapOfShape mapShape;
+ NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher> aFF2N;
+ for (int i = 1; i <= aFacesToNameModif.Extent(); i++)
+ {
+ TopExp_Explorer exp (aFacesToNameModif.FindKey(i), TopAbs_FACE);
+ for (;exp.More(); exp.Next())
+ aFF2N.Add(exp.Current(), aFacesToNameModif.FindFromIndex(i));
+ }
+
TopExp_Explorer exp (theShape, TopAbs_FACE);
QVector<QString> Names;
for (; exp.More(); exp.Next())
if (mapShape.Add(csh))
{
//listShape.Append(csh);
- QString Qstr = aFacesToNameModif.FindFromKey(csh);
+ QString Qstr = aFF2N.FindFromKey(csh);
Names.push_back(Qstr);
}
}
for (size_t i = 0; i < aFc->length(); i++)
- GEOMBase::PublishSubObject(aFc->operator[](i), Names[i]);
+ {
+ std::string name = Names[i].toStdString();
+ GEOM::GEOM_Object_ptr anObj = aFc->operator[](i);
+ //GEOMBase::PublishSubObject( anObj, name.c_str() );
+ theGeomEngine->AddInStudy( theStudy, anObj, name.c_str(), aGeomObj );
+ }
return aGeomObj;
}