Clipping only a portion of 3d Tileset

The clipping planes define a Half Space. They are only defined by a normal direction and a distance to the origin. The concept of “size” does not apply to them. They are basically “infinitely large”.

(You showed the rectangle in the screenshot. Yes, that’s that: A rectangle. This one does have a size. But this is only a visual representation for the clipping plane. It is not used for the clipping plane computations).

In order to define a “clipping shape”, you have to put multiple clipping planes into a ClippingPlaneCollection. With this, you can essentially describe a Convex Polytope.

The actual question here is somewhat similar to How to load only 3dtiles inside the polygon? - #7 by Marco13 . I had created an example sandcastle for the other thread, and just tweaked it for your use-case.

There are two sliders (defined in the “HTML body & CSS” tab). The first slider affects the size of a square. From the corner points of this square, 4 clipping planes are created. The second slider affects the height of another clipping plane. Together, these 5 clipping planes allow you to “carve out” something cube-shaped from a tileset.

You’ll probably have to tweak and adjust that as well, for example, to create a rectangle (from width an height) and not only a square. But the example should already show the general approach of using 5 clipping planes to define the area that is supposed to be cut out here.