The optical square uses a pentaprism to reflect and refract a beam or sighting 90 degrees, it is used in pairs in surveying and in a singular block in metrology.
Used with an autocollimator or angle dekkor and mirror it can be used for machine tool axis squareness checking. For measuring the squareness of surfaces.
Optical square in surveying
Double pentaprism as used in surveying.
In surveying it is used both as a hand held tool for sighting between two poles (often with a plumb bob hung from the handle) and also mounted on a Jacob's staff.