[vtkusers] Extracting particles and plane

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Jun 20 00:25:21 EDT 2001


>>>>> "SB" == Shiva Bissoon <sbissoo2 at hotmail.com> writes:

    SB> Step 1: I created a box Step2: I created some particles in the
    SB> box Step3: I created a plane using the box as the input Step4:
    SB> How do I find the intersection of the particles with the plane
    SB> and display them????

I dont understand what you mean by create a plane using the box as an
input.

    SB> I think I have to use the particles as the input for the
    SB> clippolydata but how do I still use the cube to define the
    SB> boundary for the plane?  If I have to use the particles...what
    SB> do I put as my input SetInput [ sphereActor$i] and put this
    SB> inside another loop????

Looking at your code it seems that you are trying to clip the box and
not the particles.

    	vtkClipPolyData clipper3
    	clipper3 SetInput [cubex GetOutput]
			  ^^^^^^^^^^^^^^^^^
    	clipper3 SetClipFunction plane3

Now since you do this all you will see is the box being cut and not
the particles.  You need to set the input to cut what polydata you
want to cut.  As I understand you want to cut the particles.  You can
use the AppendPolyData filter on the output of all your
vtkSphereSource and then use the output of this as the Input of
clipper3.  I guess that should work.

prabhu




More information about the vtkusers mailing list