Splitting cells on a PolyData

Thanks @Yohann_Bearzi and @Joachim_P!

I am interested in the general 3D case; the original figure I provided was not very clear.

More formally, the problem I need to solve is this - given a PolyData and a closed polyline which lies on that surface, build a new PolyData containing:

  • All of the cells which are fully “outside” the polyline
  • All of the cells which are fully “inside” the polyline
  • New cells corresponding to those which are intersected by the polyline.

I am trying to avoid doing as much of the hard work as possible :slight_smile:. I could be way off, but I feel like a lot of the machinery already exists in either vtkClipPolyData or vtkBooleanOperationPolyDataFilter.

I am also open to suggestions if if you are aware of other libraries which might be able to accomplish this.