Draft ShapeString tutorial: Difference between revisions
Renatorivo (talk | contribs) mNo edit summary |
m (Fillet -> Chamfer) |
||
(46 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
<translate> |
<translate> |
||
<!--T:1--> |
<!--T:1--> |
||
{{TutorialInfo |
{{TutorialInfo |
||
|Topic=Product design |
|||
|Topic= ShapeString (Draft workbench) |
|||
|Level= |
|Level=Beginner |
||
|Time=30 minutes |
|Time=30 minutes |
||
|Author=r-frank |
|Author=r-frank and vocx |
||
|FCVersion=0. |
|FCVersion=0.17 and above |
||
|Files=[https://github.com/FreeCAD/Examples/blob/master/Draft_Shapestring_Tutorial_Examples/Draft_Shapestring_Tutorial_Text.FCStd?raw=true Draft_Shapestring_Text] |
|||
|Files= |
|||
}} |
}} |
||
==Introduction== <!--T:2--> |
==Introduction== <!--T:2--> |
||
In this tutorial we will discuss how to |
|||
<!--T:11--> |
|||
* insert a text with the [[Image:Draft_ShapeString.png|16px]] [[Draft_ShapeString|ShapeString]] tool |
|||
This tutorial was originally written by Roland Frank (†2017, r-frank), and it was rewritten and re-illustrated by vocx. |
|||
* extrude it to be a solid |
|||
* position it in 3D space using [[placement|placement]] and [[Draft Move|Draft Move]] with sketches as helper elements |
|||
<!--T:12--> |
|||
* doing an engraving by applying a boolean cut |
|||
This tutorial describes a method to create 3D text and use it with solid objects in the [[File:Workbench_Part.svg|24px]] [[Part_Workbench|Part Workbench]]. We will discuss how to |
|||
* insert outlined text with the {{Button|[[Image:Draft_ShapeString.svg|16px]] [[Draft_ShapeString|Draft ShapeString]]}} tool, |
|||
* extrude it to be a 3D solid with {{Button|[[File:Part_Extrude.svg|16px]] [[Part_Extrude|Part Extrude]]}}, |
|||
* position it in 3D space using [[Placement|placement]], and {{Button|[[File:Draft_Move.svg|16px]] [[Draft_Move|Draft Move]]}} (it uses a sketch as auxiliary geometry), and |
|||
* engrave the text by applying a boolean {{Button|[[File:Part_Cut.svg|16px]] [[Part_Cut|Part Cut]]}}. |
|||
<!--T:13--> |
|||
To use ShapeStrings inside the [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbench]], the process is essentially the same as with the Part Workbench, but the ShapeString is placed inside the [[PartDesign_Body|PartDesign Body]] to extrude it. Go to the end of this tutorial for more information. |
|||
</translate> |
|||
[[File:08_T04_Part_ShapesString_Extrude_final_cut.png]] |
|||
<translate> |
|||
<!--T:14--> |
|||
{{Caption|Final model of the engraved text.}} |
|||
<!--T:10--> |
<!--T:10--> |
||
The [[Sketcher_Workbench|Sketcher Workbench]] is used briefly to draw an auxiliary line. More information about the tools of this workbench can be found in |
|||
It is recommended to have completed the sketcher tutorial first. |
|||
* [[Basic_Sketcher_Tutorial|Basic Sketcher tutorial]] |
|||
* [[Sketcher_reference|Sketcher reference]] |
|||
== |
== Setup == <!--T:15--> |
||
*Start FreeCAD and create a new document |
|||
*Switch to part workbench |
|||
*Insert a cube by clicking on [[Image:Part_Box.png|32px]] |
|||
*Make sure the cube is selected in the tree view |
|||
*Change width to be 31 mm by using the data-tab in the property view |
|||
*Click on [[Image:View-axometric.svg|32px]] to change to axometric view |
|||
*Click on [[Image:View-zoom-all.svg|32px]] to zoom to fit all |
|||
*Select upper edge on the front face of the cube in 3D view |
|||
*Apply a chamfer (to Edge6) of 5 mm by clicking on [[Image:Part_Chamfer.png|32px]] |
|||
*Make sure object "chamfer" is selected in the tree view and press <Space> to toggle visibility |
|||
[[Image:TutorialDraftShapeString_BasicShape.jpg|300px]] |
|||
<!--T:16--> |
|||
==Inserting text with the Draft ShapeString tool== <!--T:4--> |
|||
1. Open FreeCAD, create a new empty document with {{MenuCommand|File → [[File:Std_New.svg|16px]] [[Std_New|New]]}}, and switch to the [[Part_Workbench|Part Workbench]]. |
|||
*Switch to Draft workbench |
|||
:1.1. Press the {{Button|[[File:Std_ViewIsometric.svg|16px]] [[Std_ViewIsometric|View isometric]]}} button, or press {{KEY|0}} in the numerical pad of your keyboard, to change the view to isometric to visualize the 3D solids better. |
|||
*make sure nothing is selected in the tree view |
|||
:1.2. Press the {{Button|[[File:Std_ViewFitAll.svg|16px]] [[Std_ViewFitAll|View fit all]]}} button whenever you add objects in order to pan and zoom the [[3D_view|3D view]] so that all elements are seen in the view. |
|||
*Toggle working plane to XY (Top) by clicking on {{KEY| [[Image:Draft_SelectPlane.png|32px]] Auto}} and choosing {{KEY| XY}} |
|||
:1.3. Hold {{KEY|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|3D view]]. |
|||
*Insert text "FreeCAD" by |
|||
**Click on [[Image:Draft_ShapeString.png|32px]] |
|||
**Highlight the text in the "Global X"-field and type "0" on the keyboard and press {{KEY| Return}} |
|||
**The text in the "Global Y" field is highlighted |
|||
**Type "0" on the keyboard and press {{KEY| Return}} |
|||
**The text in the "Global Z" field is highlighted |
|||
**Type "0" on the keyboard and press {{KEY| Return}} |
|||
**Enter "FreeCAD" in the string field (without brackets) and press {{KEY| Return}} |
|||
**Choose a height of 5mm |
|||
**Choose a tracking of 0 mm |
|||
**now point FreeCAD to a "TTF"-Text-Font to use (for example the ARIAL-TTF) |
|||
**After pressing {{KEY| Return}} one last time, the Draft-Shapestring object is created in the tree view |
|||
==Create |
==Create the basic shape== <!--T:3--> |
||
*Switch to part workbench |
|||
*Make sure the Draft Shapestring object view is selected in the tree |
|||
*Use Part Extrude-Tool [[Image:Part_Extrude.png|32px]] with the parameters: |
|||
**extude Z=1 mm |
|||
**make sure to tick "create solid" |
|||
*Make sure object "Extrude" is selected in the tree view and press <Space> to toggle visibility |
|||
[[Image:TutorialDraftShapeString_DraftShapestring.jpg|300px]] |
|||
<!--T:17--> |
|||
==Insert sketch for positioning== <!--T:6--> |
|||
2. Insert a primitive cube by clicking on {{Button|[[Image:Part_Box.svg|16px]] [[Part_Box|Box]]}}. |
|||
*Switch to sketcher workbench |
|||
:2.1. Select {{incode|Cube}} in the [[Tree_view|tree view]]. |
|||
*Make sure object "chamfer" is selected in the tree view and press <Space> to toggle visibility |
|||
:2.2. Change the dimensions in the {{MenuCommand|Data}} tab of the [[Property_editor|property editor]]. |
|||
*Choose sloped face created by chamfer operation |
|||
:2.3. Change {{MenuCommand|Width}} to {{incode|31 mm}}. |
|||
*Click on [[Image: Sketcher_NewSketch.png|32px]] to insert new sketch |
|||
*Draw a line (may be horizintal or vertical, length is not of importance ...) |
|||
*Constrain one of the endpoints to be +2,5 mm vertical distance and +2 mm horizontal distance away from the origin |
|||
*Close sketch |
|||
[[Image:TutorialDraftShapeString_Sketch.jpg|600px]] |
|||
<!--T:18--> |
|||
==Positioning 3D text in 3D space== <!--T:7--> |
|||
3. Create a chamfer. |
|||
*Make sure object "Extrude" is selected in the tree view and press <Space> to toggle visibility |
|||
:3.1. Select the upper edge ({{incode|Edge6}}) on the front face of the {{incode|Cube}} in the [[3D_view|3D view]]. |
|||
*Make sure, object "Extrude" is selected in the tree view |
|||
:3.2. Press {{Button|[[Image:Part_Chamfer.svg|16px]] [[Part_Chamfer|Chamfer]]}}. |
|||
*Apply incremental placement, axis of rotation Z=90° |
|||
:3.3. In the {{MenuCommand|Chamfer edges}} [[Task_panel|task panel]] go to {{MenuCommand|Selection}}, choose {{MenuCommand|Select edges}}. As {{MenuCommand|Chamfer type}} choose {{incode|Equal distance}}, then set {{MenuCommand|Length}} to {{incode|5 mm}}. |
|||
*Apply incremental placement, axis of rotation Y=45° |
|||
:3.4. Press {{Button|OK}}. This will create a {{incode|Chamfer}} object. |
|||
*Switch to draft workbench |
|||
:3.5. In the [[Tree_view|tree view]], select {{incode|Chamfer}}, in the {{MenuCommand|View}} tab change the value of {{MenuCommand|Line Width}} to {{incode|2.0}}. |
|||
*Switch to wireframe mode |
|||
*Make sure, only "snap to endpoint" is activated |
|||
</translate> |
|||
*Select "extrude"-object |
|||
[[File:01_T04_Part_Cube_base_long.png]] |
|||
*Click on [[Image: Draft_Move.png|32px]] |
|||
<translate> |
|||
*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) |
|||
<!--T:19--> |
|||
[[Image:TutorialDraftShapeString_Position.jpg|600px]] |
|||
{{Caption|Base object created from a cube and a chamfer operation.}} |
|||
==Insert the ShapeString== <!--T:4--> |
|||
<!--T:20--> |
|||
4. Switch to the [[Draft_Workbench|Draft Workbench]]. |
|||
:4.1. Make sure nothing is selected in the [[Tree_view|tree view]]. |
|||
:4.2. Establish the working plane to XY (Top) by clicking on {{Button|[[File:Draft_SelectPlane.svg|16px]] [[Draft_SelectPlane|SelectPlane]]}} and pressing {{Button|[[File:View-top.svg|16px]] [[Std_ViewTop|Top (XY)]]}}. |
|||
<!--T:21--> |
|||
5. Insert the text "FreeCAD". |
|||
:5.1. Click on {{Button|[[File:Draft_ShapeString.svg|16px]] [[Draft_ShapeString|ShapeString]]}}. |
|||
:5.2. Change {{MenuCommand|X}} to {{incode|0 mm}}. |
|||
:5.3. Change {{MenuCommand|Y}} to {{incode|0 mm}}. |
|||
:5.4. Change {{MenuCommand|Z}} to {{incode|0 mm}}. |
|||
:5.5. Or press {{Button|Reset point}}. |
|||
:5.6. Change {{MenuCommand|String}} to {{incode|FreeCAD}}; change {{MenuCommand|Height}} to {{incode|5 mm}}; change {{MenuCommand|Tracking}} to {{incode|0 mm}}. |
|||
:5.7. Make sure {{MenuCommand|Font file}} points to a valid font, for example, {{incode|/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf}}. Press the ellipsis {{Button|...}} to open the operating system's dialog to find a font. |
|||
::{{Emphasis|Note:}} for more details about working with fonts please refer to the [[Draft_ShapeString#Notes|Draft ShapeString Notes]] section. |
|||
:5.8. Press {{Button|OK}}. This will create a {{incode|ShapeString}} object. |
|||
:5.9. Recompute the document by pressing {{Button|[[File:Std_Refresh.svg|16px]] [[Std_Refresh|Refresh]]}}. |
|||
:5.10. In the [[Tree_view|tree view]], select {{incode|ShapeString}}, in the {{MenuCommand|View}} tab change the value of {{MenuCommand|Line Width}} to {{incode|2.0}}. |
|||
:5.11. In the [[Tree_view|tree view]], select {{incode|Chamfer}}, in the {{MenuCommand|View}} tab change the value of {{MenuCommand|Visibility}} to {{incode|false}}, or press {{KEY|Space}} in the keyboard. This will hide the object, so you can see the {{incode|ShapeString}} better. |
|||
:5.12. To see the ShapeString from above change the view by pressing {{Button|[[File:View-top.svg|16px]] [[Std_ViewTop|Top (XY)]]}}, or {{KEY|2}} in the keyboard. |
|||
:5.13. To restore the view to isometric, press {{Button|[[File:Std_ViewIsometric.svg|16px]] [[Std_ViewIsometric|View isometric]]}}, or {{KEY|0}} in the keyboard. |
|||
</translate> |
|||
[[File:02_T04_Part_ShapeString.png]] |
|||
<translate> |
|||
<!--T:22--> |
|||
{{Caption|Text created as a ShapeString, that is, as a collection of edges in a plane.}} |
|||
==Create the solid 3D text== <!--T:5--> |
|||
<!--T:23--> |
|||
6. Switch back to the [[Part_Workbench|Part Workbench]]. |
|||
:6.1. In the [[Tree_view|tree view]], select {{incode|ShapeString}}, then press {{Button|[[File:Part_Extrude.svg|16px]] [[Part_Extrude|Extrude]]}}. |
|||
:6.2. In the {{MenuCommand|Extrude}} [[Task_panel|task panel]] go to {{MenuCommand|Direction}}, choose {{MenuCommand|Along normal}}; in {{MenuCommand|Length}}, set {{MenuCommand|Along}} to {{incode|1 mm}}; also tick the {{MenuCommand|Create solid}} option. |
|||
:6.3. Press {{Button|OK}}. This will create an {{incode|Extrude}} object. |
|||
:6.4. In the [[Tree_view|tree view]], select {{incode|Extrude}}, in the {{MenuCommand|View}} tab change the value of {{MenuCommand|Line Width}} to {{incode|2.0}}. |
|||
</translate> |
|||
[[File:03_T04_Part_ShapeString_Extrude.png]] |
|||
<translate> |
|||
<!--T:24--> |
|||
{{Caption|Text created as a ShapeString, and turned into a solid by extrusion.}} |
|||
==Insert auxiliary sketch for positioning== <!--T:6--> |
|||
<!--T:25--> |
|||
Now we will draw a simple sketch that will be used as auxiliary geometry to position the ShapeString extrusion. |
|||
<!--T:26--> |
|||
7. In the [[Tree_view|tree view]], select {{incode|Extrude}}, and press {{KEY|Space}} in the keyboard to make it invisible. |
|||
<!--T:27--> |
|||
8. Switch to the [[Sketcher_Workbench|Sketcher Workbench]]. |
|||
<!--T:28--> |
|||
9. In the [[Tree_view|tree view]], select {{incode|Chamfer}}, and press {{KEY|Space}} in the keyboard to make it visible. |
|||
:9.1. Choose the sloped face created by the chamfer operation ({{incode|Face3}}). |
|||
:9.2. Click on {{Button|[[File:Sketcher_NewSketch.svg|16px]] [[Sketcher_NewSketch|NewSketch]]}}. In the {{MenuCommand|Sketch attachment}} dialog, select {{incode|FlatFace}}, and press {{Button|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 a 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 {{incode|2.5 mm}} away from the local X axis and from the local Y axis, using {{Button|[[File:Sketcher_ConstrainDistanceX.svg|16px]] [[Sketcher_ConstrainDistanceX|ConstrainDistanceX]]}} and {{Button|[[File:Sketcher_ConstrainDistanceY.svg|16px]] [[Sketcher_ConstrainDistanceY|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, {{incode|20 mm}}, again with {{Button|[[File:Sketcher_ConstrainDistanceX.svg|16px]] [[Sketcher_ConstrainDistanceX|ConstrainDistanceX]]}}. |
|||
:9.7. Close the sketch. |
|||
</translate> |
|||
[[File:04_T04_Part_ShapeString_support_sketch.png|500px]] |
|||
<translate> |
|||
<!--T:29--> |
|||
{{Caption|Line being created with the sketcher, with constraints.}} |
|||
</translate> |
|||
[[File:05_T04_Part_ShapeString_support_sketch_3D.png|500px]] |
|||
<translate> |
|||
<!--T:30--> |
|||
{{Caption|Sketch line created on top of the solid face, to be used as reference guide for positioning the extruded text.}} |
|||
==Positioning the solid text in 3D space== <!--T:7--> |
|||
<!--T:31--> |
|||
10. In the [[Tree_view|tree view]], select {{incode|Extrude}}, and press {{KEY|Space}} in the keyboard to make it visible. |
|||
<!--T:32--> |
|||
11. With {{incode|Extrude}} still selected, in the {{MenuCommand|Data}} tab of the [[property editor|property editor]], click on the {{MenuCommand|Placement}} value so the ellipsis button {{Button|...}} appears on the right and click on that button. |
|||
:11.1. Tick the option {{MenuCommand|Apply incremental changes}}. |
|||
:11.2. Change the {{MenuCommand|Rotation}} to {{incode|Rotation axis with angle}}; {{MenuCommand|Axis}} to {{incode|Z}} (by setting the {{incode|X}}, {{incode|Y}} and {{incode|Z}} values of the axis inputboxes to {{incode|0}}, {{incode|0}} and {{incode|1}} respectively, {{incode|Z}} is the third inputbox), and {{MenuCommand|Angle}} to {{incode|90 deg}}, then click on {{Button|Apply}}. This will apply a rotation around the Z-axis, and will reset the {{MenuCommand|Angle}} field to zero. |
|||
:11.3. Change the {{MenuCommand|Rotation}} to {{incode|Rotation axis with angle}}; {{MenuCommand|Axis}} to {{incode|Y}} (by setting the {{incode|X}}, {{incode|Y}} and {{incode|Z}} values of the axis inputboxes to {{incode|0}}, {{incode|1}} and {{incode|0}} respectively), and {{MenuCommand|Angle}} to {{incode|45 deg}}, then click on {{Button|Apply}}. This will apply a rotation around the Y-axis, and will reset the {{MenuCommand|Angle}} field to zero. |
|||
:11.4. Click on {{Button|OK}} to close the dialog. |
|||
<!--T:33--> |
|||
12. Switch again to the [[Draft_Workbench|Draft Workbench]]. |
|||
:12.1. Switch to "Wireframe" draw style with {{MenuCommand|View → [[Std_DrawStyle|Draw style]] → [[File:DrawStyleWireFrame.svg|16px]] Wireframe}}, or press the {{Button|[[File:DrawStyleWireFrame.svg|16px]] [[Std_DrawStyle|Wireframe]]}} button in the view toolbar. This will allow you to see the objects behind other objects. |
|||
:12.2. Make sure the [[Draft_Snap|Draft Snap]] "Snap to endpoint" method is active. This can be done from the menu {{MenuCommand|Draft → Snapping → [[File:Draft_Snap_Lock.svg|16px]] [[Draft_Snap_Lock|Toggle On/Off]]}}, and then {{MenuCommand| → [[File:Draft_Snap_Endpoint.svg|16px]] [[Draft_Snap_Endpoint|Endpoint]]}}, or by pressing the {{Button|[[File:Draft_Snap_Lock.svg|16px]] [[Draft_Snap_Lock|ToggleSnap]]}} and {{Button|[[File:Draft_Snap_Endpoint.svg|16px]] [[Draft_Snap_Endpoint|Snap endpoint]]}} buttons in the Snap toolbar. |
|||
<!--T:34--> |
|||
13. In the [[Tree_view|tree view]], select {{incode|Extrude}}. |
|||
:13.1. Click on {{Button|[[File:Draft_Move.svg|16px]] [[Draft_Move|Move]]}}. |
|||
:13.2. In the [[3D_view|3D view]] click on the upper left corner point of the {{incode|Extrude}} object (1), and then click on the leftmost point in the line drawn with the sketcher (2). |
|||
:13.3. If {{Button|[[File:Draft_Snap_Endpoint.svg|16px]] [[Draft_Snap_Endpoint|Snap endpoint]]}} is active, as soon as you move the pointer close to a vertex, you should see that it attaches to it exactly. |
|||
:{{Emphasis|Note:}} if you have problems snapping to vertices, make sure only the {{Button|[[File:Draft_Snap_Endpoint.svg|16px]] [[Draft_Snap_Endpoint|Snap endpoint]]}} method is enabled. Having multiple snapping methods active at the same time may make it difficult to select the right feature. |
|||
:13.4. The extruded text should now be inside the body of the {{incode|Chamfer}} object. |
|||
</translate> |
|||
[[File:06_T04_Part_ShapeString_move.svg]] |
|||
<translate> |
|||
<!--T:35--> |
|||
{{Caption|The extruded ShapeString should be moved to the position of the sketched line that lies on the face of the base body.}} |
|||
</translate> |
|||
[[File:07_T04_Part_ShapesString_Extrude_in_place.png]] |
|||
<translate> |
|||
<!--T:36--> |
|||
{{Caption|Extruded ShapeString positioned in the {{incode|Chamfer}}.}} |
|||
==Creating engraved text== <!--T:8--> |
==Creating engraved text== <!--T:8--> |
||
*Switch to part workbench |
|||
<!--T:37--> |
|||
*Switch to "As is"-view mode |
|||
14. Switch back to the [[Part_Workbench|Part Workbench]]. |
|||
*Select the 3D text ("extrude") and then the base object ("chamfer") in the tree view |
|||
:14.1. Switch to "As is" draw style with {{MenuCommand|View → [[Std_DrawStyle|Draw style]] → [[File:DrawStyleAsIs.svg|16px]] As is}}, or press the {{Button|[[File:DrawStyleAsIs.svg|16px]] [[Std_DrawStyle|As is]]}} button in the view toolbar. This will show all objects with the normal shading and color. |
|||
*Apply a boolean cut by clicking on [[Image:Part_Cut.png|32px]] |
|||
:14.2. In the [[Tree_view|tree view]], select {{incode|Sketch}}, and press {{KEY|Space}} in the keyboard to make it invisible. |
|||
*Make sure object "Sketch" is selected in the tree view |
|||
*Press <Space> to toggle visibilty |
|||
<!--T:38--> |
|||
*Click on [[Image:View-axometric.svg|32px]] to change to axometric view |
|||
15. In the [[Tree_view|tree view]] select {{incode|Chamfer}} first, and then {{incode|Extrude}}. |
|||
*Click on [[Image:View-zoom-all.svg|32px]] to zoom to fit all |
|||
:15.1. Then press {{Button|[[File:Part_Cut.svg|16px]] [[Part_Cut|Cut]]}}. This will create a {{incode|Cut}} object. This is the final object. |
|||
*Finished |
|||
:{{Emphasis|Note:}} the order in which you select the objects is important for the cut operation. The base object is selected first, and the subtracting object comes at the end. |
|||
[[Image:TutorialDraftShapeString_Complete.jpg|300px]] |
|||
:15.2. In the [[Tree_view|tree view]], select {{incode|Cut}}, in the {{MenuCommand|View}} tab change the value of {{MenuCommand|Line Width}} to {{incode|2.0}}. |
|||
</translate> |
|||
[[File:08_T04_Part_ShapesString_Extrude_final_cut.png]] |
|||
<translate> |
|||
<!--T:39--> |
|||
{{Caption|Final model of a filleted cube, with carved text created from a ShapeString, Extrude, and boolean Cut operations.}} |
|||
== Engraving 3D text with the PartDesign Workbench == <!--T:40--> |
|||
<!--T:41--> |
|||
A similar process as described above can be done with the [[PartDesign_Workbench|PartDesign Workbench]]. |
|||
<!--T:42--> |
|||
# Create the {{Button|[[File:Draft_ShapeString.svg|16px]] [[Draft_ShapeString|Draft ShapeString]]}} first. |
|||
# Create a {{Button|[[File:PartDesign_Body_Tree.svg|16px]] [[PartDesign_Body|PartDesign Body]]}}, make it active, and add a base solid by adding primitives, or using a Sketch and extruding it with {{Button|[[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}. |
|||
# Move the {{incode|ShapeString}} object into the active body. |
|||
# Attach the {{incode|ShapeString}} object to one of the faces of the solid, or to a {{Button|[[File:PartDesign_Plane.svg|16px]] [[PartDesign Plane|PartDesign Plane]]}}, using {{Button|[[File:Part_EditAttachment.svg|16px]] [[Part_EditAttachment|Part EditAttachment]]}}. |
|||
# Now create a {{Button|[[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}} or a {{Button|[[File:PartDesign_Pocket.svg|16px]] [[PartDesign_Pocket|PartDesign Pocket]]}} from the {{incode|ShapeString}}, in order to produce an additive or a subtractive [[PartDesign_Feature|feature]] of the base body, respectively. |
|||
<!--T:43--> |
|||
See the forum thread, [https://forum.freecadweb.org/viewtopic.php?f=3&t=36623 How to use ShapeStrings in PartDesign]. |
|||
==Notes== <!--T:9--> |
==Notes== <!--T:9--> |
||
*for creating curved text you can use the macro [[Macro_Circular Text|Circular Text]] |
|||
<!--T:44--> |
|||
*for importing text from inkscape look at the "Importing text from inkscape"-tutorial |
|||
* To create curved text you can use [[File:FCCircularTextButtom.png|32px]] [[Macro_FCCircularText|Macro FCCircularText]]. |
|||
*Extrusion of the Shapestring-Text can also be done with the PartDesign-Pad-Tool |
|||
* To import text from an SVG file look at the [[Import_text_and_geometry_from_Inkscape|Import text and geometry from Inkscape]] tutorial. |
|||
*Remember that the DraftShapestring-Object cannot be attached to a face (so no pocket-command possible) |
|||
</translate> |
</translate> |
||
{{Part Tools navi{{#translation:}}}} |
|||
{{clear}} |
|||
{{PartDesign Tools navi{{#translation:}}}} |
|||
<languages/> |
|||
{{Sketcher Tools navi{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 09:11, 6 November 2023
Tutorial |
Topic |
---|
Product design |
Level |
Beginner |
Time to complete |
30 minutes |
Authors |
r-frank and vocx |
FreeCAD version |
0.17 and above |
Example files |
Draft_Shapestring_Text |
See also |
None |
Introduction
This tutorial was originally written by Roland Frank (†2017, r-frank), and it was rewritten and re-illustrated by vocx.
This tutorial describes a method to create 3D text and use it with solid objects in the Part Workbench. We will discuss how to
- insert outlined text with the Draft ShapeString tool,
- extrude it to be a 3D solid with Part Extrude,
- position it in 3D space using placement, and Draft Move (it uses a sketch as auxiliary geometry), and
- engrave the text by applying a boolean Part Cut.
To use ShapeStrings inside the PartDesign Workbench, the process is essentially the same as with the Part Workbench, but the ShapeString is placed inside the PartDesign Body to extrude it. Go to the end of this tutorial for more information.
Final model of the engraved text.
The Sketcher Workbench is used briefly to draw an auxiliary line. More information about the tools of this workbench can be found in
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 Chamfer type choose
Equal distance
, then set Length to5 mm
. - 3.4. Press OK. This will create a
Chamfer
object. - 3.5. In the tree view, select
Chamfer
, in the View tab change the value of Line Width to2.0
.
Base object created from a cube and a chamfer operation.
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. Click 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.- Note: for more details about working with fonts please refer to the Draft ShapeString Notes section.
- 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 ShapeString 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 solid 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 auxiliary sketch for positioning
Now we will draw a simple sketch that will be used as auxiliary geometry to position the ShapeString extrusion.
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 a 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,
20 mm
, again with ConstrainDistanceX. - 9.7. Close the sketch.
Line being created with the sketcher, with constraints.
Sketch line created on top of the solid face, to be used as reference guide for positioning the extruded text.
Positioning the solid text in 3D space
10. In the tree view, select Extrude
, and press Space in the keyboard to make it visible.
11. With Extrude
still selected, in the Data tab of the property editor, click on the Placement value so the ellipsis button ... appears on the right and click on that button.
- 11.1. Tick the option Apply incremental changes.
- 11.2. Change the Rotation to
Rotation axis with angle
; Axis toZ
(by setting theX
,Y
andZ
values of the axis inputboxes to0
,0
and1
respectively,Z
is the third inputbox), and Angle to90 deg
, then click on Apply. This will apply a rotation around the Z-axis, and will reset the Angle field to zero. - 11.3. Change the Rotation to
Rotation axis with angle
; Axis toY
(by setting theX
,Y
andZ
values of the axis inputboxes to0
,1
and0
respectively), and Angle to45 deg
, then click on Apply. This will apply a rotation around the Y-axis, and will reset the Angle field to zero. - 11.4. Click on OK to close the dialog.
12. Switch again to the Draft Workbench.
- 12.1. Switch to "Wireframe" draw style with View → Draw style → Wireframe, or press the Wireframe button in the view toolbar. This will allow you to see the objects behind other objects.
- 12.2. Make sure the Draft Snap "Snap to endpoint" method is active. This can be done from the menu Draft → Snapping → Toggle On/Off, and then → Endpoint, or by pressing the ToggleSnap and Snap endpoint buttons in the Snap toolbar.
13. In the tree view, select Extrude
.
- 13.1. Click on Move.
- 13.2. In the 3D view click on the upper left corner point of the
Extrude
object (1), and then click on the leftmost point in the line drawn with the sketcher (2). - 13.3. If Snap endpoint is active, as soon as you move the pointer close to a vertex, you should see that it attaches to it exactly.
- Note: if you have problems snapping to vertices, make sure only the Snap endpoint method is enabled. Having multiple snapping methods active at the same time may make it difficult to select the right feature.
- 13.4. The extruded text should now be inside the body of the
Chamfer
object.
The extruded ShapeString should be moved to the position of the sketched line that lies on the face of the base body.
Extruded ShapeString positioned in the Chamfer
.
Creating engraved text
14. Switch back to the Part Workbench.
- 14.1. Switch to "As is" draw style with View → Draw style → As is, or press the As is button in the view toolbar. This will show all objects with the normal shading and color.
- 14.2. In the tree view, select
Sketch
, and press Space in the keyboard to make it invisible.
15. In the tree view select Chamfer
first, and then Extrude
.
- 15.1. Then press Cut. This will create a
Cut
object. This is the final object. - Note: the order in which you select the objects is important for the cut operation. The base object is selected first, and the subtracting object comes at the end.
- 15.2. In the tree view, select
Cut
, in the View tab change the value of Line Width to2.0
.
Final model of a filleted cube, with carved text created from a ShapeString, Extrude, and boolean Cut operations.
Engraving 3D text with the PartDesign Workbench
A similar process as described above can be done with the PartDesign Workbench.
- Create the Draft ShapeString first.
- Create a PartDesign Body, make it active, and add a base solid by adding primitives, or using a Sketch and extruding it with PartDesign Pad.
- Move the
ShapeString
object into the active body. - Attach the
ShapeString
object to one of the faces of the solid, or to a PartDesign Plane, using Part EditAttachment. - Now create a PartDesign Pad or a PartDesign Pocket from the
ShapeString
, in order to produce an additive or a subtractive feature of the base body, respectively.
See the forum thread, How to use ShapeStrings in PartDesign.
Notes
- To create curved text you can use Macro FCCircularText.
- To import text from an SVG file look at the Import text and geometry from Inkscape tutorial.
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Extrude, Revolve, Mirror, Fillet, Chamfer, Make face from wires, Ruled Surface, Loft, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Thickness, Projection on surface, Attachment
- Boolean: Make compound, Explode Compound, Compound Filter, Boolean, Cut, Fuse, Common, Connect, Embed, Cutout, Boolean fragments, Slice apart, Slice, XOR
- Measure: Measure Linear, Measure Angular, Measure Refresh, Clear All, Toggle All, Toggle 3D, Toggle Delta
- Structure tools: Part, Group
- Helper tools: Create body, Create sketch, Edit sketch, Map sketch to face
- Modeling tools
- Datum tools: Create a datum point, Create a datum line, Create a datum plane, Create a local coordinate system, Create a shape binder, Create a sub-object(s) shape binder, Create a clone
- Additive tools: Pad, Revolution, Additive loft, Additive pipe, Additive helix, Additive box, Additive cylinder, Additive sphere, Additive cone, Additive ellipsoid, Additive torus, Additive prism, Additive wedge
- Subtractive tools: Pocket, Hole, Groove, Subtractive loft, Subtractive pipe, Subtractive helix, Subtractive box, Subtractive cylinder, Subtractive sphere, Subtractive cone, Subtractive ellipsoid, Subtractive torus, Subtractive prism, Subtractive wedge
- Transformation tools: Mirrored, Linear Pattern, Polar Pattern, Create MultiTransform, Scaled
- Dress-up tools: Fillet, Chamfer, Draft, Thickness
- Boolean: Boolean operation
- Extras: Migrate, Sprocket, Involute gear, Shaft design wizard
- Context menu: Set tip, Move object to other body, Move object after other object, Appearance, Color per face
- General: Create sketch, Edit sketch, Map sketch to face, Reorient sketch, Validate sketch, Merge sketches, Mirror sketch, Leave sketch, View sketch, View section, Toggle grid, Toggle snap, Configure rendering order, Stop operation
- Sketcher geometries: Point, Line, Arc, Arc by 3 points, Circle, Circle by 3 points, Ellipse, Ellipse by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, B-spline by control points, Periodic B-spline by control points, B-spline by knots, Periodic B-spline by knots, Polyline, Rectangle, Centered rectangle, Rounded rectangle, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Regular polygon, Slot, Fillet, Corner-preserving fillet, Trim, Extend, Split, External geometry, Carbon copy, Toggle construction geometry
- Sketcher constraints:
- Geometric constraints: Coincident, Point on object, Vertical, Horizontal, Parallel, Perpendicular, Tangent, Equal, Symmetric, Block
- Dimensional constraints: Lock, Horizontal distance, Vertical distance, Distance, Radius or weight, Diameter, Auto radius/diameter, Angle, Refraction (Snell's law)
- Constraint tools: Toggle driving/reference constraint, Activate/deactivate constraint
- Sketcher tools: Select unconstrained DoF, Select associated constraints, Select associated geometry, Select redundant constraints, Select conflicting constraints, Show/hide internal geometry, Select origin, Select horizontal axis, Select vertical axis, Symmetry, Clone, Copy, Move, Rectangular array, Remove axes alignment, Delete all geometry, Delete all constraints
- Sketcher B-spline tools: Show/hide B-spline degree, Show/hide B-spline control polygon, Show/hide B-spline curvature comb, Show/hide B-spline knot multiplicity, Show/hide B-spline control point weight, Convert geometry to B-spline, Increase B-spline degree, Decrease B-spline degree, Increase knot multiplicity, Decrease knot multiplicity, Insert knot, Join curves
- Sketcher virtual space: Switch virtual space
- Additional: Sketcher Dialog, Preferences, Sketcher scripting
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub