mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-25 05:20:33 +05:00
Fix regression of viscous_layers_2D_00/A2
This commit is contained in:
parent
f1a810b957
commit
b7fecac60b
@ -2614,24 +2614,30 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
|
|||||||
// copy elements
|
// copy elements
|
||||||
|
|
||||||
std::vector< const SMDS_MeshElement* > newElems( initMeshDS->NbElements() + 1, 0 );
|
std::vector< const SMDS_MeshElement* > newElems( initMeshDS->NbElements() + 1, 0 );
|
||||||
elemIt = initImpl->GetElements( theMeshesArray[i], SMESH::ALL );
|
SMESH::array_of_ElementType_var srcElemTypes = theMeshesArray[i]->GetTypes();
|
||||||
while ( elemIt->more() )
|
bool hasElems = (( srcElemTypes->length() > 1 ) ||
|
||||||
|
( srcElemTypes->length() == 1 && srcElemTypes[0] != SMESH::NODE ));
|
||||||
|
if ( hasElems )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* elem = elemIt->next();
|
elemIt = initImpl->GetElements( theMeshesArray[i], SMESH::ALL );
|
||||||
elemType.myNodes.resize( elem->NbNodes() );
|
while ( elemIt->more() )
|
||||||
|
|
||||||
SMDS_NodeIteratorPtr itNodes = elem->nodeIterator();
|
|
||||||
for ( int k = 0; itNodes->more(); k++)
|
|
||||||
{
|
{
|
||||||
const SMDS_MeshNode* node = itNodes->next();
|
const SMDS_MeshElement* elem = elemIt->next();
|
||||||
elemType.myNodes[ k ] = static_cast< const SMDS_MeshNode*> ( newNodes[ node->GetID() ]);
|
elemType.myNodes.resize( elem->NbNodes() );
|
||||||
}
|
|
||||||
|
|
||||||
// creates a corresponding element on existent nodes in new mesh
|
SMDS_NodeIteratorPtr itNodes = elem->nodeIterator();
|
||||||
newElems[ elem->GetID() ] =
|
for ( int k = 0; itNodes->more(); k++)
|
||||||
newEditor.AddElement( elemType.myNodes, elemType.Init( elem, /*basicOnly=*/false ));
|
{
|
||||||
|
const SMDS_MeshNode* node = itNodes->next();
|
||||||
|
elemType.myNodes[ k ] = static_cast< const SMDS_MeshNode*> ( newNodes[ node->GetID() ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// creates a corresponding element on existent nodes in new mesh
|
||||||
|
newElems[ elem->GetID() ] =
|
||||||
|
newEditor.AddElement( elemType.myNodes, elemType.Init( elem, /*basicOnly=*/false ));
|
||||||
|
}
|
||||||
|
newEditor.ClearLastCreated(); // forget the history
|
||||||
}
|
}
|
||||||
newEditor.ClearLastCreated(); // forget the history
|
|
||||||
|
|
||||||
|
|
||||||
// create groups of just added elements
|
// create groups of just added elements
|
||||||
|
Loading…
Reference in New Issue
Block a user