zippy84 / vtkbool

A new boolean operations filter for VTK
Apache License 2.0
166 stars 40 forks source link

Union still does not work for disjoint meshes #30

Closed bluelightning32 closed 4 years ago

bluelightning32 commented 4 years ago

I filed #26, which got duped to #19. #19 was marked as fixed, but the union of disjoint objects still isn't working for me. I still get this error:

ERROR: In /home/kyle/nrf/vtk_print_examples/vtkbool/vtkPolyDataBooleanFilter.cxx, line 186
vtkPolyDataBooleanFilter (0x18fa280): Inputs have no contact.
zippy84 commented 4 years ago

If there is no contact, vtkbool won't produce any result. This is the desired behavior because the filter is not an appender. If you want append mesh A to B, use vtkAppendPolyData. You can detect it with an ErrorObserver (see https://github.com/zippy84/vtkbool/blob/ccfdf2b70052417a9f5464d3dc90687724dc488a/testing/testing.cxx#L352 and https://github.com/zippy84/vtkbool/blob/ccfdf2b70052417a9f5464d3dc90687724dc488a/testing/testing.cxx#L1176) or by testing bf->GetOutput(1)->GetNumberOfCells() against zero.