Salome HOME
52657: Wrong State in Creation Info of GetShapesOnShapeAsCompound()
authoreap <eap@opencascade.com>
Wed, 1 Apr 2015 17:11:01 +0000 (20:11 +0300)
committereap <eap@opencascade.com>
Wed, 1 Apr 2015 17:11:01 +0000 (20:11 +0300)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index d98b007ac24d63b3e858dbcfedfcb75253a70d1e..7a55d6cd41f62aede27d23df5cc758b674abc4e9 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <GEOM_Function.hxx>
 #include <GEOMUtils_Hatcher.hxx>
+#include <GEOMAlgo_State.hxx>
 
 // OCCT Includes
 #include <ShapeFix_Wire.hxx>
@@ -1599,7 +1600,13 @@ GetCreationInformation(std::string&             theOperationName,
     if ( !shapes.IsNull() && shapes->Length() > 1 )
       AddParam( theParams, "Shape", shapes->Value(2) );
     AddParam( theParams, "Shape type", TopAbs_ShapeEnum( aCI.GetSubShapeType() ));
-    AddParam( theParams, "State", TopAbs_State((int) aCI.GetTolerance() ));
+    AddParam( theParams, "State" );
+    GEOMAlgo_State st = GEOMAlgo_State( (int) aCI.GetTolerance()+0.1 );
+    const char* stName[] = { "UNKNOWN","IN","OUT","ON","ONIN","ONOUT","INOUT" };
+    if ( 0 <= st && st <= GEOMAlgo_ST_INOUT )
+      theParams.back() << stName[ st ];
+    else
+      theParams.back() << (int) st;
     break;
   }
   case SHAPE_ISOLINE: