I initially thought I understood the OP’s request, but subsequent posts have left me uncertain. I believe we’ve now seen three distinct interpretations offered that are quite different both in their meaning and in the way one would handle them.
First is what I read initially: the user has marked various things as currently uninteresting either by setting their hidden flag or by assigning a non-visible layer to them. Now the user wants to go the next step by actually deleting them. This operation would be easy to code.
Second is a sort of “outer shell” idea in which things inside other solids would be suppressed, leaving only the enclosing skin. Unlike the first idea, this does not presume any prior action to designate what will be erased. This operation should be feasible to code but is more complex than the first and much more likely to have nasty corner cases because SketchUp allows distinct entities to overlap in space.
Third is visibility: suppress things that aren’t seen from the current camera because something is between them and the camera. This would require ray-testing all over the view, which is normally handled by the graphics but would have to be emulated by the CPU. It would likely be quite expensive computation when done using Ruby and would have issues about what to do with things that are partially obscured. I suspect (hope) this is not what the OP meant!