{
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() )