mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-05-12 11:40:48 +05:00
0020918: EDF 1447 SMESH: Mesh common borders
correct detection of Import algo removal
This commit is contained in:
parent
739be56dc1
commit
32e5f26956
@ -370,19 +370,26 @@ namespace // INTERNAL STUFF
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( subMesh->GetAlgoState() != SMESH_subMesh::HYP_OK )
|
SMESH_Gen* gen = subMesh->GetFather()->GetGen();
|
||||||
|
SMESH_Algo* algo = gen->GetAlgo(*subMesh->GetFather(),subMesh->GetSubShape() );
|
||||||
|
|
||||||
|
if ( subMesh->GetAlgoState() != SMESH_subMesh::HYP_OK ||
|
||||||
|
strncmp( "Import", algo->GetName(), 6 ) != 0 )
|
||||||
|
{
|
||||||
// treate removal of Import algo from subMesh
|
// treate removal of Import algo from subMesh
|
||||||
removeSubmesh( subMesh, (_ListenerData*) data );
|
removeSubmesh( subMesh, (_ListenerData*) data );
|
||||||
|
}
|
||||||
else if ( subMesh->IsEmpty() )
|
else if ( subMesh->IsEmpty() )
|
||||||
|
{
|
||||||
// treate modification of ImportSource hypothesis
|
// treate modification of ImportSource hypothesis
|
||||||
clearSubmesh( subMesh, (_ListenerData*) data );
|
clearSubmesh( subMesh, (_ListenerData*) data );
|
||||||
|
}
|
||||||
else if ( SMESH_subMesh::CHECK_COMPUTE_STATE == event &&
|
else if ( SMESH_subMesh::CHECK_COMPUTE_STATE == event &&
|
||||||
SMESH_subMesh::COMPUTE_EVENT == eventType )
|
SMESH_subMesh::COMPUTE_EVENT == eventType )
|
||||||
{
|
{
|
||||||
// check compute state of all submeshes impoting from same src mesh;
|
// check compute state of all submeshes impoting from same src mesh;
|
||||||
// this is to take into account 1D computed submeshes hidden by 2D import algo
|
// this is to take into account 1D computed submeshes hidden by 2D import algo;
|
||||||
|
// else source mesh is not copied as _subM.size != _computedSubM.size()
|
||||||
list< _ImportData > & dList = _tgtMesh2ImportData[ subMesh->GetFather() ];
|
list< _ImportData > & dList = _tgtMesh2ImportData[ subMesh->GetFather() ];
|
||||||
list< _ImportData >::iterator d = dList.begin();
|
list< _ImportData >::iterator d = dList.begin();
|
||||||
for ( ; d != dList.end(); ++d )
|
for ( ; d != dList.end(); ++d )
|
||||||
@ -726,7 +733,7 @@ void StdMeshers_Import_1D::importMesh(const SMESH_Mesh* srcMesh,
|
|||||||
(*e2eIt).second = newElem;
|
(*e2eIt).second = newElem;
|
||||||
}
|
}
|
||||||
// copy free nodes
|
// copy free nodes
|
||||||
if ( tgtSubMesh->NbNodes() < srcMeshDS->NbNodes() )
|
if ( srcMeshDS->NbNodes() > n2n->size() )
|
||||||
{
|
{
|
||||||
SMDS_NodeIteratorPtr nIt = srcMeshDS->nodesIterator();
|
SMDS_NodeIteratorPtr nIt = srcMeshDS->nodesIterator();
|
||||||
while( nIt->more() )
|
while( nIt->more() )
|
||||||
@ -736,6 +743,7 @@ void StdMeshers_Import_1D::importMesh(const SMESH_Mesh* srcMesh,
|
|||||||
{
|
{
|
||||||
const SMDS_MeshNode* newNode = tgtMeshDS->AddNode( node->X(), node->Y(), node->Z());
|
const SMDS_MeshNode* newNode = tgtMeshDS->AddNode( node->X(), node->Y(), node->Z());
|
||||||
n2n->insert( make_pair( node, newNode ));
|
n2n->insert( make_pair( node, newNode ));
|
||||||
|
tgtSubMesh->AddNode( newNode );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user