From ce9cd12e0961ae754db00aced9c3d8b5f672e347 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 28 Feb 2012 13:32:04 +0000 Subject: [PATCH] fix CoincidentElements::IsSatisfy() for polyhedrons --- src/Controls/SMESH_Controls.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index e65db837f..26348e012 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -2161,11 +2161,12 @@ bool CoincidentElements::IsSatisfy( long theElementId ) { if ( e->GetType() != GetType() ) return false; set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); + const int nbNodes = e->NbNodes(); SMDS_ElemIteratorPtr invIt = (*elemNodes.begin())->GetInverseElementIterator( GetType() ); while ( invIt->more() ) { const SMDS_MeshElement* e2 = invIt->next(); - if ( e2 == e || e2->NbNodes() != (int)elemNodes.size() ) continue; + if ( e2 == e || e2->NbNodes() != nbNodes ) continue; bool sameNodes = true; for ( size_t i = 0; i < elemNodes.size() && sameNodes; ++i ) -- 2.39.2