<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">Hi Kenichiro,</font></div><div><font size="2"><br></font></div><div><font size="2">As I said, I'm working on the vtkBooleanPolyDataOperationsFilter these days.</font></div><div><font size="2"><br></font></div><div><font size="2">You will find enclosed to this email a new version of the class vtkImplicitPolyDataDistance. This will correct the bug related to inside/outside points. I have just tested your example and it works with this class.</font></div><div><font size="2"><br></font></div><div><font size="2">To solve the problem, I'm using another algorithm to find whether a point is inside or outside a mesh based on a vtkOBBTree and the method "InsideOrOutside". Unfortunately, this solution makes the computation longer. You should not see the difference with small meshes such as the ones you
 are working with.&nbsp;</font></div><div><font size="2">Another trick to solve part of the problem with no additional time cost was to use the input mesh's bounds (cube limits). If a point is not in the bounds, we can directly say that it is outside the mesh.</font></div><div><font size="2">My changes are from line 293 to 307.</font></div><div><font size="2"><br></font></div><div><font size="2">Last point about the input mesh, it should be clean and the normals should be correctly computed before using the vtkBooleanPolyDataOperationsFilter. I'm using vtkCleanPolyData, vtkPolyDataNormals and vtkMergePoints for this.</font></div><div><font size="2"><br></font></div><div><font size="2">For me, these solutions do the trick but I think developers will have to come back to this algorithm to find a quicker solution. As I said, with big meshes, the computation time increases significantly.</font></div><div><font size="2"><br></font></div><div><font size="2">I
 hope this will help you.</font></div><div><font size="2">Best,</font></div><div><font size="2">James.</font></div></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><br></div>  <div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> kenichiro yoshimi &lt;rccm.kyoshimi@gmail.com&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;">Envoyé le :</span></b> Vendredi 27 juillet 2012 1h26<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re:
 [vtkusers] PolyData Boolean operation problem<br> </font> </div> <br>HI James,<br><br>Thank your very much for your kindly reply. I do appreciate it.<br><br>Best Regards<br>yoshimi<br><br><br> </div> </div>  </div></body></html>