Hi!
The Beetle isn't aware of its surroundings, so I'm afraid you'll have to think around that. There's been discussion on whether we should support collision detection, but the code to do so is costly and we're not sure it's worth it. A basic collision detection is really easy to implement and would work real fast, but it only takes in account bounding boxes, which wouldn't be enough for the vast majority of the cases.
However, you don't need to detect objects for your particular use case, here's a tutorial on drawing filled shapes: http://beetleblocks.com/users/Examples/projects/Tutorial%202%20Filled%20shapes
Hope it hepls!