Version: 8.3.0
StdMeshers_FixedPoints1D.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 // SMESH SMESH : implementaion of SMESH idl descriptions
21 // File : StdMeshers_FixedPoints1D.hxx
22 // Author : Damien COQUERET, OCC
23 // Module : SMESH
24 //
25 #ifndef _SMESH_FIXEDPOINTS1D_HXX_
26 #define _SMESH_FIXEDPOINTS1D_HXX_
27 
28 
29 
30 #include "SMESH_StdMeshers.hxx"
31 
32 #include "SMESH_Hypothesis.hxx"
33 #include "Utils_SALOME_Exception.hxx"
34 
35 #include <vector>
36 
38  public SMESH_Hypothesis
39 {
40 public:
41  StdMeshers_FixedPoints1D(int hypId, int studyId, SMESH_Gen* gen);
42  virtual ~StdMeshers_FixedPoints1D();
43 
44  void SetPoints(std::vector<double>& listParams)
45  throw(SALOME_Exception);
46 
47  void SetNbSegments(std::vector<int>& listNbSeg)
48  throw(SALOME_Exception);
49 
50  const std::vector<double>& GetPoints() const { return _params; }
51 
52  const std::vector<int>& GetNbSegments() const { return _nbsegs; }
53 
54  void SetReversedEdges( std::vector<int>& ids);
55 
56  void SetObjectEntry( const char* entry ) { _objEntry = entry; }
57 
58  const char* GetObjectEntry() { return _objEntry.c_str(); }
59 
60  const std::vector<int>& GetReversedEdges() const { return _edgeIDs; }
61 
62  virtual std::ostream & SaveTo(std::ostream & save);
63  virtual std::istream & LoadFrom(std::istream & load);
64 
71  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
72 
77  virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
78 
79 protected:
80  std::vector<double> _params;
81  std::vector<int> _nbsegs;
82  std::vector<int> _edgeIDs;
83  std::string _objEntry;
84 };
85 
86 #endif