From: jfa Date: Mon, 10 Jan 2022 08:33:28 +0000 (+0300) Subject: Add method AddBoundary to idl interface HOMARD_Gen X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0d6bb1193aa8f69bd3e36e3cc6af3b8133202ec;p=modules%2Fsmesh.git Add method AddBoundary to idl interface HOMARD_Gen --- diff --git a/idl/SMESH_Homard.idl b/idl/SMESH_Homard.idl index b1d4c27a5..ff25358ec 100644 --- a/idl/SMESH_Homard.idl +++ b/idl/SMESH_Homard.idl @@ -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); diff --git a/src/SMESH_I/SMESH_Homard_i.cxx b/src/SMESH_I/SMESH_Homard_i.cxx index c5d5a8fb8..55699404a 100644 --- a/src/SMESH_I/SMESH_Homard_i.cxx +++ b/src/SMESH_I/SMESH_Homard_i.cxx @@ -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 = " << diff --git a/src/SMESH_I/SMESH_Homard_i.hxx b/src/SMESH_I/SMESH_Homard_i.hxx index 26d17c9ea..0fbf2dc31 100644 --- a/src/SMESH_I/SMESH_Homard_i.hxx +++ b/src/SMESH_I/SMESH_Homard_i.hxx @@ -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);