if ( 0 < oldID && oldID < (int)myGIPMap->length() )
{
- if (( myGIPMap[ oldID ].length() == 1 ) ||
- ( myGIPMap[ oldID ].length() > 1 &&
- getShapeType( mySrcMesh_i, oldID ) == TopAbs_VERTEX ))
+ if ( myGIPMap[ oldID ].length() == 1 )
{
newID = myGIPMap[ oldID ][ 0 ];
}
+ else if ( myGIPMap[ oldID ].length() > 1 &&
+ getShapeType( mySrcMesh_i, oldID ) == TopAbs_VERTEX )
+ {
+ // select a meshed VERTEX
+ SMESH_subMesh* newSM;
+ for ( CORBA::ULong i = 0; i < myGIPMap[ oldID ].length() && !newID; ++i )
+ if (( newSM = myNewMesh_i->GetImpl().GetSubMeshContaining( myGIPMap[ oldID ][ i ] )) &&
+ ( !newSM->IsEmpty() ))
+ newID = myGIPMap[ oldID ][ i ];
+ }
}
return newID;
}
seq[ seq->length() - 1 ] = item;
}
}
-}
+} // namespace // utils for CopyMeshWithGeom()
//================================================================================
/*!
if ( SMESH_subMesh* newSM = newMesh_i->GetImpl().GetSubMeshContaining( newID ))
newSM->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
}
+
+ newMeshDS->Modified();
}
SALOME::GenericObj_wrap< SMESH::FilterManager > filterMgr = CreateFilterManager();
SMESH::ListOfGroups_var groups = theSourceMesh->GetGroups();
- CORBA::ULong nbGroups = groups->length(), nbAddedGroups = 0;
+ CORBA::ULong nbGroups = theToCopyGroups ? groups->length() : 0, nbAddedGroups = 0;
for ( CORBA::ULong i = 0; i < nbGroups + nbAddedGroups; ++i )
{
SMESH::SMESH_Group_var stdlGroup = SMESH::SMESH_Group::_narrow ( groups[ i ]);
} // loop on groups
+ newMeshDS->CompactMesh();
+
// set mesh name
SALOMEDS::SObject_wrap soNew = ObjectToSObject( study, theNewMesh );
SALOMEDS::SObject_wrap soOld = ObjectToSObject( study, theSourceMesh );