From: eap Date: Tue, 19 May 2009 15:19:52 +0000 (+0000) Subject: 0020279: [CEA 334] control the "random" use when using mesh algorithms X-Git-Tag: V5_1_2rc1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b6c9c862b491312d17a4ddec74a9b6c5b96f5c11;p=modules%2Fsmesh.git 0020279: [CEA 334] control the "random" use when using mesh algorithms fix IsQuadraticSubMesh() to work on mesh w/o shape --- diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 35bfeef1a..dd0eabb69 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -27,7 +27,6 @@ #include "SMDS_FacePosition.hxx" #include "SMDS_EdgePosition.hxx" -#include "SMESH_MeshEditor.hxx" #include #include @@ -80,6 +79,8 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh) TopAbs_ShapeEnum subType( aSh.ShapeType()==TopAbs_FACE ? TopAbs_EDGE : TopAbs_FACE ); SMDSAbs_ElementType elemType( subType==TopAbs_FACE ? SMDSAbs_Face : SMDSAbs_Edge ); + int nbOldLinks = myNLinkNodeMap.size(); + TopExp_Explorer exp( aSh, subType ); for (; exp.More() && myCreateQuadratic; exp.Next()) { if ( SMESHDS_SubMesh * subMesh = meshDS->MeshElements( exp.Current() )) { @@ -115,6 +116,9 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh) } } + if ( nbOldLinks == myNLinkNodeMap.size() ) + myCreateQuadratic = false; + if(!myCreateQuadratic) { myNLinkNodeMap.clear(); }