[vtkusers] Weird Bounds after vtkCutter

Romain LEGUAY romain.leguay at gmail.com
Tue Nov 3 04:09:32 EST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151103/4d9d542a/attachment.html>


More information about the vtkusers mailing list