1 // HexoticPlugin : 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 : HexoticPlugin_Hypothesis_i.cxx
23 // Author : Lioka RAZAFINDRAZAKA (CEA)
26 //=============================================================================
29 #include "HexoticPlugin_Hypothesis_i.hxx"
30 #include "SMESH_Gen.hxx"
31 #include "SMESH_PythonDump.hxx"
33 #include "Utils_CorbaException.hxx"
34 #include "utilities.h"
36 //=============================================================================
38 * HexoticPlugin_Hypothesis_i::HexoticPlugin_Hypothesis_i
42 //=============================================================================
43 HexoticPlugin_Hypothesis_i::
44 HexoticPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
46 ::SMESH_Gen* theGenImpl)
47 : SALOME::GenericObj_i( thePOA ),
48 SMESH_Hypothesis_i( thePOA )
50 MESSAGE( "HexoticPlugin_Hypothesis_i::HexoticPlugin_Hypothesis_i" );
51 myBaseImpl = new ::HexoticPlugin_Hypothesis (theGenImpl->GetANewId(),
56 //=============================================================================
58 * HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i
62 //=============================================================================
63 HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i()
65 MESSAGE( "HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i" );
68 //=============================================================================
70 * HexoticPlugin_Hypothesis_i::SetHexesMinLevel
71 * HexoticPlugin_Hypothesis_i::SetHexesMaxLevel
72 * HexoticPlugin_Hypothesis_i::SetHexoticQuadrangles
73 * HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges
74 * HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements
75 * HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold
77 //=============================================================================
79 void HexoticPlugin_Hypothesis_i::SetHexesMinLevel (CORBA::Long theValue)
81 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMinLevel");
83 this->GetImpl()->SetHexesMinLevel(theValue);
84 SMESH::TPythonDump() << _this() << ".SetHexesMinLevel( " << theValue << " )";
87 void HexoticPlugin_Hypothesis_i::SetHexesMaxLevel (CORBA::Long theValue)
89 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMaxLevel");
91 this->GetImpl()->SetHexesMaxLevel(theValue);
92 SMESH::TPythonDump() << _this() << ".SetHexesMaxLevel( " << theValue << " )";
95 void HexoticPlugin_Hypothesis_i::SetHexoticQuadrangles (CORBA::Boolean theValue)
97 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticQuadrangles");
99 this->GetImpl()->SetHexoticQuadrangles(theValue);
100 SMESH::TPythonDump() << _this() << ".SetHexoticQuadrangles( " << theValue << " )";
103 void HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges (CORBA::Boolean theValue)
105 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges");
107 this->GetImpl()->SetHexoticIgnoreRidges(theValue);
108 SMESH::TPythonDump() << _this() << ".SetHexoticIgnoreRidges( " << theValue << " )";
111 void HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements (CORBA::Boolean theValue)
113 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements");
115 this->GetImpl()->SetHexoticInvalidElements(theValue);
116 SMESH::TPythonDump() << _this() << ".SetHexoticInvalidElements( " << theValue << " )";
119 void HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold (CORBA::Long theValue)
121 // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold");
123 this->GetImpl()->SetHexoticSharpAngleThreshold(theValue);
124 SMESH::TPythonDump() << _this() << ".SetHexoticSharpAngleThreshold( " << theValue << " )";
127 //=============================================================================
129 * HexoticPlugin_Hypothesis_i::GetHexesMinLevel
130 * HexoticPlugin_Hypothesis_i::GetHexesMaxLevel
131 * HexoticPlugin_Hypothesis_i::GetHexoticQuadrangles
132 * HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges
133 * HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements
134 * HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold
136 //=============================================================================
138 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexesMinLevel()
140 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexesMinLevel");
142 return this->GetImpl()->GetHexesMinLevel();
145 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexesMaxLevel()
147 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexesMaxLevel");
149 return this->GetImpl()->GetHexesMaxLevel();
152 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetHexoticQuadrangles()
154 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticQuadrangles");
156 return this->GetImpl()->GetHexoticQuadrangles();
159 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges()
161 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges");
163 return this->GetImpl()->GetHexoticIgnoreRidges();
166 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements()
168 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements");
170 return this->GetImpl()->GetHexoticInvalidElements();
173 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold()
175 // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold");
177 return this->GetImpl()->GetHexoticSharpAngleThreshold();
180 //=============================================================================
182 * HexoticPlugin_Hypothesis_i::GetImpl
186 //=============================================================================
187 ::HexoticPlugin_Hypothesis* HexoticPlugin_Hypothesis_i::GetImpl()
189 // MESSAGE("HexoticPlugin_Hypothesis_i::GetImpl");
190 return (::HexoticPlugin_Hypothesis*)myBaseImpl;
193 //================================================================================
195 * \brief Verify whether hypothesis supports given entity type
196 * \param type - dimension (see SMESH::Dimension enumeration)
197 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
199 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
201 //================================================================================
202 CORBA::Boolean HexoticPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
204 return type == SMESH::DIM_3D;