aStatus = SMESH_Hypothesis::HYP_OK;
// there is only one compatible Hypothesis so far
- const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
+ const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape, false);
myQuadranglePreference = hyps.size() > 0;
return isOk;
//=============================================================================
bool StdMeshers_Quadrangle_2D::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 aCatchSalomeException);
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
aMesh.GetSubMesh(aShape);
FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape)
- throw(SALOME_Exception)
+ //throw(SALOME_Exception)
{
- Unexpect aCatch(SalomeException);
-
const TopoDS_Face & F = TopoDS::Face(aShape);
const bool ignoreMediumNodes = _quadraticMesh;
sideEdges.splice( sideEdges.end(), edges, edges.begin()); // edges.front() -> sideEdges.end()
bool sameSide = true;
while ( !edges.empty() && sameSide ) {
- GeomAbs_Shape cont = SMESH_Algo::Continuity( sideEdges.back(), edges.front() );
- sameSide = ( cont >= GeomAbs_G1 );
+ sameSide = SMESH_Algo::IsContinuous( sideEdges.back(), edges.front() );
if ( sameSide )
sideEdges.splice( sideEdges.end(), edges, edges.begin());
}
if ( nbSides == 0 ) { // go backward from the first edge
sameSide = true;
while ( !edges.empty() && sameSide ) {
- GeomAbs_Shape cont = SMESH_Algo::Continuity( sideEdges.front(), edges.back() );
- sameSide = ( cont >= GeomAbs_G1 );
+ sameSide = SMESH_Algo::IsContinuous( sideEdges.front(), edges.back() );
if ( sameSide )
sideEdges.splice( sideEdges.begin(), edges, --edges.end());
}
FaceQuadStruct *StdMeshers_Quadrangle_2D::CheckAnd2Dcompute
(SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape,
- const bool CreateQuadratic) throw(SALOME_Exception)
+ const bool CreateQuadratic) //throw(SALOME_Exception)
{
- Unexpect aCatch(SalomeException);
-
_quadraticMesh = CreateQuadratic;
FaceQuadStruct *quad = CheckNbEdges(aMesh, aShape);
bool StdMeshers_Quadrangle_2D::SetNormalizedGrid (SMESH_Mesh & aMesh,
const TopoDS_Shape& aShape,
- FaceQuadStruct* & quad) throw (SALOME_Exception)
+ FaceQuadStruct* & quad) //throw (SALOME_Exception)
{
- Unexpect aCatch(SalomeException);
// Algorithme décrit dans "Génération automatique de maillages"
// P.L. GEORGE, MASSON, § 6.4.1 p. 84-85
// traitement dans le domaine paramétrique 2d u,v
const vector<UVPtStruct>& uv_e3 = GetUVPtStructIn( quad, 3, nbvertic - 1 );
if ( uv_e0.empty() || uv_e1.empty() || uv_e2.empty() || uv_e3.empty() )
- return error(dfltErr(), "Can't find nodes on sides");
+ return error( "Can't find nodes on sides");
// nodes Id on "in" edges
if (! quad->isEdgeOut[0]) {
bool StdMeshers_Quadrangle_2D::ComputeQuadPref (SMESH_Mesh & aMesh,
const TopoDS_Shape& aShape,
FaceQuadStruct* quad)
- throw (SALOME_Exception)
{
- Unexpect aCatch(SalomeException);
-
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
const TopoDS_Face& F = TopoDS::Face(aShape);
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
- const TopoDS_Wire& W = BRepTools::OuterWire(F);
- bool WisF = false;
- if(W.Orientation()==TopAbs_FORWARD)
- WisF = true;
+// const TopoDS_Wire& W = BRepTools::OuterWire(F);
+ bool WisF = true;
+// if(W.Orientation()==TopAbs_FORWARD)
+// WisF = true;
//if(WisF) cout<<"W is FORWARD"<<endl;
//else cout<<"W is REVERSED"<<endl;
- bool FisF = (F.Orientation()==TopAbs_FORWARD);
- if(!FisF) WisF = !WisF;
+// bool FisF = (F.Orientation()==TopAbs_FORWARD);
+// if(!FisF) WisF = !WisF;
+// WisF = FisF;
int i,j,geomFaceID = meshDS->ShapeToIndex( F );
int nb = quad->side[0]->NbPoints();