X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MeshEditor.cxx;h=a0db1ec7aa2122e6ffc198b4557f7f5aee060630;hb=aa034dad38ed214bf71255119d299ec6826588f8;hp=be874359b73c68b2ab7891c3acb3c09104a2984c;hpb=d9f4b53e489dd5857db264ede6acded7b076c9f1;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index be874359b..a0db1ec7a 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -4636,7 +4636,7 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem, std::swap( itNN[0], itNN[1] ); std::swap( prevNod[0], prevNod[1] ); std::swap( nextNod[0], nextNod[1] ); - std::swap( isSingleNode[0], isSingleNode[1] ); + std::vector::swap(isSingleNode[0], isSingleNode[1]); if ( nbSame > 0 ) sames[0] = 1 - sames[0]; iNotSameNode = 1 - iNotSameNode; @@ -5219,13 +5219,12 @@ void SMESH_MeshEditor::makeWalls (TNodeOfNodeListMap & mapNewNodes, srcEdges.push_back(aMesh->FindEdge (commonNodes[0],commonNodes[1],commonNodes[2])); else srcEdges.push_back(aMesh->FindEdge (commonNodes[0],commonNodes[1])); -#ifdef _DEBUG_ - if ( !srcEdges.back() ) + + if (SALOME::VerbosityActivated() && !srcEdges.back()) { cout << "SMESH_MeshEditor::makeWalls(), no source edge found for a free face #" - << iF << " of volume #" << vTool.ID() << endl; + << iF << " of volume #" << vTool.ID() << endl; } -#endif } } if ( freeInd.empty() ) @@ -6816,9 +6815,8 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem for ( size_t i = 0; i < new2OldNodes.size(); ++i ) if ( const SMDS_MeshNode* n = new2OldNodes[ i ].first ) { -#ifndef _DEBUG_ - if ( n->NbInverseElements() > 0 ) -#endif + + if (!SALOME::VerbosityActivated() || n->NbInverseElements() > 0 ) { const SMDS_MeshNode* n2 = tgtMeshDS->AddNodeWithID( n->X(), n->Y(), n->Z(), idShift + n->GetID() ); @@ -7281,6 +7279,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes, { const SMDS_MeshElement* elem = *eIt; SMESHDS_SubMesh* sm = mesh->MeshElements( elem->getshapeId() ); + bool marked = elem->isMarked(); bool keepElem = applyMerge( elem, newElemDefs, nodeNodeMap, /*noHoles=*/false ); if ( !keepElem ) @@ -7317,6 +7316,8 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes, sm->AddElement( newElem ); if ( elem != newElem ) ReplaceElemInGroups( elem, newElem, mesh ); + if ( marked && newElem ) + newElem->setIsMarked( true ); } } } @@ -12808,7 +12809,8 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, bool toCopyElements/*=false*/, bool toCopyExistingBoundary/*=false*/, bool toAddExistingBondary/*= false*/, - bool aroundElements/*= false*/) + bool aroundElements/*= false*/, + bool toCreateAllElements/*= false*/) { SMDSAbs_ElementType missType = (dimension == BND_2DFROM3D) ? SMDSAbs_Face : SMDSAbs_Edge; SMDSAbs_ElementType elemType = (dimension == BND_1DFROM2D) ? SMDSAbs_Face : SMDSAbs_Volume; @@ -12827,7 +12829,6 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, SMESH_MeshEditor* presentEditor; SMESH_MeshEditor tgtEditor2( tgtEditor.GetMesh() ); presentEditor = toAddExistingBondary ? &tgtEditor : &tgtEditor2; - SMESH_MesherHelper helper( *myMesh ); const TopAbs_ShapeEnum missShapeType = ( missType==SMDSAbs_Face ? TopAbs_FACE : TopAbs_EDGE ); SMDS_VolumeTool vTool; @@ -12865,8 +12866,9 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, const SMDS_MeshElement* otherVol = 0; for ( int iface = 0, n = vTool.NbFaces(); iface < n; iface++ ) { - if ( !vTool.IsFreeFace(iface, &otherVol) && - ( !aroundElements || elements.count( otherVol ))) + if ( !toCreateAllElements && + !vTool.IsFreeFace(iface, &otherVol) && + ( !aroundElements || elements.count( otherVol ))) continue; freeFacets.push_back( iface ); }