Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6585463
)
PAL8196. Fix GetAlgo() for the case with the same algo on several ancestors
author
eap
<eap@opencascade.com>
Fri, 24 Jun 2005 11:01:15 +0000
(11:01 +0000)
committer
eap
<eap@opencascade.com>
Fri, 24 Jun 2005 11:01:15 +0000
(11:01 +0000)
src/SMESH/SMESH_Gen.cxx
patch
|
blob
|
history
diff --git
a/src/SMESH/SMESH_Gen.cxx
b/src/SMESH/SMESH_Gen.cxx
index 143c05296374087d4f125cdcd2096979804c2d2f..7a3c34a50a0f8d309bcebfc26aacba9878ac1b16 100644
(file)
--- a/
src/SMESH/SMESH_Gen.cxx
+++ b/
src/SMESH/SMESH_Gen.cxx
@@
-602,9
+602,18
@@
SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
list <const SMESHDS_Hypothesis * > algoList;
aMesh.GetHypotheses( aShape, filter, algoList, true );
list <const SMESHDS_Hypothesis * > algoList;
aMesh.GetHypotheses( aShape, filter, algoList, true );
- if (algoList.size() != 1 )
+
+ if ( algoList.empty() )
return NULL;
return NULL;
+ if (algoList.size() > 1 ) { // check if there is one algo several times
+ list <const SMESHDS_Hypothesis * >::iterator algo = algoList.begin();
+ for ( ; algo != algoList.end(); ++algo )
+ if ( (*algo) != algoList.front() &&
+ (*algo)->GetName() != algoList.front()->GetName() )
+ return NULL;
+ }
+
return const_cast<SMESH_Algo*> ( static_cast<const SMESH_Algo* >( algoList.front() ));
}
return const_cast<SMESH_Algo*> ( static_cast<const SMESH_Algo* >( algoList.front() ));
}