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" );
68 //=============================================================================
70 * BLSURFPlugin_Hypothesis_i::SetPhysicalMesh
75 //=============================================================================
76 void BLSURFPlugin_Hypothesis_i::SetPhysicalMesh (CORBA::Long theValue)
78 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhysicalMesh");
80 this->GetImpl()->SetPhysicalMesh((::BLSURFPlugin_Hypothesis::PhysicalMesh)theValue);
81 SMESH::TPythonDump() << _this() << ".SetPhysicalMesh( " << theValue << " )";
84 //=============================================================================
86 * BLSURFPlugin_Hypothesis_i::GetPhysicalMesh
90 //=============================================================================
91 CORBA::Long BLSURFPlugin_Hypothesis_i::GetPhysicalMesh()
93 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhysicalMesh");
95 return this->GetImpl()->GetPhysicalMesh();
98 //=============================================================================
100 * BLSURFPlugin_Hypothesis_i::SetPhySize
104 //=============================================================================
105 void BLSURFPlugin_Hypothesis_i::SetPhySize (CORBA::Double theValue)
107 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhySize");
109 this->GetImpl()->SetPhySize(theValue);
110 SMESH::TPythonDump() << _this() << ".SetPhySize( " << theValue << " )";
113 //=============================================================================
115 * BLSURFPlugin_Hypothesis_i::GetPhySize
119 //=============================================================================
120 CORBA::Double BLSURFPlugin_Hypothesis_i::GetPhySize()
122 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhySize");
124 return this->GetImpl()->GetPhySize();
127 //=============================================================================
129 * BLSURFPlugin_Hypothesis_i::SetGeometricMesh
134 //=============================================================================
135 void BLSURFPlugin_Hypothesis_i::SetGeometricMesh (CORBA::Long theValue)
137 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGeometricMesh");
139 this->GetImpl()->SetGeometricMesh((::BLSURFPlugin_Hypothesis::GeometricMesh)theValue);
140 SMESH::TPythonDump() << _this() << ".SetGeometricMesh( " << theValue << " )";
143 //=============================================================================
145 * BLSURFPlugin_Hypothesis_i::GetGeometricMesh
149 //=============================================================================
150 CORBA::Long BLSURFPlugin_Hypothesis_i::GetGeometricMesh()
152 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGeometricMesh");
154 return this->GetImpl()->GetGeometricMesh();
157 //=============================================================================
159 * BLSURFPlugin_Hypothesis_i::SetAngleMeshS
163 //=============================================================================
164 void BLSURFPlugin_Hypothesis_i::SetAngleMeshS (CORBA::Double theValue)
166 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetAngleMeshS");
168 this->GetImpl()->SetAngleMeshS(theValue);
169 SMESH::TPythonDump() << _this() << ".SetAngleMeshS( " << theValue << " )";
172 //=============================================================================
174 * BLSURFPlugin_Hypothesis_i::GetAngleMeshS
178 //=============================================================================
179 CORBA::Double BLSURFPlugin_Hypothesis_i::GetAngleMeshS()
181 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetAngleMeshS");
183 return this->GetImpl()->GetAngleMeshS();
186 //=============================================================================
188 * BLSURFPlugin_Hypothesis_i::SetGradation
192 //=============================================================================
193 void BLSURFPlugin_Hypothesis_i::SetGradation (CORBA::Double theValue)
195 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGradation");
197 this->GetImpl()->SetGradation(theValue);
198 SMESH::TPythonDump() << _this() << ".SetGradation( " << theValue << " )";
201 //=============================================================================
203 * BLSURFPlugin_Hypothesis_i::GetGradation
207 //=============================================================================
208 CORBA::Double BLSURFPlugin_Hypothesis_i::GetGradation()
210 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGradation");
212 return this->GetImpl()->GetGradation();
215 //=============================================================================
217 * BLSURFPlugin_Hypothesis_i::SetQuadAllowed
221 //=============================================================================
222 void BLSURFPlugin_Hypothesis_i::SetQuadAllowed (CORBA::Boolean theValue)
224 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetQuadAllowed");
226 this->GetImpl()->SetQuadAllowed(theValue);
227 SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
230 //=============================================================================
232 * BLSURFPlugin_Hypothesis_i::GetQuadAllowed
236 //=============================================================================
237 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetQuadAllowed()
239 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetQuadAllowed");
241 return this->GetImpl()->GetQuadAllowed();
244 //=============================================================================
246 * BLSURFPlugin_Hypothesis_i::SetDecimesh
250 //=============================================================================
251 void BLSURFPlugin_Hypothesis_i::SetDecimesh (CORBA::Boolean theValue)
253 // MESSAGE("BLSURFPlugin_Hypothesis_i::SetDecimesh");
255 this->GetImpl()->SetDecimesh(theValue);
256 SMESH::TPythonDump() << _this() << ".SetDecimesh( " << theValue << " )";
259 //=============================================================================
261 * BLSURFPlugin_Hypothesis_i::GetDecimesh
265 //=============================================================================
266 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetDecimesh()
268 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetDecimesh");
270 return this->GetImpl()->GetDecimesh();
273 //=============================================================================
275 * BLSURFPlugin_Hypothesis_i::GetImpl
279 //=============================================================================
280 ::BLSURFPlugin_Hypothesis* BLSURFPlugin_Hypothesis_i::GetImpl()
282 // MESSAGE("BLSURFPlugin_Hypothesis_i::GetImpl");
283 return (::BLSURFPlugin_Hypothesis*)myBaseImpl;
286 //================================================================================
288 * \brief Verify whether hypothesis supports given entity type
289 * \param type - dimension (see SMESH::Dimension enumeration)
290 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
292 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
294 //================================================================================
295 CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
297 return type == SMESH::DIM_2D;