SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this );
me->_ancestors.reserve( ancShapes.Extent() );
SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this );
me->_ancestors.reserve( ancShapes.Extent() );
- if (!mainShape.IsNull())
- {
- _father->GetSubMesh( _father->GetShapeToMesh() )->DependsOn();
- }
+ if ( !mainShape.IsNull() )
+ _father->GetSubMesh( mainShape )->DependsOn();
+
+ TopTools_MapOfShape map;
+
for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() )
if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() ))
if ( map.Add( it.Value() ))
for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() )
if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() ))
if ( map.Add( it.Value() ))