X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MEDSupport_i.cxx;h=e9b45e00903772663bf998deb81057b8c44e6fed;hp=931bb835bb7e56c2f54e51b64fcc26e9291507e5;hb=79b1ac2b6df9117f16f11d444b1f165d477a1813;hpb=f7fbf1c62246f439c35746c731f64dab57391c1b diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index 931bb835b..e9b45e009 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -17,17 +17,17 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // // File : SMESH_MEDSupport_i.cxx // Module : SMESH -using namespace std; #include "SMESH_MEDSupport_i.hxx" #include "utilities.h" #include "Utils_CorbaException.hxx" +#include "Utils_ExceptHandlers.hxx" #include #include "SMESHDS_Mesh.hxx" @@ -36,6 +36,9 @@ using namespace std; #include "SMESH_Mesh_i.hxx" #include "SMESH_subMesh_i.hxx" +using namespace std; + + //============================================================================= /*! * Default constructor @@ -293,9 +296,10 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: */ //============================================================================= -Engines::long_array * SMESH_MEDSupport_i::getNumber( +SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { + Unexpect aCatch(SALOME_SalomeException); if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Support", SALOME::INTERNAL_ERROR); @@ -304,18 +308,17 @@ Engines::long_array * SMESH_MEDSupport_i::getNumber( if (geomElement != SALOME_MED::MED_NONE) THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM); - Engines::long_array_var myseq = new Engines::long_array; + SALOME_MED::long_array_var myseq = new SALOME_MED::long_array; int i = 0; myseq->length(_subMeshDS->NbNodes()); - SMDS_Iterator * it = _subMeshDS->GetNodes(); + SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); while(it->more()) { myseq[i] = it->next()->GetID(); i++; }; - delete it; SCRUTE(myseq->length()); MESSAGE("End of SMESH_MEDSupport_i::getNumber"); @@ -323,6 +326,18 @@ Engines::long_array * SMESH_MEDSupport_i::getNumber( } +//============================================================================= +/*! + * CORBA: get Nodes from file + */ +//============================================================================= + +SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberFromFile( + SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) +{ + return getNumber(geomElement); +} + //============================================================================= /*! * CORBA: Global Nodes Index (optionnaly designed by the user) @@ -330,23 +345,70 @@ Engines::long_array * SMESH_MEDSupport_i::getNumber( */ //============================================================================= -Engines::long_array * +SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberIndex()throw(SALOME::SALOME_Exception) { MESSAGE("Not implemented for SMESH_i"); THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); - return 0; + return NULL; } - //============================================================================= /*! * CORBA: Array containing indexes for elements included in the support */ //============================================================================= -CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoints(SALOME_MED:: +CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoint(SALOME_MED:: medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { MESSAGE("Not implemented for SMESH_i"); return 0; } +//============================================================================= +/*! + * Gives the number of types of elements included in the support + */ +//============================================================================= +CORBA::Long SMESH_MEDSupport_i::getNumberOfTypes() + throw (SALOME::SALOME_Exception) +{ + MESSAGE("!!! NOT YET IMPLEMENTED !!!!"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); + return 0; +} +//============================================================================= +/*! + * Gives CORBA: Array containing the numbers of Gauss point of elements + * included in the support + */ +//============================================================================= +SALOME_MED::long_array* SMESH_MEDSupport_i::getNumbersOfGaussPoint() + throw (SALOME::SALOME_Exception) +{ + MESSAGE("!!! NOT YET IMPLEMENTED !!!!"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); + return NULL; +} +//============================================================================= +/*! + * build the object which will contain all the boundary elements of the mesh. + */ +//============================================================================= +void SMESH_MEDSupport_i::getBoundaryElements() + throw (SALOME::SALOME_Exception) +{ + MESSAGE("!!! NOT YET IMPLEMENTED !!!!"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); +} +//============================================================================= +/*! + * Gives information on the support + */ +//============================================================================= +SALOME_MED::SUPPORT::supportInfos * SMESH_MEDSupport_i::getSupportGlobal() + throw (SALOME::SALOME_Exception) +{ + MESSAGE("!!! NOT YET IMPLEMENTED !!!!"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); + return NULL; +}