Back to index

salome-med  6.5.0
Functions
convertToPoly.cxx File Reference
#include "MEDMEM_Mesh.hxx"
#include <iostream>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file convertToPoly.cxx.

{
    if( argc != 4 )
    {
      cout << "Usage: convertToPoly input_med_file output_med_file mesh_name" << endl;
      return -1;
    }
  else
    {
      string filename(argv[1]);
      string meshname(argv[3]);
      string outputfilename(argv[2]);
      
      MESH *mesh=new MESH(MED_DRIVER, filename, meshname);

      mesh->convertToPoly();

      int id = mesh->addDriver(MED_DRIVER,outputfilename,meshname);
      mesh->write(id);
      mesh->removeReference();
      return 0;
    }
}