[vtk-developers] vtkCutter modification to use vtkCellLocator

Berk Geveci berk.geveci at kitware.com
Tue Aug 12 12:44:28 EDT 2014


Hi Rostislav,

This is great. Can you push the code to Gerrit (
http://review.source.kitware.com/)?

Best,
-berk



On Sat, Aug 9, 2014 at 2:52 PM, Rostislav Khlebnikov <
rostislav.khlebnikov at kcl.ac.uk> wrote:

> Hi guys,
>
> just thought that the VTK developers might be interested in the test I
> made recently.
>
> Bascially what I did is subclass the vtkCellLocator to implement the
> visitor pattern. It allows to filter the octree nodes (e.g. reject the
> octree nodes that are of no interest early) and for leafs, to visit the
> cells of the polydata.
> Then, I subclassed the vtkCutter to use this cell locator instead of
> straight iteration over cells. Likely for very complex implicit cutting
> functions this wouldnt be of any benefit. However, for those which can test
> bboxes as being of interest or not, rejecting whole subtrees, such as
> vtkPlane, it is very useful. I tested it on a surface with 500k triangles
> and the cutter performance went from 88ms per cut to 14ms.
>
> The code I made is quite ugly due to limited extensibility of vtkCutter,
> so I had to copy-paste the RequestData method and make my changes instead
> of, say, overriding IterateCells method which would just provide the cells
> to cut through.
>
> But anyway, I was wondering if you guys are intersted in this kind of
> functionality? Would you like me to send you the code?
>
> All best,
>    Rostislav.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140812/354ad7f9/attachment-0002.html>


More information about the vtk-developers mailing list