Draft tutorial: Difference between revisions

From FreeCAD Documentation
(6a and 6b)
(Rewritten information. Images to come.)
Line 153: Line 153:


<!--T:117-->
<!--T:117-->
Linear dimensions work best when using the appropriate [[Draft_Snap|Draft Snap]] methods to select points and edges to measure. However, they can also be created by specifying absolute coordinates.
Dimensions require a constant use of '''Snapping Constraints''' to properly select the points that one wishes to dimension. The '''Snapping toolbar''' is used to change the possible points that can be selected.


<!--T:88-->
<!--T:88-->
11. Create dimensions for the different objects.
# Select [[Image:Draft_Dimension.svg|32px]] [[Draft_Dimension|Dimension]]
:11.1. Press {{Button|[[File:Draft_Dimension.svg|16px]] [[Draft_Dimension|Dimension]]}}.
# Select the first point. This can be either an existing element or specified by coordinates. For this tutorial, the first point will always be '''(0, 0, 0)'''
:11.2. Pick the first point. In this tutorial the first point will always be the origin {{Value|(0, 0, 0)}}.
# Select the second point. Approach the [[Draft Midpoint|midpoint]] of the top line of the polygon. A white point should appear alongside this icon [[Image:Snap_Midpoint.svg|32px]]
:11.3. In the [[Draft_Snap|Snap toolbar]] make sure {{Button|[[File:Draft_ToggleSnap.svg|16px]] [[Draft_ToggleSnap|Snap]]}} is active, and only {{Button|[[File:Draft_Midpoint.svg|16px]] [[Draft_Midpoint|Midpoint]]}} as well. As you move the pointer to the top edge of the polygon, the [[File:Draft_Midpoint.svg|24px]] [[Draft_Midpoint|Midpoint]] icon should appear; click to select this point.
# Move the cursor to the desired location of the dimension and click on it.
:11.4. Move the cursor to the right to specify the location of the dimension, the click to set the final position, around {{Value|(100, 20, 0)}}. The dimension will automatically show the length value measured between the two points.
# Change the font size on the [[Property_editor#View|'''View''' tab]] to 6 mm
:11.5. Select the dimension object in the [[tree_view|tree view]], and in the [[Property_editor|property editor]], change {{PropertyView|Font Size}} to {{Value|6 mm}}, set {{PropertyView|Ext Lines}} to {{Value|45 mm}}, and {{PropertyView|Show Unit}} to {{FALSE}}.


<!--T:89-->
<!--T:89-->
12. Repeat the process for the two arcs of the closed profile. The first point of the measurement will still be the origin, and the second point will use the [[File:Draft_Midpoint.svg|24px]] [[Draft_Midpoint|Midpoint]] of the arc.
Repeat the process for the arcs and circles.


13. Repeat the process for the circle located in the center. The first point of the measurement will still be the origin. To select the second point make sure {{Button|[[File:Draft_ToggleSnap.svg|16px]] [[Draft_ToggleSnap|Snap]]}} is active, and only {{Button|[[File:Draft_Angle.svg|16px]] [[Draft_Angle|Angle]]}} as well. As you move the pointer to the top of the circle, the [[File:Draft_Angle.svg|24px]] [[Draft_Angle|Angle]] icon should appear; click to select this point. Then move the cursor to the right and click to fix the dimension.
=== Annotations and Text === <!--T:90-->
There is a slight difference between the two: it is only possible to use the second one as a profile to perform 3D operations.


Remember to adjust the {{PropertyView|Font Size}}, and other properties to see the dimension correctly.
==== Annotations ==== <!--T:91-->
# Select the [[Image:Draft_Text.svg|24px]] [[Draft_Text|Text]] button.
# Select the reference point in the [[3D View]]. In this case, the [[Draft Midpoint|midpoint]] of the top arc.
# Enter your text and press {{KEY|Enter}}
# Repeat for as many lines of text as you wish to input.
# Press {{KEY|Enter}}


==== Text ==== <!--T:92-->
== Texts and ShapeStrings == <!--T:90-->
# Select the [[Image:Draft_ShapeString.svg|24px]] [[Draft_ShapeString|ShapeString]] button.
# Select the reference point in the [[3D View]]. This can be an existing point or the current cursor location.
# Enter your text and press {{KEY|Enter}}
# Set the desired font size
# Leave tracking at 0 mm
# Select the '''path''' to the font file that you wish to use


=== Creating Blueprints === <!--T:93-->
<!--T:91-->
14. Text objects are simple planar figures that are created in the [[3D_view|3D view]] but don't have an actual [[Shape|shape]] underneath. This means that they cannot be used in complex operations with shapes, such as extrusions or boolean operations.
To create blueprints, it is necessary to create a '''Technical Drawing''' with the elements that you wish to use. Please read the <s>[[Drawing tutorial]]</s> for a detailed description.
:14.1. Press {{Button|[[File:Draft_Text.svg|16px]] [[Draft_Text|Text]]}}.
:14.2. Select the reference point in the [[3D_view|3D view]]. In the [[Draft_Snap|Snap toolbar]] make sure {{Button|[[File:Draft_ToggleSnap.svg|16px]] [[Draft_ToggleSnap|Snap]]}} is active, and only {{Button|[[File:Draft_Midpoint.svg|16px]] [[Draft_Midpoint|Midpoint]]}} as well. Move the pointer to the top edge of the highest arc, so that the [[File:Draft_Midpoint.svg|24px]] [[Draft_Midpoint|Midpoint]] icon appears; click to select this point.
:14.3. Enter the desired {{MenuCommand|Text}}, and press {{KEY|Enter}} once to start a new line; then add more text as required.
:14.4. When you are ready to finish with edition, press {{KEY|Enter}} twice.
:14.5. Select the text object in the [[tree_view|tree view]], and in the [[Property_editor|property editor]], change {{PropertyView|Font Size}} to {{Value|6 mm}}, and {{PropertyView|Justification}} to {{Value|Center}}.

<!--T:92-->
15. ShapeString objects are shapes made of primitive wires that follow the lines indicated by a certain font. This means that these objects have a real [[Shape|shape]] underneath and thus can be used in complex operations like extrusions and boolean operations.
:15.1. Press {{Button|[[File:Draft_ShapeString.svg|16px]] [[Draft_ShapeString|ShapeString]]}}.
:15.2. Move the pointer to the desired location in the [[3D_view|3D view]] above the regular polygon, and click once. This will set the coordinates of the shapestring. This may be entered manually as well, for example, {{Value|(-20, 65, 0)}}.
:15.3. Enter the desired {{MenuCommand|String}}, and choose the desired {{MenuCommand|Height}}.
:15.4. If there is no default font file, you must click on the ellipsis {{Button|...}} to open the dialog to navigate to a font location.
:15.5. When a valid font file is specified, press {{KEY|Enter}}.

== Creating blueprints == <!--T:93-->


<!--T:99-->
<!--T:99-->
As it is now, the objects that we have created can be saved, exported to other formats like [[SVG|SVG]] or [[DXF|DXF]], or printed.
'''Important Note:''' Drawing WB was deprecated in FreeCAD v0.16 and replaced by the [[TechDraw Workbench]]. Although the author of this tutorial also created the Drawing Tutorial, it would be better for the reader to familiarize themselves with Basic tutorials of TechDraw, such as [[Basic_TechDraw_Tutorial]].

If you wish, you may create a technical drawing to display these objects together with additional information like a frame.

Before doing anything, hide the Draft grid by pressing {{Button|[[File:Draft_ToggleGrid.svg|16px]] [[Draft_ToggleGrid|Toggle grid]]}}.

16. Switch to the [[File:Workbench_TechDraw.svg|24px]] [[TechDraw_Workbench|TechDraw Workbench]].
:16.1. Create a standard page by pressing {{Button|[[File:TechDraw_PageDefault.svg|16px]] [[TechDraw_PageDefault|TechDraw PageDefault]]}}.
:16.2. In the [[tree_view|tree view]] select all objects created, except for the Page, and then press {{Button|[[File:TechDraw_ActiveView.svg|16px]] [[TechDraw_ActiveView|TechDraw ActiveView]]}}; press {{Button|OK}} with the default options.
:16.3. Select the Page object in the [[tree_view|tree view]] to show the Page in the 3D view. Go to the [[Property_editor|property editor]], and change {{PropertyData|Scale}} to {{Value|0.70}}.
:16.4. Expand the Page object in the [[tree_view|tree view]] to select the ActiveView object. Go to the [[Property_editor|property editor]], and change {{PropertyData|Scale Type}} to {{Value|Page}}.
:16.5. Recompute the model by using {{Button|[[File:Std_Refresh.svg|16px]] [[Std_Refresh|Refresh]]}} or pressing {{KEY|F5}}.

Learn more about the [[TechDraw_Workbench|TechDraw Workbench]] by reading [[Basic_TechDraw_Tutorial|Basic TechDraw Tutorial]].

TechDraw works best with objects that have a [[Part_TopoShape|Part TopoShape]]. Since some objects from Draft, like [[Draft_Text|Draft Texts]] and [[Draft_Dimension|Draft Dimensions]], don't have such "[[Shape|Shapes]]", some operations of TechDraw don't work with these elements.

Tools like {{Button|[[File:TechDraw_ActiveView.svg|16px]] [[TechDraw_ActiveView|TechDraw ActiveView]]}}, {{Button|[[File:TechDraw_DraftView.svg|16px]] [[TechDraw_DraftView|TechDraw DraftView]]}}, and {{Button|[[File:TechDraw_ArchView.svg|16px]] [[TechDraw_ArchView|TechDraw ArchView]]}} work by receiving an internal SVG image that is generated by internal Draft functions; therefore, TechDraw doesn't have much control about how these views are displayed. More integration of Draft and TechDraw is a work in progress.


==End== <!--T:94-->
==End== <!--T:94-->

Revision as of 02:00, 25 February 2020

Tutorial
Topic
Drafting
Level
Beginner
Time to complete
30 minutes
Authors
Drei
FreeCAD version
0.16 or above
Example files
None
See also
None

Introduction

This tutorial is meant to introduce the reader to the basic workflow of the Draft Workbench.

The reader will practice:

  • creation of profiles
  • the use of working planes
  • the creation of dimensions, text and annotations

This tutorial uses the notation (x, y, z) to denote the coordinates required to define points in an object.

Setup

1. Open FreeCAD, create a new empty document with File → New.

1.1. Switch to the Draft Workbench from the workbench selector, or the menu View → Workbench → Draft.
1.2. Make sure you understand how to use the property editor, particularly the Data and View tabs to change the properties.
1.3. Since the draft objects are planar shapes, they are better viewed from the top. Use View top to set the 3D view.

Snap toolbar

2. The Draft Snap toolbar is normally activated when you switch to the Draft Workbench.

2.1. To make sure it is always there, got to the Draft Preferences, Edit → Preferences → Draft → Grid and snapping tab.
2.2. Verify that the Show Draft Snap toolbar is active.

You can also change the visibility and property of the grid in this same menu.

Working planes

Most Draft objects are planar shapes so they are naturally based on a working plane. A working plane can be one of the main XY, XZ, and YZ global coordinate planes, or it can be a plane that is parallel to them with a positive or negative offset, or it can be a plane defined by the face of a solid object.

3. Press Select plane, or go to the menu Utilities → Select plane, to open the working plane task panel.

3.1. Press Top (XY).

Before pressing the button, you can also change the value of the offset in millimeters, as well as the grid spacing, the main lines and snapping radius.

Creating Profiles

The creation of profiles can be done in several ways. Though it is possible to use simple arcs and lines to do most of the work, FreeCAD includes several tools to speed up the process.

Lines and arcs

4. We will create arcs and lines.

4.1. Press Arc.
4.2. Set the Center to (0, 0, 0), and press Enter.
4.3. Set the Radius to 30 mm, and press Enter.
4.4. Set the Start angle to 60.0°, and press Enter.
4.5. Set the Aperture angle to 60.0°, and press Enter.
4.6. Repeat the same procedure for a second arc with a radius of 25 mm, the other properties are the same.

5. We will now create a closed profile by tying the arcs with lines.

5.1. Press Line.
5.2. In the Snap toolbar make sure File:Draft ToggleSnap.svg Snap is active, and only Endpoint as well. As you move the pointer to one endpoint of an arc, the File:Snap Endpoint.svg Endpoint icon should appear. Click to select this point.
5.3. Move the pointer to the closest endpoint of the other arc in the same side to tie the two arcs together.
5.4. Repeat the process for the other side of the arc to close the profile.

Fusing or upgrading

We now have several objects in the tree view that form a closed profile. However, this profile is still composed of disconnected objects; each of them can be edited and moved independently of the others. It is possible to continue working with the elements in this way, but it is also possible to fuse them into a single object.

6a. Note that fusing the objects into a single object will create an object that is no longer parametric, so their properties cannot be modified further.

6.1. Select all four objects by holding Ctrl and picking on them in the 3D view or by selecting them in the tree view.
6.2. With these objects selected, click on Upgrade.
6.3. This will upgrade the four objects into a single Wire.

6b. If you wish to maintain the parametric nature of the objects you may wish to create a compound instead.

6.1. Switch to the Part Workbench.
6.2. With these objects selected, click on Part Compound.

Rectangles, circles, and polygons

7. We will draw a rectangular frame.

7.1. Press Rectangle.
7.2. Enter the values (-100, -60, 0), and press Enter.
7.3. Make sure the Relative option is unchecked, as we will use absolute units. You may press R in the keyboard to quickly toggle this option on and off.
7.4. Enter the values for the second point (140, 90, 0), and press Enter.

A rectangle is created. Go in the property editor to change its properties. If you don't want the rectangle to create a face, set DataMake Face to false. If you want to make a face, but see only the wires of that object, keep DataMake Face to true but set the ViewDisplay Mode to Wireframe.

8. We will draw a circle.

8.1. Press Circle.
8.2. Enter the values of the center (0, 0, 0), and press Enter.
8.3. Set the radius to 15 mm, and press Enter.

9. We will draw a regular polygon.

9.1. Press Polygon.
9.2. Enter the values of the center (0, 0, 0), and press Enter.
9.3. Set the number of sides to 6, and press Enter.
9.4. Set the radius to 50 mm, and press Enter.

Again, you may change the DataMake Face and ViewDisplay Mode properties in the property editor if you want.

The rectangle, the circle, the polygon, and most other objects created with the Draft Workbench share many data and view properties because they are derived from the same base class, Part Part2DObject.

Arrays

Arrays are used to replicate an object several times in an orthogonal direction (X, Y, Z), around a revolution axis, or along a path.

10. We will create a polar array.

10.1. Select the Wire object that was previously created with the Upgrade tool, or the Compound created with the Part Compound tool.
10.2. Press PolarArray.
10.3. Adjust the polar angle to 360°, and press OK.

Old workflow

10.2. Press Array.
10.3. Go to the tree view, select the Array object, and then go to the property editor, and change the DataArray Type from ortho to polar.
10.4. Change DataNumber Polar to 4, and DataAngle to 360°.

An array object should be created replicating the object around the origin.

Dimensions

Linear dimensions work best when using the appropriate Draft Snap methods to select points and edges to measure. However, they can also be created by specifying absolute coordinates.

11. Create dimensions for the different objects.

11.1. Press Dimension.
11.2. Pick the first point. In this tutorial the first point will always be the origin (0, 0, 0).
11.3. In the Snap toolbar make sure File:Draft ToggleSnap.svg Snap is active, and only Midpoint as well. As you move the pointer to the top edge of the polygon, the Midpoint icon should appear; click to select this point.
11.4. Move the cursor to the right to specify the location of the dimension, the click to set the final position, around (100, 20, 0). The dimension will automatically show the length value measured between the two points.
11.5. Select the dimension object in the tree view, and in the property editor, change ViewFont Size to 6 mm, set ViewExt Lines to 45 mm, and ViewShow Unit to false.

12. Repeat the process for the two arcs of the closed profile. The first point of the measurement will still be the origin, and the second point will use the Midpoint of the arc.

13. Repeat the process for the circle located in the center. The first point of the measurement will still be the origin. To select the second point make sure File:Draft ToggleSnap.svg Snap is active, and only Angle as well. As you move the pointer to the top of the circle, the Angle icon should appear; click to select this point. Then move the cursor to the right and click to fix the dimension.

Remember to adjust the ViewFont Size, and other properties to see the dimension correctly.

Texts and ShapeStrings

14. Text objects are simple planar figures that are created in the 3D view but don't have an actual shape underneath. This means that they cannot be used in complex operations with shapes, such as extrusions or boolean operations.

14.1. Press Text.
14.2. Select the reference point in the 3D view. In the Snap toolbar make sure File:Draft ToggleSnap.svg Snap is active, and only Midpoint as well. Move the pointer to the top edge of the highest arc, so that the Midpoint icon appears; click to select this point.
14.3. Enter the desired Text, and press Enter once to start a new line; then add more text as required.
14.4. When you are ready to finish with edition, press Enter twice.
14.5. Select the text object in the tree view, and in the property editor, change ViewFont Size to 6 mm, and ViewJustification to Center.

15. ShapeString objects are shapes made of primitive wires that follow the lines indicated by a certain font. This means that these objects have a real shape underneath and thus can be used in complex operations like extrusions and boolean operations.

15.1. Press ShapeString.
15.2. Move the pointer to the desired location in the 3D view above the regular polygon, and click once. This will set the coordinates of the shapestring. This may be entered manually as well, for example, (-20, 65, 0).
15.3. Enter the desired String, and choose the desired Height.
15.4. If there is no default font file, you must click on the ellipsis ... to open the dialog to navigate to a font location.
15.5. When a valid font file is specified, press Enter.

Creating blueprints

As it is now, the objects that we have created can be saved, exported to other formats like SVG or DXF, or printed.

If you wish, you may create a technical drawing to display these objects together with additional information like a frame.

Before doing anything, hide the Draft grid by pressing Toggle grid.

16. Switch to the TechDraw Workbench.

16.1. Create a standard page by pressing TechDraw PageDefault.
16.2. In the tree view select all objects created, except for the Page, and then press TechDraw ActiveView; press OK with the default options.
16.3. Select the Page object in the tree view to show the Page in the 3D view. Go to the property editor, and change DataScale to 0.70.
16.4. Expand the Page object in the tree view to select the ActiveView object. Go to the property editor, and change DataScale Type to Page.
16.5. Recompute the model by using Refresh or pressing F5.

Learn more about the TechDraw Workbench by reading Basic TechDraw Tutorial.

TechDraw works best with objects that have a Part TopoShape. Since some objects from Draft, like Draft Texts and Draft Dimensions, don't have such "Shapes", some operations of TechDraw don't work with these elements.

Tools like TechDraw ActiveView, TechDraw DraftView, and TechDraw ArchView work by receiving an internal SVG image that is generated by internal Draft functions; therefore, TechDraw doesn't have much control about how these views are displayed. More integration of Draft and TechDraw is a work in progress.

End

We are now finished with the basic workflow for the Draft Workbench.

Recommended Lectures

  • For a detailed description of the workbench, please see Draft Workbench
  • To know more about the Snapping controls, see Draft Snap