clipping an area

In fact, I take this case just for the example.
My goal is to do the same thing with 3D objects.

But thanks for the answer.