Ray Cast creates a mask over light pixels until it reaches a dark pixel border. If dark pixels are drawn directly on the cast will cover them, or if the sphere is greater than the structure. The brush uses a circle shape and can be adjusted via the slider at the base of the ui panel.
To use this tool the best is a sphere smaller than the structure around the border then bucket fill the area.