From a41868ac871c718a7bea205878aee7594d5744ec Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 26 Mar 2019 13:31:26 +0300 Subject: [PATCH] Fix bad dump produced in case if ExtractShapes() function is called with 'FLAT' shape type --- src/GEOM/GEOM_PythonDump.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx index 486a12fde..6ee4d2fee 100644 --- a/src/GEOM/GEOM_PythonDump.cxx +++ b/src/GEOM/GEOM_PythonDump.cxx @@ -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<