[vtkusers] vtkTriangleStrip and empty vtkSTLWriter output
Cory Quammen
cory.quammen at kitware.com
Tue Sep 12 15:16:50 EDT 2017
PLY supports up to 256-point polygons and vtkPolyDataWriter has no
restriction on cell type, so you are right, no vtkTriangleFilter
should be needed in front of any of those writers.
Cory
On Tue, Sep 12, 2017 at 3:04 PM, Sean McBride <sean at rogue-research.com> wrote:
> Cory,
>
> Thanks for this.
>
> So, for the benefit of the archives, does this mean one doesn't need to invoke vtkTriangleFilter before any of: vtkPLYWriter, vtkSTLWriter, vtkPolyDataWriter?
>
> Sean
>
>
>
> On Tue, 12 Sep 2017 08:58:21 -0400, Cory Quammen said:
>
>>Hi folks,
>>
>>Following up on this now almost 2-year-old thread, I have a merge
>>request in VTK that adds on the fly triangulation of arbitrary
>>polygons into triangles in vtkSTLWriter.
>>https://gitlab.kitware.com/vtk/vtk/merge_requests/3260
>>
>>I welcome your reviews.
>>
>>Thanks!
>>Cory
>>
>>On Wed, Oct 21, 2015 at 12:47 PM, Bill Lorensen
>><bill.lorensen at gmail.com> wrote:
>>> I believe that PLY and VTK can handle non-triangles.
>>>
>>>
>>> On Wed, Oct 21, 2015 at 12:13 PM, Sean McBride <sean at rogue-
>>research.com> wrote:
>>>> On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said:
>>>>
>>>>>I looked at the STLWriter code:
>>>>>
>>>>>1) It reports an error if a polygon is not a triangle.
>>>>>2) It reports nothing if there are triangle strips.
>>>>>
>>>>>At a minimum I think it should handle triangle strips. No need to run
>>>>>triangle filter, I'll decompose the strips on the fly.
>>>>
>>>> Does this cause any inconsistency wrt other similar writers? For
>>example, I just looked at our exporter code and it basically does:
>>>>
>>>> - create vtkTriangleFilter
>>>> - switch on file type (ply, stl, vtk)
>>>> - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter
>>>>
>>>> I imagine others have similar code. I admittedly didn't check, but
>>it would be nice if I could remove this vtkTriangleFilter for all cases,
>>and not need it for some but not others...
>
>
--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
More information about the vtkusers
mailing list