<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><div><font size="2">Ok I see. Thank you.</font></div><div><font size="2"><br></font></div><div><font size="2">Meanwhile, I will try to look at another implementation of boolean operations (something with CSG maybe). I found something on the VTK Journal : http://www.midasjournal.org/browse/publication/726 about the use of GTS for such computations.</font></div><div><font size="2"><br></font></div><div><font size="2">Did you try it ?</font></div><div><font size="2"><br></font></div><div><font size="2">Best</font></div></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><br></div>  <div style="font-size: 10pt; font-family: 'Courier New',
 courier, monaco, monospace, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> Cory Quammen &lt;cquammen@cs.unc.edu&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> Malsoaz James &lt;jmalsoaz@yahoo.fr&gt; <br><b><span style="font-weight: bold;">Cc&nbsp;:</span></b> Bryn Lloyd &lt;lloyd@itis.ethz.ch&gt;; "vtkusers@vtk.org" &lt;vtkusers@vtk.org&gt; <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi 22 mai 2012 15h18<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [vtkusers] Re : Holes in mesh after vtkBooleanOperationPolyDataFilter<br> </font> </div> <br>There's a known problem when vertices on one of the input surfaces are<br>within epsilon of a surface-to-surface intersection. It's on my to do<br>list to make this more
 robust.<br><br>Thank you for providing another example for me to test.<br><br>Thanks,<br>Cory<br><br>On Tue, May 22, 2012 at 9:02 AM, Malsoaz James &lt;<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>&gt; wrote:<br>&gt; Thank you,<br>&gt;<br>&gt; I'm gonna try this solution.<br>&gt;<br>&gt; Is this problem due to the implementation of the algorithm to compute the<br>&gt; boolean operation ?<br>&gt;<br>&gt; I'm a bit confused, because the holes doesn't appear in a place where there<br>&gt; are intersections or unions.<br>&gt;<br>&gt; I have been trying to use this website : <a href="http://evanw.github.com/csg.js/" target="_blank">http://evanw.github.com/csg.js/</a> to<br>&gt; test another implentation of the CSG and it works even with parallel<br>&gt; surfaces.<br>&gt; You can try the following in the text box at the end of the page (note that<br>&gt; the page requires WebGL) :<br>&gt;<br>&gt; var a =
 CSG.cylinder({radius:0.2, center:[0, 0, 0]});<br>&gt; var b = CSG.cube({radius:[1, 0.5, 0.2], center:[0, 0, 0]});<br>&gt; var c = CSG.cylinder({radius:0.2, start: [-1, -1, 0], end: [-1, 1, 0]});<br>&gt; return a.union(b).union(c);<br>&gt;<br>&gt; Best.<br>&gt;<br>&gt; ________________________________<br>&gt; De&nbsp;: Bryn Lloyd &lt;<a ymailto="mailto:lloyd@itis.ethz.ch" href="mailto:lloyd@itis.ethz.ch">lloyd@itis.ethz.ch</a>&gt;<br>&gt; À&nbsp;: <a ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>&gt; Envoyé le : Mardi 22 mai 2012 14h05<br>&gt; Objet&nbsp;: Re: [vtkusers] Holes in mesh after vtkBooleanOperationPolyDataFilter<br>&gt;<br>&gt; The boolean operations are not robust for parallel surfaces.<br>&gt;<br>&gt; One way to try to resolve the problem is to move the objects by some small<br>&gt; delta before applying the boolean operation.<br>&gt;<br>&gt;<br>&gt; On 5/22/2012 11:15 AM, Malsoaz James
 wrote:<br>&gt;<br>&gt; Hi VTK users,<br>&gt;<br>&gt; I'm using the vtkBooleanOperationPolyDataFilter to apply boolean operations<br>&gt; to polydata. Unfortunately, I got unexpected results (holes in the mesh).<br>&gt;<br>&gt; You can see here&nbsp;<a href="http://www.hostingpics.net/viewer.php?id=210273error.png an" target="_blank">http://www.hostingpics.net/viewer.php?id=210273error.png&nbsp;an</a><br>&gt; example.<br>&gt; I'm creating a cylinder, then I'm adding a cube and finally I'm adding<br>&gt; another cylinder. The holes appear with the last operation.<br>&gt;<br>&gt;<br>&gt; Can someone explain me the reason(s) of these results ?<br>&gt;<br>&gt; Here are my source code :<br>&gt; vtkCylinderSource * cylinder1 = vtkCylinderSource::New();<br>&gt; cylinder1-&gt;SetCenter(0, 10, 0);<br>&gt; cylinder1-&gt;SetHeight(50);<br>&gt; cylinder1-&gt;SetRadius(5);<br>&gt; cylinder1-&gt;SetResolution(100);<br>&gt; cylinder1-&gt;Update();<br>&gt;<br>&gt;
 vtkTriangleFilter * cylinder1Triangle = vtkTriangleFilter::New();<br>&gt; cylinder1Triangle-&gt;SetInput(cylinder1-&gt;GetOutput());<br>&gt; cylinder1Triangle-&gt;Update();<br>&gt;<br>&gt; cylinder1-&gt;Delete();<br>&gt;<br>&gt; vtkCubeSource * cube = vtkCubeSource::New();<br>&gt; cube-&gt;SetCenter(0, 10, 0);<br>&gt; cube-&gt;SetXLength(50);<br>&gt; cube-&gt;SetYLength(20);<br>&gt; cube-&gt;SetZLength(10);<br>&gt; cube-&gt;Update();<br>&gt;<br>&gt; vtkTriangleFilter *cubeTriangle = vtkTriangleFilter::New();<br>&gt; cubeTriangle-&gt;SetInput(cube-&gt;GetOutput());<br>&gt; cubeTriangle-&gt;Update();<br>&gt;<br>&gt; cube-&gt;Delete();<br>&gt;<br>&gt; vtkCylinderSource * cylinder2 = vtkCylinderSource::New();<br>&gt; cylinder2-&gt;SetCenter(-25, 15, 0);<br>&gt; cylinder2-&gt;SetHeight(30);<br>&gt; cylinder2-&gt;SetRadius(3);<br>&gt; cylinder2-&gt;SetResolution(100);<br>&gt; cylinder2-&gt;Update();<br>&gt;<br>&gt; vtkTriangleFilter * cylinder2Triangle =
 vtkTriangleFilter::New();<br>&gt; cylinder2Triangle-&gt;SetInput(cylinder2-&gt;GetOutput());<br>&gt; cylinder2Triangle-&gt;Update();<br>&gt;<br>&gt; cylinder2-&gt;Delete();<br>&gt;<br>&gt; vtkBooleanOperationPolyDataFilter * add1 =<br>&gt; vtkBooleanOperationPolyDataFilter::New();<br>&gt; add1-&gt;SetOperationToUnion();<br>&gt; add1-&gt;SetInput(0, cylinder1Triangle-&gt;GetOutput());<br>&gt; add1-&gt;SetInput(1, cubeTriangle-&gt;GetOutput());<br>&gt; add1-&gt;Update();<br>&gt;<br>&gt; cubeTriangle-&gt;Delete();<br>&gt; cylinder1Triangle-&gt;Delete();<br>&gt;<br>&gt; vtkBooleanOperationPolyDataFilter * add =<br>&gt; vtkBooleanOperationPolyDataFilter::New();<br>&gt; add-&gt;SetOperationToUnion();<br>&gt; add-&gt;SetInput(0, add1-&gt;GetOutput());<br>&gt; add-&gt;SetInput(1, cylinder2Triangle-&gt;GetOutput());<br>&gt; add-&gt;Update();<br>&gt;<br>&gt; add1-&gt;Delete();<br>&gt; cylinder2Triangle-&gt;Delete();<br>&gt;<br>&gt; Am I doing something wrong in
 the use of vtkBooleanOperationPolyDataFilter ?<br>&gt;<br>&gt; Thank you.<br>&gt; Best<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a
 href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Powered by www.kitware.com<br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ"
 target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br><br><br><br>-- <br>Cory Quammen<br>Research Associate<br>Department of Computer Science<br>The University of North Carolina at Chapel Hill<br><br><br> </div> </div>  </div></body></html>