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_SimpleHypothesis_3D_i.cxx
23 // Author : Edward AGAPOV
25 //=============================================================================
27 #include "NETGENPlugin_SimpleHypothesis_3D_i.hxx"
28 #include "NETGENPlugin_SimpleHypothesis_3D.hxx"
30 #include <SMESH_Gen.hxx>
31 #include <SMESH_PythonDump.hxx>
33 #include <Utils_CorbaException.hxx>
34 #include <utilities.h>
38 //=============================================================================
40 * NETGENPlugin_SimpleHypothesis_3D_i::NETGENPlugin_SimpleHypothesis_3D_i
44 //=============================================================================
45 NETGENPlugin_SimpleHypothesis_3D_i::
46 NETGENPlugin_SimpleHypothesis_3D_i (PortableServer::POA_ptr thePOA,
48 ::SMESH_Gen* theGenImpl)
49 : SALOME::GenericObj_i( thePOA ),
50 SMESH_Hypothesis_i( thePOA ),
51 NETGENPlugin_SimpleHypothesis_2D_i( thePOA,theStudyId,theGenImpl )
53 MESSAGE( "NETGENPlugin_SimpleHypothesis_3D_i::NETGENPlugin_SimpleHypothesis_3D_i" );
56 myBaseImpl = new ::NETGENPlugin_SimpleHypothesis_3D (theGenImpl->GetANewId(),
61 //=============================================================================
63 * NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i
67 //=============================================================================
68 NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i()
70 MESSAGE( "NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i" );
73 //=============================================================================
75 * NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces()
77 //=============================================================================
78 void NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces()
80 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces");
82 this->GetImpl()->LengthFromFaces();
83 SMESH::TPythonDump() << _this() << ".LengthFromFaces()";
86 //=============================================================================
88 * NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume()
90 //=============================================================================
91 void NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume(CORBA::Double value)
93 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume");
95 this->GetImpl()->SetMaxElementVolume(value);
96 SMESH::TPythonDump() << _this() << ".SetMaxElementVolume( " << value << " )";
100 //=============================================================================
102 * NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume()
104 //=============================================================================
105 CORBA::Double NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume()
107 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume");
109 return this->GetImpl()->GetMaxElementVolume();
111 //=============================================================================
113 * NETGENPlugin_SimpleHypothesis_3D_i::GetImpl
115 //=============================================================================
116 ::NETGENPlugin_SimpleHypothesis_3D* NETGENPlugin_SimpleHypothesis_3D_i::GetImpl()
118 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::GetImpl");
119 return (::NETGENPlugin_SimpleHypothesis_3D*)myBaseImpl;
122 //================================================================================
124 * \brief Verify whether hypothesis supports given entity type
125 * \param type - dimension (see SMESH::Dimension enumeration)
126 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
128 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
130 //================================================================================
131 CORBA::Boolean NETGENPlugin_SimpleHypothesis_3D_i::IsDimSupported( SMESH::Dimension type )
133 return type == SMESH::DIM_3D;