X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Mesh_i.cxx;h=afc798f2474561247352fbfb2bce7b752ba14449;hp=4e442a7a0daa8c473b1473dd8215f7aea4a34e41;hb=ef9db08c815361b806e558b78acf445adc43613d;hpb=12d2ca8ac73624835e9398ebbb34a2febf8ee638;ds=sidebyside diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 4e442a7a0..afc798f24 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -4069,7 +4069,11 @@ public: void prepareForWriting(SMESH_Mesh_i& self) { /* nothing here */ } void exportField(SMESH_Mesh_i& self, const std::string& aMeshName, bool have0dField, SMESHDS_Mesh *meshDS, const GEOM::ListOfFields& fields, const char*geomAssocFields) { - THROW_IK_EXCEPTION("exportField Not implemented yet for full memory !"); + DriverMED_W_Field_Mem fieldWriter(_res); + fieldWriter.SetMeshName( aMeshName ); + fieldWriter.AddODOnVertices( have0dField ); + self.exportMEDFields( fieldWriter, meshDS, fields, geomAssocFields ); + _res = fieldWriter.getData(); } public: MEDCoupling::MCAuto getData() { return _res; } @@ -4084,10 +4088,15 @@ CORBA::LongLong SMESH_Mesh_i::ExportPartToMEDCoupling(SMESH::SMESH_IDSource_ptr const char* geomAssocFields, CORBA::Double ZTolerance) { + MEDCoupling::MCAuto data; + SMESH_TRY; + if( !this->_gen_i->isSSLMode() ) + SMESH::throwCorbaException("SMESH_Mesh_i::ExportPartToMEDCoupling : only for embedded mode !"); MEDFileMemSpeCls spe; this->ExportPartToMEDCommon(spe,meshPart,auto_groups,autoDimension,fields,geomAssocFields,ZTolerance); - MEDCoupling::MCAuto res( spe.getData() ); - MEDCoupling::DataArrayByte *ret(res.retn()); + data = spe.getData(); + SMESH_CATCH( SMESH::throwCorbaException ); + MEDCoupling::DataArrayByte *ret(data.retn()); return reinterpret_cast(ret); }