[vtkusers] Weird Bounds after vtkCutter

Cory Quammen cory.quammen at kitware.com
Tue Nov 3 08:47:10 EST 2015


Romain,

I don't see anything wrong with the code you posted. Could you post a
complete example that can be compiled and tested and which shows your
problem?

I tried using your cutter code with a vtkSphereSource instead of an OBJ
reader and it seemed to work fine.

Thanks,
Cory

On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY <romain.leguay at gmail.com>
wrote:

> Hello everyone,
>
> I applied the filter vtkCutter to a mesh and I want to get the bounds of
> the result contours.
>
> The bounds of the mesh seem goods.
>
> When I display the vtkCutter output result, I see the expected result but
> I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = ymax =
> zmax = -1.0.
>
> I don't understand what I did wrong in my code:
>
> // Create a plane of the current Y-axis
> vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
> plane->SetOrigin(0,0,0);
> plane->SetNormal(0,1,0);
> // Cut the mesh -> contours creation
> vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
> cutter->SetCutFunction(plane);
> cutter->SetInputConnection(readerOBJ->GetOutputPort());
> cutter->Update();
>
> double boundsCutter[6];
> cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0,
> 1.0, -1.0]
>
>
> Do I need to do another update?
>
> Thank you,
>
> Romain
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151103/34133dc3/attachment.html>


More information about the vtkusers mailing list