[vtkusers] clipPolyData with cube

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Wed Sep 11 17:17:32 EDT 2002


Hi Erik,
   take a look at vtkPlanes, which you can pass to
vtkClipPolyData->SetImplicitFunction. You could also use six instances of
vtkPlane, pass these to vtkImplicitBoolean->AddFunction and call
SetOperationTypeToUnion (maybe default?).
If your data are polygons you may find that the boundaries of your clipped
cube are a bit ragged, this is due to the linear interpolation used in
vtkClipPolyData. You can use vtkLinearSubdivisionFilter with
SetNumberOfSubdivisions to 2 or 3, careful with higher values, it gets
exponentially slow. This is a hack, but often useful.

  Happy clipping
    Dave Pont



|--------+--------------------------------->
|        |          Erik Sobel             |
|        |          <erik.sobel at alphatech.c|
|        |          om>                    |
|        |          Sent by:               |
|        |          vtkusers-admin at public.k|
|        |          itware.com             |
|        |                                 |
|        |                                 |
|        |          12/09/2002 07:44       |
|        |                                 |
|--------+--------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:     vtkusers at public.kitware.com                                                                   |
  |      cc:                                                                                                   |
  |      Subject:     [vtkusers] clipPolyData with cube                                                        |
  >------------------------------------------------------------------------------------------------------------|




Can someone suggest a simple example of how to cut out a cube of a polydata

set.  I want to start with a vtkCubeSource and convert it to an implicit
function so that I can use it as the input to vtkClipPolydata.  If that is
the logical sequence.

Thanks,
Erik

_______________________________________________
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