mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021347: [CEA 497] Visualisation into SMESH and VISU of hexagonal prism cells (MED_OCTA12)
0021380: EDF 1937 SMESH: Take into account QUAD9 and HEXA27 In CopyMesh(), copy free nodes as well
This commit is contained in:
parent
41b91cf1c6
commit
32a63e97ee
@ -2436,12 +2436,13 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
|
||||
|
||||
// 3. Get elements to copy
|
||||
|
||||
SMDS_ElemIteratorPtr srcElemIt;
|
||||
SMDS_ElemIteratorPtr srcElemIt; SMDS_NodeIteratorPtr srcNodeIt;
|
||||
TIDSortedElemSet srcElems;
|
||||
SMESH::array_of_ElementType_var srcElemTypes = meshPart->GetTypes();
|
||||
if ( SMESH::DownCast<SMESH_Mesh_i*>( meshPart ))
|
||||
{
|
||||
srcElemIt = srcMeshDS->elementsIterator();
|
||||
srcNodeIt = srcMeshDS->nodesIterator();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2515,6 +2516,23 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
|
||||
}
|
||||
}
|
||||
|
||||
// 4(b). Copy free nodes
|
||||
|
||||
if ( srcNodeIt && srcMeshDS->NbNodes() != newMeshDS->NbNodes() )
|
||||
{
|
||||
while ( srcNodeIt->more() )
|
||||
{
|
||||
nSrc = srcNodeIt->next();
|
||||
if ( nSrc->NbInverseElements() == 0 )
|
||||
{
|
||||
if ( toKeepIDs )
|
||||
nTgt = newMeshDS->AddNodeWithID( nSrc->X(), nSrc->Y(), nSrc->Z(), nSrc->GetID());
|
||||
else
|
||||
n2nMap[ nSrc ] = newMeshDS->AddNode( nSrc->X(), nSrc->Y(), nSrc->Z() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Copy groups
|
||||
|
||||
int nbNewGroups = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user