[vtk-developers] ENH: vtkSTLWriter - customization of header

Pokutnev, Pavel (GE Energy Services) Pavel.Pokutnev at ge.com
Tue Nov 30 09:06:00 EST 2010


Utkarsh,

Yes, if you need I can provide some example. But I think, you can use "42400-IDGH.stl" from VTKData for this purpose.

Here is a simple test case:

vtkPolyData* data = vtkPolyData::New();

vtkSTLReader* r = vtkSTLReader::New();
r->SetFileName("42400-IDGH.stl");      // header is "LYMB generated SLA File"
r->SetOutput(data);
r->Update();
r->Delete();

vtkSTLWriter* w = vtkSTLWriter::New();
w->SetFileTypeToBinary();
w->SetFileName("42400-IDGH-test.stl");
w->SetHeader("MY STL HEADER TEST");
w->SetInput(data);
w->Update();
w->Delete();

data->Delete();

The new Header in "42400-IDGH-test.stl" must be now "MY STL HEADER TEST" instead of "Visualization Toolkit generated SLA File".

Thanks,
Pavel


-----Ursprüngliche Nachricht-----
Von: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] 
Gesendet: Dienstag, 30. November 2010 14:35
An: Pokutnev, Pavel (GE Energy Services); Dave Partyka
Cc: vtk-developers at vtk.org
Betreff: Re: [vtk-developers] ENH: vtkSTLWriter - customization of header

Pavel,

Is it possible to provide a sample dataset to test the same?

Thanks
Utkarsh

On Tue, Nov 30, 2010 at 4:28 AM, Pokutnev, Pavel (GE Energy Services) <Pavel.Pokutnev at ge.com> wrote:
> Hello vtk-devs,
>
>
>
> the current implementation of vtkSTLWriter doesn't handle the 
> customization of STL header. Is it possible to merge the fix for this 
> problem into the next release?
>
>
>
> http://public.kitware.com/Bug/view.php?id=8405
>
>
>
> Thanks in advance!
>
>
>
> Best regards!
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>



More information about the vtk-developers mailing list