Simple Box Cover

From FreeCAD Documentation
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎italiano • ‎русский

This documentation is not finished. Please help and contribute documentation.

Gui Command explains how tools should be documented. See Draft ShapeString for an example of a well documented tool. Browse Category:UnfinishedDocu to see incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

This tutorial is still incomplete after 4 years (!!!), and since its creation there have been considerable changes to the PartDesign workbench. It should be considered obsolete, and might not be worth salvaging... To wiki translators: please wait for the tutorial to be finished (if it ever happens!) before translating it. - NormandC

Base ExampleCommandModel.png Tutorial
Time to complete
20 minutes
Normand C.
FreeCAD version
0.14.3700 or greater
Example files


This tutorial will explain how to model a simple box cover with engraved text. The cover will have a flat top with a lip all around to fit over a box.

The context: you have downloaded a sorting box model from a popular "things" sharing site, and you have printed it with your personal 3D printer. It's perfect to sort your bolts, but you would like to have a cover to go with it, with "Bolts" engraved on top of it so it's easy to recognize among your many other printed boxes!

Tutorial Simple Box Cover 01.png

For this we will use the Draft, Part and Part Design workbenches.

The sequence of operations will be:

  1. Create a sketch and draw and constrain a rectangle
  2. Create a Pad feature out of the sketch
  3. Hollow out the Pad solid using the Part Thickness tool
  4. Create text on top of the cover using the Draft ShapeString tool
  5. Create a PartDesign Pocket feature using the Draft ShapeString object.

Figuring out the dimensions

Let's say that the box length and width are 110x110mm. We should allow some play between the box outer dimensions and the cover inner dimensions, so let's add 1mm on each side. We want the cover to be 3mm thick, and the lip to be 7mm high without counting the top.

  • Cover inner length: 111mm
  • Cover inner width: 111mm
  • Cover thickness: 3mm
  • Cover lip height: 7mm

Making the base solid

We will make a base solid of which dimensions equal the empty volume inside the finished cover.

Creating the sketch

  1. Start FreeCAD, create a new document and using the workbench selector, switch to the Workbench PartDesign.svg PartDesign Workbench.
  2. Click on the Sketcher NewSketch.svg Create new sketch icon in the toolbar.
  3. In the "Choose orientation" dialog, select the XY-Plane and click OK.
  4. Click on the Sketcher CreateRectangle.svg Create a rectangle icon.
  5. Click somewhere in the 3D view to pick the first point of the rectangle, drag your mouse then click again to select the second point, which corresponds to the opposite corner of the rectangle. When clicking, loosely center the rectangle on the red and green axes.
  6. We will now center the rectangle on the origin. I have found by experience that it is almost always a good idea to center your geometry to the axes. Click on two opposite vertices (corner points) of the rectangle, for example the upper left point and the lower right point; thirdly click on the origin point (the point at the center of the green and red axes). With the three points selected (they now should be green), click on the Sketcher ConstrainSymmetric.png Constraint Symmetric icon. The rectangle is now centered to the origin of the sketch. If you pick either a corner or a side and drag the mouse, you will see that you can resize the rectangle, but it will always remain centered.
  7. The rectangle should actually be a square, as the length and width have equal values. Select a vertical line of the rectangle, and a horizontal line of the rectangle, then click on the Sketcher ConstrainEqual.png Equal Length Constraint icon.
  8. If you look at the Solver messages text box in the Tasks panel, the message reads: "Under-constrained sketch with 1 degree of freedom". Picking and dragging the contour of the rectangle gives us a hint as to what that degree of freedom may be: we have not set the size of the square. So select the top line of the square, and click on the Constraint HorizontalDistance.svg Horizontal Distance Constraint. If you select a vertical line, you will then use the Vertical Distance Constraint. Note: many people make the error of using the Sketcher ConstrainDistance.png Length Constraint instead. The length constraint should only be used if you need to constrain a diagonal length, as it requires more calculation by the solver.
  9. The sketch should now be fully constrained, with the Solver messages box saying so. The sketch geometry also turns entirely green.
  10. We can now exit the sketch by clicking on the Close button on the Tasks panel, or on the Sketcher LeaveSketch.png Leave sketch icon on the toolbar. Notice that there is now a new Sketch object listed in the Model tree view.
    Tutorial Simple Box Cover 02.png

Padding the sketch

Let's now add volume to our sketch.

  1. First, let's change the view orientation to axometric so the next step is displayed better. For that, type 0 (the zero digit) on your keyboard, or click on the View-axometric.svg Set to axometric view icon in the View toolbar.
  2. The Sketch object should still be selected in the Model tree view. If not, select it (either in the tree or in the 3D view).
  3. Click on the PartDesign Pad.svg PartDesign Pad icon.
  4. Under Pad parameters in the Tasks panel, set the length to 7mm. You can see in the 3D view that changing the value makes the solid thicker or thinner. Tip: you can quickly raise or lower the value by 5mm increments by placing the mouse pointer over the entry field and scrolling with the mouse wheel.
  5. Click OK. Notice that a new Pad object has been added to the tree, and the Sketch has been hidden and nested under the Pad object. You can reveal the Sketch object by clicking on the arrow besides the "Pad" object in the tree.
    Tutorial Simple Box Cover 03.png

Hollowing out the base solid

For this step we need to switch to the Part workbench.

  1. Switch to the Workbench Part.svg Part Workbench.
  2. Select the top face of the Pad object.
    Tutorial Simple Box Cover 04.png
  3. Click on the Part Thickness.svg Part Thickness icon.
  4. You will notice in the 3D view that the solid has been replaced with a hollowed box with 4 sides and an open top. This hollowed box is also wider than the base solid. Under the Thickness parameters in the Tasks panel, the value Thickness sets the thickness of the walls of the box. With a positive value, the hollowed shape is built outward of the base solid. With a negative value, it would build inward, thus keeping the same outer dimensions as the base solid.
  5. Set the thickness to 3mm, and Joint type to Intersection. The default joint type is set to "Arc" which rounds all outer edges with a radius equal to the thickness, if the thickness has a positive value.
    Tutorial Simple Box Cover 05.png

Engraving text

To be continued.