TechDraw Geometric dimensioning and tolerancing

Concept
The main purpose of a technical drawing is that others understand what the designer created with what tolerances AND how to manufacture the design. To achieve this the system of Geometric Dimensioning and Tolerancing (GD&T) was developed for defining and communicating engineering tolerances.

The concept of the geometrical tolerancing is that in practice the dimension is just one parameter to decide if a part can he used or not. Take for example this part:



In the application an axis should be put through the 2 holes of the part. That mean we have to specify the following things
 * The diameter of the holes and they are equal.
 * That the holes are along a certain axis that is not perpendicular to the XZ base plane.
 * That the axis part must have a certain straightness.

The straightness is important because a bend axis would not fit through the holes. Thus it has to be specified for the axis part and not to our part. The hole alignment is important because just drilling each hole at the given position without taking care of the axis, would lead to holes through which the axis will not fit. So just specifying the hole dimension and position is not sufficient.

TechDraws' capabilities to fulfill the common GD&T standards is limited (as of FreeCAD 0.19) but you can achieve already many things. This Wiki page explains what is implemented and what tricks can be used for non-implemented features.

Dimensioning
TechDraw provides several tools to create different types of dimension. Please have a look at the different dimensions on how to create and modify them.

Formatting
The default format for new dimension numbers depends on the preferences options Use Global Decimals and Alternate Decimals. This specifies the number of decimals, but in every case the dimension is a floating point number. For example if the setting is to have 2 decimals, the used format specifier is "%.2f" (floating point number with 2 decimals).

The number format can be changed:
 * 1) Select a dimension in the tree
 * 2) Go to the properties tab Data and there to the section
 * 3) The property  contains the format specifier, so change it to what you need

The syntax of the format specifier is explained here. You can also use this online tool to see what formatting specifier will format numbers.

Examples:
 * You use 2 decimals but for an angle you want to have only one decimal use the format specifier %.1f.
 * You use 2 decimals but don't like that trailing zeroes are printed (you prefer 4 instead of 4.00). Then use this format specifier: %g. The 'g' will use the shortest possible output and thus it omits trailing zeroes. Moreover it will automatically switch to scientific notation if necessary.

With the property you can make length dimensions negative and flip angles from the range 0 - 180° to the the reflex range 180° - 360°.

Setting the property to true will mark the dimension as theoretically exact by adding a frame around it.

You can use your own text instead of a formatted number by setting the property to true. Then the content of the property will be printed as dimension.

With the properties and  you can change the horizontal and vertical position of the dimension text relative to the view. Alternatively you can change the position by dragging the dimension number or text.

Creation

 * 1) Create a dimension in your drawing
 * 2) Select the dimension in the tree
 * 3) Go to the properties tab Data and there to the section
 * 4) Add to the property  the amount by which the dimension can be exceeded.
 * 5) Add to the property  the amount by which the dimension can be smaller.

Deletion
To get rid of a tolerance, change the the properties and  to each 0.00.

Formatting
The default format for new tolerances is by default the same format than the dimension (property ). It can be changed by changing the properties and.

You can also use your own text instead of a formatted number by setting the property to true. Then the content of the properties and  will be printed as tolerances.

Tolerances appear by default like this:. However, in many cases you have equal over- and undertolerance, thus it should better be displayed like "7,87 ±0,1 mm" since this is the standard. The only way to achieve this at the moment, is to delete the tolerances as described in the section above. Then set to true an enter the the dimension as it should appear:  "7,87 ±0,1 mm".

Tolerancing
In case you are not familiar with how geometric tolerancing works, please have a look at overviews like this or special literature.

As reference, here are lists of characters to be used for geometric tolerancing: