X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Regular_1D.hxx;h=b02e21028ca105a94df59526151481cc92433248;hb=482a58db1be716040955d1f187d32e01e6001ba2;hp=a685492680067fab6d8cf23b22928c38af6a45ff;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Regular_1D.hxx b/src/StdMeshers/StdMeshers_Regular_1D.hxx index a68549268..b02e21028 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.hxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.hxx @@ -32,8 +32,7 @@ #include "SMESH_1D_Algo.hxx" -class StdMeshers_LocalLength; -class StdMeshers_NumberOfSegments; +class TopoDS_Edge; class StdMeshers_Regular_1D: public SMESH_1D_Algo @@ -49,17 +48,53 @@ public: virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); + virtual const std::list & + GetUsedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape); + ostream & SaveTo(ostream & save); istream & LoadFrom(istream & load); friend ostream & operator << (ostream & save, StdMeshers_Regular_1D & hyp); friend istream & operator >> (istream & load, StdMeshers_Regular_1D & hyp); protected: - double _localLength; - int _numberOfSegments; - double _scaleFactor; - const StdMeshers_LocalLength* _hypLocalLength; - const StdMeshers_NumberOfSegments* _hypNumberOfSegments; + + virtual bool computeInternalParameters (const TopoDS_Edge& theEdge, + std::list< double > & theParameters, + const bool theReverse) const; + + enum HypothesisType { LOCAL_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE }; + + enum ValueIndex { + SCALE_FACTOR_IND = 0, + BEG_LENGTH_IND = 0, + END_LENGTH_IND = 1, + DEFLECTION_IND = 0 + }; + + enum IValueIndex { + NB_SEGMENTS_IND = 0, + DISTR_TYPE_IND = 1, + EXP_MODE_IND = 2 + }; + + enum VValueIndex { + TAB_FUNC_IND = 0 + }; + + enum SValueIndex { + EXPR_FUNC_IND = 0 + }; + + HypothesisType _hypType; + + double _value[2]; + int _ivalue[3]; + std::vector _vvalue[1]; + std::string _svalue[1]; + + // a source of propagated hypothesis, is set by CheckHypothesis() + // always called before Compute() + TopoDS_Shape _mainEdge; }; #endif