-// 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
#ifdef _DEBUG_
#define DBGOUT(msg) //cout << msg << endl;
#define SHOWYXZ(msg, xyz) \
- // { gp_Pnt p (xyz); \
- // cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
+ //{ gp_Pnt p (xyz); cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
#else
#define DBGOUT(msg)
#define SHOWYXZ(msg, xyz)
return error( err );
}
}
- return true;
+ return error( COMPERR_OK );
}
//================================================================================
// 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;
}
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;
for ( iE = 0; iE < *nbE; ++e, ++iE )
if ( SMESH_Algo::isDegenerated( *e ))
{
- ee.erase( e );
+ e = --ee.erase( e );
--(*nbE);
--iE;
}
}
}
-// #define SHOWYXZ(msg, xyz) { \
-// gp_Pnt p (xyz); \
-// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; \
-// }
+// #define SHOWYXZ(msg, xyz) { gp_Pnt p(xyz); cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
+
// double _u[]={ 0.1, 0.1, 0.9, 0.9 };
// double _v[]={ 0.1, 0.9, 0.1, 0.9 };
// for ( int z = 0; z < 2; ++z )