<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
You can try vtkCleanPolyData filter, but it does not work very well in all applications.<br><br>Xiaofeng Zhao<br>
<a href="http://www.xzing.org" target="_blank"></a><br><br><br><br>> Date: Wed, 11 Aug 2010 15:48:59 +0300<br>> From: mrapsouthern@gmail.com<br>> To: vtkusers@vtk.org<br>> Subject: Re: [vtkusers] VTK File Writing<br>> <br>> Ha of course, I knew that just didnt put it all together thanks.<br>> <br>> So I guess the solution is to split the polygon into triangles? Is there <br>> not a already defined algorithm to do this for an abitrary polygon? If <br>> so where can I find it... ?<br>> <br>> Thanks<br>> Alex<br>> <br>> <br>> On 11.8.2010 15:41, Bill Lorensen wrote:<br>> > http://en.wikipedia.org/wiki/Convex_polygon<br>> ><br>> ><br>> > On Wed, Aug 11, 2010 at 8:36 AM, Alex Southern<mrapsouthern@gmail.com> wrote:<br>> > <br>> >> Hmmm,<br>> >><br>> >> What do you mean by convex? The geometry has no curves in it. Its just a 6<br>> >> sided polygon.<br>> >><br>> >> I must be missing something... please explain.<br>> >><br>> >> Thanks<br>> >> Alex<br>> >><br>> >> On 11.8.2010 15:33, Sebastien Jourdain wrote:<br>> >> <br>> >>> A ploygon cell in VTK can not be convex. So you will have to split it<br>> >>> in two cells.<br>> >>> And I don't know if there is an automatic way to do it by using a<br>> >>> given filter in VTK and writing the file again.<br>> >>><br>> >>> Seb<br>> >>><br>> >>> On Wed, Aug 11, 2010 at 7:25 AM, Alex Southern<aps@tml.hut.fi> wrote:<br>> >>><br>> >>> <br>> >>>> Hi,<br>> >>>><br>> >>>> Could you guys take a look at this vtk file I wrote, can you see anything<br>> >>>> wrong with it? I can't, but if you take a look at the JPG of paraview<br>> >>>> screenshots, you will see that the single polygon looks fine in wire<br>> >>>> frame<br>> >>>> mode but has some weird error when viewed as a surface, this is happening<br>> >>>> with a few files I have written, but the is the most basic geometry it<br>> >>>> occurs with.<br>> >>>><br>> >>>> JPG at http://www.tml.tkk.fi/~aps/<http://www.tml.tkk.fi/%7Eaps/><br>> >>>><br>> >>>> Thanks<br>> >>>> Alex<br>> >>>><br>> >>>> # vtk DataFile Version 3.0<br>> >>>> VTK File Exmaple<br>> >>>> ASCII<br>> >>>> DATASET POLYDATA<br>> >>>> POINTS 6 float<br>> >>>> 0.0 81.8897637795276 0.0<br>> >>>> 43.7007874015748 81.8897637795276 0.0<br>> >>>> 43.7007874015748 150.748031496063 0.0<br>> >>>> 94.9606299212598 150.748031496063 0.0<br>> >>>> 94.9606299212598 0.0 0.0<br>> >>>> 0.0 0.0 0.0<br>> >>>> POLYGONS 1 7<br>> >>>> 6 0 1 2 3 4 5<br>> >>>> _______________________________________________<br>> >>>> Powered by www.kitware.com<br>> >>>><br>> >>>> Visit other Kitware open-source projects at<br>> >>>> http://www.kitware.com/opensource/opensource.html<br>> >>>><br>> >>>> Please keep messages on-topic and check the VTK FAQ at:<br>> >>>> http://www.vtk.org/Wiki/VTK_FAQ<br>> >>>><br>> >>>> Follow this link to subscribe/unsubscribe:<br>> >>>> http://www.vtk.org/mailman/listinfo/vtkusers<br>> >>>><br>> >>>><br>> >>>> <br>> >>> _______________________________________________<br>> >>> Powered by www.kitware.com<br>> >>><br>> >>> Visit other Kitware open-source projects at<br>> >>> http://www.kitware.com/opensource/opensource.html<br>> >>><br>> >>> Please keep messages on-topic and check the VTK FAQ at:<br>> >>> http://www.vtk.org/Wiki/VTK_FAQ<br>> >>><br>> >>> Follow this link to subscribe/unsubscribe:<br>> >>> http://www.vtk.org/mailman/listinfo/vtkusers<br>> >>><br>> >>> <br>> >> _______________________________________________<br>> >> Powered by www.kitware.com<br>> >><br>> >> Visit other Kitware open-source projects at<br>> >> http://www.kitware.com/opensource/opensource.html<br>> >><br>> >> Please keep messages on-topic and check the VTK FAQ at:<br>> >> http://www.vtk.org/Wiki/VTK_FAQ<br>> >><br>> >> Follow this link to subscribe/unsubscribe:<br>> >> http://www.vtk.org/mailman/listinfo/vtkusers<br>> >><br>> >> <br>> <br>> _______________________________________________<br>> Powered by www.kitware.com<br>> <br>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>> <br>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> <br>> Follow this link to subscribe/unsubscribe:<br>> http://www.vtk.org/mailman/listinfo/vtkusers<br>                                            </body>
</html>