X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MeshEditor.cxx;h=9b8ead42d3dd54e2f59fdbd7df80d0119078d7bc;hp=42ce46b7970659d6c05900cbbef01570752a74af;hb=27c5228fcfe39a6405378da49ac700ee2adca6cc;hpb=9493563cbc59acba2b9b036bb22fb184f5be946d diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 42ce46b79..9b8ead42d 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -5002,14 +5002,17 @@ void SMESH_MeshEditor::makeWalls (TNodeOfNodeListMap & mapNewNodes, SMDSAbs_ElementType highType = SMDSAbs_Edge; // count most complex elements only while ( eIt->more() && nbInitElems < 2 ) { const SMDS_MeshElement* e = eIt->next(); - SMDSAbs_ElementType type = e->GetType(); - if ( type == SMDSAbs_Volume || type < highType ) continue; + SMDSAbs_ElementType type = e->GetType(); + if ( type == SMDSAbs_Volume || + type < highType || + !elemSet.count(e)) + continue; if ( type > highType ) { nbInitElems = 0; - highType = type; + highType = type; } el = e; - nbInitElems += elemSet.count(el); + ++nbInitElems; } if ( nbInitElems == 1 ) { bool NotCreateEdge = el && el->IsMediumNode(node);