[vtkusers] Strange behaviour when using vtkSTLReader

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Jul 16 08:57:17 EDT 2004


Marek,


Marek.Wasilewski at dnv.com wrote:
> Hi
> I'm just experimenting with vtkSTLReader (using C++) and the following
> code results in an interesting collage of black and white triangles.
> Does anyone know what might be wrong?
> 
> Thanks for any help you can give.
> 
> Marek
> 
>   CString strFileName;
>   strFileName.Format(_T("%s%s"), VTK_DATA_ROOT, "42400-IDGH.stl");
                              ^

Make sure you insert a '/' in between the path and the filename. Or use 
standart string :

   std::string strFileName = VTK_DATA_ROOT;
   strFileName += '/';
   strFileName += "42400-IDGH.stl";

   vtkSTLReader* part = vtkSTLReader::New();
   part->SetFileName(strFileName.c_str());


HTH
Mathieu





More information about the vtkusers mailing list