-// 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
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<bool>::swap(isSingleNode[0], isSingleNode[1]);
if ( nbSame > 0 )
sames[0] = 1 - sames[0];
iNotSameNode = 1 - iNotSameNode;
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() )
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() );
{
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 )
sm->AddElement( newElem );
if ( elem != newElem )
ReplaceElemInGroups( elem, newElem, mesh );
+ if ( marked && newElem )
+ newElem->setIsMarked( true );
}
}
}
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;
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;
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 );
}