X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MeshEditor_i.cxx;h=5227a966814a6402f36fd1a38fc10e9f017403a2;hp=acf9a4030d7ed821a70cfc5e1d8f1c5bf1b498b1;hb=c63ee099ad2b149bd70136839c973e8910137bc5;hpb=7cab0901cbf9895ce79a5af2390f310136a94802 diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index acf9a4030..5227a9668 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -519,16 +519,18 @@ CORBA::Boolean SMESH_MeshEditor_i::ReorientObject(SMESH::SMESH_IDSource_ptr theO //purpose : auxilary function for conversion long_array to std::map<> // which is used in some methods //======================================================================= -static void ToMap(const SMESH::long_array & IDs, - const SMESHDS_Mesh* aMesh, - std::map& aMap) +static void ToMap(const SMESH::long_array & IDs, + const SMESHDS_Mesh* aMesh, + std::map& aMap, + const SMDSAbs_ElementType aType = SMDSAbs_All ) { for (int i=0; i::iterator It = aMap.find(ind); if(It==aMap.end()) { const SMDS_MeshElement * elem = aMesh->FindElement(ind); - aMap.insert( make_pair(ind,elem) ); + if ( elem && ( aType == SMDSAbs_All || elem->GetType() == aType )) + aMap.insert( make_pair( elem->GetID(), elem )); } } } @@ -548,7 +550,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array & IDsOfE SMESHDS_Mesh* aMesh = GetMeshDS(); map faces; - ToMap(IDsOfElements, aMesh, faces); + ToMap(IDsOfElements, aMesh, faces, SMDSAbs_Face); SMESH::NumericalFunctor_i* aNumericalFunctor = dynamic_cast( SMESH_Gen_i::GetServant( Criterion ).in() ); @@ -624,7 +626,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array & IDsOfE SMESHDS_Mesh* aMesh = GetMeshDS(); map faces; - ToMap(IDsOfElements, aMesh, faces); + ToMap(IDsOfElements, aMesh, faces, SMDSAbs_Face); SMESH::NumericalFunctor_i* aNumericalFunctor = dynamic_cast( SMESH_Gen_i::GetServant( Criterion ).in() ); @@ -697,7 +699,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfEle SMESHDS_Mesh* aMesh = GetMeshDS(); map faces; - ToMap(IDsOfElements, aMesh, faces); + ToMap(IDsOfElements, aMesh, faces, SMDSAbs_Face); // Update Python script TPythonDump() << "isDone = " << this << ".SplitQuad( " @@ -861,7 +863,7 @@ CORBA::Boolean SMESHDS_Mesh* aMesh = GetMeshDS(); map elements; - ToMap(IDsOfElements, aMesh, elements); + ToMap(IDsOfElements, aMesh, elements, SMDSAbs_Face); set fixedNodes; for (int i = 0; i < IDsOfFixedNodes.length(); i++) {