I am not sure I totally understand, in my case I dont have 2 triangles in 1 frame and 1 triangle and a 1 quad in another frame, but 2 triangles in one frame and 3 triangles in next frame.
In that situation, I have something like (I enclose in parenthesis values that belon to the same frame)
Offsets = [(0, 3, 6), (0, 3, 6, 9)]
ConnectivityIds = [(0, 1, 2, 2, 4, 1), (0, 1, 2, 2, 4, 1, 4, 5, 6)]
Types = [(3, 3), (3, 3, 3)]
NumberOfCells = [2, 3]
Steps/CellOffsets = [0, 3]
Steps/ConnectivityIdsOffsets = [0, 6]
If this is correct, then there might be a bug in the reader, as I have a file which I think follows that format that fails to read correctly (https://discourse.paraview.org/t/vtkhdf-unstructured-grid-with-transient-topology-fails-to-read/13852/2)