00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _SMESH_HEXA_3D_HXX_
00029 #define _SMESH_HEXA_3D_HXX_
00030
00031 #include "SMESH_StdMeshers.hxx"
00032
00033 #include "SMESH_3D_Algo.hxx"
00034 #include "SMESH_Mesh.hxx"
00035 #include "StdMeshers_Quadrangle_2D.hxx"
00036 #include "Utils_SALOME_Exception.hxx"
00037
00038 #include "SMESH_MesherHelper.hxx"
00039
00040 class TopTools_IndexedMapOfShape;
00041
00042 typedef struct point3Dstruct
00043 {
00044 const SMDS_MeshNode * node;
00045 } Point3DStruct;
00046
00047 typedef double Pt3[3];
00048
00049 typedef struct conv2dstruct
00050 {
00051 double a1;
00052 double b1;
00053 double c1;
00054 double a2;
00055 double b2;
00056 double c2;
00057 int ia;
00058 int ib;
00059 int ic;
00060 int ja;
00061 int jb;
00062 int jc;
00063 } Conv2DStruct;
00064
00065 class STDMESHERS_EXPORT StdMeshers_Hexa_3D:
00066 public SMESH_3D_Algo
00067 {
00068 public:
00069 StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen);
00070 virtual ~StdMeshers_Hexa_3D();
00071
00072 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
00073 const TopoDS_Shape& aShape,
00074 SMESH_Hypothesis::Hypothesis_Status& aStatus);
00075
00076 virtual bool Compute(SMESH_Mesh& aMesh,
00077 const TopoDS_Shape& aShape)
00078 ;
00079
00080 virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
00081 MapShapeNbElems& aResMap);
00082
00083 static TopoDS_Vertex OppositeVertex(const TopoDS_Vertex& aVertex,
00084 const TopTools_IndexedMapOfShape& aQuads0Vertices,
00085 FaceQuadStruct* aQuads[6]);
00086
00087 protected:
00088 TopoDS_Edge
00089 EdgeNotInFace(SMESH_Mesh& aMesh,
00090 const TopoDS_Shape& aShape,
00091 const TopoDS_Face& aFace,
00092 const TopoDS_Vertex& aVertex,
00093 const TopTools_IndexedDataMapOfShapeListOfShape& MS);
00094
00095 int GetFaceIndex(SMESH_Mesh& aMesh,
00096 const TopoDS_Shape& aShape,
00097 const std::vector<SMESH_subMesh*>& meshFaces,
00098 const TopoDS_Vertex& V0,
00099 const TopoDS_Vertex& V1,
00100 const TopoDS_Vertex& V2,
00101 const TopoDS_Vertex& V3);
00102
00103 void GetConv2DCoefs(const faceQuadStruct& quad,
00104 const TopoDS_Shape& aShape,
00105 const TopoDS_Vertex& V0,
00106 const TopoDS_Vertex& V1,
00107 const TopoDS_Vertex& V2,
00108 const TopoDS_Vertex& V3,
00109 Conv2DStruct& conv);
00110
00111 void GetPoint(Pt3 p,
00112 int i, int j, int k,
00113 int nbx, int nby, int nbz,
00114 Point3DStruct *np,
00115 const SMESHDS_Mesh* meshDS);
00116
00117 bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res);
00118 };
00119
00120 #endif