<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span>This thread may help : </span><a href="http://vtk.1045678.n5.nabble.com/Holes-in-mesh-after-vtkBooleanOperationPolyDataFilter-td5713284.html" style="font-size: 10pt; ">http://vtk.1045678.n5.nabble.com/Holes-in-mesh-after-vtkBooleanOperationPolyDataFilter-td5713284.html</a></div><div><br></div> <div style="font-size: 10pt; font-family: 'Courier New', courier, monaco, monospace, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">De :</span></b> Miguel Sotaquira <msotaquira@gmail.com><br> <b><span style="font-weight: bold;">À :</span></b> vtkusers@vtk.org <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Jeudi 24 mai 2012
5h25<br> <b><span style="font-weight: bold;">Objet :</span></b> [vtkusers] vtkBooleanOperationPolyDataFilter: SetOperationToDifference gives me strange results<br> </font> </div> <br><div id="yiv418981627">Hi everyone,<div><br></div><div>I'm trying to compute an XOR boolean operation between two NON manifold surfaces (see figure <a rel="nofollow" target="_blank" href="http://shareimage.org/images/3s5diyk1oypdib5fvx80.png">http://shareimage.org/images/3s5diyk1oypdib5fvx80.png</a>). 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.</div>
<div><br></div><div>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:</div><div><br></div><div><div>vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolean = vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();</div>
<div>boolean->SetOperationToDifference();</div><div>boolean->SetInput(0,meshA);</div><div>boolean->SetInput(1,meshB);</div><div>boolean->Update();</div></div><div><br></div><div>vtkPolyData* meshC = boolean->GetOutput();</div>
<div><br></div><div>However, when using this approach I obtain a surface like this (the blue one): <a rel="nofollow" target="_blank" href="http://shareimage.org/images/gva77uyrmog4n2j1ndo.png">http://shareimage.org/images/gva77uyrmog4n2j1ndo.png</a>; that clearly is not the expected XOR operation.</div>
<div><br></div><div>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?</div>
<div><br></div><div>Thanks,</div><div>Miguel</div><div><br></div>
</div><br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br><br><br> </div> </div> </div></body></html>