1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // NETGENPlugin : C++ implementation
21 // File : NETGENPlugin_SimpleHypothesis_3D_i.cxx
22 // Author : Edward AGAPOV
24 //=============================================================================
26 #include "NETGENPlugin_SimpleHypothesis_3D_i.hxx"
27 #include "NETGENPlugin_SimpleHypothesis_3D.hxx"
29 #include <SMESH_Gen.hxx>
30 #include <SMESH_PythonDump.hxx>
32 #include <Utils_CorbaException.hxx>
33 #include <utilities.h>
37 //=============================================================================
39 * NETGENPlugin_SimpleHypothesis_3D_i::NETGENPlugin_SimpleHypothesis_3D_i
43 //=============================================================================
44 NETGENPlugin_SimpleHypothesis_3D_i::
45 NETGENPlugin_SimpleHypothesis_3D_i (PortableServer::POA_ptr thePOA,
47 ::SMESH_Gen* theGenImpl)
48 : SALOME::GenericObj_i( thePOA ),
49 SMESH_Hypothesis_i( thePOA ),
50 NETGENPlugin_SimpleHypothesis_2D_i( thePOA,theStudyId,theGenImpl )
52 MESSAGE( "NETGENPlugin_SimpleHypothesis_3D_i::NETGENPlugin_SimpleHypothesis_3D_i" );
55 myBaseImpl = new ::NETGENPlugin_SimpleHypothesis_3D (theGenImpl->GetANewId(),
60 //=============================================================================
62 * NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i
66 //=============================================================================
67 NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i()
69 MESSAGE( "NETGENPlugin_SimpleHypothesis_3D_i::~NETGENPlugin_SimpleHypothesis_3D_i" );
72 //=============================================================================
74 * NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces()
76 //=============================================================================
77 void NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces()
79 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::LengthFromFaces");
81 this->GetImpl()->LengthFromFaces();
82 SMESH::TPythonDump() << _this() << ".LengthFromFaces()";
85 //=============================================================================
87 * NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume()
89 //=============================================================================
90 void NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume(CORBA::Double value)
92 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::SetMaxElementVolume");
94 this->GetImpl()->SetMaxElementVolume(value);
95 SMESH::TPythonDump() << _this() << ".SetMaxElementVolume( " << SMESH::TVar(value) << " )";
99 //=============================================================================
101 * NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume()
103 //=============================================================================
104 CORBA::Double NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume()
106 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::GetMaxElementVolume");
108 return this->GetImpl()->GetMaxElementVolume();
110 //=============================================================================
112 * NETGENPlugin_SimpleHypothesis_3D_i::GetImpl
114 //=============================================================================
115 ::NETGENPlugin_SimpleHypothesis_3D* NETGENPlugin_SimpleHypothesis_3D_i::GetImpl()
117 MESSAGE("NETGENPlugin_SimpleHypothesis_3D_i::GetImpl");
118 return (::NETGENPlugin_SimpleHypothesis_3D*)myBaseImpl;
121 //================================================================================
123 * \brief Verify whether hypothesis supports given entity type
124 * \param type - dimension (see SMESH::Dimension enumeration)
125 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
127 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
129 //================================================================================
130 CORBA::Boolean NETGENPlugin_SimpleHypothesis_3D_i::IsDimSupported( SMESH::Dimension type )
132 return type == SMESH::DIM_3D;