Salome HOME
Fix bad dump produced in case if ExtractShapes() function is called with 'FLAT' shape...
authorvsr <vsr@opencascade.com>
Tue, 26 Mar 2019 10:31:26 +0000 (13:31 +0300)
committervsr <vsr@opencascade.com>
Tue, 26 Mar 2019 10:31:26 +0000 (13:31 +0300)
src/GEOM/GEOM_PythonDump.cxx

index 486a12fde51cc8874228b6363c096531b5ef3153..6ee4d2feed97c4043958f26da130f90e5bc5dfb8 100644 (file)
@@ -110,7 +110,14 @@ namespace GEOM
   TPythonDump& TPythonDump::operator<< (const TopAbs_ShapeEnum theArg)
   {
     myStream<<"geompy.ShapeType[\"";
-    TopAbs::Print(theArg, myStream);
+    if (theArg == -1)
+      myStream<<"AUTO";
+    else if (theArg == 9)
+      myStream<<"FLAT";
+    else if (theArg >= TopAbs_COMPOUND && theArg <= TopAbs_SHAPE)
+      TopAbs::Print(theArg, myStream);
+    else
+      myStream<<int(theArg);
     myStream<<"\"]";
     return *this;
   }