Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from BR_Dev_For_4_0 branch (from mergeto_BR_QT4_Dev_17Jan08 tag)
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Hexa_3D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Hexa_3D.cxx
b/src/StdMeshers/StdMeshers_Hexa_3D.cxx
index 80cd6caeb1973e8e309f56e9a914a13586655980..33efea5e7243d429415f555ac0e3e01b818521f5 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Hexa_3D.cxx
+++ b/
src/StdMeshers/StdMeshers_Hexa_3D.cxx
@@
-45,13
+45,11
@@
#include "SMDS_VolumeOfNodes.hxx"
#include <TopExp.hxx>
#include "SMDS_VolumeOfNodes.hxx"
#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TColStd_MapOfInteger.hxx>
-
-#include <BRep_Tool.hxx>
-#include <Geom_Surface.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS.hxx>
#include <gp_Pnt2d.hxx>
#include "utilities.h"
#include <gp_Pnt2d.hxx>
#include "utilities.h"
@@
-118,12
+116,15
@@
bool StdMeshers_Hexa_3D::CheckHypothesis
SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// check nb of faces in the shape
SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// check nb of faces in the shape
+/* PAL16229
aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY;
int nbFaces = 0;
for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next())
if ( ++nbFaces > 6 )
aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY;
int nbFaces = 0;
for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next())
if ( ++nbFaces > 6 )
- return false;
-
+ break;
+ if ( nbFaces != 6 )
+ return false;
+*/
aStatus = SMESH_Hypothesis::HYP_OK;
return true;
}
aStatus = SMESH_Hypothesis::HYP_OK;
return true;
}
@@
-174,9
+175,10
@@
static bool findIJ (const SMDS_MeshNode* node, const FaceQuadStruct * quad, int&
//=============================================================================
bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
//=============================================================================
bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
- const TopoDS_Shape & aShape) throw(SALOME_Exception)
+ const TopoDS_Shape & aShape)
//
throw(SALOME_Exception)
{
{
- Unexpect aCatch(SalomeException);
+ // PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
+ //Unexpect aCatch(SalomeException);
MESSAGE("StdMeshers_Hexa_3D::Compute");
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
MESSAGE("StdMeshers_Hexa_3D::Compute");
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
@@
-190,7
+192,7
@@
bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
meshFaces.push_back(aSubMesh);
}
if (meshFaces.size() != 6)
meshFaces.push_back(aSubMesh);
}
if (meshFaces.size() != 6)
- return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in block");
+ return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in
a
block");
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)
@@
-251,6
+253,9
@@
bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
ASSERT(quadAlgo);
try {
aQuads[i] = quadAlgo->CheckAnd2Dcompute(aMesh, aFace, _quadraticMesh);
ASSERT(quadAlgo);
try {
aQuads[i] = quadAlgo->CheckAnd2Dcompute(aMesh, aFace, _quadraticMesh);
+ if(!aQuads[i]) {
+ return error( quadAlgo->GetComputeError());
+ }
}
catch(SALOME_Exception & S_ex) {
return ClearAndReturn( aQuads, error(COMPERR_SLM_EXCEPTION,TComm(S_ex.what()) <<
}
catch(SALOME_Exception & S_ex) {
return ClearAndReturn( aQuads, error(COMPERR_SLM_EXCEPTION,TComm(S_ex.what()) <<