1 // Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // SMESH SMESH : implementation of SMESH idl descriptions
21 // File : StdMeshers_FixedPoints1D.hxx
22 // Author : Damien COQUERET, OCC
25 #ifndef _SMESH_FIXEDPOINTS1D_HXX_
26 #define _SMESH_FIXEDPOINTS1D_HXX_
28 #include "SMESH_StdMeshers.hxx"
30 #include "StdMeshers_Reversible1D.hxx"
31 #include "SMESH_Hypothesis.hxx"
32 #include "Utils_SALOME_Exception.hxx"
33 #include <smIdType.hxx>
37 class STDMESHERS_EXPORT StdMeshers_FixedPoints1D: public StdMeshers_Reversible1D
40 StdMeshers_FixedPoints1D(int hypId, SMESH_Gen* gen);
41 virtual ~StdMeshers_FixedPoints1D();
43 void SetPoints(const std::vector<double>& listParams);
45 void SetNbSegments(const std::vector<smIdType>& listNbSeg) ;
47 const std::vector<double>& GetPoints() const { return _params; }
49 const std::vector<smIdType>& GetNbSegments() const { return _nbsegs; }
51 virtual std::ostream & SaveTo(std::ostream & save);
52 virtual std::istream & LoadFrom(std::istream & load);
55 * \brief Initialize start and end length by the mesh built on the geometry
56 * \param theMesh - the built mesh
57 * \param theShape - the geometry of interest
58 * \retval bool - true if parameter values have been successfully defined
60 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
63 * \brief Initialize my parameter values by default parameters.
64 * \retval bool - true if parameter values have been successfully defined
66 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
69 std::vector<double> _params;
70 std::vector<smIdType> _nbsegs;