<div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Rostislav,</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">This is great. Can you push the code to Gerrit (</span><font face="arial, sans-serif"><a href="http://review.source.kitware.com/">http://review.source.kitware.com/</a>)?</font></div>

<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Best,</font></div><div><font face="arial, sans-serif">-berk</font></div><div><font face="arial, sans-serif"><br></font></div></div>
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Aug 9, 2014 at 2:52 PM, Rostislav Khlebnikov <span dir="ltr"><<a href="mailto:rostislav.khlebnikov@kcl.ac.uk" target="_blank">rostislav.khlebnikov@kcl.ac.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
<br>
just thought that the VTK developers might be interested in the test I made recently.<br>
<br>
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.<br>


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.<br>


<br>
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.<br>


<br>
But anyway, I was wondering if you guys are intersted in this kind of functionality? Would you like me to send you the code?<br>
<br>
All best,<br>
   Rostislav.<br>
<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/<u></u>mailman/listinfo/vtk-<u></u>developers</a><br>
<br>
</blockquote></div><br></div>