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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : StdMeshers_Hexa_3D.hxx
25 // Moved here from SMESH_Hexa_3D.hxx
26 // Author : Paul RASCLE, EDF
29 #ifndef _SMESH_HEXA_3D_HXX_
30 #define _SMESH_HEXA_3D_HXX_
32 #include "SMESH_3D_Algo.hxx"
33 #include "SMESH_Mesh.hxx"
34 #include "StdMeshers_Quadrangle_2D.hxx"
35 #include "Utils_SALOME_Exception.hxx"
37 #include "SMESH_MesherHelper.hxx"
39 class TopTools_IndexedMapOfShape;
41 typedef struct point3Dstruct
43 const SMDS_MeshNode * node;
46 typedef double Pt3[3];
48 typedef struct conv2dstruct
50 double a1; // X = a1*x + b1*y + c1
51 double b1; // Y = a2*x + b2*y + c2
52 double c1; // a1, b1 a2, b2 in {-1,0,1}
53 double a2; // c1, c2 in {0,1}
56 int ia; // I = ia*i + ib*j + ic
59 int ja; // J = ja*i + jb*j + jc
64 class StdMeshers_Hexa_3D:
68 StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen);
69 virtual ~StdMeshers_Hexa_3D();
71 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
72 const TopoDS_Shape& aShape,
73 SMESH_Hypothesis::Hypothesis_Status& aStatus);
75 virtual bool Compute(SMESH_Mesh& aMesh,
76 const TopoDS_Shape& aShape)
77 throw (SALOME_Exception);
79 static TopoDS_Vertex OppositeVertex(const TopoDS_Vertex& aVertex,
80 const TopTools_IndexedMapOfShape& aQuads0Vertices,
81 FaceQuadStruct* aQuads[6]);
85 EdgeNotInFace(SMESH_Mesh& aMesh,
86 const TopoDS_Shape& aShape,
87 const TopoDS_Face& aFace,
88 const TopoDS_Vertex& aVertex,
89 const TopTools_IndexedDataMapOfShapeListOfShape& MS);
91 int GetFaceIndex(SMESH_Mesh& aMesh,
92 const TopoDS_Shape& aShape,
93 const vector<SMESH_subMesh*>& meshFaces,
94 const TopoDS_Vertex& V0,
95 const TopoDS_Vertex& V1,
96 const TopoDS_Vertex& V2,
97 const TopoDS_Vertex& V3);
99 void GetConv2DCoefs(const faceQuadStruct& quad,
100 const TopoDS_Shape& aShape,
101 const TopoDS_Vertex& V0,
102 const TopoDS_Vertex& V1,
103 const TopoDS_Vertex& V2,
104 const TopoDS_Vertex& V3,
109 int nbx, int nby, int nbz,
111 const SMESHDS_Mesh* meshDS);
113 bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res);