1 // BLSURFPlugin : 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : BLSURFPlugin_Hypothesis_i.cxx
23 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
26 //=============================================================================
29 #include "BLSURFPlugin_Hypothesis_i.hxx"
30 #include "SMESH_Gen.hxx"
31 #include "SMESH_PythonDump.hxx"
33 #include "Utils_CorbaException.hxx"
34 #include "utilities.h"
36 //=============================================================================
38 * BLSURFPlugin_Hypothesis_i::BLSURFPlugin_Hypothesis_i
42 //=============================================================================
43 BLSURFPlugin_Hypothesis_i::
44 BLSURFPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
46 ::SMESH_Gen* theGenImpl)
47 : SALOME::GenericObj_i( thePOA ),
48 SMESH_Hypothesis_i( thePOA )
50 MESSAGE( "BLSURFPlugin_Hypothesis_i::BLSURFPlugin_Hypothesis_i" );
51 myBaseImpl = new ::BLSURFPlugin_Hypothesis (theGenImpl->GetANewId(),
56 //=============================================================================
58 * BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i
62 //=============================================================================
63 BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i()
65 MESSAGE( "BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i" );
69 * BLSURFPlugin_Hypothesis_i::SetTopology
74 //=============================================================================
75 void BLSURFPlugin_Hypothesis_i::SetTopology (CORBA::Long theValue)
77 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetTopology");
79 this->GetImpl()->SetTopology((::BLSURFPlugin_Hypothesis::Topology)theValue);
80 SMESH::TPythonDump() << _this() << ".SetTopology( " << theValue << " )";
83 //=============================================================================
85 * BLSURFPlugin_Hypothesis_i::GetTopology
89 //=============================================================================
90 CORBA::Long BLSURFPlugin_Hypothesis_i::GetTopology()
92 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetTopology");
94 return this->GetImpl()->GetTopology();
97 //=============================================================================
99 //=============================================================================
101 * BLSURFPlugin_Hypothesis_i::SetPhysicalMesh
106 //=============================================================================
107 void BLSURFPlugin_Hypothesis_i::SetPhysicalMesh (CORBA::Long theValue)
109 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhysicalMesh");
111 this->GetImpl()->SetPhysicalMesh((::BLSURFPlugin_Hypothesis::PhysicalMesh)theValue);
112 SMESH::TPythonDump() << _this() << ".SetPhysicalMesh( " << theValue << " )";
115 //=============================================================================
117 * BLSURFPlugin_Hypothesis_i::GetPhysicalMesh
121 //=============================================================================
122 CORBA::Long BLSURFPlugin_Hypothesis_i::GetPhysicalMesh()
124 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhysicalMesh");
126 return this->GetImpl()->GetPhysicalMesh();
129 //=============================================================================
131 * BLSURFPlugin_Hypothesis_i::SetPhySize
135 //=============================================================================
136 void BLSURFPlugin_Hypothesis_i::SetPhySize (CORBA::Double theValue)
138 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhySize");
140 this->GetImpl()->SetPhySize(theValue);
141 SMESH::TPythonDump() << _this() << ".SetPhySize( " << theValue << " )";
144 //=============================================================================
146 * BLSURFPlugin_Hypothesis_i::GetPhySize
150 //=============================================================================
151 CORBA::Double BLSURFPlugin_Hypothesis_i::GetPhySize()
153 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhySize");
155 return this->GetImpl()->GetPhySize();
158 //=============================================================================
160 * BLSURFPlugin_Hypothesis_i::SetGeometricMesh
165 //=============================================================================
166 void BLSURFPlugin_Hypothesis_i::SetGeometricMesh (CORBA::Long theValue)
168 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGeometricMesh");
170 this->GetImpl()->SetGeometricMesh((::BLSURFPlugin_Hypothesis::GeometricMesh)theValue);
171 SMESH::TPythonDump() << _this() << ".SetGeometricMesh( " << theValue << " )";
174 //=============================================================================
176 * BLSURFPlugin_Hypothesis_i::GetGeometricMesh
180 //=============================================================================
181 CORBA::Long BLSURFPlugin_Hypothesis_i::GetGeometricMesh()
183 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGeometricMesh");
185 return this->GetImpl()->GetGeometricMesh();
188 //=============================================================================
190 * BLSURFPlugin_Hypothesis_i::SetAngleMeshS
194 //=============================================================================
195 void BLSURFPlugin_Hypothesis_i::SetAngleMeshS (CORBA::Double theValue)
197 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetAngleMeshS");
199 this->GetImpl()->SetAngleMeshS(theValue);
200 SMESH::TPythonDump() << _this() << ".SetAngleMeshS( " << theValue << " )";
203 //=============================================================================
205 * BLSURFPlugin_Hypothesis_i::GetAngleMeshS
209 //=============================================================================
210 CORBA::Double BLSURFPlugin_Hypothesis_i::GetAngleMeshS()
212 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetAngleMeshS");
214 return this->GetImpl()->GetAngleMeshS();
217 //=============================================================================
219 * BLSURFPlugin_Hypothesis_i::SetGradation
223 //=============================================================================
224 void BLSURFPlugin_Hypothesis_i::SetGradation (CORBA::Double theValue)
226 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGradation");
228 this->GetImpl()->SetGradation(theValue);
229 SMESH::TPythonDump() << _this() << ".SetGradation( " << theValue << " )";
232 //=============================================================================
234 * BLSURFPlugin_Hypothesis_i::GetGradation
238 //=============================================================================
239 CORBA::Double BLSURFPlugin_Hypothesis_i::GetGradation()
241 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGradation");
243 return this->GetImpl()->GetGradation();
246 //=============================================================================
248 * BLSURFPlugin_Hypothesis_i::SetQuadAllowed
252 //=============================================================================
253 void BLSURFPlugin_Hypothesis_i::SetQuadAllowed (CORBA::Boolean theValue)
255 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetQuadAllowed");
257 this->GetImpl()->SetQuadAllowed(theValue);
258 SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
261 //=============================================================================
263 * BLSURFPlugin_Hypothesis_i::GetQuadAllowed
267 //=============================================================================
268 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetQuadAllowed()
270 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetQuadAllowed");
272 return this->GetImpl()->GetQuadAllowed();
275 //=============================================================================
277 * BLSURFPlugin_Hypothesis_i::SetDecimesh
281 //=============================================================================
282 void BLSURFPlugin_Hypothesis_i::SetDecimesh (CORBA::Boolean theValue)
284 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetDecimesh");
286 this->GetImpl()->SetDecimesh(theValue);
287 SMESH::TPythonDump() << _this() << ".SetDecimesh( " << theValue << " )";
290 //=============================================================================
292 * BLSURFPlugin_Hypothesis_i::GetDecimesh
296 //=============================================================================
297 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetDecimesh()
299 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetDecimesh");
301 return this->GetImpl()->GetDecimesh();
304 //=============================================================================
306 * BLSURFPlugin_Hypothesis_i::GetImpl
310 //=============================================================================
311 ::BLSURFPlugin_Hypothesis* BLSURFPlugin_Hypothesis_i::GetImpl()
313 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetImpl");
314 return (::BLSURFPlugin_Hypothesis*)myBaseImpl;
317 //================================================================================
319 * \brief Verify whether hypothesis supports given entity type
320 * \param type - dimension (see SMESH::Dimension enumeration)
321 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
323 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
325 //================================================================================
326 CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
328 return type == SMESH::DIM_2D;