[vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges
Cory Quammen
cory.quammen at kitware.com
Mon May 16 15:38:04 EDT 2016
Normanius,
On Mon, May 16, 2016 at 5:14 PM, Andras Lasso <lasso at queensu.ca> wrote:
>> but it cannot be that one has to do that extra cleanup step after every such basic operation, right?!
>
> Performing Boolean operation on meshes may sound easy but is an extremely difficult problem. It would be nice if VTK had a solution that worked reliably, so it's great that you submit reports on specific problems you find.
Hear hear.
> However, I'm not sure if there is anybody who could work on fixing these issues in the near future. So, if you cannot fix them yourself then most likely your best bet is to work around the problem by converting all meshes to images, combining them, and regenerating a mesh.
There is some new work that should improve the boolean operations filter:
https://gitlab.kitware.com/vtk/vtk/merge_requests/1336
https://gitlab.kitware.com/vtk/vtk/merge_requests/1272
This should hopefully be merged in the near term.
Best regards,
Cory
>
> Andras
>
> -----Original Message-----
> From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius
> Sent: May 15, 2016 4:54 AM
> To: vtkusers at vtk.org
> Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges
>
> Hi all
>
> This is an issue that has been raised already. But I wanted to ask whether there is a workaround or whether it actually is a bug that has been properly reported.
>
> Find attached sample code which reproduces the problem: If I union two overlapping, watertight objects A and B, the resulting object C very likely won't be watertight (it shows border edges and non-manifold edges).
>
> The sample code in essence does this:
> - create cylinder A as a vtk.vtkCylinderSource
> - create sphere B as a vtk.vtkSphereSource
> - extract triangles from A and B
> - create union C with vtk.vtkBooleanOperationPolyDataFilter() with
> SetOperationToUnion()
>
> The problem occurs also, if I use other objects than cylinders or spheres.
> The problem occurs also, if I "clean/condition" the surfaces of A and B before calculating the union. (I tried vtkCleanPolyData(),
> vtkFillHolesFilter() and addition of small noise on the vertices, which sometimes helps to regularise operations on objects)
>
> In the following two screenshots. The first one indicates the two objects to union. The second one shows the result, with the non-manifold and border edges.
>
> <http://vtk.1045678.n5.nabble.com/file/n5738088/input.png>
> <http://vtk.1045678.n5.nabble.com/file/n5738088/result.png>
>
> Because I often make use of vtkBooleanOperationPolyDataFilter, the problem is really annoying for me. That's why I thought to seek help in the community. Any ideas of how to handle this?
> Cleaning the surface (set flag cleanOutputSurface=True in my code) does improve the situation in some cases - but it cannot be that one has to do that extra cleanup step after every such basic operation, right?!
>
> By the way: this problem has been reported already: see here <http://vtk.1045678.n5.nabble.com/Non-manifold-triangles-after-running-vtkBooleanOperationPolydataFilter-td5713964.html>
> and here
> <http://vtk.1045678.n5.nabble.com/Broken-surfaces-for-vtkBooleanOperationPolyDataFilter-Bug-td5735413.html>
> reproduced_problem.py
> <http://vtk.1045678.n5.nabble.com/file/n5738088/reproduced_problem.py> .
>
> Thanks for any inputs from your side.
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
--
Cory Quammen
R&D Engineer
Kitware, Inc.
More information about the vtkusers
mailing list