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. Since most parts have to fit to assemblies, also the geometric relations to other parts are important. To achieve this, the system of Geometric Dimensioning and Tolerancing (GD&T) was developed.

Take for example this part:



In the application an axis should be put through the 2 holes of the part. That means we have to specify the following things
 * The diameter of the holes and their positions.
 * 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 bent axis would not fit through the holes. 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. The first point is "classical" dimensioning while the 2 others are geometric information, thus GD&T comes into play. The example also makes clear that GD&T is essential to assure that parts fit well to assemblies.

If you are not familiar with the concept of GD&T, we highly recommend to learn about it now. For example a quick introduction is given in this video. For more like the concept of the "maximum material condition", have a look at this video. For details to all sorts of GD&T features, look around in the Internet. For example this YouTube channel provides some good explanations.

GD&T is defined in the standards ISO 1101 and ASME Y14.5.

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

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 font for new dimension is determined by the preferences setting Label Font. The default font size is specified by the preferences setting Font Size. Note: It is recommended to use a font in which the minus sign has the same width as the plus sign because this assured that tolerances will be formatted as proposed by the GD&T norms. Such a font is for example osifont that is part of all FreeCAD installations.

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) Either double-click on the dimension in the drawing or onto the dimension object in the model tree
 * 2) In the appearing dimension dialog the field Format Specifier 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 option Theoretically Exact in the dimension dialog 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 option Arbitrary Text in the dimension dialog. Then the content of the field Format Specifier 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) Either double-click on the dimension in the drawing or onto the dimension object in the model tree
 * 3) In the appearing dimension dialog specify as Overtolerance the amount by which the dimension can be exceeded. This will result in an equal tolerance like this: [[Image:TechDraw_equal-tolerance.png|100px]]
 * 4) If you have unequal tolerances, specify as Undertolerance the amount by which the dimension can be smaller and uncheck the option Equal Tolerance. This will result in an unequal tolerance like this: [[Image:TechDraw_Non-equal-tolerance.png|80px]]

Deletion
To get rid of a tolerance, change Overtolerance and Undertolerance to each zero.

Formatting
The default font for new tolerances is the same than for dimensions. The default font size is specified by the preferences setting Tolerance Text Scale. This scale is a factor of the font size used for the dimension.

The default number format for new tolerances is by default the same format than for the dimension. It can be changed in the dimension dialog.

You can also use your own text instead of a formatted number by checking the option Arbitrary Tolerance Text in the dimension dialog. Then the content of Tolerance Format Specifier will be used as tolerance text.

Geometrical Tolerancing
Tolerances are created by using the Balloon feature of TechDraw. Since for most features a frame is required, it is helpful to change in the TechDraw preferences the Balloon Shape to Rectangle.

Tolerance indicator


The tolerance indicator of GD&T is a frame, also called "feature control frame". It can be created by using the Balloon feature of TechDraw:
 * after adding a Balloon and if its shape is not already a frame, double-click on it in the model tree and set in the appearing dialog the Shape to Rectangle.
 * add the corresponding Unicode character for the feature you need to the Balloon Text. (You can copy them from the reference tables below or use TechDraw_ExtensionCustomizeFormat.)
 * by adding the character '|' to the Text, you start a new indicator field.

There is no rule that defines if or how the tolerance indicator must have a leader line or not, so you can either:
 * set the property Line Visible to False in the balloon dialog.
 * set End Symbol to Filled Arrow or Dot.

The example at the right side shows the two possible tolerance indicator layouts.

Datums
Datums in the GD&T sense of the meaning are surfaces your tolerance is relative to. They are created as Balloon:
 * after adding a Balloon, set End Symbol to Filled Triangle in the balloon dialog.
 * if the bubble shape is not already a frame, set Bubble Shape to Rectangle.
 * drag the bubble with the mouse so that the triangle points away from the datum surface.
 * since it is common to have a straight line for datums unless the datum surface is not perpendicular to X or Y, assure that either the properties and  or  and  are equal to get a straight Balloon line.



Symbol reference
To insert GD&T symbols TechDraw provides the Customize format label feature.

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