Base ExampleCommandModel.png Tutorial

Topic
{{{Topic}}}
Level
Intermediate
Time to complete
20 minutes
Author
piffpoof
FreeCAD version
0.14 or above
Example File(s)
[1] example data set #1

[2] example data set #2

[3] example data set #3

[4] example data set #4

[5] example data set #5



Introduction

This tutorial is meant to introduce the reader to the basic workflows of the Workbench Part.svg Part Workbench, Workbench PartDesign.svg Part Design Workbench, and Workbench Sketcher.svgSketcher Workbench. The PartDesign Pocket.png Pocket tool is used to make a model comprised of 2 different pieces.

Tutorial example screen snapshot.jpg

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:

  • 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

And because this is a Sketcher tutorial, we will use the Sketcher workbench, but we will use it from the Part Design workbench

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 View->Views->Combo View. 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: View-zoom-all.svg, View-zoom-selection.svg, View-axometric.svg, View-front.svg, View-top.svg, View-right.svg, View-rear.svg, View-bottom.svg, View-left.svg 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

  1. Switch to the Workbench Part.svg Part workbench.
  2. Click on Document-new.svg to create a new document.
  3. Click on Part Box.svg Cube, a new cube will be created at the origin.
  4. In the Combo View click on the Cube and press Return.
  5. Now enter the text solid lock housing and press Return.
  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 -30 or use the small arrows to the right to decrement the existing value (which will be 0).
  9. In the y field either enter -40 or use the small arrows to the right to decrement the existing value (which will be 0).
  10. In the z field either enter 0 or use the small arrows to the right to increment the existing value (which will be 0).
  11. In the Length field, enter 60.
  12. In the Width field, enter 80.
  13. In the Height field, enter 32.

Pocket Lock Housing and Key Shaft Aperature

We will now create a Sketch and use it to Pocket the Lock Housing.

  1. Switch to the Workbench PartDesign.svg Part Design workbench.
  2. Click on the top face of the solid to select it.
  3. Select Sketcher NewSketch.png New sketch
    Note: If a face is selected then the Sketcher will create the new sketch on that face.
  4. Select Sketcher Rectangle.svg Rectangle
  5. Create the rectangle somewhere near the origin with arbitrary lengths.
  6. Click on the lower-left corner of the rectangle, then on the lower-right corner, then finally on the Y axis. Both points and the Y axis should now be selected.
  7. Click on Constraint Symmetric.svg Symmetric Constraint
  8. The two sides of the rectangle are now equi-distant from the Y-axis.
  9. Click on the upper-left corner, then on the lower-left corner
  10. Click on Constraint VerticalDistance.svg Vertical Distance Constraint
  11. A small query box asking for the Length will appear, enter the number 76 into it and click OK
  12. Click on the lower-left corner, then on the lower-right corner
  13. Click on Constraint HorizontalDistance.svg Horizontal Distance Constraint
  14. A small query box asking for the Length will appear, enter the number 56 into it and click OK
  15. Click on the Close button at the top of the Tasks Tab of the Combo View
  16. Click on PartDesign Pocket.png Pocket
  17. In the Length field, enter 30.
  18. Click OK

    Now we will pocket the aperture for the key shaft in the bottom of the lock housing.

  19. Click on the top face of the bottom of the box to select it.
  20. Select Sketcher NewSketch.png New sketch
  21. Select Sketcher Circle.svg Circle
  22. Your first click will place the centre of the circle, your second click will set the radius of the circle. Place the centre somewhere near the Y axis.
  23. Click on the centre of the circle, then click on the Y-axis.
  24. Click on Constraint PointOnObject.svg Point on Object Constraint. The circle centre is now constrained to remain on the Y-axis.
  25. Click on the centre of the circle then on the X axis.
  26. Click on Constraint VerticalDistance.svg Vertical Distance Constraint
  27. A small query box asking for the Length will appear, enter the number 10 into it and click OK
  28. Click on the circle
  29. Click on Constraint Radius.svg Radius Constraint
  30. A small query box asking for the Radius will appear, enter the number 5 into it and click OK
  31. Click on the Close button at the top of the Tasks Tab of the Combo View
  32. Click on PartDesign Pocket.png Pocket
  33. In the Length field, enter 2.
  34. Click OK
  35. Save your work: select the menu option File->Save, or click the Document-save.svg Save icon; or press Command-S.

Creating the Lock Housing Lid

  1. Click on Part Box.svg Cube, a new cube will be created at the origin.
  2. In the Combo View click on the Cube and press Return.
  3. Now enter the text lock housing lid and press Return.
  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 -30 or use the small arrows to the right to decrement the existing value (which will be 0).
  7. In the y field either enter -40 or use the small arrows to the right to decrement the existing value (which will be 0).
  8. In the z field either enter 30 or use the small arrows to the right to increment the existing value (which will be 0).
  9. In the Length field, enter 60.
  10. In the Width field, enter 80.
  11. In the Height field, enter 2.
  12. Save your work: select the menu option File->Save, or click the Document-save.svg Save icon; or press Command-S.

Pocket Lock Housing Lid

We will now create a Sketch and use it to Pocket the Lock Housing.

  1. Switch to the Workbench PartDesign.svg Part Design workbench.
  2. Click on the top face of the lid to select it.
  3. Select Sketcher NewSketch.png New sketch
    Note: If a face is selected then the Sketcher will create the new sketch on that face.
  4. Select Sketcher Circle.svg Circle
  5. Your first click will place the centre of the circle, your second click will set the radius of the circle. Place the centre somewhere near the Y axis.
  6. Click on the centre of the circle, then click on the Y-axis.
  7. Click on Constraint PointOnObject.svg Point on Object Constraint. The circle centre is now constrained to remain on the Y-axis.
  8. Click on the centre of the circle then on the X axis.
  9. Click on Constraint VerticalDistance.svg Vertical Distance Constraint
  10. A small query box asking for the Length will appear, enter the number 10 into it and click OK
  11. Click on the circle
  12. Click on Constraint Radius.svg Radius Constraint
  13. A small query box asking for the Radius will appear, enter the number 5 into it and click OK
  14. Click on the Close button at the top of the Tasks Tab of the Combo View
  15. Click on PartDesign Pocket.png Pocket
  16. In the Length field, enter 2.
  17. Click OK
  18. Click on the top face of the lid to select it.
  19. Select Sketcher NewSketch.png New sketch
  20. Select Sketcher Rectangle.svg Rectangle
  21. Create the rectangle somewhere near the origin with arbitrary lengths.
  22. Click on the lower-left corner of the rectangle, then on the lower-right corner, then finally on the Y axis. Both points and the Y axis should now be selected.
  23. Click on Constraint Symmetric.svg Symmetric Constraint
  24. The two sides of the rectangle are now equi-distant from the Y-axis.
  25. Click on the upper-left corner, then on the lower-left corner
  26. Click on Constraint VerticalDistance.svg Vertical Distance Constraint
  27. A small query box asking for the Length will appear, enter the number 76 into it and click OK
  28. Click on the lower-left corner, then on the lower-right corner
  29. Click on Constraint HorizontalDistance.svg Horizontal Distance Constraint
  30. A small query box asking for the Length will appear, enter the number 56 into it and click OK
  31. Click on the Close button at the top of the Tasks Tab of the Combo View
  32. Click on PartDesign Pocket.png Pocket
  33. In the Length field, enter 2.
  34. Click OK
  35. Save your work: select the menu option File->Save, or click the Document-save.svg Save icon; or press Command-S.

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:

  • Sketcher
  • Constraints within the Sketcher
  • Pad from the Part Design workbench

Further Information

To Do On Tutorial

  • constrain the rectangle on the 3rd Sketch
  • 0.16 specific changes
    • View->Views->Combo View becomes View->Panels->Combo View