Flatness (manufacturing). In manufacturing and mechanical engineering, flatness is an important geometric condition for workpieces and tools. Flatness is the condition of a surface or derived median plane having all elements in one plane.

Geometric dimensioning and tolerancing has provided geometrically defined, quantitative ways of defining flatness operationally.
Flatness deviation may be defined in terms of least squares fit to a plane ("statistical flatness") or worst-case (the distance between the two closest parallel planes within). It can be specified for a given area and/or over an entire surface. 

In the manufacture of precision parts and assemblies, especially where parts will be required to be connected across a surface area in an air-tight or liquid-tight manner, flatness is a critical quality of the manufactured surfaces. Such surfaces are usually machined or ground to achieve the required degree of flatness. Metrology of such a surface can confirm and ensure that the required degree of flatness has been achieved as a key step in a manufacturing processes. 

Two parts that are flat to about 1 helium light band (HLB) can be "wrung" together, which means they will cling to each other when placed in contact. This phenomenon is commonly used with gauge blocks.

History
Sir Joseph Whitworth popularized the first practical method of making accurate flat surfaces during the 1830s, using engineer's blue and scraping techniques on three trial surfaces, in what is known as Whitworth's three plates method. By testing all three in pairs against each other, it is ensured that the surfaces become flat. Using two surfaces would result in a concave surface and a convex surface. Eventually a point is reached when many points of contact are visible within each square inch, at which time the three surfaces are uniformly flat to a very close tolerance. This method does not rely other flat reference surfaces or other precision instruments, and thus solves the bootstrapping problem of how to create the first precise flat surface.

Up until his introduction of the scraping technique, the same three plate method was employed using polishing techniques, giving less accurate results. This led to an explosion of development of precision instruments using these flat surface generation techniques as a basis for further construction of precise shapes.

Whitworth three plates method 
When any two surfaces (call them A and B) are lapped together, the protrusions of the two surfaces will abrade each other off, eventually resulting in two surfaces which will closely agree each other, but which can still be concave or convex (and thus, not flat).

The key insight is to then lap them against a third surface, C, with rotation. The various pairs of surfaces are lapped together in succession, until all three agree with each other. It is impossible for any one surface to be concave (or convex), while still agree with two other mutually-agreeing surfaces.

With enough iteration, the three surfaces will converge on being precisely flat, where successive iterations of the technique will further improve the flatness.

Measures
ISO 12781-1 defines several flatness measures:
 least squares reference plane
 minimum zone reference planes
 local flatness deviation
 root-mean-square flatness deviation

The two-dimensional measures above find one-dimensional counterparts in straightness measures, defined by ISO 12780 on a cross-section (the plane curve resulting from the intersection of the surface of interest and a plane spanned by the surface normal):
least squares reference line
minimum zone reference lines
local straightness deviation
root-mean-square straightness deviation

References

External links
Flatness Overview - GD&T Basics
Two surface plates made by Whitworth
What is the right Flatness Tolerance for a Gasket Application

Metalworking terminology
Planes (geometry)
Geometric measurement

ja:公差
pt:Tolerância (engenharia)