[vtkusers] Extracting surface triangles (eliminating inner triangles)
bailleul jonathan
jonathan.bailleul at utc.fr
Wed Feb 15 12:20:00 EST 2006
Thank you for your hint. Looking for the list designated me
vtkGeometryFilter as the right filter, but I didn't manage to have it
work. I should have noted that on my previous post...
So, my real question is: how to use this filter, since I'm stuck in
understanding the documentation, even after having read some example code.
Here is the very simplistic code I used for my test:
int
main(int argc, char* argv[])
{
usage(argc, argv);
// create object geometry
vtkPolyDataReader *reader = vtkPolyDataReader::New();
reader -> SetFileName(argv[1]);
reader -> Update();
vtkGeometryFilter *geom = vtkGeometryFilter::New();
geom -> SetInput(reader -> GetOutput());
geom -> Update();
vtkPolyDataWriter *writer = vtkPolyDataWriter::New();
writer -> SetInput(geom -> GetOutput());
writer -> SetFileName(argv[2]);
writer -> SetFileTypeToASCII();
writer -> Update();
return EXIT_SUCCESS;
}
I'm sorry to put that topic on table once again, but I'm quite stuck on
it for now...
In advance, thank you for any suggestion,
Tim Hutton wrote:
> Jonathan,
>
> vtkGeometryFilter should do this for you, I think.
>
> You may need to ensure that the vertices aren't split, and
> vtkCleanPolyData them if they are.
>
> Tim
>
> On 2/14/06, bailleul jonathan <jonathan.bailleul at utc.fr> wrote:
>
>>Dear All,
>>
>>I know the topic is quite covered already, but I didn't manage to find
>>my solution in the list so far...
>>
>>I have a closed surface obtained from 3D delaunay (tetgen). It is
>>already a polydata made of triangles, but since it is infered from
>>tetrahedrons, there are many many inner triangles 'inside'.
>>
>>I would simply like to get rid of them, and only keep the
>>"boundary"/outer triangles.
>>
>>Please note that I neither don't want to add any vertices nor move the
>>existing "outer" vertices.
>>
>>
>>With my best regards,
>>
>>
>>
>>--
>>---------------------------------------
>>Jonathan BAILLEUL, ATER
>>Dept. Génie Biomédical - UTC Compiègne
>>Doctorant au GREYC Image - ENSICAEN
>>http://www.greyc.ensicaen.fr/~bailleul/
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Tim Hutton - http://www.sq3.org.uk
>
> Take the Organic Builder challenge -
> http://www.sq3.org.uk/Evolution/Squirm3/OrganicBuilder/
--
---------------------------------------
Jonathan BAILLEUL, ATER
Dept. Génie Biomédical - UTC Compiègne
Doctorant au GREYC Image - ENSICAEN
http://www.greyc.ensicaen.fr/~bailleul/
More information about the vtkusers
mailing list