While trying to recreate my answer here with geonodes: Array + Curve + Subdiv anomaly
I came up with this geo nodes setup:
The strategy is to set a "flag" A, represented by the top frame, if it's the back face and the first instance, or flag B (middle frame) if it's a vertical (back or front) face and it's a middle instance, or flag C (bottom frame) if it's the front face and the last instance. Then, if either flag is set, remove the currently evaluated face.
It doesn't work, however, because instead of the instance index, I use the face index. To my understanding, the Index node gives the index of the currently evaluated element, which is a face, because those nodes are evaluated by Delete Geometry node, which is set to iterate over faces. I'm not even sure if Instance on Points is iterating - i.e. if each instance can be different (other than using a collection and passing indices...). So does it mean I have to move the logic after Realize Instances node, somehow capture the point index (or use modulo...) and then delete faces? Perhaps makes sense, but the question remains: can the index further down the chain be accessed?
I tried to capture attribute between Mesh Line and Instance on Points, and pass that back to the frames, but it didn't seem to work - I have no experience in geonodes though, maybe I was debugging incorrectly.