- exp1.Init( exp0.Current(), TopAbs_SHELL );
- const TopoDS_Shell& shell = TopoDS::Shell(exp1.Current());
- isCurShellApp = SMESH_Block::FindBlockShapes(shell, theVertex0, theVertex1, theShapeIDMap );
- if ( toCheckAll && !isCurShellApp ) return false;
- if ( !toCheckAll && isCurShellApp ) return true;
+ exp1.Init( exp0.Current(), TopAbs_FACE );
+ int nbEdges = SMESH_MesherHelper::Count( exp1.Current(), TopAbs_EDGE, /*ignoreSame=*/true );
+ bool ok = ( nbEdges > 3 );
+ if ( toCheckAll && !ok ) return false;
+ if ( !toCheckAll && ok ) return true;