1 // SMESH SMESH : implementaion of SMESH idl descriptions
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : StdMeshers_Quadrangle_2D.hxx
25 // Moved here from SMESH_Quadrangle_2D.hxx
26 // Author : Paul RASCLE, EDF
30 #ifndef _SMESH_QUADRANGLE_2D_HXX_
31 #define _SMESH_QUADRANGLE_2D_HXX_
33 #include "SMESH_2D_Algo.hxx"
34 #include "SMESH_Mesh.hxx"
35 #include "Utils_SALOME_Exception.hxx"
39 typedef struct uvPtStruct
43 double u; // original 2d parameter
45 double x; // 2d parameter, normalized [0,1]
47 const SMDS_MeshNode * node;
50 typedef struct faceQuadStruct
56 bool isEdgeForward[4];
57 bool isEdgeOut[4]; // true, if an edge has more nodes, than the opposite
58 UVPtStruct* uv_edges[4];
62 class StdMeshers_Quadrangle_2D:
66 StdMeshers_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
67 virtual ~StdMeshers_Quadrangle_2D();
69 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
70 const TopoDS_Shape& aShape,
71 SMESH_Hypothesis::Hypothesis_Status& aStatus);
73 virtual bool Compute(SMESH_Mesh& aMesh,
74 const TopoDS_Shape& aShape)
75 throw (SALOME_Exception);
77 FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
78 const TopoDS_Shape& aShape)
79 throw (SALOME_Exception);
81 static void QuadDelete(FaceQuadStruct* quad);
83 ostream & SaveTo(ostream & save);
84 istream & LoadFrom(istream & load);
85 friend ostream & operator << (ostream & save, StdMeshers_Quadrangle_2D & hyp);
86 friend istream & operator >> (istream & load, StdMeshers_Quadrangle_2D & hyp);
90 void SetNormalizedGrid(SMESH_Mesh& aMesh,
91 const TopoDS_Shape& aShape,
93 throw (SALOME_Exception);
95 UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh,
96 const TopoDS_Face& F, const TopoDS_Edge& E,
97 double first, double last);
99 UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
100 const TopoDS_Face& F, const TopoDS_Edge& E,
101 double first, double last, int nb_segm);