From: vsv Date: Fri, 6 Feb 2015 16:20:26 +0000 (+0300) Subject: Issue #398: Export shape to GEOM with the same name as it has in NewGeom X-Git-Tag: V_1.1.0~212^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e6d7f79722c97c8db93d37748682136f36f16cee;p=modules%2Fshaper.git Issue #398: Export shape to GEOM with the same name as it has in NewGeom --- diff --git a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py index e69b259fe..c4bf4a6ae 100644 --- a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py +++ b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py @@ -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