[vtkusers] Clipping

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Wed Mar 26 20:05:36 EST 2003


Hi Ramu and Shyam,
   you both want to clip using a plane, but have the clipping bounded to
the extent of the plane. I have a vtk class (C++ ) that should do what you
want. Let me know if you are interested and I will send you the code.

BUT, you might be able to get the desired effect using existing vtk filters
as follows. Create a set of planes (vtkPlane) in the form of a six sided
box, with normals facing outward. The 'box' would be very thin, imagine it
is the surface of a knife blade. Add these planes one at a time to
vtkImplicitBoolean with AddFunction. I think you need
SetOperationTypeToIntersection. Now pass this implicit function to
vtkClipPolyData. The 'thin' box will cut a narrow slice out, afterwards you
could use vtkConnectivityFilter to discard the disconected piece. Or you
could arrange the box so that it contains the unwanted part, and nothing
else (which may be impossible). A set of boxes of the corerct size and
location might be required.

  there should be enough clues there... good luck
     Dave Pont



|--------+-------------------------------------->
|        |          "R K Shyamprakash"          |
|        |          <ramakrishna.prakash at quest-g|
|        |          lobal.com>                  |
|        |          Sent by:                    |
|        |          vtkusers-admin at public.kitwar|
|        |          e.com                       |
|        |                                      |
|        |                                      |
|        |          25/03/2003 17:11            |
|        |                                      |
|--------+-------------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:     "Vtkusers (E-mail)" <vtkusers at public.kitware.com>                                             |
  |      cc:                                                                                                   |
  |      Subject:     [vtkusers] Clipping                                                                      |
  >------------------------------------------------------------------------------------------------------------|




Hello All,
              I am using vtkPlane to slie my 3d object. But I found that it
cuts through the whole object in that plane. I want to set the limit
(boundary for the plane) so that it will slice only that area. Any body
have
an idea how to do this?

Thanks
Shyam

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers







More information about the vtkusers mailing list