[Paraview] Bug? Paraview will load vrml 1.0 but cannot display

Steve M. Robbins steve at sumost.ca
Thu Nov 24 22:48:06 EST 2011


Hi,

The VTK parser class (vtkVRMLImporter) only handles VMRL 2.0.  I
believe paraview uses this class, but paraview's vtkVRMLSource
method CanReadFile() will accept either 1.0 or 2.0.  Is this
a bug -- or can paraview handle vrml 1.0 in some manner?

I've tried loading some VRML 1.0 examples such as
http://www.cg.tuwien.ac.at/studentwork/VRSem96/VRML/Examples/earth_sun_19.wrl
but no joy.

-Steve

//-----------------------------------------------------------------------------
int vtkVRMLSource::CanReadFile(const char *filename)
{
  FILE *fd = fopen(filename, "r");
  if (!fd) return 0;

  char header[128];
  fgets(header, 128, fd);

  // Technically, the header should start with "#VRML V2.0 utf8", but who's
  // to say that new versions will not be forward compatible.  Let's not be
  // perscriptive yet.  If some future version of VRML is incompatible, we
  // can make this test more strict.
  int valid = (strncmp(header, "#VRML ", 6) == 0);

  fclose(fd);
  return valid;
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111124/5aef75fa/attachment.pgp>


More information about the ParaView mailing list