[vtk-developers] VTK_POLYHEDRON problem is non-convex faces

Markos Kopanos mkopano at gmail.com
Thu Dec 20 04:03:23 EST 2018


I have a question regarding the VTK_POLYHEDRON. When all the faces are
convex faces the rendering is ok.

When one of the faces is non-convex the result is wrong

[image: image.png]



The corresponding code is this



vtkSmartPointer<vtkUnstructuredGrid> ugrid = vtkSmartPointer<
vtkUnstructuredGrid>::New();

       ugrid->SetPoints(points);

       ugrid->InsertNextCell(VTK_POLYHEDRON, 10, dodechedronPointsIds, 6,
Faces->GetPointer());



When I use wireframe representation for both convex and non-convex polygons
the results are ok (the second attached file)



SetRepresentationToWireframe();



When I use rendering  representation for convex faces is ok but for
non-convex the representation is wrong



tmpCustomActor->GetProperty()->SetRepresentationToSurface()


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181220/a02e2ffe/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 15372 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181220/a02e2ffe/attachment-0001.png>


More information about the vtk-developers mailing list