Salome HOME
Merge changes from 'master' branch.
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPlugin_Hypothesis_2D_i.cxx
index 58683c6d54f363ac4304114159ea115f3a528ec7..2a2ffa3360248fb18f3a8f500d43d7d845c70d4e 100644 (file)
 #include "SMESH_Gen.hxx"
 #include "SMESH_PythonDump.hxx"
 
-#include "Utils_CorbaException.hxx"
-#include "utilities.h"
-
-using namespace std;
-
 //=============================================================================
 /*!
  *  NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i
@@ -69,56 +64,95 @@ NETGENPlugin_Hypothesis_2D_i::~NETGENPlugin_Hypothesis_2D_i()
 
 //=============================================================================
 /*!
- *  NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed
+ *  NETGENPlugin_Hypothesis_2D_i::GetImpl
  *
- *  Set QuadAllowed flag
+ *  Get implementation
  */
 //=============================================================================
-// void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
-// {
-//   if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
-//                                                     theValue,
-//                                                     METH_SetQuadAllowed ))
-//   {
-//     this->GetImpl()->SetQuadAllowed(theValue);
-//     SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
-//   }
-// }
+::NETGENPlugin_Hypothesis_2D* NETGENPlugin_Hypothesis_2D_i::GetImpl()
+{
+  return (::NETGENPlugin_Hypothesis_2D*)myBaseImpl;
+}
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type 
+  * \param type - dimension (see SMESH::Dimension enumeration)
+  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * 
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================  
+CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_2D;
+}
+
 
 //=============================================================================
 /*!
- *  NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed
+ *  NETGENPlugin_RemesherHypothesis_2D_i::NETGENPlugin_RemesherHypothesis_2D_i
  *
- *  Get QuadAllowed flag
+ *  Constructor
  */
 //=============================================================================
-// CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
-// {
-//   return this->GetImpl()->GetQuadAllowed();
-// }
+NETGENPlugin_RemesherHypothesis_2D_i::
+NETGENPlugin_RemesherHypothesis_2D_i (PortableServer::POA_ptr thePOA,
+                                      ::SMESH_Gen*            theGenImpl)
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA ),
+    NETGENPlugin_Hypothesis_2D_i( thePOA, theGenImpl )
+{
+  myBaseImpl = new ::NETGENPlugin_RemesherHypothesis_2D (theGenImpl->GetANewId(),
+                                                         theGenImpl);
+}
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type
+ * \param type - dimension (see SMESH::Dimension enumeration)
+ * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ *
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================
+CORBA::Boolean NETGENPlugin_RemesherHypothesis_2D_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_2D;
+}
 
 //=============================================================================
 /*!
- *  NETGENPlugin_Hypothesis_2D_i::GetImpl
+ *  NETGENPlugin_RemesherHypothesis_2D_i::GetImpl
  *
  *  Get implementation
  */
 //=============================================================================
-::NETGENPlugin_Hypothesis_2D* NETGENPlugin_Hypothesis_2D_i::GetImpl()
+::NETGENPlugin_RemesherHypothesis_2D* NETGENPlugin_RemesherHypothesis_2D_i::GetImpl()
 {
-  return (::NETGENPlugin_Hypothesis_2D*)myBaseImpl;
+  return (::NETGENPlugin_RemesherHypothesis_2D*)myBaseImpl;
 }
 
 //================================================================================
 /*!
- * \brief Verify whether hypothesis supports given entity type 
-  * \param type - dimension (see SMESH::Dimension enumeration)
-  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
- * 
- * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ * \brief Set ridge angle
  */
-//================================================================================  
-CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::IsDimSupported( SMESH::Dimension type )
+//================================================================================
+
+void NETGENPlugin_RemesherHypothesis_2D_i::SetRidgeAngle( CORBA::Double angle )
 {
-  return type == SMESH::DIM_2D;
+  GetImpl()->SetRidgeAngle( angle );
+
+  SMESH::TPythonDump() << _this() << ".SetRidgeAngle( " << SMESH::TVar(angle) << " )";
+}
+
+//================================================================================
+/*!
+ * \brief Return ridge angle
+ */
+//================================================================================
+
+CORBA::Double NETGENPlugin_RemesherHypothesis_2D_i::GetRidgeAngle()
+{
+  return GetImpl()->GetRidgeAngle();
 }