View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010854VTK(No Category)public2010-06-19 16:442015-10-21 11:54
ReporterDavid Doria 
Assigned ToBill Lorensen 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0010854: vtkSTLWriter should warn when input is not all written
DescriptionvtkSTLWriter only writes the first 3 points of each polygon. If the input is a triangle strip, for example, only the first 3 points of the strip are written. I'd suggest that it throw an error (or at least a warning) indicating that the input is not what it is expecting. Maybe this could be done by checking the number of points that were written to the file against the number of input points?
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Filescxx file icon Test.cxx [^] (1,531 bytes) 2011-02-10 14:35
cxx file icon vtkSTLWriter.cxx [^] (7,954 bytes) 2011-02-22 01:33
? file icon vtkSTLWriter.h [^] (1,850 bytes) 2011-02-22 01:34
cxx file icon vtkSTLWriter_ver_2.cxx [^] (7,560 bytes) 2011-02-22 11:37

 Relationships

  Notes
(0025384)
Glenn Faken (reporter)
2011-02-10 14:30

Hi, I'm going to try and work on this bug and was wondering if you can post the code to your program that is using this function so that I can replicate the issue easily.
(0025385)
David Doria (reporter)
2011-02-10 14:35

I just uploaded a file. It creates a triangle strip with 4 points, writes it to an stl, reads the stl, and declares that there is only 1 point!
(0025386)
Glenn Faken (reporter)
2011-02-10 14:40

Thanks for the quick response.
(0025529)
Glenn Faken (reporter)
2011-02-21 23:14
edited on: 2011-02-22 01:29

I've been trying to trace how the calls in the program work and I'm having trouble tracking down how it tells vtkSTLWriter to write. Also when running the test the output states that there is only 1 point is that correct? The stl file only contains "solid ascii endsolid" when it is created.

I was wondering if you had any quick pointers for me to try and follow?

Haha, I went back and reread your previous note and looks like your having the same problem :p

I will also attach a proposed solution.

(0025530)
David Doria (reporter)
2011-02-22 07:54

If you look at
http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html [^]
you can see the inheritance diagram (it doesn't go all the way up the tree). Better is to click "List of all members". I would start by looking at the Write() function of vtkWriter and follow it down.

I never checked the actual contents of the file, all I did was see that GetNumberOfPoints() reported 1.
(0025531)
Glenn Faken (reporter)
2011-02-22 11:35
edited on: 2011-02-22 11:36

Wow if only I had found that link earlier. I've been chasing the .h files and trying to see where the jumps would go.

I've updated the attached file for a little bit cleaner execution and I left it with the warning out side of the if statement to make it easier for maintaining.

I guess I can't delete files so I've renamed the second version.

(0030924)
Jean-Christophe Fillion-Robin (manager)
2013-06-05 16:34

Hi Glenn,

Does the problem still occur with VTK 5.10 ? VTK 6 ?

Would be great if you could submit a patch using Gerrit. This would make the review and integration easier. For more details see http://www.vtk.org/Wiki/VTK/Git/Develop [^]

Thanks
Jc
(0031201)
Dave DeMarle (administrator)
2013-07-22 18:55

If this is still an issue in 6.0.0, please reopen this report.
(0035307)
Bill Lorensen (developer)
2015-10-19 10:55

This patch resolves the issue of writing triangle strips, https://gitlab.kitware.com/vtk/vtk/merge_requests/777 [^]

 The error regarding non-triangles was fixed by this gerrit patch: http://review.source.kitware.com/#/c/14558/ [^]
(0035332)
Bill Lorensen (developer)
2015-10-21 11:54

Fixed in vtk 7. Older versions should run triangle filter before running STLWriter

 Issue History
Date Modified Username Field Change
2010-06-19 16:44 David Doria New Issue
2011-02-10 14:30 Glenn Faken Note Added: 0025384
2011-02-10 14:35 David Doria File Added: Test.cxx
2011-02-10 14:35 David Doria Note Added: 0025385
2011-02-10 14:40 Glenn Faken Note Added: 0025386
2011-02-21 23:14 Glenn Faken Note Added: 0025529
2011-02-21 23:15 Glenn Faken Note Edited: 0025529
2011-02-22 01:29 Glenn Faken Note Edited: 0025529
2011-02-22 01:33 Glenn Faken File Added: vtkSTLWriter.cxx
2011-02-22 01:34 Glenn Faken File Added: vtkSTLWriter.h
2011-02-22 07:54 David Doria Note Added: 0025530
2011-02-22 11:35 Glenn Faken Note Added: 0025531
2011-02-22 11:36 Glenn Faken Note Edited: 0025531
2011-02-22 11:37 Glenn Faken File Added: vtkSTLWriter_ver_2.cxx
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2013-06-05 16:34 Jean-Christophe Fillion-Robin Note Added: 0030924
2013-07-22 18:55 Dave DeMarle Note Added: 0031201
2013-07-22 18:55 Dave DeMarle Status backlog => expired
2013-07-22 18:55 Dave DeMarle Assigned To => Dave DeMarle
2015-10-19 10:50 Bill Lorensen Assigned To Dave DeMarle => Bill Lorensen
2015-10-19 10:50 Bill Lorensen Status expired => backlog
2015-10-19 10:55 Bill Lorensen Note Added: 0035307
2015-10-19 10:55 Bill Lorensen Status backlog => gerrit review
2015-10-21 11:40 Bill Lorensen Project => TBD
2015-10-21 11:40 Bill Lorensen Type => incorrect functionality
2015-10-21 11:40 Bill Lorensen Resolution open => fixed
2015-10-21 11:54 Bill Lorensen Note Added: 0035332
2015-10-21 11:54 Bill Lorensen Status gerrit review => closed


Copyright © 2000 - 2018 MantisBT Team