Range of Vision

To what extent can an enemy see your factory/gen.?
I.e. Their sonar range reaches to 1/2 of your factory -do they see it or is it hidden from view?
I.e. Their sonar range reaches to 1/2 of your factory -do they see it or is it hidden from view?