<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 :</span></b> Cory Quammen <cquammen@cs.unc.edu><br> <b><span style="font-weight: bold;">À :</span></b> Malsoaz James <jmalsoaz@yahoo.fr> <br><b><span style="font-weight: bold;">Cc :</span></b> Bryn Lloyd <lloyd@itis.ethz.ch>; "vtkusers@vtk.org" <vtkusers@vtk.org> <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi 22 mai 2012 15h18<br> <b><span style="font-weight: bold;">Objet :</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 <<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>> wrote:<br>> Thank you,<br>><br>> I'm gonna try this solution.<br>><br>> Is this problem due to the implementation of the algorithm to compute the<br>> boolean operation ?<br>><br>> I'm a bit confused, because the holes doesn't appear in a place where there<br>> are intersections or unions.<br>><br>> 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>> test another implentation of the CSG and it works even with parallel<br>> surfaces.<br>> You can try the following in the text box at the end of the page (note that<br>> the page requires WebGL) :<br>><br>> var a =
CSG.cylinder({radius:0.2, center:[0, 0, 0]});<br>> var b = CSG.cube({radius:[1, 0.5, 0.2], center:[0, 0, 0]});<br>> var c = CSG.cylinder({radius:0.2, start: [-1, -1, 0], end: [-1, 1, 0]});<br>> return a.union(b).union(c);<br>><br>> Best.<br>><br>> ________________________________<br>> De : Bryn Lloyd <<a ymailto="mailto:lloyd@itis.ethz.ch" href="mailto:lloyd@itis.ethz.ch">lloyd@itis.ethz.ch</a>><br>> À : <a ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>> Envoyé le : Mardi 22 mai 2012 14h05<br>> Objet : Re: [vtkusers] Holes in mesh after vtkBooleanOperationPolyDataFilter<br>><br>> The boolean operations are not robust for parallel surfaces.<br>><br>> One way to try to resolve the problem is to move the objects by some small<br>> delta before applying the boolean operation.<br>><br>><br>> On 5/22/2012 11:15 AM, Malsoaz James
wrote:<br>><br>> Hi VTK users,<br>><br>> I'm using the vtkBooleanOperationPolyDataFilter to apply boolean operations<br>> to polydata. Unfortunately, I got unexpected results (holes in the mesh).<br>><br>> You can see here <a href="http://www.hostingpics.net/viewer.php?id=210273error.png an" target="_blank">http://www.hostingpics.net/viewer.php?id=210273error.png an</a><br>> example.<br>> I'm creating a cylinder, then I'm adding a cube and finally I'm adding<br>> another cylinder. The holes appear with the last operation.<br>><br>><br>> Can someone explain me the reason(s) of these results ?<br>><br>> Here are my source code :<br>> vtkCylinderSource * cylinder1 = vtkCylinderSource::New();<br>> cylinder1->SetCenter(0, 10, 0);<br>> cylinder1->SetHeight(50);<br>> cylinder1->SetRadius(5);<br>> cylinder1->SetResolution(100);<br>> cylinder1->Update();<br>><br>>
vtkTriangleFilter * cylinder1Triangle = vtkTriangleFilter::New();<br>> cylinder1Triangle->SetInput(cylinder1->GetOutput());<br>> cylinder1Triangle->Update();<br>><br>> cylinder1->Delete();<br>><br>> vtkCubeSource * cube = vtkCubeSource::New();<br>> cube->SetCenter(0, 10, 0);<br>> cube->SetXLength(50);<br>> cube->SetYLength(20);<br>> cube->SetZLength(10);<br>> cube->Update();<br>><br>> vtkTriangleFilter *cubeTriangle = vtkTriangleFilter::New();<br>> cubeTriangle->SetInput(cube->GetOutput());<br>> cubeTriangle->Update();<br>><br>> cube->Delete();<br>><br>> vtkCylinderSource * cylinder2 = vtkCylinderSource::New();<br>> cylinder2->SetCenter(-25, 15, 0);<br>> cylinder2->SetHeight(30);<br>> cylinder2->SetRadius(3);<br>> cylinder2->SetResolution(100);<br>> cylinder2->Update();<br>><br>> vtkTriangleFilter * cylinder2Triangle =
vtkTriangleFilter::New();<br>> cylinder2Triangle->SetInput(cylinder2->GetOutput());<br>> cylinder2Triangle->Update();<br>><br>> cylinder2->Delete();<br>><br>> vtkBooleanOperationPolyDataFilter * add1 =<br>> vtkBooleanOperationPolyDataFilter::New();<br>> add1->SetOperationToUnion();<br>> add1->SetInput(0, cylinder1Triangle->GetOutput());<br>> add1->SetInput(1, cubeTriangle->GetOutput());<br>> add1->Update();<br>><br>> cubeTriangle->Delete();<br>> cylinder1Triangle->Delete();<br>><br>> vtkBooleanOperationPolyDataFilter * add =<br>> vtkBooleanOperationPolyDataFilter::New();<br>> add->SetOperationToUnion();<br>> add->SetInput(0, add1->GetOutput());<br>> add->SetInput(1, cylinder2Triangle->GetOutput());<br>> add->Update();<br>><br>> add1->Delete();<br>> cylinder2Triangle->Delete();<br>><br>> Am I doing something wrong in
the use of vtkBooleanOperationPolyDataFilter ?<br>><br>> Thank you.<br>> Best<br>><br>><br>> _______________________________________________<br>> Powered by www.kitware.com<br>><br>> Visit other Kitware open-source projects at<br>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br>> _______________________________________________<br>> Powered by www.kitware.com<br>><br>> Visit other Kitware open-source projects at<br>> <a
href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br>><br>> _______________________________________________<br>> Powered by www.kitware.com<br>><br>> Visit other Kitware open-source projects at<br>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>><br>> Please keep messages on-topic and check the VTK FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><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>