X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverUNV%2FDriverUNV_W_SMESHDS_Document.cxx;h=0e73e1cae851d06e6238bb101f15f79631c011b9;hp=b9d226ac1bdf91b36dc439bc6eed6bc92ae46508;hb=2387bfa403855b82751bf9f122295b1fc6923a18;hpb=4791f5b30ea7a9c1247aa551750dc71cb83b99aa diff --git a/src/DriverUNV/DriverUNV_W_SMESHDS_Document.cxx b/src/DriverUNV/DriverUNV_W_SMESHDS_Document.cxx index b9d226ac1..0e73e1cae 100644 --- a/src/DriverUNV/DriverUNV_W_SMESHDS_Document.cxx +++ b/src/DriverUNV/DriverUNV_W_SMESHDS_Document.cxx @@ -1,5 +1,3 @@ -// SMESH DriverUNV : driver to read and write 'unv' files -// // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // @@ -18,87 +16,5 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : DriverUNV_W_SMESHDS_Document.cxx -// Module : SMESH -using namespace std; #include "DriverUNV_W_SMESHDS_Document.h" -#include "DriverUNV_W_SMESHDS_Mesh.h" - -#include "utilities.h" - -extern "C" -{ - Document_Writer* Wmaker() { - return new DriverUNV_W_SMESHDS_Document; - } -} - -DriverUNV_W_SMESHDS_Document::DriverUNV_W_SMESHDS_Document() { -; -} - -DriverUNV_W_SMESHDS_Document::~DriverUNV_W_SMESHDS_Document() { -; -} - -//void DriverUNV_W_SMESHDS_Document::SetFile(string aFile) { -//myFile = aFile; -//} - -//void DriverUNV_W_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDocument) { -//myDocument = aDocument; -//} - -void DriverUNV_W_SMESHDS_Document::Write() { - - Handle(SMESHDS_Mesh) myMesh; - - /**************************************************************************** - * OUVERTURE DU FICHIER EN ECRITURE * - ****************************************************************************/ - char* file2Write = (char*)myFile.c_str(); - FILE* fid = fopen(file2Write,"w+"); - if (fid < 0) - { - fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Write); - exit(EXIT_FAILURE); - } - - /**************************************************************************** - * FERMETURE DU FICHIER * - ****************************************************************************/ - - fclose(fid); - - /******** Nombre de maillages ********/ - int nb_of_meshes = myDocument->NbMeshes(); //voir avec Yves - //nb_of_meshes = 1; - int numero = 0; - - string myClass = string("SMESHDS_Mesh"); - string myExtension = string("UNV"); - - //while (numeroGetMesh(numero); - myDocument->InitMeshesIterator(); - for (;myDocument->MoreMesh();myDocument->NextMesh()) { - numero++; - myMesh = myDocument->CurrentMesh(); - - DriverUNV_W_SMESHDS_Mesh* myWriter = new DriverUNV_W_SMESHDS_Mesh; - //Mesh_Writer* myWriter = Driver::GetMeshWriter(myExtension, myClass); - - myWriter->SetMesh(myMesh); - myWriter->SetFile(myFile); - SCRUTE(myMesh); - //myWriter->SetFileId(fid); - myWriter->SetMeshId(numero); - myWriter->Write(); - } - -}