From e5b3888b6f3a2f4ebb51689f166e1450660c7691 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 1 Apr 2015 20:11:01 +0300 Subject: [PATCH] 52657: Wrong State in Creation Info of GetShapesOnShapeAsCompound() --- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index d98b007ac..7a55d6cd4 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -31,6 +31,7 @@ #include #include +#include // OCCT Includes #include @@ -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: -- 2.39.2