[Gmsh] VTK Format Reader

Dominique Belhachemi domibel at cs.tu-berlin.de
Thu Sep 25 23:12:57 CEST 2008


On Thu, 2008-09-25 at 21:17 +0200, Christophe Geuzaine wrote:
> Dominique Belhachemi wrote:
> > Hi,
> > 
> > The FileOpenDialog offers to read a "VTK mesh (*.vtk)" into Gmsh.
> > I've tried it with different files without success. All I get is a
> > syntax error.
> > 
> > I took a quick look at the code. Geo/GModelIO_Mesh.cpp offers a readVTK
> > function.
> > 
> >      int GModel::readVTK(const std::string &name)
> >      {
> >        Msg::Error("VTK reader is not implemented yet");
> >        return 0;
> >      }
> > 
> > But this function is never called. Is it possible to add a call to the
> > function "int MergeFile(...)" in Common/OpenFile.cpp ?
> 
> Sure, but someone needs to implement the reader first :-)
> 
Not really. The crux of the matter is that the user doesnt see the error
message:

     Msg::Error("VTK reader is not implemented yet");

Current implementation handles .vtk files like .geo files. This results
in a syntax error without notifying the user.

Cheers
Dominique