1 // NETGENPlugin : C++ implementation
3 // Copyright (C) 2006 OPEN CASCADE, CEA/DEN, EDF R&D
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : NETGENPlugin_Hypothesis_i.cxx
23 // Author : Michael Sazonov (OCN)
27 //=============================================================================
28 #include "NETGENPlugin_Hypothesis_i.hxx"
29 #include "SMESH_Gen.hxx"
30 #include "SMESH_PythonDump.hxx"
32 #include "Utils_CorbaException.hxx"
33 #include "utilities.h"
37 //=============================================================================
39 * NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i
43 //=============================================================================
44 NETGENPlugin_Hypothesis_i::
45 NETGENPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
47 ::SMESH_Gen* theGenImpl)
48 : SALOME::GenericObj_i( thePOA ),
49 SMESH_Hypothesis_i( thePOA )
51 MESSAGE( "NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i" );
52 myBaseImpl = new ::NETGENPlugin_Hypothesis (theGenImpl->GetANewId(),
57 //=============================================================================
59 * NETGENPlugin_Hypothesis_i::~NETGENPlugin_Hypothesis_i
63 //=============================================================================
64 NETGENPlugin_Hypothesis_i::~NETGENPlugin_Hypothesis_i()
66 MESSAGE( "NETGENPlugin_Hypothesis_i::~NETGENPlugin_Hypothesis_i" );
69 //=============================================================================
71 * NETGENPlugin_Hypothesis_i::SetMaxSize
75 //=============================================================================
76 void NETGENPlugin_Hypothesis_i::SetMaxSize (CORBA::Double theValue)
78 MESSAGE("NETGENPlugin_Hypothesis_i::SetMaxSize");
80 this->GetImpl()->SetMaxSize(theValue);
81 SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theValue << " )";
84 //=============================================================================
86 * NETGENPlugin_Hypothesis_i::GetMaxSize
90 //=============================================================================
91 CORBA::Double NETGENPlugin_Hypothesis_i::GetMaxSize()
93 MESSAGE("NETGENPlugin_Hypothesis_i::GetMaxSize");
95 return this->GetImpl()->GetMaxSize();
98 //=============================================================================
100 * NETGENPlugin_Hypothesis_i::SetSecondOrder
102 * Set SecondOrder flag
104 //=============================================================================
105 void NETGENPlugin_Hypothesis_i::SetSecondOrder (CORBA::Boolean theValue)
107 MESSAGE("NETGENPlugin_Hypothesis_i::SetSecondOrder");
109 this->GetImpl()->SetSecondOrder(theValue);
110 SMESH::TPythonDump() << _this() << ".SetSecondOrder( " << theValue << " )";
113 //=============================================================================
115 * NETGENPlugin_Hypothesis_i::GetSecondOrder
117 * Get SecondOrder flag
119 //=============================================================================
120 CORBA::Boolean NETGENPlugin_Hypothesis_i::GetSecondOrder()
122 MESSAGE("NETGENPlugin_Hypothesis_i::GetSecondOrder");
124 return this->GetImpl()->GetSecondOrder();
127 //=============================================================================
129 * NETGENPlugin_Hypothesis_i::SetOptimize
133 //=============================================================================
134 void NETGENPlugin_Hypothesis_i::SetOptimize (CORBA::Boolean theValue)
136 MESSAGE("NETGENPlugin_Hypothesis_i::SetOptimize");
138 this->GetImpl()->SetOptimize(theValue);
139 SMESH::TPythonDump() << _this() << ".SetOptimize( " << theValue << " )";
142 //=============================================================================
144 * NETGENPlugin_Hypothesis_i::GetOptimize
148 //=============================================================================
149 CORBA::Boolean NETGENPlugin_Hypothesis_i::GetOptimize()
151 MESSAGE("NETGENPlugin_Hypothesis_i::GetOptimize");
153 return this->GetImpl()->GetOptimize();
156 //=============================================================================
158 * NETGENPlugin_Hypothesis_i::SetFineness
162 //=============================================================================
163 void NETGENPlugin_Hypothesis_i::SetFineness (CORBA::Long theValue)
165 MESSAGE("NETGENPlugin_Hypothesis_i::SetFineness");
167 this->GetImpl()->SetFineness((::NETGENPlugin_Hypothesis::Fineness)theValue);
168 SMESH::TPythonDump() << _this() << ".SetFineness( " << theValue << " )";
171 //=============================================================================
173 * NETGENPlugin_Hypothesis_i::GetFineness
177 //=============================================================================
178 CORBA::Long NETGENPlugin_Hypothesis_i::GetFineness()
180 MESSAGE("NETGENPlugin_Hypothesis_i::GetFineness");
182 return this->GetImpl()->GetFineness();
185 //=============================================================================
187 * NETGENPlugin_Hypothesis_i::SetGrowthRate
191 //=============================================================================
192 void NETGENPlugin_Hypothesis_i::SetGrowthRate (CORBA::Double theValue)
194 MESSAGE("NETGENPlugin_Hypothesis_i::SetGrowthRate");
196 this->GetImpl()->SetGrowthRate(theValue);
197 SMESH::TPythonDump() << _this() << ".SetGrowthRate( " << theValue << " )";
200 //=============================================================================
202 * NETGENPlugin_Hypothesis_i::GetGrowthRate
206 //=============================================================================
207 CORBA::Double NETGENPlugin_Hypothesis_i::GetGrowthRate()
209 MESSAGE("NETGENPlugin_Hypothesis_i::GetGrowthRate");
211 return this->GetImpl()->GetGrowthRate();
214 //=============================================================================
216 * NETGENPlugin_Hypothesis_i::SetNbSegPerEdge
220 //=============================================================================
221 void NETGENPlugin_Hypothesis_i::SetNbSegPerEdge (CORBA::Double theValue)
223 MESSAGE("NETGENPlugin_Hypothesis_i::SetNbSegPerEdge");
225 this->GetImpl()->SetNbSegPerEdge(theValue);
226 SMESH::TPythonDump() << _this() << ".SetNbSegPerEdge( " << theValue << " )";
229 //=============================================================================
231 * NETGENPlugin_Hypothesis_i::GetNbSegPerEdge
235 //=============================================================================
236 CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerEdge()
238 MESSAGE("NETGENPlugin_Hypothesis_i::GetNbSegPerEdge");
240 return this->GetImpl()->GetNbSegPerEdge();
243 //=============================================================================
245 * NETGENPlugin_Hypothesis_i::SetNbSegPerRadius
249 //=============================================================================
250 void NETGENPlugin_Hypothesis_i::SetNbSegPerRadius (CORBA::Double theValue)
252 MESSAGE("NETGENPlugin_Hypothesis_i::SetNbSegPerRadius");
254 this->GetImpl()->SetNbSegPerRadius(theValue);
255 SMESH::TPythonDump() << _this() << ".SetNbSegPerRadius( " << theValue << " )";
258 //=============================================================================
260 * NETGENPlugin_Hypothesis_i::GetNbSegPerRadius
264 //=============================================================================
265 CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerRadius()
267 MESSAGE("NETGENPlugin_Hypothesis_i::GetNbSegPerRadius");
269 return this->GetImpl()->GetNbSegPerRadius();
272 //=============================================================================
274 * NETGENPlugin_Hypothesis_i::GetImpl
278 //=============================================================================
279 ::NETGENPlugin_Hypothesis* NETGENPlugin_Hypothesis_i::GetImpl()
281 MESSAGE("NETGENPlugin_Hypothesis_i::GetImpl");
282 return (::NETGENPlugin_Hypothesis*)myBaseImpl;
285 //================================================================================
287 * \brief Verify whether hypothesis supports given entity type
288 * \param type - dimension (see SMESH::Dimension enumeration)
289 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
291 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
293 //================================================================================
294 CORBA::Boolean NETGENPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
296 return type == SMESH::DIM_3D;