]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
An additional fix for the issue #2253. Make naming for simply created objects (like...
authormpv <mpv@opencascade.com>
Mon, 2 Oct 2017 06:15:45 +0000 (09:15 +0300)
committermpv <mpv@opencascade.com>
Mon, 2 Oct 2017 06:15:45 +0000 (09:15 +0300)
src/Model/Model_BodyBuilder.cpp

index 49fad4397ad1d00dc0ed4b9a307f6ae4611005f3..4209b2401ccbf509f25e120e8ecc6a8fc593d574 100755 (executable)
@@ -574,7 +574,7 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> 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)
       {