<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 3, 2015 at 9:11 AM, Romain LEGUAY <span dir="ltr"><<a href="mailto:romain.leguay@gmail.com" target="_blank">romain.leguay@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Cory for your answer.<div><br></div><div>I attach my code with the CMake file. Maybe my first cut on my mesh does nothing because on other cut, the bound values seems quite good.</div></div></blockquote><div><br></div><div>Yeah. The first plane cuts on the very edge of the object, yielding 0 cells and 0 points. I tested this with your code on the armadillo.obj file that you can find with some Googling. Since there are no points, the bounds are left in their default invalid state.</div><div><br></div><div>HTH,</div><div>Cory</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>In this code, I first use vtkCutter then vtkContourTriangular but I have the same result (the first cut give me some weird bounds).</div><div><br></div><div>Thanks again!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Romain</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-11-03 14:47 GMT+01:00 Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Romain,<div><br></div><div>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?</div><div><br></div><div>I tried using your cutter code with a vtkSphereSource instead of an OBJ reader and it seemed to work fine.</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY <span dir="ltr"><<a href="mailto:romain.leguay@gmail.com" target="_blank">romain.leguay@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello everyone,<div><br></div><div>I applied the filter vtkCutter to a mesh and I want to get the bounds of the result contours.</div><div><br></div><div>The bounds of the mesh seem goods.</div><div><br></div><div>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.</div><div><br></div><div>I don't understand what I did wrong in my code:</div><div><br></div><div><div><span style="white-space:pre-wrap">// Create a plane of the current Y-axis</span></div><div>vtkSmartPointer<vtkPlane> plane =<span style="white-space:pre-wrap"> </span>vtkSmartPointer<vtkPlane>::New();</div><div>plane->SetOrigin(0,0,0);</div><div>plane->SetNormal(0,1,0);</div><div><span style="white-space:pre-wrap"> </span></div><div>// Cut the mesh -> contours creation</div><div>vtkSmartPointer<vtkCutter> cutter =<span style="white-space:pre-wrap"> </span>vtkSmartPointer<vtkCutter>::New();</div><div>cutter->SetCutFunction(plane);</div><div>cutter->SetInputConnection(readerOBJ->GetOutputPort());<br></div><div>cutter->Update();</div></div><div><br></div><div><div>double boundsCutter[6];</div><div>cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, 1.0, -1.0]</div></div><div><br></div><div><br></div><div>Do I need to do another update?</div><div><br></div><div>Thank you,</div><div><br></div><div>Romain</div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div></div>