1 // Copyright (C) 2007-2010 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.
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 StdMeshers_TrianglePreference
21 // File : StdMeshers_TrianglePreference.cxx
24 #include "StdMeshers_TrianglePreference.hxx"
25 #include "utilities.h"
29 //=============================================================================
33 //=============================================================================
35 StdMeshers_TrianglePreference::StdMeshers_TrianglePreference(int hypId,
38 :SMESH_Hypothesis(hypId, studyId, gen)
40 _name = "TrianglePreference";
41 _param_algo_dim = -2; // auxiliary used by StdMeshers_Quadrangle_2D
44 //=============================================================================
48 //=============================================================================
50 StdMeshers_TrianglePreference::~StdMeshers_TrianglePreference()
54 //=============================================================================
58 //=============================================================================
60 ostream & StdMeshers_TrianglePreference::SaveTo(ostream & save)
65 //=============================================================================
69 //=============================================================================
71 istream & StdMeshers_TrianglePreference::LoadFrom(istream & load)
76 //=============================================================================
80 //=============================================================================
82 ostream & operator <<(ostream & save, StdMeshers_TrianglePreference & hyp)
84 return hyp.SaveTo( save );
87 //=============================================================================
91 //=============================================================================
93 istream & operator >>(istream & load, StdMeshers_TrianglePreference & hyp)
95 return hyp.LoadFrom( load );
97 //================================================================================
99 * \brief Initialize my parameter values by the mesh built on the geometry
100 * \param theMesh - the built mesh
101 * \param theShape - the geometry of interest
102 * \retval bool - true if parameter values have been successfully defined
104 * Just return false as this hypothesis does not have parameters values
106 //================================================================================
108 bool StdMeshers_TrianglePreference::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
109 const TopoDS_Shape& /*theShape*/)
114 //================================================================================
116 * \brief Initialize my parameter values by default parameters.
117 * \retval bool - true if parameter values have been successfully defined
119 //================================================================================
121 bool StdMeshers_TrianglePreference::SetParametersByDefaults(const TDefaults& /*dflts*/,
122 const SMESH_Mesh* /*theMesh*/)