[vtkusers] vtkClipPolyData with vtkBox doesn't work

Bill Lorensen bill.lorensen at gmail.com
Thu Jan 14 13:08:37 EST 2010


You could use vtkPlanes, although it seems that vtkBox should work.

Bill

On Thu, Jan 14, 2010 at 12:29 PM, Adeline Joliet
<adeline_joli at hotmail.com> wrote:
> Hello,
>
> I'm trying to cut un polydata using vtkClipPolyData with a vtkBox as
> implicit function.
>
> my Polydata is simply a rectangle (x = 100, y = 50, z= 20). I'd like to cut
> this rectangle to obtain
> only the part of the middle.. (so i'd like to cut to a right side AND a left
> side...)
>
> here is the code
>
>  vtkBox * cuting = vtkBox::New();
>   double boundy[6];
>
>   //m_image is a vtkImageData that represent a cube (my rectangle polydata
> interect this cube, so the bounds should be correct...)
>   m_image->GetBounds(boundy);
>
>   cuting->SetBounds(boundy);
>
> vtkClipPolyData * clipper = vtkClipPolyData::New();
> clipper->SetInput(newPolyData);
> clipper->SetClipFunction(cuting);
>
> // and then I display clipper->GetOutput...
>
> the thing is that i tried with vtkPlane and it works... but the problem is
> that i need if a use
> vtkPlane I can cut only One side....
>
>
> any help would be appreciated,
> Than's
>
> Adeline
>
> ________________________________
> Windows 7 : Trouvez le PC qui vous convient! Découvrez notre offre !
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list