From 2be2076415e2cff53255f43fab55cff7b096f6a8 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 30 Nov 2010 16:59:43 +0000 Subject: [PATCH] 0020945: EDF 1465 SMESH: create a new mesh from a selected group or from selected elements fix python dump and check of group type --- src/SMESH_I/SMESH_Gen_i.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 0a76af809..d69a3d4c8 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -2330,9 +2330,6 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, 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() ) { @@ -2342,7 +2339,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, // 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 @@ -2399,6 +2396,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, *pyDump << newMesh << " = " << this << ".CopyMesh( " << meshPart << ", " + << "'" << meshName << "', " << toCopyGroups << ", " << toKeepIDs << ")"; -- 2.39.2