Basic Sketcher Tutorial: Difference between revisions

From FreeCAD Documentation
m (Kunda1 moved page Sketcher tutorial to Basic Sketcher Tutorial without leaving a redirect: Part of translatable page "Sketcher tutorial")
(Updated information. Will continue rewriting and provide images.)
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
<!--T:1-->
<!--T:1-->
{{TutorialInfo
{{TutorialInfo
|Topic= Sketcher
|Topic=Sketcher
|Level= Beginner
|Level=Beginner
|Time= 10 minutes
|Time=30 minutes
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei]
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei]
|FCVersion=0.16 or above
|FCVersion=0.16 or above
Line 12: Line 12:
}}
}}


=== Introduction === <!--T:2-->
== Introduction == <!--T:2-->

This tutorial is meant to introduce the reader to the basic workflow of the [[Image:Workbench_Sketcher.svg|24px]] [[Sketcher Workbench|Sketcher Workbench]]. We will be creating a sketch similar to the one shown below.
This tutorial is meant to introduce the reader to the basic workflow of the [[Image:Workbench_Sketcher.svg|24px]] [[Sketcher Workbench|Sketcher Workbench]].

The reader will practice:
* Creating construction geometry
* Creating real geometry
* Applying geometric constraints
* Applying datum constraints

<!--T:3-->
The [[Sketcher_Workbench|Sketcher Workbench]] exists as a standalone module, so it can be used to draw generic 2D (planar) objects. However, it is mostly used in conjunction with the [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbench]]. A closed sketch is normally used to create a face or a profile which will be subsequently extruded into a solid [[Body|body]] with an operation such as {{Button|[[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}.


<!--T:32-->
<!--T:32-->
[[Image:Sketcher_tutorial_result.png|480px]]
[[Image:Sketcher_tutorial_result.png|480px]]


{{Caption|Final result of the sketch, with all geometry fully constrained, including construction geometry for support.}}
<!--T:3-->

The Sketcher workbench exists as a standalone module, but it is also accessible from within the [[Image:Workbench_PartDesign.svg|24px]] [[PartDesign Workbench|PartDesign Workbench]] when it is required to create a '''profile'''.
== Setup == <!--T:5-->

1. Open FreeCAD, create a new empty document with {{MenuCommand|File → [[File:Std_New.svg|16px]] [[Std_New|New]]}}.
:1.1. Switch to the [[Sketcher_Workbench|Sketcher Workbench]] from the [[Std_Workbench|workbench selector]], or the menu {{MenuCommand|[[Std_View_Menu|View]] → Workbench → Sketcher}}.


Some actions to remember:
* Press the right mouse button, or press {{KEY|Esc}} in the keyboard once, to exit deselect the active tool in edit mode.
* To exit the sketch edit mode, press the {{Button|Close}} button in the [[task_panel|task panel]], or press {{KEY|Esc}} twice in the keyboard.
* To enter again edit mode, double click on the sketch in the [[tree_view|tree view]], or select it and then click on {{Button|[[File:Sketcher_EditSketch.svg|16px]] [[Sketcher_EditSketch|Edit sketch]]}}.


=== Requirements === <!--T:5-->
== Create a sketch == <!--T:6-->
* FreeCAD version 0.16 or above


2. Click on {{Button|[[Image:Sketcher_NewSketch.svg‎‎|16px]] [[Sketcher_NewSketch|New sketch]]}}.
=== Procedure === <!--T:6-->
:2.1. Choose the sketch orientation, one of the base XY, YZ, or XZ planes. Also choose if you want an inverted orientation of the normal of the plane, and an offset from this plane.
==== Creating a Sketch ====
:2.2. We will use the default plane and options.
# Create a new document
:2.3. Click {{Button|OK}} to start constructing the sketch.
# Switch to the Sketcher Workbench by using the '''drop-down menu''' or by clicking on {{MenuCommand|View > Workbench > Sketcher}}
# Select [[Image:Sketcher_NewSketch.svg‎‎|32px]] [[Sketcher_NewSketch|New sketch]]
# You should see a dialog that prompts you to choose sketch orientation and provide an offset. We will not be using offset, and we will use the default plane
# Click OK and we can start to construct the sketch


<!--T:7-->
<!--T:7-->
We are now inside the Sketcher environment. Within it, we're able to make use of the majority of the tools that are available in this workbench.
We are now inside the sketch edit mode. Within it, we're able to make use of the majority of the tools of this workbench.


<!--T:8-->
<!--T:8-->
In the [[task_panel|task panel]], expand the section {{MenuCommand|Edit controls}}, and make sure the {{MenuCommand|Auto constraints}} option is enabled. Other options can be changed in this task panel, including the size of the grid. In other sections of the [[task_panel|task panel]] you can also see which geometrical elements and constraints have been defined.
In the [[Combo View]], expand the option '''Edit controls''' and make sure '''Autoconstraints''' are enabled.


==== Creating geometry ==== <!--T:9-->
== Sketcher construction geometry == <!--T:9-->
===== Sketcher construction geometry =====
Construction geometry is used as guides for the creation of complex profiles. To access it, we need to enable '''Construction mode '''.


<!--T:10-->
<!--T:10-->
3. Construction geometry is used to guide the creation of "real" geometry. Real geometry will be the one shown outside of the sketch edit mode, while construction geometry will only be shown inside the edit mode.
# Select [[Image:Sketcher_ToggleConstruction.svg|32px]] [[Sketcher_ToggleConstruction|Construction Mode]]
:3.1. Click on {{Button|[[Image:Sketcher_ToggleConstruction.svg|16px]] [[Sketcher_ToggleConstruction|Toggle construction]]}}. Now geometrical elements will be drawn in {{MenuCommand|Construction mode}}.
# Select [[Image:Sketcher_Line.svg|32px]] [[Sketcher_CreateLine|Line by 2 point]]
:3.2. Click on {{Button|[[Image:Sketcher_Line.svg|16px]] [[Sketcher_CreateLine|Create line]]}}.
# Approach the '''origin point''' in the sketch, the point should highlight and near your cursor this icon [[Image:Constraint_PointOnPoint.svg|32px]] will appear.
:3.3. Approach the '''origin''' of the sketch, the point should highlight and near your cursor the [[File:Constraint_PointOnPoint.svg|32px]] [[Sketcher_ConstrainCoincident|coincident constraint]] icon will appear.
# Select the point and extend the line diagonally up to an arbitrary length.
:3.4. Select the point and extend the line diagonally up to an arbitrary length.
# Repeat this procedure until you've created five '''construction''' lines. Be sure to keep all of them diagonal.
:3.5. Repeat this procedure until you've created five construction lines. Be sure to keep all of them diagonal.
# To exit construction mode, simply click again on [[Image:Sketcher_ToggleConstruction.svg|32px]] [[Sketcher_ToggleConstruction|Construction Mode]]
:3.6. To exit construction mode, simply click again on {{Button|[[Image:Sketcher_ToggleConstruction.svg|16px]] [[Sketcher_ToggleConstruction|Toggle construction]]}}.


{{Emphasis|Note:}} up to this point the [[Sketcher_CreateLine|line tool]] is still active. This means we can keep clicking on the [[3D_view|3D view]] to draw as many lines as we want. If we wish to exit this tool, we can press the right mouse button, or press {{KEY|Esc}} in the keyboard once. By doing this the pointer won't create lines any more, it will just be a pointer.
===== Sketcher geometry ===== <!--T:11-->
Sketcher geometry is used to create the closed profiles required to perform 3D operations in the '''PartDesign''' workbench.
# Select [[Image:Sketcher_Circle.svg|32px]] [[Sketcher_CreateCircle|Circle]]
# Position its '''centerpoint''' on the origin of the sketch.
# Extend the circumference to an arbitrary length.


{{Emphasis|Note 2:}} do not press {{KEY|Esc}} a second time as this will exit the sketch edit mode. Re-enter the edit mode by double clicking on the sketch in the [[tree_view|tree view]].

== Sketcher real geometry == <!--T:11-->


<!--T:12-->
<!--T:12-->
4. Real geometry must make a closed shape if it is to be used as a profile that can be extruded by tools such as {{Button|[[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}.
# Select [[Image:Sketcher_Arc.svg|32px]] [[Sketcher_CreateArc|Arc]]

# Approach the '''endpoint''' of one of the construction lines.
5. Create a circle.
# Set the ''centerpoint''' of the arc to be '''coincident''' with the endpoint.
:5.1. Click on {{Button|[[File:Sketcher_Circle.svg|16px]] [[Sketcher_CreateCircle|Create circle]]}}.
# Select an arbitrary location of your cursor to be set as the beginning of the arc, by clicking once.
:5.2. Click on the origin of the sketch to position its center point.
# Extend the arc an arbitrary amount, making sure the circumference opens outward (the empty space is facing towards the circle you created earlier).
:5.3. Click anywhere in the [[3D_view|3D view]] to extend the circumference radius to an arbitrary length from the origin.
# Repeat these steps for each construction line.


6. Create a series of arcs.
:6.1. Click on {{Button|[[File:Sketcher_Arc.svg|16px]] [[Sketcher_CreateArc|Create arc]]}}.
:6.2. Approach the endpoint of one of the construction lines, and click on it.
:6.3. This will set the center point of the circular arc to be [[File:Constraint_PointOnPoint.svg|32px]] [[Sketcher_ConstrainCoincident|coincident]] with this endpoint.
:6.4. Click once in the [[3D_view|3D view]] at an arbitrary location to set simultaneously the radius of the arc, and the first endpoint of it.
:6.5. Move the pointer in an anti-clockwise direction to trace an arc that has its concavity pointing towards the center of the sketch. Click to set the final endpoint of the arc.
:6.6. Repeat these steps with each construction line, so that each of them has a circular at its tip. We will call these A-arcs.


<!--T:13-->
<!--T:13-->
# Create an arc between each pair of the previous arcs, with their circumference pointing towards the circle.
7. Create an arc between each pair of the previous A-arcs.
:7.1. Still with {{Button|[[File:Sketcher_Arc.svg|16px]] [[Sketcher_CreateArc|Create arc]]}} tool active, click somewhere between two A-arcs to set the center point of a new arc.
:7.2. Click on one of the endpoints from one A-arc making sure the [[File:Constraint_PointOnPoint.svg|32px]] [[Sketcher_ConstrainCoincident|coincident constraint]] icon appears.
:7.3. Click on the other endpoint on the adjacent A-arc making sure the [[File:Constraint_PointOnPoint.svg|32px]] [[Sketcher_ConstrainCoincident|coincident constraint]] icon appears.
:7.4. A new arc will appear automatically, tying the two A-arcs exactly at the selected endpoints. The center point of this new arc will move automatically so that it ties the two A-arcs.
:7.5. Repeat these steps, so that each pair of A-arcs is tied by a new arc. We will call these B-arcs.
:7.6. The A-arcs should have their concavity pointing towards the origin point of the sketch, while the B-arcs should have their concavity pointing away from the same origin.


<!--T:14-->
<!--T:14-->
The resulting sketch should now be closed, as each A-arc connects to a B-arc, resulting in a closed profile.
We have now created the basic elements for our profile.


==== Constraints ==== <!--T:17-->
== Geometric constraints == <!--T:18-->

Constraints are used to constrain the '''Degrees of Freedom''' of points and curves within sketcher.
<!--T:17-->
Constraints are used to fix the {{Emphasis|degrees of freedom}} (DOF) of points and curves within sketcher. In general, there are {{Emphasis|geometric}} and {{Emphasis|datum}}


===== Geometric Constraints ===== <!--T:18-->
They are used to establish relations between points and curves without the use of dimensions.
They are used to establish relations between points and curves without the use of dimensions.


Line 103: Line 129:
As of this step, we have now created a closed profile that can be adjusted with the desired dimensions.
As of this step, we have now created a closed profile that can be adjusted with the desired dimensions.


== Datum constraints == <!--T:24-->


===== Datum Constraints ===== <!--T:24-->
These are used to specify the distance between points in a particular direction and the dimensions of curves.
These are used to specify the distance between points in a particular direction and the dimensions of curves.


Line 133: Line 159:
We are now finished with the basic workflow for the [[Sketcher Module|Sketcher Workbench]].
We are now finished with the basic workflow for the [[Sketcher Module|Sketcher Workbench]].


=== Further Reading === <!--T:30-->
== Further Reading == <!--T:30-->
* To understand more about the workbench, see [[Sketcher Workbench|Sketcher Workbench]].
* To understand more about the workbench, see [[Sketcher Workbench|Sketcher Workbench]].




</translate>
</translate>
{{clear}}


[[Category:Sketcher{{#translation:}}]]
{{Tutorials navi{{#translation:}}}}
{{Sketcher Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 07:14, 22 February 2020

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

Introduction

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

The reader will practice:

  • Creating construction geometry
  • Creating real geometry
  • Applying geometric constraints
  • Applying datum constraints

The Sketcher Workbench exists as a standalone module, so it can be used to draw generic 2D (planar) objects. However, it is mostly used in conjunction with the PartDesign Workbench. A closed sketch is normally used to create a face or a profile which will be subsequently extruded into a solid body with an operation such as PartDesign Pad.

Final result of the sketch, with all geometry fully constrained, including construction geometry for support.

Setup

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

1.1. Switch to the Sketcher Workbench from the workbench selector, or the menu View → Workbench → Sketcher.

Some actions to remember:

  • Press the right mouse button, or press Esc in the keyboard once, to exit deselect the active tool in edit mode.
  • To exit the sketch edit mode, press the Close button in the task panel, or press Esc twice in the keyboard.
  • To enter again edit mode, double click on the sketch in the tree view, or select it and then click on Edit sketch.

Create a sketch

2. Click on New sketch.

2.1. Choose the sketch orientation, one of the base XY, YZ, or XZ planes. Also choose if you want an inverted orientation of the normal of the plane, and an offset from this plane.
2.2. We will use the default plane and options.
2.3. Click OK to start constructing the sketch.

We are now inside the sketch edit mode. Within it, we're able to make use of the majority of the tools of this workbench.

In the task panel, expand the section Edit controls, and make sure the Auto constraints option is enabled. Other options can be changed in this task panel, including the size of the grid. In other sections of the task panel you can also see which geometrical elements and constraints have been defined.

Sketcher construction geometry

3. Construction geometry is used to guide the creation of "real" geometry. Real geometry will be the one shown outside of the sketch edit mode, while construction geometry will only be shown inside the edit mode.

3.1. Click on Toggle construction. Now geometrical elements will be drawn in Construction mode.
3.2. Click on Create line.
3.3. Approach the origin of the sketch, the point should highlight and near your cursor the coincident constraint icon will appear.
3.4. Select the point and extend the line diagonally up to an arbitrary length.
3.5. Repeat this procedure until you've created five construction lines. Be sure to keep all of them diagonal.
3.6. To exit construction mode, simply click again on Toggle construction.

Note: up to this point the line tool is still active. This means we can keep clicking on the 3D view to draw as many lines as we want. If we wish to exit this tool, we can press the right mouse button, or press Esc in the keyboard once. By doing this the pointer won't create lines any more, it will just be a pointer.

Note 2: do not press Esc a second time as this will exit the sketch edit mode. Re-enter the edit mode by double clicking on the sketch in the tree view.

Sketcher real geometry

4. Real geometry must make a closed shape if it is to be used as a profile that can be extruded by tools such as PartDesign Pad.

5. Create a circle.

5.1. Click on Create circle.
5.2. Click on the origin of the sketch to position its center point.
5.3. Click anywhere in the 3D view to extend the circumference radius to an arbitrary length from the origin.

6. Create a series of arcs.

6.1. Click on Create arc.
6.2. Approach the endpoint of one of the construction lines, and click on it.
6.3. This will set the center point of the circular arc to be coincident with this endpoint.
6.4. Click once in the 3D view at an arbitrary location to set simultaneously the radius of the arc, and the first endpoint of it.
6.5. Move the pointer in an anti-clockwise direction to trace an arc that has its concavity pointing towards the center of the sketch. Click to set the final endpoint of the arc.
6.6. Repeat these steps with each construction line, so that each of them has a circular at its tip. We will call these A-arcs.

7. Create an arc between each pair of the previous A-arcs.

7.1. Still with Create arc tool active, click somewhere between two A-arcs to set the center point of a new arc.
7.2. Click on one of the endpoints from one A-arc making sure the coincident constraint icon appears.
7.3. Click on the other endpoint on the adjacent A-arc making sure the coincident constraint icon appears.
7.4. A new arc will appear automatically, tying the two A-arcs exactly at the selected endpoints. The center point of this new arc will move automatically so that it ties the two A-arcs.
7.5. Repeat these steps, so that each pair of A-arcs is tied by a new arc. We will call these B-arcs.
7.6. The A-arcs should have their concavity pointing towards the origin point of the sketch, while the B-arcs should have their concavity pointing away from the same origin.

The resulting sketch should now be closed, as each A-arc connects to a B-arc, resulting in a closed profile.

Geometric constraints

Constraints are used to fix the degrees of freedom (DOF) of points and curves within sketcher. In general, there are geometric and datum

They are used to establish relations between points and curves without the use of dimensions.

  1. Select all five construction lines.
  2. Select Equal Length


  1. Select all five arcs centered on an endpoint of a line.
  2. Select Equal Length
  3. Repeat for all five arcs that are not centered on an endpoint.


  1. Select the construction line that is closest to the vertical axis.
  2. Select Vertical


  1. Select the endpoint of an arc and the endpoint closest to it.
  2. Select Tangent
  3. Repeat for each endpoint, until a closed profile is created.

As of this step, we have now created a closed profile that can be adjusted with the desired dimensions.

Datum constraints

These are used to specify the distance between points in a particular direction and the dimensions of curves.

  1. Select the vertically constrained construction line.
  2. Select Vertical Distance
  3. Set the length to 30 mm.


  1. Select the vertical construction line and the line closest to it
  2. Select Internal Angle
  3. Set the angle to 72°
  4. Repeat the same procedure for each pair of adjacent lines.


  1. Select one of the arcs centered on the endpoint of a line.
  2. Select Radius
  3. Set the radius to 8 mm.
  4. Do the same for an arc not centered on an endpoint. Set the radius to 11 mm.
  5. Set the center circle radius to 10 mm.

You should end up with a fully constrained sketch. It can be confirmed by noticing the change in color of all curves.

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

Further Reading


Template:Tutorials navi