0020918: EDF 1447 SMESH: Mesh common borders

1) clear failed not empty submesh at hyp modification
  2) fix hiding algo detection
This commit is contained in:
eap 2010-11-12 14:42:01 +00:00
parent f68e8a6388
commit b9288c7246

View File

@ -1000,9 +1000,12 @@ SMESH_Hypothesis::Hypothesis_Status
if ( ret == SMESH_Hypothesis::HYP_OK && if ( ret == SMESH_Hypothesis::HYP_OK &&
!algo->NeedDescretBoundary() && !algo->NeedDescretBoundary() &&
!algo->SupportSubmeshes()) { !algo->SupportSubmeshes()) {
TopoDS_Shape algoAssignedTo, otherAssignedTo;
gen->GetAlgo( *_father, _subShape, &algoAssignedTo );
map<int, SMESH_subMesh*>::reverse_iterator i_sm = _mapDepend.rbegin(); map<int, SMESH_subMesh*>::reverse_iterator i_sm = _mapDepend.rbegin();
for ( ; ( ret == SMESH_Hypothesis::HYP_OK && i_sm != _mapDepend.rend()) ; ++i_sm ) for ( ; ( ret == SMESH_Hypothesis::HYP_OK && i_sm != _mapDepend.rend()) ; ++i_sm )
if ( gen->GetAlgo( *_father, i_sm->second->_subShape )) if ( gen->GetAlgo( *_father, i_sm->second->_subShape, &otherAssignedTo ) &&
SMESH_MesherHelper::IsSubShape( /*sub=*/otherAssignedTo, /*main=*/algoAssignedTo ))
ret = SMESH_Hypothesis::HYP_HIDING_ALGO; ret = SMESH_Hypothesis::HYP_HIDING_ALGO;
} }
} }
@ -1544,6 +1547,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
switch (event) switch (event)
{ {
case MODIF_ALGO_STATE: case MODIF_ALGO_STATE:
if ( !IsEmpty() )
ComputeStateEngine( CLEAN );
algo = gen->GetAlgo((*_father), _subShape); algo = gen->GetAlgo((*_father), _subShape);
if (algo && !algo->NeedDescretBoundary()) if (algo && !algo->NeedDescretBoundary())
CleanDependsOn(); // clean sub-meshes with event CLEAN CleanDependsOn(); // clean sub-meshes with event CLEAN