Sandbox:Piffpoof9-1a

Introduction
This tutorial is meant to introduce the reader to the basic workflow of the Part Workbench to make a model. This will be done using the Thickness tool and Boolean operations of the Part workbench,



Problem Background
We're going to construct a model of a housing for a lock - like the lock on a door. After looking at the task, we have decided we will make this in 3 pieces: And because this is a Part workbench tutorial, we will use the Part workbench.
 * a plate at the back of the lock housing
 * the sides of the lock housing
 * the front plate of the lock housing which will have the aperture through which the key passes

Preparation
FreeCAD has numerous facilities and features. To make our work easier in this tutorial, we need to make sure some of them are visible. From the menu bar at the top of the screen select the option. This will produce the Combo View which is a browser with two panes, one above the other. The upper pane has two tabs Model and Tasks - select Model. The lower pane also has two tabs View and Data - select Data.

Viewing Work in Progress
While working through the tutorial, utilise the Standard View icons built into FreeCAD which will allow you to manipulate your viewpoint and so therefore better see what is being done. The icons are:, , , , , , , , all of which are described on the page Standard View Menu. Manipulating the viewpoint does not effect any of the objects being constructed. The very nature of 3-dimensional modeling means that often some of the result of an operation will be on an aspect of the model not currently visible. Judicious use of the viewpoint allows the modeler to fully appreciate the model being developed.

Creating the Lock Housing
Note: you can save your work at any time in FreeCAD, either in the Sketcher or not, by clicking the Save button.
 * 1) Switch to the [[Image:Workbench_Part.svg‎‎|24px]] Part workbench.
 * 2) Click on [[Image:Document-new.svg‎‎|24px]] to create a new document.
 * 3) Click on [[Image:Part_Box.svg|24 px]] Cube, a new cube will be created at the origin.
 * 4) In the Combo View click on the Cube and press.
 * 5) Now enter the text  and press.
 * 6) In the bottom pane of the Combo View, click to the left of the Placement, Angle, Axis and Position should become visible.
 * 7) Click to the left of Position, x, y, and z should become visible.
 * 8) In the x field, either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 9) In the y field either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 10) In the z field either enter  or use the small arrows to the right to increment the existing value (which will be 0).
 * 11) In the Length field, enter.
 * 12) In the Width field, enter.
 * 13) In the Height field, enter.
 * 14) Click on [[Image:Part_Thickness.svg|24 px]] Part Thickness, a dialogue will appear.
 * 15) In the Thickness field, enter.
 * 16) In the Mode field, select.
 * 17) In the Join Type field, select.
 * 18) Press.
 * 19) Save your work: select the menu option, or click the [[Image:Document-save.svg‎‎|24px]] Save icon; or press -.

Creating the Lock Housing Lid

 * 1) Click on [[Image:Part_Box.svg|24 px]] Cube, a new cube will be created at the origin.
 * 2) In the Combo View click on the Cube and press.
 * 3) Now enter the text  and press.
 * 4) In the bottom pane of the Combo View, click to the left of the Placement, Angle, Axis and Position should become visible.
 * 5) Click to the left of Position, x, y, and z should become visible.
 * 6) In the x field, either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 7) In the y field either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 8) In the z field either enter  or use the small arrows to the right to increment the existing value (which will be 0).
 * 9) In the Length field, enter.
 * 10) In the Width field, enter.
 * 11) In the Height field, enter.
 * 12) Save your work: select the menu option, or click the [[Image:Document-save.svg‎‎|24px]] Save icon; or press -.

Creating the Cutouts

 * 1) Click on [[Image:Part_Cylinder.svg|24 px]] Cylinder, a new cylinder will be created at the origin.
 * 2) In the Combo View click on the Cylinder and press.
 * 3) Now enter the text  and press.
 * 4) In the bottom pane of the Combo View, click to the left of the Placement, Angle, Axis and Position should become visible.
 * 5) Click to the left of Position, x, y, and z should become visible.
 * 6) In the x field, either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 7) In the y field either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 8) In the z field either enter  or use the small arrows to the right to increment the existing value (which will be 0).
 * 9) In the Radius field, enter.
 * 10) In the Height field, enter.
 * 11) Click on [[Image:Part_Box.svg|24 px]] Cube, a new cube will be created at the origin.
 * 12) In the Combo View click on the Cube and press.
 * 13) Now enter the text  and press.
 * 14) In the bottom pane of the Combo View, click to the left of the Placement, Angle, Axis and Position should become visible.
 * 15) Click to the left of Position, x, y, and z should become visible.
 * 16) In the x field, either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 17) In the y field either enter   or use the small arrows to the right to decrement the existing value (which will be 0).
 * 18) In the z field either enter  or use the small arrows to the right to increment the existing value (which will be 0).
 * 19) In the Length field, enter.
 * 20) In the Width field, enter.
 * 21) In the Height field, enter.
 * 22) Save your work: select the menu option, or click the [[Image:Document-save.svg‎‎|24px]] Save icon; or press -.

Using Booleans for the Final Model

 * 1) In the Combo View single-click the empty lock housing in the Combo View to select it
 * 2) Holding down, single-click on the following objects to select them:
 * 3) * lock housing lid
 * 4) Click on [[Image:Part_Union.png|24px]] Union to fuse the 2 objects into one object. Notice that the resultant is another object called something like 'Fusion'. The objects that were used to form the result are encapsulated within the resulting object. Click to the left of 'Fusion" to view the objects used to form it.
 * 5) In the Combo View click on the Fusion and press.
 * 6) Now enter the text  and press.
 * 7) Single-click the 'lock housing with lid' in the Combo View to select it
 * 8) Holding down, single-click on 'key shaft aperature' to select it.
 * 9) Click on [[Image:Part_Cut.svg‎‎|24px]]  Cut to cut the second object from the first. Notice that the resultant is another object called something like 'Cut'. The two objects that were used to form the result are encapsulated within the resulting object. Click to the left of 'Cut" to view the 2 objects used to form it.
 * 10) Single-click the object 'Cut' just created
 * 11) Holding down, single-click on 'key teeth aperature' to select it.
 * 12) Click on [[Image:Part_Cut.svg‎‎|24px]]  Cut to cut the second object from the first. Notice that the resultant is another object called something like 'Cut001'. The two objects that were used to form the result are encapsulated within the resulting object - one being the resultant from the first cut operation.
 * 13) In the Combo View click on the second Cut resultant and press.
 * 14) Now enter the text  and press.
 * 15) Save your work: select the menu option, or click the [[Image:Document-save.svg‎‎|24px]] Save icon; or press -.

Results
The objects we have created now constitute the housing for a lock.

There is an | example data set #4 which has the results so far. You can download this and compare it to your own results. Certain things like the positioning of labels on the Sketches may change depending on zoom levels. So your the positioning of your labels may differ but the dimensions and the list of Constraints should be identical.

Further Ideas

 * Create a key to fit this lock (see tutorial XXX)
 * Model some working of real lock inside our lock housing - now that would be complex!

Summary
We used the following tools in this tutorial:

Further Information

 * To learn more about the Part Workbench, see Part Workbench.

To Do On Tutorial

 * 0.16 specific changes
 * View->Views->Combo View becomes View->Panels->Combo View
 * View->Views->Combo View becomes View->Panels->Combo View