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_REGULAR_1D_HXX_
00029 #define _SMESH_REGULAR_1D_HXX_
00030
00031 #include "SMESH_StdMeshers.hxx"
00032
00033 #include "SMESH_1D_Algo.hxx"
00034
00035 #include "StdMeshers_FixedPoints1D.hxx"
00036
00037 class Adaptor3d_Curve;
00038 class TopoDS_Vertex;
00039 class StdMeshers_SegmentLengthAroundVertex;
00040
00041 class STDMESHERS_EXPORT StdMeshers_Regular_1D: public SMESH_1D_Algo
00042 {
00043 public:
00044 StdMeshers_Regular_1D(int hypId, int studyId, SMESH_Gen* gen);
00045 virtual ~StdMeshers_Regular_1D();
00046
00047 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
00048 const TopoDS_Shape& aShape,
00049 SMESH_Hypothesis::Hypothesis_Status& aStatus);
00050
00051 virtual bool Compute(SMESH_Mesh& aMesh,
00052 const TopoDS_Shape& aShape);
00053
00054 virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
00055 MapShapeNbElems& aResMap);
00056
00057 virtual const std::list <const SMESHDS_Hypothesis *> &
00058 GetUsedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, const bool=true);
00059
00067 virtual void SetEventListener(SMESH_subMesh* subMesh);
00068
00075 void SubmeshRestored(SMESH_subMesh* subMesh);
00076
00077 protected:
00078
00079 virtual bool computeInternalParameters (SMESH_Mesh & theMesh,
00080 Adaptor3d_Curve & theC3d,
00081 double theLength,
00082 double theFirstU,
00083 double theLastU,
00084 std::list<double> & theParameters,
00085 const bool theReverse,
00086 bool theConsiderPropagation = false);
00087
00088 virtual void redistributeNearVertices (SMESH_Mesh & theMesh,
00089 Adaptor3d_Curve & theC3d,
00090 double theLength,
00091 std::list< double > & theParameters,
00092 const TopoDS_Vertex & theVf,
00093 const TopoDS_Vertex & theVl);
00094
00098 static const
00099 StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh,
00100 const TopoDS_Vertex & theV);
00101
00102 enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, NONE };
00103
00104 enum ValueIndex {
00105 SCALE_FACTOR_IND = 0,
00106 BEG_LENGTH_IND = 0,
00107 END_LENGTH_IND = 1,
00108 DEFLECTION_IND = 0,
00109 PRECISION_IND = 1
00110 };
00111
00112 enum IValueIndex {
00113 NB_SEGMENTS_IND = 0,
00114 DISTR_TYPE_IND = 1,
00115 CONV_MODE_IND = 2
00116 };
00117
00118 enum VValueIndex {
00119 TAB_FUNC_IND = 0
00120 };
00121
00122 enum SValueIndex {
00123 EXPR_FUNC_IND = 0
00124 };
00125
00126 HypothesisType _hypType;
00127
00128 const StdMeshers_FixedPoints1D* _fpHyp;
00129
00130 double _value[2];
00131 int _ivalue[3];
00132 std::vector<double> _vvalue[1];
00133 std::string _svalue[1];
00134 std::vector<int> _revEdgesIDs;
00135
00136
00137
00138 TopoDS_Shape _mainEdge;
00139 };
00140
00141 #endif