]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #398: Export shape to GEOM with the same name as it has in NewGeom
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 6 Feb 2015 16:20:26 +0000 (19:20 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 6 Feb 2015 16:20:26 +0000 (19:20 +0300)
src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py

index e69b259fe73e248ffcc950f15fd775f2cc918af8..c4bf4a6ae239da7b1736a17d79125dbb6a98d0c2 100644 (file)
@@ -40,6 +40,7 @@ class ExportFeature(ModelAPI.ModelAPI_Feature):
 
     ## Exports all bodies
     def exportBodies(self):
+        global ShapeIndex
         kResultBodyType = "Bodies"
         aPartSize = self.Part.size(kResultBodyType)
         if aPartSize == 0:
@@ -56,7 +57,7 @@ class ExportFeature(ModelAPI.ModelAPI_Feature):
             aDump = aShape.getShapeStream()
             # Load shape to SALOME Geom
             aBrep = self.geompy.RestoreShape(aDump)
-            self.geompy.addToStudy(aBrep, "NewGeomShape_{0}".format(idx + 1))
+            self.geompy.addToStudy(aBrep, aBodyResult.data().name())
             self.geomObjects.append([aShape, aBrep])
 
     ## Exports all groups