[vtkusers] vtkModifiedBSPTree slicing

Biddiscombe, John A. biddisco at cscs.ch
Thu Mar 22 03:46:12 EDT 2012


erratum. I should have written "to add an intersect with plane" - not line.

seeing the question again, you ask about vtkCutter, so in theory you might want any ImplicitFunction. The same argument applies, but the implementation become slightly more involved as you would have to test each box against the function and not against a simple plane.

JB

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Biddiscombe, John A.
Sent: 21 March 2012 17:12
To: edd cmaugo; vtkusers at vtk.org
Subject: Re: [vtkusers] vtkModifiedBSPTree slicing

>Is it possible to slice a vtkModifiedBSPTree with a vtkCutter ?
Not without code changes. Why would you do this? You can slice a vtkDataSet with a cutter and that will give you much the same result.

Do you have data already in the BSP tree? and you want to cut it faster?

If the answer is yes to both, then look at the BSP tree intersect with line code. I think in my local repo I may have an intersect with Box function too. To add an intersect with line, you need only walk the tree using the stack in the same way as the existing code, test each bounding box against the slice plane and reject any on the wrong side. open those that overlap and then keep going until you get to cells. Then you can call vtkCell intersect/slice or whatever.
It would be quite simple to implement if you examine the existing code.

JB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120322/964ead54/attachment.htm>


More information about the vtkusers mailing list