Salome HOME
23118: EDF 11115 SMESH: Hexahedric mesh produces degenerate elements in quadratic...
[modules/smesh.git] / src / StdMeshers / StdMeshers_Quadrangle_2D.hxx
index 813457a1c8b6cd09ea0cb71d650a0c45209ed38e..6a06c9a46af65cccf7d52a7d132a2585e8784cb6 100644 (file)
@@ -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
@@ -119,6 +119,8 @@ struct FaceQuadStruct
 
   FaceQuadStruct ( const TopoDS_Face& F = TopoDS_Face(), const std::string& nm="main" );
   UVPtStruct& UVPt( int i, int j ) { return uv_grid[ i + j * iSize ]; }
+  double&        U( int i, int j ) { return UVPt( i, j ).u; }
+  double&        V( int i, int j ) { return UVPt( i, j ).v; }
   void  shift    ( size_t nb, bool keepUnitOri, bool keepGrid=false );
   int & nbNodeOut( int iSide ) { return side[ iSide ].nbNodeOut; }
   bool  findCell ( const gp_XY& uv, int & i, int & j );
@@ -132,7 +134,7 @@ struct FaceQuadStruct
 
 class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
 {
-public:
+ public:
   StdMeshers_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
   virtual ~StdMeshers_Quadrangle_2D();
 
@@ -157,7 +159,7 @@ public:
 
   static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
 
-protected:
+ protected:
 
   bool checkNbEdgesForEvaluate(SMESH_Mesh& aMesh,
                                const TopoDS_Shape & aShape,
@@ -166,7 +168,7 @@ protected:
                                bool& IsQuadratic);
 
   bool setNormalizedGrid(FaceQuadStruct::Ptr quad);
-  
+
   void splitQuadFace(SMESHDS_Mesh *       theMeshDS,
                      const int            theFaceID,
                      const SMDS_MeshNode* theNode1,
@@ -203,6 +205,8 @@ protected:
 
   void smooth (FaceQuadStruct::Ptr quad);
 
+  bool check();
+
   int getCorners(const TopoDS_Face&          theFace,
                  SMESH_Mesh &                theMesh,
                  std::list<TopoDS_Edge>&     theWire,
@@ -225,12 +229,12 @@ protected:
                      int *                  iNext=NULL);
 
 
-  // Fields
protected: // Fields
 
   bool myQuadranglePreference;
   bool myTrianglePreference;
   int  myTriaVertexID;
-  bool myNeedSmooth;
+  bool myNeedSmooth, myCheckOri;
   const StdMeshers_QuadrangleParams* myParams;
   StdMeshers_QuadType                myQuadType;