Salome HOME
Improvement 0018239: Create subMesh menu item
[modules/smesh.git] / src / StdMeshers / StdMeshers_Quadrangle_2D.hxx
index 90db88e55f9048b743f5b4622159fed33544be4c..0877ca3a68f4bbdde23ea8b2cb2d9cf1121b57a4 100644 (file)
 class SMESH_Mesh;
 class SMESH_MesherHelper;
 class StdMeshers_FaceSide;
+class SMDS_MeshNode;
 struct uvPtStruct;
 
-//class SMDS_MeshNode;
 
 enum TSideID { BOTTOM_SIDE=0, RIGHT_SIDE, TOP_SIDE, LEFT_SIDE, NB_SIDES };
 
 typedef uvPtStruct UVPtStruct;
 typedef struct faceQuadStruct
 {
-  //int nbPts[4];
-  //TopoDS_Edge edge[4];
-  vector< StdMeshers_FaceSide*> side;
-  //double first[4];
-  //double last[4];
-  //bool isEdgeForward[4];
+  std::vector< StdMeshers_FaceSide*> side;
   bool isEdgeOut[4]; // true, if an edge has more nodes, than the opposite
-  //UVPtStruct* uv_edges[4];
   UVPtStruct* uv_grid;
   ~faceQuadStruct();
 } FaceQuadStruct;
@@ -70,32 +64,35 @@ public:
                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
 
   virtual bool Compute(SMESH_Mesh& aMesh,
-                      const TopoDS_Shape& aShape)
-    throw (SALOME_Exception);
+                      const TopoDS_Shape& aShape);
 
   FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
                                    const TopoDS_Shape& aShape,
-                                    const bool CreateQuadratic)
-    throw (SALOME_Exception);
+                                    const bool CreateQuadratic);
 
 protected:
 
   FaceQuadStruct* CheckNbEdges(SMESH_Mesh& aMesh,
-                               const TopoDS_Shape& aShape)
-    throw (SALOME_Exception);
+                               const TopoDS_Shape& aShape);
 
   bool SetNormalizedGrid(SMESH_Mesh& aMesh,
                         const TopoDS_Shape& aShape,
-                        FaceQuadStruct*& quad)
-    throw (SALOME_Exception);
+                        FaceQuadStruct*& quad);
+  
+  void SplitQuad(SMESHDS_Mesh *theMeshDS,
+                 const int theFaceID,
+                 const SMDS_MeshNode* theNode1,
+                 const SMDS_MeshNode* theNode2,
+                 const SMDS_MeshNode* theNode3,
+                 const SMDS_MeshNode* theNode4);
 
   /**
    * Special function for creation only quandrangle faces
    */
   bool ComputeQuadPref(SMESH_Mesh& aMesh,
+                       
                        const TopoDS_Shape& aShape,
-                       FaceQuadStruct* quad)
-    throw (SALOME_Exception);
+                       FaceQuadStruct* quad);
 
   UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh,
                              const TopoDS_Face& F, const TopoDS_Edge& E,
@@ -114,6 +111,8 @@ protected:
   // is not the same in the case where the global number of nodes on edges is even
   bool myQuadranglePreference;
 
+  bool myTrianglePreference;
+
   SMESH_MesherHelper* myTool; // tool for working with quadratic elements
 };