Salome HOME
Add method AddBoundary to idl interface HOMARD_Gen
authorjfa <jfa@opencascade.com>
Mon, 10 Jan 2022 08:33:28 +0000 (11:33 +0300)
committerjfa <jfa@opencascade.com>
Mon, 10 Jan 2022 08:33:28 +0000 (11:33 +0300)
idl/SMESH_Homard.idl
src/SMESH_I/SMESH_Homard_i.cxx
src/SMESH_I/SMESH_Homard_i.hxx

index b1d4c27a585c79ab3f738c4005f66b3d4016525e..ff25358ece29006919206d90a18148dfa7180be9 100644 (file)
@@ -147,6 +147,7 @@ module SMESHHOMARD
                           in string theWorkingDir) raises(SALOME::SALOME_Exception);
 
     // Associate boundaries to groups
+    void AddBoundary(in string BoundaryName) raises (SALOME::SALOME_Exception);
     void AddBoundaryGroup(in string BoundaryName,
                           in string Group) raises (SALOME::SALOME_Exception);
 
index c5d5a8fb837716dbcb629513cc05a40ff68d4f37..55699404a176729de876f15b09ff1e6c782383fd 100644 (file)
@@ -2493,6 +2493,19 @@ void HOMARD_Gen_i::PythonDump()
   MESSAGE ("End PythonDump");
 }
 
+void HOMARD_Gen_i::AddBoundary(const char* BoundaryName)
+{
+  MESSAGE("HOMARD_Gen_i::AddBoundary : BoundaryName = " << BoundaryName);
+  if (myCase->_is_nil()) {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    std::string text = "The input mesh must be defined before boundary addition";
+    es.text = CORBA::string_dup(text.c_str());
+    throw SALOME::SALOME_Exception(es);
+  }
+  myCase->AddBoundary(BoundaryName);
+}
+
 void HOMARD_Gen_i::AddBoundaryGroup(const char* BoundaryName, const char* Group)
 {
   MESSAGE("HOMARD_Gen_i::AddBoundaryGroup : BoundaryName = " <<
index 26d17c9eab0f9c0286a0b37e9b1c93796cb26746..0fbf2dc31d602f76c97de2d835bf1bfe3836af87 100644 (file)
@@ -240,6 +240,7 @@ public:
   void        DeleteCase();
   CORBA::Long DeleteIteration(int numIter);
 
+  void AddBoundary(const char* Boundary);
   void AddBoundaryGroup(const char* Boundary, const char* Group);
 
   void AssociateCaseIter(int numIter, const char* labelIter);