From: adv Date: Mon, 13 Jan 2014 11:47:27 +0000 (+0000) Subject: The search of shapes in the map is corrected by workaround. X-Git-Tag: BR_hydro_v_1_0~107 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17ebd777f2d11132acb49f52b70fa468515ef0cc;p=modules%2Fhydro.git The search of shapes in the map is corrected by workaround. --- diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index bcbd1964..5ec58560 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -736,12 +736,19 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var { const TopoDS_Shape& aShape = aGroupDef.Shapes.Value( i ); - const TopoDS_Shape& ModifiedShape = aSewing.Modified( aShape ); - if ( ModifiedShape.IsNull() ) + const TopoDS_Shape& aModifiedShape = aSewing.Modified( aShape ); + if ( aModifiedShape.IsNull() ) continue; - int anIndex = aMapOfSubShapes.FindIndex( ModifiedShape ); - if ( anIndex > 0 ) aGroupIndexes.Append( anIndex ); + // Workaround for TopTools_IndexedMapOfShape::FindIndex() + for ( int anIndex = 1; anIndex <= aMapOfSubShapes.Extent(); anIndex++ ) + { + if ( aModifiedShape.IsPartner( aMapOfSubShapes.FindKey( anIndex ) ) ) + { + aGroupIndexes.Append( anIndex ); + break; + } + } } if ( !aGroupIndexes.IsEmpty() )