int nbNewGroups = 0;
if ( toCopyGroups )
{
- SMESH::ElementType* typesBeg = & srcElemTypes[0];
- SMESH::ElementType* typesEnd = typesBeg+srcElemTypes->length();
-
SMESH_Mesh::GroupIteratorPtr gIt = srcMesh_i->GetImpl().GetGroups();
while ( gIt->more() )
{
// Check group type. We copy nodal groups containing nodes of copied element
SMDSAbs_ElementType groupType = groupDS->GetType();
if ( groupType != SMDSAbs_Node &&
- std::find( typesBeg, typesEnd, groupType ) == typesEnd )
+ newMeshDS->GetMeshInfo().NbElements( groupType ) == 0 )
continue; // group type differs from types of meshPart
// Find copied elements in the group
*pyDump << newMesh << " = " << this
<< ".CopyMesh( " << meshPart << ", "
+ << "'" << meshName << "', "
<< toCopyGroups << ", "
<< toKeepIDs << ")";