visualizaing solids and lines

How can I see a line passing through a solid?
For example, a line passing in the middle of a cube face.

OBS.: Sorry, I don´t know English very well.

Do you mean you want to see the intersection point or that you want to see a line as it is obscured by a solid?

The latter is just a matter of making the solid transparent.

To see the intersection point you would either have to compute it manually, or go for some sort of hack. One that comes to mind and might work would be to first draw the solid, then draw the line twice, first thick and dark and with the depth function GL_EQUAL, then again normally with the depth function GL_LESS. You might have to add an offset to get it to work. Just a thought.