Draft ShapeString tutorial
Tutorial |
Topic |
---|
Product design |
Level |
Beginner |
Time to complete |
30 minutes |
Authors |
r-frank |
FreeCAD version |
0.17 and above |
Example files |
Draft_Shapestring_Text |
See also |
None |
Introduction
In this tutorial we will discuss how to
- insert a text with the ShapeString tool
- extrude it to be a solid
- position it in 3D space using placement and Draft Move with sketches as helper elements
- doing an engraving by applying a boolean cut
It is recommended to understand the basics of the Sketcher Workbench as well.
Setup
1. Open FreeCAD, create a new empty document with File → New, and switch to the Part Workbench.
- 1.1. Press the View isometric button, or press 0 in the numerical pad of your keyboard, to change the view to isometric to visualize the 3D solids better.
- 1.2. Press the View fit all button whenever you add objects in order to pan and zoom the 3D view so that all elements are seen in the view.
- 1.3. Hold Ctrl while you click to select multiple items. If you selected something wrong or want to de-select everything, just click on empty space in the 3D view.
Create the basic shape
2. Insert a primitive cube by clicking on Box.
- 2.1. Select
Cube
in the tree view. - 2.2. Change the dimensions in the Data tab of the property editor.
- 2.3. Change Width to
31 mm
.
3. Create a chamfer.
- 3.1. Select the upper edge (
Edge6
) on the front face of theCube
in the 3D view. - 3.2. Press Chamfer.
- 3.3. In the Chamfer edges task panel go to Selection, choose Select edges. As Fillet type choose
Constant length
, then set Length to5 mm
. - 3.4. Press OK. This will create a
Chamfer
object. - 3.5. In the tree view, select
Chafmer
, in the View tab change the value of Line Width to2.0
.
Base figure created from a cube object and a chamfer.
Insert the ShapeString
4. Switch to the Draft Workbench.
- 4.1. Make sure nothing is selected in the tree view.
- 4.2. Establish the working plane to XY (Top) by clicking on SelectPlane and pressing Top (XY).
5. Insert the text "FreeCAD".
- 5.1. Press on ShapeString.
- 5.2. Change X to
0 mm
. - 5.3. Change Y to
0 mm
. - 5.4. Change Z to
0 mm
. - 5.5. Or press Reset point.
- 5.6. Change String to
FreeCAD
; change Height to5 mm
; change Tracking to0 mm
. - 5.7. Make sure Font file points to a valid font, for example,
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
. Press the ellipsis ... to open the operating system's dialog to find a font. - 5.8. Press OK. This will create a
ShapeString
object. - 5.9. Recompute the document by pressing Refresh.
- 5.10. In the tree view, select
ShapeString
, in the View tab change the value of Line Width to2.0
. - 5.11. In the tree view, select
Chamfer
, in the View tab change the value of Visibility tofalse
, or press Space in the keyboard. This will hide the object, so you can see theShapeString
better. - 5.12. To see the shape string from above change the view by pressing Top (XY), or 2 in the keyboard.
- 5.13. To restore the view to isometric, press View isometric, or 0 in the keyboard.
Text created as a ShapeString, that is, as a collection of edges in a plane.
Create the 3D text
6. Switch back to the Part Workbench.
- 6.1. In the tree view, select
ShapeString
, then press Extrude. - 6.2. In the Extrude task panel go to Direction, choose Along normal; in Length, set Along to
1 mm
; also tick the Create solid option. - 6.3. Press OK. This will create an
Extrude
object. - 6.4. In the tree view, select
Extrude
, in the View tab change the value of Line Width to2.0
.
Text created as a ShapeString, and turned into a solid by extrusion.
Insert sketch for positioning
Now we will draw a simple sketch that will be used as auxiliary geometry for further operations.
7. In the tree view, select Extrude
, and press Space in the keyboard to make it invisible.
8. Switch to the Sketcher Workbench.
9. In the tree view, select Chamfer
, and press Space in the keyboard to make it visible.
- 9.1. Choose the sloped face created by the chamfer operation (
Face3
). - 9.2. Click on NewSketch. In the Sketch attachment dialog, select
FlatFace
, and press OK. - 9.3. The view should adjust automatically so that the camera is parallel to the selected face.
- 9.4. Draw a horizontal line in the general position on top of the face. The length is not important; we are just interested in its position.
- 9.5. Constrain the left endpoint to be
2.5 mm
away from the local X axis and from the local Y axis, using ConstrainDistanceX and ConstrainDistanceY. - 9.6. Since the sketch is just an auxiliary object, we don't need to have it fully constrained. You can do this if you wish by assigning a fixed distance, say, of
20 mm
with ConstrainDistanceX again. - 9.7. Close the sketch.
Sketch line created on top of the solid face, to be used as reference guide for positioning the extruded text.
Positioning 3D text in 3D space
- Make sure object "Extrude" is selected in the tree view and press <Space> to toggle visibility to visible
- Make sure, object "Extrude" is selected in the tree view
- Open Placement task Edit->Placement...
- Apply incremental placement, axis of rotation Z=90°
- Apply incremental placement, axis of rotation Y=45°
- Switch to draft workbench
- Switch to wireframe mode
- Make sure, only "snap to endpoint" is activated Draft->Snapping->Snap to endpoint
- Select "extrude"-object
- Click on
- In 3D view click on the most upper left corner point of "extrude"-object (1) and then click on the constrained point in the sketch (2)
Creating engraved text
- Switch to part workbench
- Switch to "As is"-view mode
- Select the 3D text ("extrude") and then the base object ("chamfer") in the tree view
- Apply a boolean cut by clicking on
- Make sure object "Sketch" is selected in the tree view
- Press <Space> to toggle visibilty
- Click on to change to axometric view
- Click on to zoom to fit all
- Finished
Notes
- for creating curved text you can use the macro Circular Text
- for importing text from inkscape look at the Importing text from inkscape tutorial
- Extrusion of the Shapestring-Text can also be done with the PartDesign-Pad-Tool
- Remember that the DraftShapestring-Object cannot be attached to a face (so no pocket-command possible)