Search all objects of the selected layer's named rtree on the current sheet and return a list of idpaths.

The first argument is a layer name with an optional suffix. A layer name is the same as layer names printed by the GUI, e.g. "wire" or "hub & terminal". Suffix may be "-stroke" or "-fill"; when no suffix is appended, "-stroke" is assumed. All normal objects are in the stroke rtree; polygons with fill enabled are also in the fill rtree.

If coordinates of a box is give, smaller coords first, the search is performed only within that box and any object that has overlapping bounding box (on the given layer) is returned. Otherwise the search is performed on the whole rtree, returning all objects on the layer.