X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Quadrangle_2D.hxx;h=9abff008c1b806efc1dc4219ed49f5f63a7016c3;hp=afa3882f2cc1b7e0ee123daa3b9086b533742ed6;hb=4ff5bd61540272713e48de1eee75625028c32155;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8 diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index afa3882f2..9abff008c 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -34,6 +34,12 @@ #include "SMESH_Mesh.hxx" #include "Utils_SALOME_Exception.hxx" +#include "gp_XY.hxx" + +#include "StdMeshers_Helper.hxx" + +//class SMDS_MeshNode; + typedef struct uvPtStruct { double param; @@ -42,7 +48,7 @@ typedef struct uvPtStruct double v; double x; // 2d parameter, normalized [0,1] double y; - const SMDS_MeshNode * node; + const SMDS_MeshNode * node; } UVPtStruct; typedef struct faceQuadStruct @@ -52,6 +58,7 @@ typedef struct faceQuadStruct double first[4]; double last[4]; bool isEdgeForward[4]; + bool isEdgeOut[4]; // true, if an edge has more nodes, than the opposite UVPtStruct* uv_edges[4]; UVPtStruct* uv_grid; } FaceQuadStruct; @@ -72,10 +79,16 @@ public: throw (SALOME_Exception); FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape) + const TopoDS_Shape& aShape, + const bool CreateQuadratic) throw (SALOME_Exception); - void QuadDelete(FaceQuadStruct* quad); + static void QuadDelete(FaceQuadStruct* quad); + + /** + * Returns NLinkNodeMap from myTool + */ + const NLinkNodeMap& GetNLinkNodeMap() { return myTool->GetNLinkNodeMap(); } ostream & SaveTo(ostream & save); istream & LoadFrom(istream & load); @@ -84,19 +97,41 @@ public: protected: + FaceQuadStruct* CheckNbEdges(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape) + throw (SALOME_Exception); + void SetNormalizedGrid(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, FaceQuadStruct* quad) throw (SALOME_Exception); + /** + * Special function for creation only quandrangle faces + */ + bool ComputeQuadPref(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + FaceQuadStruct* quad) + throw (SALOME_Exception); + + UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh, + const TopoDS_Face& F, const TopoDS_Edge& E, + bool IsReverse); + UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh, - const TopoDS_Face& F, - const TopoDS_Edge& E, - double first, - double last); -// bool isForward); + const TopoDS_Face& F, const TopoDS_Edge& E, + double first, double last); + + UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh, + const TopoDS_Face& F, const TopoDS_Edge& E, + double first, double last, int nb_segm); + + // true if QuadranglePreference hypothesis is assigned that forces + // construction of quadrangles if the number of nodes on opposite edges + // is not the same in the case where the global number of nodes on edges is even + bool myQuadranglePreference; -// FaceQuadStruct _quadDesc; + StdMeshers_Helper* myTool; // toll for working with quadratic elements }; #endif