From e6d7f79722c97c8db93d37748682136f36f16cee Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 6 Feb 2015 19:20:26 +0300 Subject: [PATCH] Issue #398: Export shape to GEOM with the same name as it has in NewGeom --- src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2