Unable to add to .vtp models to my renderer

A couple of ideas to help you debug this.

  1. Ensure that you can render each vtp file separately. The GeometryViewer is a great tool to do a sanity check on this.
  2. Double check that each vtp file is getting its own vtkPolyDataReader → vtkMapper/vtkActor pipeline.
  3. When you add both actors to the scene, call renderer.resetCamera(); renderWindow.render() to make sure that the positions of your geometries are correct. You can also call actor.getBounds() to verify that the bounds of each actor are as expected (i.e. has sufficient intersection).
1 Like