X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MeshEditor.cxx;h=49f9c1b3a8776abf98730188553103d7e1ca84fb;hb=8c9a971309bd09be8c62a445303930dcff75ee3b;hp=7bb9b26dd8109c6b5414c2ae1f758fae095df301;hpb=5a57da6b1e541a696e319e9e3a2076c48f5100f3;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 7bb9b26dd..49f9c1b3a 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -10968,6 +10968,12 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorGetCellType(vtkId); int downId = grid->CellIdToDownId(vtkId); + if (downId < 0) + { + MESSAGE("doubleNodesOnGroupBoundaries: internal algorithm problem"); + continue; // not OK at this stage of the algorithm: + //no cells created after BuildDownWardConnectivity + } DownIdType aCell(downId, vtkType); if (celldom.count(vtkId)) continue; @@ -11045,6 +11051,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorextrudeVolumeFromFace(vtkVolId, dom1, dom2, oldNodes, nodeDomains, nodeQuadDomains); stringstream grpname; - grpname << "junction_"; + grpname << "j_"; if (dom1 < dom2) grpname << dom1 << "_" << dom2; else @@ -11198,7 +11209,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorGetMeshDS()->AddVolumeFromVtkIds(orderedNodes); stringstream grpname; - grpname << "junction_"; + grpname << "mj_"; grpname << 0 << "_" << 0; int idg; string namegrp = grpname.str(); @@ -11210,6 +11221,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorGetCellType(vtkId); int downId = grid->CellIdToDownId(vtkId); + if (downId < 0) + continue; // new cells: not to be modified DownIdType aCell(downId, vtkType); int volParents[1000]; int nbvol = grid->GetParentVolumes(volParents, vtkId); @@ -11330,6 +11344,8 @@ bool SMESH_MeshEditor::CreateFlatElementsOnFacesGroups(const std::vector intermediateNodes; clonedNodes.clear(); intermediateNodes.clear(); + std::map mapOfJunctionGroups; + mapOfJunctionGroups.clear(); for (int idom = 0; idom < theElems.size(); idom++) { @@ -11441,6 +11457,20 @@ bool SMESH_MeshEditor::CreateFlatElementsOnFacesGroups(const std::vectormyMesh->AddGroup(SMDSAbs_Volume, namegrp.c_str(), idg); + SMESHDS_Group *sgrp = dynamic_cast(mapOfJunctionGroups[namegrp]->GetGroupDS()); + if (sgrp) + sgrp->Add(vol->GetID()); + } + // --- modify the face aFace->ChangeNodes(&ln[0], ln.size());