Each hangar is separate. Moreover, players write about the problem with the disappearance of ships if 2 terminals are used in one hangar.
The main limitation for the hangar is that it must be entirely in one indivisible capital ship construction zone (or a separate expansion zone). I managed to get only a square-shaped hangar to work. This is due to the fact that when spawning a ship, the largest ship size is checked against the smallest hangar size.
The orientation of the ship spawn in the hangar corresponds to the orientation of the capital ship (direction forward and up).