[vtkusers] PolyData Boolean operation problem

Malsoaz James jmalsoaz at yahoo.fr
Mon Jul 30 11:46:49 EDT 2012


Hi Kenichiro,

As I said, I'm working on the vtkBooleanPolyDataOperationsFilter these days.

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.

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. 
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.
My changes are from line 293 to 307.

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.

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.

I hope this will help you.
Best,
James.



________________________________
 De : kenichiro yoshimi <rccm.kyoshimi at gmail.com>
À : Malsoaz James <jmalsoaz at yahoo.fr> 
Envoyé le : Vendredi 27 juillet 2012 1h26
Objet : Re: [vtkusers] PolyData Boolean operation problem
 
HI James,

Thank your very much for your kindly reply. I do appreciate it.

Best Regards
yoshimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120730/26c6e79c/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkImplicitPolyDataDistance.h
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120730/26c6e79c/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkImplicitPolyDataDistance.cpp
Type: application/octet-stream
Size: 9302 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120730/26c6e79c/attachment.obj>


More information about the vtkusers mailing list