[vtkusers] Clipping objects? I need help

Carlos Martinez Burgos cmarbur at iti.upv.es
Mon Mar 26 04:52:17 EST 2001


Hi all.

I have to apply some cutting planes to a group of objects and I don't know
how to do it exactly. I have not much experience in VTK. I have tried two
aproaches:

The first is to apply each plane to the object using it as the function
to vtkClipPolyData and vtkCutter in a loop, using the output of each 
iteration as input of the next. Something like this:

vtkPolyData(Object) --> vtkClipPolyData -> vtkAppendPolyData -> (output 1)
                    \-> vtkCutter -> ... --^
                             ^
                             |
                          vtkPlane (1)

  (output 1)        --> vtkClipPolyData -> vtkAppendPolyData -> (output 2)
                    \-> vtkCutter -> ... --^
                             ^
                             |
                          vtkPlane (2)

  (output n)        --> vtkClipPolyData -> vtkAppendPolyData -> vtkPolyDataMapper -> vtkActor
                    \-> vtkCutter -> ... --^
                             ^
                             |
                          vtkPlane (2)


The second is to use a vtkImplicitBoolean to apply all the planes at one
time, using less vtkClipPolyData, vtkCutter, vtkStripper, ... objects. I
think this aproach is better but I get bad results sometimes.

I have a problem whith the number of objects because I can have much
entities to which I have to apply the cutting planes so at one time I can
have more than 100 objects (much more in the first aproach). This is not a
good idea because my program runs slowly.

I don't know how exactly do the cut. Is there another aproach better
than these. Could you help me? I need a quick response.

Thanks a lot.

PS: Sorry for my english I think I'll learn it someday.
-- 
----------------------------------------------------------------------
Carlos Martínez Burgos      |     Instituto Tecnológico de Informática
Ingeniero Informático       |      Universidad Politécnica de Valencia
Tlf: +34 963877237          |                        Camí de Vera, S/N
cmarbur at iti.upv.es          |                   46071 Valencia - Spain
www.iti.upv.es/~cmarbur     |                           www.iti.upv.es
----------------------------------------------------------------------





More information about the vtkusers mailing list