Basic Sketcher Tutorial

Introduction
This tutorial is meant to introduce the reader to the basic workflow of the Sketcher Workbench.

The reader will practice:
 * Creating construction geometry
 * Creating real geometry
 * Applying geometric constraints
 * Applying datum constraints

The Sketcher Workbench exists as a standalone module, so it can be used to draw generic 2D (planar) objects. However, it is mostly used in conjunction with the PartDesign Workbench. A closed sketch is normally used to create a face or a profile which will be subsequently extruded into a solid body with an operation such as.



Setup
1. Open FreeCAD, create a new empty document with.
 * 1.1. Switch to the Sketcher Workbench from the workbench selector, or the menu.

Some actions to remember:
 * Press the right mouse button, or press in the keyboard once, to exit deselect the active tool in edit mode.
 * To exit the sketch edit mode, press the button in the task panel, or press  twice in the keyboard.
 * To enter again edit mode, double click on the sketch in the tree view, or select it and then click on.

Create a sketch
2. Click on.
 * 2.1. Choose the sketch orientation, one of the base XY, YZ, or XZ planes. Also choose if you want an inverted orientation of the normal of the plane, and an offset from this plane.
 * 2.2. We will use the default plane and options.
 * 2.3. Click to start constructing the sketch.

We are now inside the sketch edit mode. Within it, we're able to make use of the majority of the tools of this workbench.

In the task panel, expand the section, and make sure the option is enabled. Other options can be changed in this task panel, including the size of the grid. In other sections of the task panel you can also see which geometrical elements and constraints have been defined.

Sketcher construction geometry
3. Construction geometry is used to guide the creation of "real" geometry. Real geometry will be the one shown outside of the sketch edit mode, while construction geometry will only be shown inside the edit mode.
 * 3.1. Click on . Now geometrical elements will be drawn in.
 * 3.2. Click on.
 * 3.3. Approach the origin of the sketch, the point should highlight and near your cursor the Constraint_PointOnPoint.svg coincident constraint icon will appear.
 * 3.4. Select the point and extend the line diagonally up to an arbitrary length.
 * 3.5. Repeat this procedure until you've created five construction lines. Be sure to keep all of them diagonal.
 * 3.6. To exit construction mode, simply click again on.

up to this point the line tool is still active. This means we can keep clicking on the 3D view to draw as many lines as we want. If we wish to exit this tool, we can press the right mouse button, or press in the keyboard once. By doing this the pointer won't create lines any more, it will just be a pointer.

do not press a second time as this will exit the sketch edit mode. Re-enter the edit mode by double clicking on the sketch in the tree view.

Sketcher real geometry
4. Real geometry must make a closed shape if it is to be used as a profile that can be extruded by tools such as.

5. Create a circle.
 * 5.1. Click on.
 * 5.2. Click on the origin of the sketch to position its center point.
 * 5.3. Click anywhere in the 3D view to extend the circumference radius to an arbitrary length from the origin.

6. Create a series of arcs.
 * 6.1. Click on.
 * 6.2. Approach the endpoint of one of the construction lines, and click on it.
 * 6.3. This will set the center point of the circular arc to be Constraint_PointOnPoint.svg coincident with this endpoint.
 * 6.4. Click once in the 3D view at an arbitrary location to set simultaneously the radius of the arc, and the first endpoint of it.
 * 6.5. Move the pointer in an anti-clockwise direction to trace an arc that has its concavity pointing towards the center of the sketch. Click to set the final endpoint of the arc.
 * 6.6. Repeat these steps with each construction line, so that each of them has a circular at its tip. We will call these A-arcs.

7. Create an arc between each pair of the previous A-arcs.
 * 7.1. Still with tool active, click somewhere between two A-arcs to set the center point of a new arc.
 * 7.2. Click on one of the endpoints from one A-arc making sure the Constraint_PointOnPoint.svg coincident constraint icon appears.
 * 7.3. Click on the other endpoint on the adjacent A-arc making sure the Constraint_PointOnPoint.svg coincident constraint icon appears.
 * 7.4. A new arc will appear automatically, tying the two A-arcs exactly at the selected endpoints. The center point of this new arc will move automatically so that it ties the two A-arcs.
 * 7.5. Repeat these steps, so that each pair of A-arcs is tied by a new arc. We will call these B-arcs.
 * 7.6. The A-arcs should have their concavity pointing towards the origin point of the sketch, while the B-arcs should have their concavity pointing away from the same origin.

The resulting sketch should now be closed, as each A-arc connects to a B-arc, resulting in a closed profile.

Geometric constraints
Constraints are used to fix the (DOF) of points and curves within sketcher. In general, there are and

They are used to establish relations between points and curves without the use of dimensions.


 * 1) Select all five construction lines.
 * 2) Select [[Image:Constraint_EqualLength.svg|32px]] Equal Length


 * 1) Select all five arcs centered on an endpoint of a line.
 * 2) Select [[Image:Constraint_EqualLength.png|32px]] Equal Length
 * 3) Repeat for all five arcs that are not centered on an endpoint.


 * 1) Select the construction line that is closest to the vertical axis.
 * 2) Select  [[Image:Constraint_Vertical.svg|32px]] Vertical


 * 1) Select the endpoint of an arc and the endpoint closest to it.
 * 2) Select [[Image:Constraint_Tangent.svg|32px]] Tangent
 * 3) Repeat for each endpoint, until a closed profile is created.

As of this step, we have now created a closed profile that can be adjusted with the desired dimensions.

Datum constraints
These are used to specify the distance between points in a particular direction and the dimensions of curves.


 * 1) Select the vertically constrained construction line.
 * 2) Select  [[Image:Constraint_VerticalDistance.svg|32px]] Vertical Distance
 * 3) Set the length to 30 mm.


 * 1) Select the vertical construction line and the line closest to it
 * 2) Select  [[Image:Constraint_InternalAngle.svg|32px]] Internal Angle
 * 3) Set the angle to 72°
 * 4) Repeat the same procedure for each pair of adjacent lines.


 * 1) Select one of the arcs centered on the endpoint of a line.
 * 2) Select [[Image:Constraint_Radius.svg|32px]] Radius
 * 3) Set the radius to 8 mm.
 * 4) Do the same for an arc not centered on an endpoint. Set the radius to 11 mm.
 * 5) Set the center circle radius to 10 mm.

You should end up with a fully constrained sketch. It can be confirmed by noticing the change in color of all curves.

We are now finished with the basic workflow for the Sketcher Workbench.