X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Prism_3D.cxx;h=6e58555e1828b93af54789620d6b29eb236fe3ab;hb=b22e182dd1a2c30be324b21074158390d00714b3;hp=f473b36ba669529e1adf6d24060e7d1138c15df1;hpb=bff3771eab25def0f01abb6e18327009a932d5b8;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index f473b36ba..6e58555e1 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -905,7 +905,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh return error( err ); } } - return true; + return error( COMPERR_OK ); } //================================================================================ @@ -1320,7 +1320,17 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism) // clear data myBotToColumnMap.clear(); myBlock.Clear(); - + + // update state of sub-meshes (mostly in order to erase improper errors) + SMESH_subMesh* sm = myHelper->GetMesh()->GetSubMesh( thePrism.myShape3D ); + SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/false); + while ( smIt->more() ) + { + sm = smIt->next(); + sm->GetComputeError().reset(); + sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + } + return true; } @@ -2353,7 +2363,7 @@ bool StdMeshers_Prism_3D::isSimpleBottom( const Prism_3D::TPrismTopo& thePrism ) TopoDS_Vertex commonV; const list< TopoDS_Edge >& botEdges = thePrism.myBottomEdges; list< TopoDS_Edge >::const_iterator edge = botEdges.begin(); - for ( ; edge != botEdges.end(); ++edge ) + while ( edge != botEdges.end() ) { if ( SMESH_Algo::isDegenerated( *edge )) return false; @@ -2539,7 +2549,7 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable() for ( iE = 0; iE < *nbE; ++e, ++iE ) if ( SMESH_Algo::isDegenerated( *e )) { - ee.erase( e ); + e = --ee.erase( e ); --(*nbE); --iE; }