Version: 9.16.0
StdMeshers_MaxLength.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, 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 : implementation of SMESH idl descriptions
21// File : StdMeshers_MaxLength.hxx
22// Module : SMESH
23//
24#ifndef _SMESH_MaxLength_HXX_
25#define _SMESH_MaxLength_HXX_
26
27#include "SMESH_StdMeshers.hxx"
28
29#include "SMESH_Hypothesis.hxx"
30#include "Utils_SALOME_Exception.hxx"
31
33{
34 public:
35 StdMeshers_MaxLength(int hypId, SMESH_Gen * gen);
36 virtual ~ StdMeshers_MaxLength();
37
38 void SetLength(double length);
39 double GetLength() const;
40
41 bool HavePreestimatedLength() const { return _preestimated > 0.; }
42 double GetPreestimatedLength() const { return _preestimated; }
43 void SetPreestimatedLength(double length);
44
45 void SetUsePreestimatedLength(bool toUse);
46 bool GetUsePreestimatedLength() const;
47
48 virtual std::ostream & SaveTo(std::ostream & save);
49 virtual std::istream & LoadFrom(std::istream & load);
50
57 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
58
63 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
64
65 protected:
66 double _length, _preestimated;
68};
69
70#endif
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
virtual std::istream & LoadFrom(std::istream &load)=0
virtual std::ostream & SaveTo(std::ostream &save)=0
Definition: SMESH_Gen.hxx:68
Definition: SMESH_Hypothesis.hxx:48
virtual bool SetParametersByDefaults(const TDefaults &dflts, const SMESH_Mesh *theMesh=0)=0
Initialize my parameter values by default parameters.
virtual bool SetParametersByMesh(const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)=0
Initialize my parameter values by the mesh built on the geometry.
Definition: SMESH_Mesh.hxx:80
Definition: StdMeshers_MaxLength.hxx:33
bool _preestimation
Definition: StdMeshers_MaxLength.hxx:67
bool HavePreestimatedLength() const
Definition: StdMeshers_MaxLength.hxx:41
double _length
Definition: StdMeshers_MaxLength.hxx:66
double GetPreestimatedLength() const
Definition: StdMeshers_MaxLength.hxx:42