From: mpv Date: Mon, 2 Oct 2017 06:15:45 +0000 (+0300) Subject: An additional fix for the issue #2253. Make naming for simply created objects (like... X-Git-Tag: V_2.8.0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b078e707b3889fdca4379370e5dc20c9a3c51b5;p=modules%2Fshaper.git An additional fix for the issue #2253. Make naming for simply created objects (like imported or recovered) more correct. --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 49fad4397..4209b2401 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -574,7 +574,7 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr theShape, TopTools_IndexedMapOfShape Edges; BRepTools::Map3DEdges(aShape, Edges); if (Edges.Extent() == 1) { - builder(++theTag)->Generated(Edges.FindKey(1)); + builder(theTag++)->Generated(Edges.FindKey(1)); TopExp_Explorer expl(aShape, TopAbs_VERTEX); for (; expl.More(); expl.Next()) { builder(theTag)->Generated(expl.Current()); @@ -678,12 +678,13 @@ void Model_BodyBuilder::loadFirstLevel( std::string aName; if (aShape.ShapeType() == TopAbs_COMPOUND || aShape.ShapeType() == TopAbs_COMPSOLID) { TopoDS_Iterator itr(aShape); - for (; itr.More(); itr.Next(),theTag++) { + for (; itr.More(); itr.Next()) { builder(theTag)->Generated(itr.Value()); TCollection_AsciiString aStr(theTag); aName = theName + aStr.ToCString(); buildName(theTag, aName); if(!theName.empty()) buildName(theTag, aName); + theTag++; if (itr.Value().ShapeType() == TopAbs_COMPOUND || itr.Value().ShapeType() == TopAbs_COMPSOLID) {