Is there a "slice(s) of pie" filter in VTK?

I have a cylinder that bounds a polygonal data set: all of the points and cells in the data set are inside the cylinder. I would like to extract regions of the cylinder that are shaped like pieces of pie. I’d use the the phrase “slice of pie” but the word slice is already fairly well used with a distinctly different meaning in VTK. Slice typically means a cut plane, but I want wedge shaped 3D sub-regions, not 2D slices of a 3D data set.

Imagine my cylinder is a pie, with an analog clock printed on top. I would like to extract 12 (or N) equally sized (geometrically, not in terms of numbers of points or cells) slices, with each slice “centered” on a number on the clock face.

Is there an existing filter that already does this?

If not, are there some existing filters that would be easy to combine to get the same or a similar net result?

Or do I have to write a new filter for this ?

Thanks,
David C.

I think you might want to trying using the vtkClipPolyData class to cut your cylinder with some other object to extract your “slice of pie”. Try applying this example:

https://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ImplicitDataSetClipping

or maybe this with the vtkClipClosedSurface filter:

https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/ClipClosedSurface/

Yes! This is perfect. I can totally adapt the ClipClosedSurface example to do what I need to do.

Thank you!

1 Like

If you’re a Python user and could share your data files then I could put together an example using vtki: http://docs.vtki.org/examples/index.html