[Paraview] Debugging Why STL file will not load

Michael Jackson mike.jackson at bluequartz.net
Mon May 30 10:59:55 EDT 2011


I took a look at the STL Reader class in VTK and I did notice something that would cause issues with some STL files. In Binary STL files the 49 and 50 byte of each triangle is set to be the "Attribute Byte Count". In our case this may NOT actually be zero as we are contemplating actually using that capability of the STL File to encode some information for the triangle. In our case this would be a non zero number but the VTK STL reader assumes it is zero by reading and then throwing away those 2 bytes. I believe to be most compatible with the STL spec one should read the two bytes, then skip ahead the value of those 2 bytes.
  Now the "Devil's advocates" among us are going to say that this may break compatibility with existing STL files. Those STL files are Technically wrong BUT there could always be a user option to enable/disable "Strict" STL mode for the reader? Better error reporting and warning feedback might also help users who are writing their own STL files spot their mistakes, like the number of triangles not being correct in the file, or the attribute byte length being zero when it isn't but needs to be.
  Anyways, thanks for offering to help with my file.

___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jackson at bluequartz.net 
BlueQuartz Software               Dayton, Ohio   

On May 30, 2011, at 10:38 AM, Robert Maynard wrote:

> Excellent, I was just going to look at why the file was failing :)
> 
> On Mon, May 30, 2011 at 10:33 AM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
> Figured it out. The issue was obviously in my writer. I was not offsetting into the file correctly to write the data which lead ParaView to basically just read junk data would be my guess and could not interpret it.
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
> 
> 
> 
> On May 30, 2011, at 9:57 AM, Robert Maynard wrote:
> 
> > Hi,
> >
> > The current STL reader has no debug information to tell you why it failed to read a file. If you are able to send me the file I can look into why the reader fails.
> >
> > On Mon, May 30, 2011 at 9:47 AM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
> > I am creating an STL Binary file from another program. I am then trying to load it in ParaView. ParaView seems to recognize the STL file but after I load it nothing appears. I click on the "Information" tab and it says Polygonal Mesh but 0 cells and 0 points. There are no error messages or anything else. Is there something I can enable to try and figure out why nothing is showing up or the read is failing?
> >
> > Thanks
> > ___________________________________________________________
> > Mike Jackson                      www.bluequartz.net
> > Principal Software Engineer       mike.jackson at bluequartz.net
> > BlueQuartz Software               Dayton, Ohio
> >
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
> >
> > --
> > Robert Maynard
> 
> 
> 
> 
> -- 
> Robert Maynard



More information about the ParaView mailing list