1 //=============================================================================
2 // File : SMESH_Hexa_3D.hxx
3 // Created : sam mai 18 23:15:26 CEST 2002
4 // Author : Paul RASCLE, EDF
6 // Copyright : EDF 2002
8 //=============================================================================
10 #ifndef _SMESH_HEXA_3D_HXX_
11 #define _SMESH_HEXA_3D_HXX_
13 #include "SMESH_3D_Algo.hxx"
14 #include "SMESH_Mesh.hxx"
15 #include "SMESH_Quadrangle_2D.hxx"
16 #include "Utils_SALOME_Exception.hxx"
18 typedef struct point3Dstruct
23 typedef double Pt3[3];
25 typedef struct conv2dstruct
27 double a1; // X = a1*x + b1*y + c1
28 double b1; // Y = a2*x + b2*y + c2
29 double c1; // a1, b1 a2, b2 in {-1,0,1}
30 double a2; // c1, c2 in {0,1}
33 int ia; // I = ia*i + ib*j + ic
36 int ja; // J = ja*i + jb*j + jc
41 typedef struct cubeStruct
51 faceQuadStruct* quad_X0;
52 faceQuadStruct* quad_X1;
53 faceQuadStruct* quad_Y0;
54 faceQuadStruct* quad_Y1;
55 faceQuadStruct* quad_Z0;
56 faceQuadStruct* quad_Z1;
57 Point3DStruct* np; // normalised 3D coordinates
64 SMESH_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen);
65 virtual ~SMESH_Hexa_3D();
67 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
68 const TopoDS_Shape& aShape);
70 virtual bool Compute(SMESH_Mesh& aMesh,
71 const TopoDS_Shape& aShape)
72 throw (SALOME_Exception);
74 ostream & SaveTo(ostream & save);
75 istream & LoadFrom(istream & load);
76 friend ostream & operator << (ostream & save, SMESH_Hexa_3D & hyp);
77 friend istream & operator >> (istream & load, SMESH_Hexa_3D & hyp);
81 EdgeNotInFace(SMESH_Mesh& aMesh,
82 const TopoDS_Shape& aShape,
83 const TopoDS_Face& aFace,
84 const TopoDS_Vertex& aVertex,
85 const TopTools_IndexedDataMapOfShapeListOfShape& MS);
87 int GetFaceIndex(SMESH_Mesh& aMesh,
88 const TopoDS_Shape& aShape,
89 const vector<SMESH_subMesh*>& meshFaces,
90 const TopoDS_Vertex& V0,
91 const TopoDS_Vertex& V1,
92 const TopoDS_Vertex& V2,
93 const TopoDS_Vertex& V3);
95 void GetConv2DCoefs(const faceQuadStruct& quad,
96 const TopoDS_Shape& aShape,
97 const TopoDS_Vertex& V0,
98 const TopoDS_Vertex& V1,
99 const TopoDS_Vertex& V2,
100 const TopoDS_Vertex& V3,
105 int nbx, int nby, int nbz,
107 const Handle(SMESHDS_Mesh)& meshDS);
110 FaceQuadStruct* _quads[6];