[vtkusers] vtkBooleanOperationPolyDataFilter: SetOperationToDifference gives me strange results
Miguel Sotaquira
msotaquira at gmail.com
Wed May 23 23:25:23 EDT 2012
Hi everyone,
I'm trying to compute an XOR boolean operation between two NON manifold
surfaces (see figure http://shareimage.org/images/3s5diyk1oypdib5fvx80.png).
The surface A is the white one (top panel of previous figure) and the
surface B is the red one (bottom panel). B is simply a region extracted
from A using vtkExtractPolyDataGeometry.
Now I want to compute a boolean XOR between A and B in order to get C: the
green colored surface. I'm using vtkBooleanOperationPolyDataFilter:
vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolean
= vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
boolean->SetOperationToDifference();
boolean->SetInput(0,meshA);
boolean->SetInput(1,meshB);
boolean->Update();
vtkPolyData* meshC = boolean->GetOutput();
However, when using this approach I obtain a surface like this (the blue
one): http://shareimage.org/images/gva77uyrmog4n2j1ndo.png; that clearly
is not the expected XOR operation.
I know I'm not using manifold surfaces (as explicitly required
by vtkBooleanOperationPolyDataFilter) so I don't know if that's why I'm
getting these results. If so, is there another way of computing this XOR
operation?
Thanks,
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120524/6a8b823d/attachment.htm>
More information about the vtkusers
mailing list