Go to the documentation of this file.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_QUADRANGLE_2D_HXX_
00029 #define _SMESH_QUADRANGLE_2D_HXX_
00030
00031 #include "SMESH_StdMeshers.hxx"
00032
00033 #include "StdMeshers_QuadrangleParams.hxx"
00034
00035 #include "SMESH_2D_Algo.hxx"
00036 #include "Utils_SALOME_Exception.hxx"
00037
00038 class SMESH_Mesh;
00039 class SMESH_MesherHelper;
00040 class StdMeshers_FaceSide;
00041 class SMDS_MeshNode;
00042 class TopoDS_Face;
00043 struct uvPtStruct;
00044
00045
00046 enum TSideID { BOTTOM_SIDE=0, RIGHT_SIDE, TOP_SIDE, LEFT_SIDE, NB_SIDES };
00047
00048 typedef uvPtStruct UVPtStruct;
00049 typedef struct faceQuadStruct
00050 {
00051 std::vector< StdMeshers_FaceSide*> side;
00052 bool isEdgeOut[4];
00053 UVPtStruct* uv_grid;
00054 TopoDS_Face face;
00055 ~faceQuadStruct();
00056 } FaceQuadStruct;
00057
00058 class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
00059 {
00060 public:
00061 StdMeshers_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
00062 virtual ~StdMeshers_Quadrangle_2D();
00063
00064 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
00065 const TopoDS_Shape& aShape,
00066 SMESH_Hypothesis::Hypothesis_Status& aStatus);
00067
00068 virtual bool Compute(SMESH_Mesh& aMesh,
00069 const TopoDS_Shape& aShape);
00070
00071 virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
00072 MapShapeNbElems& aResMap);
00073
00074 FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
00075 const TopoDS_Shape& aShape,
00076 const bool CreateQuadratic);
00077
00078 FaceQuadStruct* CheckNbEdges(SMESH_Mesh& aMesh,
00079 const TopoDS_Shape& aShape);
00080
00081 protected:
00082
00083 bool CheckNbEdgesForEvaluate(SMESH_Mesh& aMesh,
00084 const TopoDS_Shape & aShape,
00085 MapShapeNbElems& aResMap,
00086 std::vector<int>& aNbNodes,
00087 bool& IsQuadratic);
00088
00089 bool SetNormalizedGrid(SMESH_Mesh& aMesh,
00090 const TopoDS_Shape& aShape,
00091 FaceQuadStruct*& quad);
00092
00093 void SplitQuad(SMESHDS_Mesh *theMeshDS,
00094 const int theFaceID,
00095 const SMDS_MeshNode* theNode1,
00096 const SMDS_MeshNode* theNode2,
00097 const SMDS_MeshNode* theNode3,
00098 const SMDS_MeshNode* theNode4);
00099
00100 bool ComputeQuadPref(SMESH_Mesh& aMesh,
00101 const TopoDS_Shape& aShape,
00102 FaceQuadStruct* quad);
00103
00104 bool EvaluateQuadPref(SMESH_Mesh& aMesh,
00105 const TopoDS_Shape& aShape,
00106 std::vector<int>& aNbNodes,
00107 MapShapeNbElems& aResMap,
00108 bool IsQuadratic);
00109
00110 bool ComputeReduced (SMESH_Mesh& aMesh,
00111 const TopoDS_Shape& aShape,
00112 FaceQuadStruct* quad);
00113
00114 void UpdateDegenUV(FaceQuadStruct* quad);
00115
00116 void Smooth (FaceQuadStruct* quad);
00117
00118
00119
00120
00121
00122
00123 bool myQuadranglePreference;
00124
00125 bool myTrianglePreference;
00126
00127 int myTriaVertexID;
00128
00129 StdMeshers_QuadType myQuadType;
00130
00131 SMESH_MesherHelper* myHelper;
00132
00133 bool myNeedSmooth;
00134 };
00135
00136 #endif