Get selected entities

The script now works only on selected entities. This limits the number
of bounding box computations to the currently selected entities.