X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Regular_1D.hxx;h=6f2984d8a85a99dc6effa45abc09eea78872859c;hb=c10193fae6b80027ca1d44e7c7778a97ff7f9f01;hp=e2695901bd94c6b67916996a035ba50c37c849a6;hpb=4ff5bd61540272713e48de1eee75625028c32155;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Regular_1D.hxx b/src/StdMeshers/StdMeshers_Regular_1D.hxx index e2695901b..6f2984d8a 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.hxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.hxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -32,10 +32,11 @@ #include "SMESH_1D_Algo.hxx" -class TopoDS_Edge; +class Adaptor3d_Curve; +class TopoDS_Vertex; +class StdMeshers_SegmentLengthAroundVertex; -class StdMeshers_Regular_1D: - public SMESH_1D_Algo +class StdMeshers_Regular_1D: public SMESH_1D_Algo { public: StdMeshers_Regular_1D(int hypId, int studyId, SMESH_Gen* gen); @@ -51,16 +52,47 @@ public: virtual const std::list & GetUsedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, const bool=true); - 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); + /*! + * \brief Sets event listener to submeshes if necessary + * \param subMesh - submesh where algo is set + * + * This method is called when a submesh gets HYP_OK algo_state. + * After being set, event listener is notified on each event of a submesh. + */ + virtual void SetEventListener(SMESH_subMesh* subMesh); + + /*! + * \brief Allow algo to do something after persistent restoration + * \param subMesh - restored submesh + * + * This method is called only if a submesh has HYP_OK algo_state. + */ + void SubmeshRestored(SMESH_subMesh* subMesh); protected: - virtual bool computeInternalParameters (const TopoDS_Edge& theEdge, - std::list< double > & theParameters, - const bool theReverse) const; + virtual bool computeInternalParameters (SMESH_Mesh & theMesh, + Adaptor3d_Curve & theC3d, + double theLength, + double theFirstU, + double theLastU, + std::list & theParameters, + const bool theReverse, + bool theConsiderPropagation = false); + + virtual void redistributeNearVertices (SMESH_Mesh & theMesh, + Adaptor3d_Curve & theC3d, + double theLength, + std::list< double > & theParameters, + const TopoDS_Vertex & theVf, + const TopoDS_Vertex & theVl); + + /*! + * \brief Return StdMeshers_SegmentLengthAroundVertex assigned to vertex + */ + static const + StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh & theMesh, + const TopoDS_Vertex & theV); enum HypothesisType { LOCAL_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, NONE };