[vtkusers] vtkBooleanOperationPolyDataFilter with SetOperationToDifference operating on identical vtkPolyData

Cory Quammen cory.quammen at kitware.com
Fri Apr 18 10:46:33 EDT 2014


It would be *possible* to do as a preprocessing step prior to the main
algorithm, but as it exists now, the filter should fail miserably, I
suspect.

Perhaps this filter by Ronald Römer would do the right thing in this case?

https://github.com/zippy84/vtkbool

Best,
Cory

On Thu, Apr 17, 2014 at 11:43 AM, Toby Rule <trule at ii-vi.com> wrote:
> Is there a way to set up a vtkBooleanOperationPolyDataFilter so that, when it is used to take a boolean difference between identical vtkPolyData, it will result in an empty vtkPolyData? For instance, if I start with
>
>     vtkPolyData * output
>
> and do ...
>
>     vtkSmartPointer<vtkBooleanOperationPolyDataFilter> diffFilter =
>       vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
>     diffFilter->SetOperationToDifference();
>     diffFilter->SetInputData(0,output1);
>     diffFilter->SetInputData(1,output1); // set input and output to same geometry
>
> ... the result of the diffFilter operation appears to be identical to output1. For my application, the result should be an empty set.
>
> According to this VTK Journal article http://www.vtkjournal.org/browse/publication/797 the algorithm assumes there are no coplanar triangles, so it may be that what I ask is impossible, and I need to look at a solid modeling library.
>
> Thanks,
>
> Toby
>
> The information contained in this transmission is intended only for the person or entity
> to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
> material. If you are not the intended recipient, please contact the sender immediately
> and destroy the material in its entirety, whether electronic or hard copy. You are
> notified that any review, retransmission, copying, disclosure, dissemination or other
> use of, or taking of any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


More information about the vtkusers mailing list