Basic Part Design Tutorial 019: Difference between revisions

From FreeCAD Documentation
(Idem.)
mNo edit summary
 
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<translate>

<!--T:1-->
{{TutorialInfo
{{TutorialInfo
|Topic=Modeling
|Topic=Modeling
|Level=Beginner
|Level=Beginner
|Author=Carlo Dormeletti ([[User:onekk|onekk]])<br>Ed Williams ([[User:edwilliams16|edwilliams16]])
|Author=Carlo Dormeletti ([[User:onekk|onekk]])<br>Ed Williams ([[User:edwilliams16|edwilliams16]])<br>Roy 043 ([[User:Roy_043|Roy 043]])
|Time=Less than an hour
|Time=1 hour
|FCVersion=0.19 or higher
|FCVersion=0.19 or higher
|SeeAlso=[[Basic_Part_Design_Tutorial|Basic Part Design Tutorial]]
|SeeAlso=[[Basic_Part_Design_Tutorial|Basic Part Design Tutorial]]
}}
}}


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


<!--T:3-->
This is an updated version of the [[Basic_Part_Design_Tutorial|Basic Part Design Tutorial]].
''This is an updated version of the [[Basic_Part_Design_Tutorial|Basic Part Design Tutorial]].''


</translate>
[[File:Pd tut final solid.png]]
[[File:Pd_tut_final_solid.png]]
<translate>


<!--T:4-->
This tutorial introduces users to the [[PartDesign_Workbench|PartDesign Workbench]]. In this tutorial we will create a 3D solid model of the part shown in the image above. In the [[TechDraw_Workbench|Drawing]] at the end of this paragraph all the necessary dimensions to complete the task are given.
This tutorial introduces users to the [[PartDesign_Workbench|Part Design Workbench]]. In this tutorial we will create a 3D solid model of the part shown in the image above. In the [[TechDraw_Workbench|drawing]] at the end of this paragraph all the necessary dimensions to complete the task are given.


<!--T:5-->
We will start by creating a core solid shape from a base Sketch and then build on that shape, adding what are known as Features. These features will either add material to, or remove material from the solid by use of additional sketches and accompanying feature operations.
We will start by creating a core solid shape from a base Sketch and then build on that shape, adding what are known as features. These features will either add material to, or remove material from the solid by use of additional sketches and accompanying feature operations.


<!--T:6-->
We will follow some of the techniques described in [[Feature_editing#Advice_for_creating_stable_models|Advice for creating stable models]]:
We will follow some of the techniques described in [[Feature_editing#Advice_for_creating_stable_models|Advice for creating stable models]]:
* A '''master sketch''' is used.
* We will use a '''master sketch'''.
* '''Named constraints''' are used to hold dimensions that can be readily referenced later in the model construction.<br>For instance, to change the model width from 53 mm, as in the technical drawing, to 55 mm we need only to modify the '''Length''' value of the appropriate '''named constraint''' in the '''master sketch''' and the whole model will modify accordingly. This is ''parametric'' design in action.
* '''Named constraints''' will be used to hold dimensions that can be referenced later in the model construction.<br>For instance, to change the model width from 53 mm, as in the technical drawing, to 55 mm we need only modify the '''Length''' value of the appropriate '''named constraint''' in the '''master sketch''' and the whole model will modify accordingly. This is ''parametric'' design in action.
* '''External Geometries''' are potentially subject to the [[Topological_naming_problem|Topological Naming Problem]]. We will be using them only when strictly necessary and will attempt to refer to the most '''stable''' elements available. Referring to edges or vertices of prior sketches is normally more stable than referencing edges or vertices of generated solid geometry.
* '''External geometries''' are potentially subject to the [[Topological_naming_problem|Topological Naming Problem]]. We will use them only when strictly necessary and will attempt to reference to the most '''stable''' elements available. Referencing edges and vertices of sketches is normally more stable than referencing edges and vertices of generated solid geometry.


<!--T:7-->
This Tutorial will not use every feature and tool available in the Part Design Workbench, but will provide a basic foundation upon which users can build their knowledge and skills.
This Tutorial will not use every feature and tool available in the Part Design Workbench, but will provide a basic foundation upon which users can build their knowledge and skills.


<!--T:8-->
Feel free to signal any errors or problems in this forum thread: [https://forum.freecadweb.org/viewtopic.php?f=36&t=73235 New Part Design Tutorial for FC 019 and 020].
Feel free to signal any errors or problems in this forum thread: [https://forum.freecad.org/viewtopic.php?f=36&t=73235 New Part Design Tutorial for FC 019 and 020].


</translate>
[[File:Tutorial Drawing Sheet.png|900px]]
[[File:Tutorial_Drawing_Sheet.png|900px]]
<translate>


== Preliminary notes ==
== Preliminary notes == <!--T:9-->


<!--T:10-->
* This tutorial will provide detailed descriptions when it describes an operation for the first time; subsequent operations will have a more concise description. When in doubt, find the operation that contains the more detailed description. For instance, when creating a sketch for the first time the process of choosing the sketch Plane will be explained in detail, for subsequent sketches it will not.
* This tutorial will provide detailed instructions when it describes an operation for the first time. Subsequent operations will have a more concise description. When in doubt, find the operation that contains the more detailed description. For instance, when creating a sketch for the first time the process of choosing the sketch plane will be explained in detail, for subsequent sketches it will not.
* See [https://wiki.freecadweb.org/Part_and_PartDesign#PartDesign_Workbench_Concepts|https://wiki.freecadweb.org/Part_and_PartDesignPartDesign Workbench Concepts] for some conceptual background.
* All mentioned tools can be accessed from toolbars and from the menu.
* This tutorial assumes that {{CheckBox|TRUE|Auto constraints}} in the Sketcher's '''Edit controls''' window is checked. This ensures that some constraints are applied automatically. Otherwise you will need to apply them yourself.
* If the Sketcher Solver detects a redundant constraint it will turn the sketch orange in color. Before further constraints are added, redundant constraints should be removed. Redundant constraints are shown in the task panel, click the blue reference and press {{KEY|Delete}}.
* The color mentioned above is a default color, it can be changed in the preferences. The same applies to the other colors mentioned in this tutorial.
* You exit a Sketcher drawing tool by pressing the {{KEY|Esc}} key or by right-clicking an empty area of the [[3D_view|3D view]]. The mouse cursor will change to the standard arrow cursor. If you press {{KEY|Esc}} an additional time you will exit sketch edit mode. To return to the editor, click the Model tab, then either double-click the Sketch element in the [[Tree_view|Tree view]], or right-click it and select '''Edit sketch''' from the context menu. To avoid leaving edit mode when pressing {{KEY|Esc}} too often, change the '''Esc can leave sketch edit mode''' preference, see [[Sketcher_Preferences#General|Sketcher Preferences]].
* It's possible that some elements in a task panel, for instance the {{Button|OK}} button, are not visible if the panel is not wide enough. You can make it wider by dragging its right border. Place your mouse pointer over the border, when the pointer changes to a two-way arrow, hold down the left mouse button and drag.
* A {{Button|&gt;&gt;}} button in a toolbar indicates that the toolbar is truncated. You can either use the mentioned button to expand it, or move the toolbar to a position where more room is available. To move a toolbar place your mouse pointer over the grip before the first icon in the toolbar, hold down the left mouse button and drag.
* During the v0.21 development cycle a new icon was introduced for the [[Sketcher_CreatePolyline|Sketcher Create polyline]] tool: [[File:Sketcher_CreatePolyline.svg|24px|link=Sketcher_CreatePolyline]]. The old icon looks like this: [[File:Sketcher_CreatePolyline_rel_0.20.svg|24px|link=Sketcher_CreatePolyline]]. In this tutorial we will use the new icon.
* See [[Part_and_PartDesign#PartDesign_Workbench_Concepts|Part Design Workbench Concepts]] for some conceptual background.
* See the [[Sketcher_Workbench|Sketcher WorkBench]] for a more detailed explanation of some of the terminology used here.
* See the [[Sketcher_Workbench|Sketcher WorkBench]] for a more detailed explanation of some of the terminology used here.
* If {{CheckBox|TRUE|Auto constraints}} in the Sketcher's '''Edit controls''' window is checked, some constraints will be applied automatically. Otherwise, you will need to apply them yourself.
* You exit a drawing tool by pressing the {{KEY|Esc}} key or by right-clicking an empty area of the 3D view. The mouse cursor should change to the standard arrow cursor. If you press {{KEY|Esc}} an additional time you will exit the sketch edit mode. To return to the editor, click on the Model tab, then either double-click the Sketch element in the tree, or right-click it and select '''Edit sketch''' from the context menu.
* If Sketcher's Solver detects a redundant constraint it will turn the sketch orange in color. Before further constraints are added, redundant constraints should be removed. (Redundant constraints are shown in the task panel - click on the blue reference and press {{KEY|Del}}.)
* It's possible that some elements of the side panel, for instance the {{Button|OK}} button may not be visible if the side panel is not wide enough. You can make it wider by dragging its right border. Place your mouse pointer over the border; when the pointer changes to a two-way arrow, press and hold the left mouse button and drag.


== Startup ==
== Startup == <!--T:11-->


<!--T:12-->
First begin by making sure you are in [[Image:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbench]], selected from the drop-down menu. Once there, you will want to create a new document if you have not done so already. It is a good habit to save your work often, so first save the new document, giving it any name you choose.
First make sure you are in the [[File:Workbench_PartDesign.svg|24px|link=PartDesign_Workbench]] [[PartDesign_Workbench|Part Design Workbench]]. If required select it from the [[Std_Workbench|Workbench dropdown list]]. Once there, you will want to create a new document if you have not done so already. It is a good habit to save your work often, so first save the new document, giving it any name you choose.


<!--T:13-->
All work in Part Design begins with a [[Glossary#Body|Body]]. Then we will build the solid inside the body by starting with a [[Glossary#Sketch|sketch]].
All work in Part Design begins with a [[Glossary#Body|body]]. Click [[File:PartDesign_Body.svg|24px|link=PartDesign_Body]] [[PartDesign_Body|Create new body]] to create and activate one. Note that it is also possible to skip this step: when creating a sketch using the Part Design [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]] tool, if no existing body is found, a new one is automatically created and activated.


== Master sketch == <!--T:14-->
Click on [[Image:PartDesign_Body.svg|24px|link=PartDesign_Body]] [[PartDesign_Body|Create new body]] to create and activate a new Body Container. ''Note: this step can be omitted. When creating a sketch using Part Design|Sketch|Create Sketch, if no existing Body is found, a new one is automatically created and activated. This is not the case if you create a sketch using the Sketcher workbench, as sketches are useful in workbenches other than Part Design.''


<!--T:15-->
== Master sketch ==
The master sketch contains the model's rectangular base shape and two '''named constraints''' that will supply correct dimensions to other parts of the model: '''length''' that will contain 53 mm (the result of adding the 39 mm dimension to the two 7 mm sides), and '''width''' that will contain 26 mm. To be able to take advantage of the model's symmetry in later steps, the top edge of the rectangle will be centered around the origin with a symmetrical constraint.

You will create the the master sketch containing the model's rectangular base shape and two '''named constraints''' that will be created to supply correct dimensions to other parts of the model:
* '''length''' that will contain 53mm (the result of adding the 39mm dimension to the two 7mm sides).
* '''width''' that will contain 26mm.


<!--T:16-->
'''<big>Sketch</big>'''
'''<big>Sketch</big>'''


</translate>
[[File:Pd start 00.png|thumb|300px|Fig: MS1]]
[[File:Pd tut sketch start.png|thumb|300px|Fig: MS2]]
[[File:Pd_start_00.png|thumb|300px|Fig: MS1]]
[[File:Pd tut sel points h.png|thumb|300px|Fig: MS3]]
[[File:Pd_tut_sketch_start.png|thumb|300px|Fig: MS2]]
[[File:Pd tut rect h dim end.png|thumb|300px|Fig: MS4]]
[[File:Pd_tut_sel_points_h.png|thumb|300px|Fig: MS3]]
[[File:Pd tut rect04.png|thumb|300px|Fig: MS5]]
[[File:Pd_tut_rect_h_dim_end.png|thumb|300px|Fig: MS4]]
[[File:Pd tut rect v3.png|thumb|300px|Fig: MS6]]
[[File:Pd_tut_rect04.png|thumb|300px|Fig: MS5]]
[[File:Pd_tut_rect_v3.png|thumb|300px|Fig: MS6]]
<translate>


<!--T:17-->
'''Step 1: Create the sketch'''
'''Step A: Create the sketch'''


<!--T:18-->
# Click on [[Image:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create new sketch]]. This will create the sketch within the just created body. It will be named '''Sketch'''.
# Click [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]]. This will create the sketch within the just created body. It will be named '''Sketch'''.
# A task panel like '''Fig: MS1''' will open where you have to choose to which plane the sketch will be attached.
# A task panel like '''Fig: MS1''' will open where you have to choose to which plane the sketch will be attached.
## Select '''XY_Plane''' from the list.
## Select '''XY_Plane''' from the list or select that plane in the [[3D_view|3D view]].
## Press {{Button|OK}}.
## Click {{Button|OK}}.
# FreeCAD automatically switches to the [[Sketcher Workbench|Sketcher Workbench]].
# FreeCAD automatically switches to the [[File:Workbench_Sketcher.svg|24px|link=Sketcher_Workbench]] [[Sketcher_Workbench|Sketcher Workbench]].
# The sketch is opened in edit mode: you will see something like '''Fig: MS2'''.
# The sketch is opened in edit mode: you will see something like '''Fig: MS2'''. The X axis (the red line) and Y axis (the green line) of the sketch are indicated, as well as its origin (the red point).


<!--T:19-->
'''Step 2: Add geometry'''
'''Step B: Add geometry'''


<!--T:20-->
# Click on [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Rectangle]] tool.
# Click [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Create rectangle]].
# Click two points to create a rectangle roughly centered around the '''Y axis''' similar to '''Fig: MS3'''. Note:
# While the tool is active the cursor has this appearance:<br>[[File:Pd_tut_rec_cursor.png]]
#* Don't place points on '''X axis''' as the '''Solver''' will automatically apply constraints that will create a problem later.
# Pick two points to create a rectangle roughly centered around the '''Y axis''' similar to '''Fig: MS3'''. Note:
#* Don't place points on an axis as the Solver will automatically apply constraints that will create problems later.
#* The dimensions of the rectangle are unimportant at this point. They will be assigned using constraints in a later step.
#* The dimensions of the rectangle are unimportant at this point. They will be assigned using constraints in a later step.
# Once done, press {{KEY|Esc}}, or right-click, to exit "rectangle creation mode". "Rectangle creation mode" is indicated by this cursor appearance:<br>[[File:Pd tut rec cursor.png]].
# Once done, press {{KEY|Esc}} or right-click to exit the tool.

'''Step 3: Assign a horizontal constraint'''


<!--T:21-->
: Assign now a [[Sketcher_ConstrainDistanceX|horizontal distance constraint]] this way:
'''Step C: Assign a horizontal distance constraint'''


<!--T:22-->
# Select the line defined by '''P2''' and '''P3''' in '''Fig: MS3'''.
# Select the line defined by '''P2''' and '''P3''' in '''Fig: MS3'''.
# Use the button [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|horizontal distance constraint]]:
# Click [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|Horizontal distance constraint]]:
## A dimension will appear between extreme points of the line selected. This dimension is the current distance.
## A dimension will appear between the endpoints of the selected line. This dimension is the current distance.
## Additionally, a dialog will appear:<br>[[File:Pd tut rect03.png|dimension dialog]]
## Additionally a dialog will appear:<br>[[File:Pd_tut_rect03.png]]
## Assign '''Length = 53 mm'''.
## Set '''Length = 53mm''', and to be able to easily reference this dimension later a name is required. You are free to use the name of your choice. It need only be unique within the sketch. Assign '''Name = length'''.
## To be able to reference this dimension later a name is required. You are free to use any name, it need only be unique within the sketch. Assign '''Name = length'''.
## Click {{Button|OK}}.
## Click {{Button|OK}}.
# The result should resemble '''Fig: MS4'''
# The result should resemble '''Fig: MS4'''


<!--T:23-->
'''Step 4: Assign a symmetrical constraint'''
'''Step D: Assign a symmetrical constraint'''

: To center the the top edge of the rectangle around the origin proceed as follows:


<!--T:24-->
# Select points '''P2''' and '''P3''' of the rectangle.
# Select points '''P2''' and '''P3''' of the rectangle.
# Select the '''origin''' of the sketch.<br> ''Note: the selection order of the points is important.
# Select the '''origin''' of the sketch. Note: the selection order of the points is important.
# Use [[File:Sketcher_ConstrainSymmetric.svg|24px]] [[Sketcher_ConstrainSymmetric|Symmetric]] tool.
# Click [[File:Sketcher_ConstrainSymmetric.svg|24px|link=Sketcher_ConstrainSymmetric]] [[Sketcher_ConstrainSymmetric|Symmetrical constraint]].
# You will end up with something that resembles '''Fig: MS5'''.
# You will end up with something that resembles '''Fig: MS5'''.
# Making a good choice of origin of the model can simplify its construction, in this case by taking advantage of the part's reflection symmetry in a later steps.


<!--T:25-->
'''Step 5: Assign a vertical constraint'''
'''Step E: Assign a vertical distance constraint'''


<!--T:26-->
: You now assign a [[Sketcher_ConstrainDistanceY|vertical distance constraint]], using a procedure analogous to the prior [[Sketcher_ConstrainDistanceX|horizontal distance constraint]]
: Assign a vertical distance constraint following the same procedure as used for the previous horizontal distance constraint:


<!--T:27-->
# Select the line defined by '''P3''' and '''P4''' in '''Fig: MS3'''.
# Select the line defined by '''P3''' and '''P4''' in '''Fig: MS3'''.
# Click on [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceY|vertical distance constraint]]:
# Click [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceY|Vertical distance constraint]]:
## Assign '''Length = 26 mm'''
## Assign '''Length = 26 mm'''
## Assign '''Name = width'''.
## Assign '''Name = width'''.
## Click {{Button|OK}}.
## Click {{Button|OK}}.
# Result should resemble '''Fig: MS6'''.
# The result should resemble '''Fig: MS6'''.
# The sketch is fully constrained now:
# Note the following:
#* The lines on the sketch will become "bright green". (Assuming you have not modified the default color theme).
#* The lines in the sketch are bright green.
#* The '''Solver messages''' window displays '''Fully constrained'''.
#* The '''Solver messages''' section of the task panel displays '''Fully constrained'''.
#* If you select any line or vertex of the sketch and try to drag it, it won't move.
#* If you select any line or vertex of the sketch and try to drag it, it won't move.


<!--T:28-->
'''Step 6: Close the sketch'''
'''Step F: Close the sketch'''


<!--T:29-->
: Click the {{Button|Close}} button at the top of the [[Task_panel|tasks panel]] to leave sketch edit mode.
: Click {{Button|Close}} at the top of the [[Task_panel|tasks panel]] to leave sketch edit mode.


</translate>
{{Clear}}
{{Clear}}
<translate>


== Main profile ==
== Main profile == <!--T:30-->


<!--T:31-->
You will create a new sketch that is holding the main profile.
The main profile is created by [[PartDesign_Pad|padding]] a new sketch.


<!--T:32-->
'''<big>Sketch001</big>'''
'''<big>Sketch001</big>'''


</translate>
[[File:OffsetSketch001.png|thumb|240px|right|Fig. MP1]]
[[File:OffsetSketch001.png|thumb|240px|right|Fig. MP1]]
[[File:Pd tut side fc.png|thumb|240px|Fig: MP2]]
[[File:Pd_tut_side_fc.png|thumb|240px|Fig: MP2]]
<translate>


<!--T:33-->
'''Step 1: Create the sketch'''
'''Step A: Create the sketch'''


<!--T:34-->
: Click on [[Image:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create new sketch]]. Create it in '''YZ_Plane'''. FreeCAD will assign the name of '''Sketch001'''.
: Click [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]] and create a sketch attached to the '''YZ_Plane'''. FreeCAD will assign the name '''Sketch001'''.


<!--T:35-->
'''Step 2: Add geometry'''
'''Step B: Add geometry'''


<!--T:36-->
# Use the [[Image:Sketcher_CreatePolyline.svg|24px|link=Sketcher_CreatePolyline]] [[Sketcher_CreatePolyline|Polyline]] tool to make a shape like that in '''Fig: MP1'''.
# Click [[File:Sketcher_CreatePolyline.svg|24px|link=Sketcher_CreatePolyline]] [[Sketcher_CreatePolyline|Create polyline]] and make a shape like in '''Fig: MP1'''.
# The labels P1, P2 etc. will not appear in the Sketcher. They were added as references.
# The labels P1, P2 etc. will not appear in the sketch. They were added for reference.
# The three vertical and horizontal constraints you see in the image are added automatically by the auto-constraints provided you drew the lines that way. If you didn't you need to add them.
# When you close the figure, make sure the first point is selected when you click to create the final line. The selected point will change color and you will see the symbol for a [[File:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher_ConstrainCoincident|Coincident]] constraint appear by the vertex. Coincidence constraints have to be explicit - just having two vertices visually coincident is not sufficient.
# For the last point of the final segment make sure to pick the first point of the shape. The point will change color and you will see the symbol for a [[File:Sketcher_ConstrainCoincident.svg|24px|link=Sketcher_ConstrainCoincident]] [[Sketcher_ConstrainCoincident|Coincident constraint]] appear near the cursor. Coincident constraints have to be explicit. Just having two points visually coincident is not sufficient.
# Press {{KEY|Esc}} or right-click to exit the tool.
# As done in first sketch you will assign additional constraints later to adjust the dimensions and exact shape (see note about Constraints below).


<!--T:37-->
'''Step 3: Assign constraints'''
'''Step C: Assign constraints'''


<!--T:38-->
# Select the point '''P2''' and the '''Y-axis''' and apply a [[File:Sketcher_ConstrainPointOnObject.svg|24px]] [[Sketcher_ConstrainPointOnObject|Point on object]] constraint.
# The three vertical and horizontal constraints you see in the image should have been added automatically provided you drew those lines that way. If you didn't you need to add them.
# Select the '''origin''' and the point '''P1''' and apply a [[File:Sketcher_ConstrainHorizontal.svg|24px]] [[Sketcher_ConstrainHorizontal|Horizontal]] constraint. Why not a [[File:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher_ConstrainCoincident|Coincident]] constraint, you might ask. Try it (and undo). The sketch will turn orange and a solver message ''redundant constraints'' will appear. Because the line P1-P2 has already been constrained to be vertical, the only remaining degree of freedom is P1's y-coordinate. The coincidence constraint sets both the x- and y-coordinates to zero, but the x-coordinate is already determined. The horizontal constraint, on the other hand, only sets the y-coordinate to zero, which is sufficient.
# Select the line defined by points '''P2''' and '''P3''' and apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|horizontal distance constraint]] and assign '''Length = 5 mm'''.
# Select the point '''P2''' and the '''Y axis''' of the sketch and apply a [[File:Sketcher_ConstrainPointOnObject.svg|24px|link=Sketcher_ConstrainPointOnObject]] [[Sketcher_ConstrainPointOnObject|Point onto object constraint]]. Because the sketch is attached to the YZ_Plane, the Y axis of the sketch does not match the Y axis of the body.
# Select the '''origin''' and the point '''P1''' and apply a [[File:Sketcher_ConstrainHorizontal.svg|24px|link=Sketcher_ConstrainHorizontal]] [[Sketcher_ConstrainHorizontal|Horizontal constraint]]. Why not a [[File:Sketcher_ConstrainCoincident.svg|24px|link=Sketcher_ConstrainCoincident]] [[Sketcher_ConstrainCoincident|Coincident constraint]]? you might ask. Try it (and undo). The sketch will turn orange and a solver message '''Redundant constraints''' will appear. Because the line P1 to P2 has already been constrained to be vertical, the only remaining degree of freedom is P1's Y coordinate. The coincidence constraint sets both the X and Y coordinates to zero, but the X coordinate is already determined. The horizontal constraint, on the other hand, only sets the Y coordinate to zero, which is sufficient.
# Select the line defined by points '''P1''' and '''P2''' and apply a [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceX|vertical distance constraint]] and assign '''Length = 26 mm'''.
# Select the line defined by points '''P4''' and '''P1''' and apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|horizontal distance constraint]]:
# Select the line defined by the points '''P2''' and '''P3''', apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|Horizontal distance constraint]], and assign '''Length = 5 mm'''.
# Select the line defined by the points '''P1''' and '''P2''', apply a [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceY|Vertical distance constraint]], and assign '''Length = 26 mm'''.
## For this value you will use a "Named constraint" using [[Expressions|Expressions]]. To do so you have to press the little button on the dimensions [[Image:Bound-expression.svg|24px]], and you will be presented with a new dialog window named '''Formula editor''' that contains an input field and a '''Result:''' label, similar to the image below:<br>[[File:Pd tut expressions.png|Expression dialog]]<br>When you start typing in the input field, you will be presented with some autocompletions.
# Select the line defined by the points '''P1''' and '''P4''' and apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|Horizontal distance constraint]]:
## Select the label of the sketch. In our case we want '''<code><<Sketch>>.</code>'''. Note the period after the "element label".
## To select '''named constraint''' "width", you have to enter '''<code>Constraints.</code>''' with the period. Here autocomplete works.
## For this value you will use a '''named constraint''' using [[Expressions|Expressions]]. To do so you have to click the little button in the '''Length''' input field: [[File:Bound-expression.svg|24px|link=Bound-expression]].
## You will be presented with a new dialog named '''Formula editor''' that contains an input field and a '''Result:''' label, similar to the image below:<br>[[File:Pd_tut_expressions.png]]<br>When you start typing in the input field, you will be presented with some autocompletions.
## To add "width", as yet autocompletion is not available, so complete the cell to read '''<code><<Sketch>>.Constraints.width</code>'''. If all went well the "red error message" in the '''Result:''' field has been replaced by the correct value as in the figure below:<br>[[File:Pd tut expression end.png|Expression result good]]
## Select the label of the sketch. In our case we want '''<code><<Sketch>>.</code>'''. Note the period after the label.
## Click {{Button|OK}} to close '''Formula editor''' dialog.
## To select the '''named constraint''' "width", you first have to enter '''<code>Constraints.</code>''' with the period. Here autocomplete works.
## Click {{Button|OK}} to close '''Insert length''' dialog.
## To add "width", as yet autocompletion is not available, so complete the cell to read '''<code><<Sketch>>.Constraints.width</code>'''. If all went well the red error message after '''Result:''' has been replaced by the correct value as in the image below:<br>[[File:Pd_tut_expression_end.png]]
# At this point you should have a fully constrained sketch similar to '''Fig: MP2'''.
## Click {{Button|OK}} to close the '''Formula editor''' dialog.
# Note the subtly different colors used for distance constraints assigned using expressions and those assigned specifying a length.
## Click {{Button|OK}} to close the '''Insert length''' dialog.
# You should have a fully constrained sketch similar to '''Fig: MP2'''.
# Note the different colors used for distance constraints assigned using expressions, and those assigned specifying a length.


<!--T:39-->
'''Step 4: Close the sketch'''
'''Step D: Close the sketch'''


<!--T:40-->
: Click the {{Button|Close}} button at the top of the [[Task_panel|tasks panel]] to leave sketch edit mode.
: Click {{Button|Close}} at the top of the [[Task_panel|tasks panel]] to leave sketch edit mode.


<!--T:41-->
'''<big>Pad</big>'''
'''<big>Pad</big>'''


<!--T:42-->
[[File:Pd tut pad1.png|thumb|240px|Fig: MP3]]
[[File:Pd_tut_pad1.png|thumb|240px|Fig: MP3]]


<!--T:43-->
# Make sure '''Sketch001''' is selected.
# Make sure '''Sketch001''' is selected.
# Click [[File:PartDesign_Pad.svg|24px|link=PartDesign_Pad]] [[PartDesign_Pad|Pad]]:
# Click [[File:PartDesign_Pad.svg|24px|link=PartDesign_Pad]] [[PartDesign_Pad|Pad]]:
## The Pad task panel opens.
## The '''Pad parameters''' task panel opens.
## For '''Type''' select {{ComboBox|Dimension}}.
## For '''Type''' select {{ComboBox|Dimension}}.
## For '''Length''' you will use again an '''Expression''' but this time you will enter '''<code><<Sketch>>.Constraints.length</code>''' in the field. This should evaluate to 53 mm.
## For '''Length''' again use an expression, but this time enter '''<code><<Sketch>>.Constraints.length</code>'''. This should evaluate to 53 mm.
## Select {{CheckBox|TRUE|Symmetric to plane}}.
## Select {{CheckBox|TRUE|Symmetric to plane}}.
## Click {{Button|OK}} to close the task panel.
## Click {{Button|OK}} to close the task panel.
# Once that is done you will have a solid as shown in '''Fig: MP3'''.
# You should now have a solid as shown in '''Fig: MP3'''.


</translate>
{{Clear}}
{{Clear}}
<translate>


== Corner cutouts ==
== Corner cutouts == <!--T:44-->


<!--T:45-->
For the corner cutouts two features are added to the model. A [[PartDesign_Pocket|pocket]], based on another sketch, is used to create the first cutout, and this feature is then [[PartDesign_Mirrored|mirrored]].

<!--T:46-->
'''<big>Sketch002</big>'''
'''<big>Sketch002</big>'''


</translate>
[[File:Pd tut sk2 start.png|thumb|300px|Fig: CC1]]
[[File:Pd_tut_sk2_ext_geom.png|thumb|300px|Fig: CC2]]
[[File:Pd_tut_sk2_start.png|thumb|300px|Fig: CC1]]
[[File:Pd tut sk2 eg01.png|thumb|300px|Fig: CC3]]
[[File:Pd_tut_sk2_eg01.png|thumb|300px|Fig: CC2]]
[[File:Pd tut sk2 end.png|thumb|300px|Fig: CC4]]
[[File:Pd_tut_sk2_end.png|thumb|300px|Fig: CC3]]
<translate>


<!--T:47-->
'''Step 1: Hide the solid'''
'''Step A: Hide the solid'''


<!--T:48-->
: Hide the just created solid: Select '''Pad''' and click the {{KEY|Spacebar}}.
: Hide the just created solid: Select '''Pad''' and click the {{KEY|Spacebar}}.


<!--T:49-->
'''Step 2: Create the sketch'''
'''Step B: Create the sketch'''


<!--T:50-->
: Click on [[Image:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create new sketch]] in '''XZ_Plane'''. Sketch will be named '''Sketch002'''.
: Click [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]] and create a sketch attached to the '''XZ_Plane'''. The sketch will be named '''Sketch002'''.


<!--T:51-->
'''Step 3: Add geometry'''
'''Step C: Add geometry'''


<!--T:52-->
: Select [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Rectangle]] tool, and create a rectangle. Do not create it too near an axis, to avoid any automatic constraints that would make it difficult to move into the correct position using the [[Sketcher_External|External geometry]] tool.
# Select [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Create rectangle]], and create a rectangle. Do not create it too near an axis, to avoid any automatic constraints that would make it difficult to move it into the correct position later.
# Exit the tool.


<!--T:53-->
'''Step 4: Assign dimensional constraints'''
'''Step D: Assign dimensional constraints'''


<!--T:54-->
# Select one of the horizontal lines apply a horizontal distance constraint and a value of 11 mm.
# Select one of the vertical lines and give it a vertical distance constraint and a value of 5 mm.
# Select one of the horizontal lines, apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|Horizontal distance constraint]], and assign a value of '''11 mm'''.
# Select one of the vertical lines, apply a [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceY|Vertical distance constraint]], and assign a value of '''5 mm'''.
# You should obtain something similar to '''Fig: CC1'''.
# You should obtain something similar to '''Fig: CC1'''.


<!--T:55-->
'''Step 5: Close the sketch'''
'''Step E: Close the sketch'''


<!--T:56-->
: Click {{Button|Close}} at the top of the task panel. '''Sketch002''' will not be not fully constrained at this stage.
: Click {{Button|Close}}. '''Sketch002''' is not fully constrained at this stage.


<!--T:57-->
'''Step 6: Make previous sketches visible'''
'''Step F: Make previous sketches visible'''


<!--T:58-->
: To use [[Sketcher_External|External geometry]] the sketches whose elements we want to reference must be visible. Make sure '''Sketch''' and '''Sketch001''' are both visible. Use the {{KEY|Spacebar}} to toggle visibility if needed.
: To use [[Sketcher_External|external geometry]], the sketches whose elements we want to reference must be visible. Make sure '''Sketch''' and '''Sketch001''' are both visible. Use the {{KEY|Spacebar}} to toggle visibility if needed. Expand the '''Pad''' node in the [[Tree_view|Tree view]] to access '''Sketch001'''.


<!--T:90-->
'''Step 7: Applying External geometries constraints'''
'''Step G: Add external geometry and fully constrain the sketch'''
# Double click on '''Sketch002''' to activate edit mode. Rotate the view so you can clearly see the points as shown in '''Fig: CC2'''. This will ease subsequent steps. Note that the rectangle's initial position could be different in your sketch.
# Select [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]] tool, the cursor will became [[File:Pd tut eg cursor.png]].
# Select with this cursor point '''P1''' in '''Fig: CC3''', selected point will remain highlighted and in the '''Elements''' tab of task panel you will see that this element is shown [[File:Pd tut ext geom pt.png]].
# Select with this cursor point '''P2''' in '''Fig: CC3'''.<br>In the '''Elements''' tab of task panel you will see another element like the above.
# Right-click or press {{KEY|Esc}} to terminate External Geometry selection. The cursor will return to the '''standard arrow pointer'''.
# Select point '''P1''' and point '''P3''' and apply a [[File:Sketcher_ConstrainVertical.svg|24px]] [[Sketcher_ConstrainVertical|Vertical Constraint]]. The rectangle will be aligned with the X position of selected point.
# Select point '''P2''' and point '''P3''' and apply a [[File:Sketcher_ConstrainHorizontal.svg|24px]] [[Sketcher_ConstrainHorizontal|Horizontal Constraint]]. The rectangle will be aligned with the Y position of the selected point.
# '''Sketch002''' should now show green as "fully constrained".


<!--T:59-->
'''Step 8: Close the sketch'''
# Double click '''Sketch002''' to enter edit mode.
# Rotate the view so you can clearly see the points as shown in '''Fig: CC2'''. This will ease subsequent steps. Note that the rectangle's initial position may be different in your sketch.
# Click [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]].
# While the tool is active the cursor has this appearance:<br>[[File:Pd_tut_eg_cursor.png]]
# Select point '''P1''' in '''Fig: CC2'''. The selected point is added to the sketch as external geometry. In the '''Elements''' section of the task panel it will appear with a purple X icon or, {{Version|0.21}}, a purple dot icon.
# With the tool still active select point '''P2''' in '''Fig: CC2'''. This external geometry should also appear in the '''Elements''' section.
# Exit the tool.
# Select point '''P1''' and point '''P3''' and apply a [[File:Sketcher_ConstrainVertical.svg|24px|link=Sketcher_ConstrainVertical]] [[Sketcher_ConstrainVertical|Vertical constraint]]. The rectangle will be aligned with the X position of '''P1'''.
# Select point '''P2''' and point '''P3''' and apply a [[File:Sketcher_ConstrainHorizontal.svg|24px|link=Sketcher_ConstrainHorizontal]] [[Sketcher_ConstrainHorizontal|Horizontal constraint]]. The rectangle will be aligned with the Y position of '''P2'''.
# You should have a fully constrained sketch similar to '''Fig: CC3'''.


<!--T:60-->
: Click {{Button|Close}} at the top of the task panel.
'''Step H: Close the sketch'''


<!--T:61-->
: Click {{Button|Close}}.

<!--T:62-->
'''<big>Pocket</big>'''
'''<big>Pocket</big>'''


</translate>
[[File:Pd tut pck01.png|thumb|300px|Fig: CC5]]
[[File:Pd tut pck02-mir.png|thumb|300px|Fig: CC6]]
[[File:Pd_tut_pck01.png|thumb|300px|Fig: CC4]]
[[File:Pd_tut_pck02-mir.png|thumb|300px|Fig: CC5]]
<translate>


<!--T:63-->
To create the cutouts we will use the [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]] tool. This tool is the opposite of the Pad tool. Whereas the Pad tool adds material to the part, the Pocket tool removes material from the part.
To create the cutouts we will use the [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]] tool. This tool is the opposite of the Pad tool. Whereas the Pad tool adds material, the Pocket tool removes material.


<!--T:64-->
# Select '''Pad''' and unhide it.
# Select '''Sketch002'''.
# Select '''Sketch002'''.
# Select [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]] and configure the operation:
# Click [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]]:
## The '''Pocket parameters''' task panel opens.
## Select '''Type''' {{ComboBox|Through all}}.
## Select '''Type''' {{ComboBox|Through all}}.
## Check {{CheckBox|TRUE|Reversed}}
## Check {{CheckBox|TRUE|Reversed}}
## Click the {{Button|OK}} button.
## Click {{Button|OK}}.
# You should have something that resembles '''Fig: CC5'''
# You should have something that resembles '''Fig: CC4'''


<!--T:65-->
'''<big>Mirror</big>'''
'''<big>Mirror</big>'''


<!--T:66-->
Instead of creating another sketch and pocketing it, we can take advantage of the model's symmetry about the YZ plane and use [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]].
Instead of creating another sketch and pocketing it, we take advantage of the model's symmetry about the YZ plane and use [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]] to create the second cutout.


<!--T:67-->
# Select '''Pocket'''.
# Select '''Pocket''' in the [[Tree_view|Tree view]].
# Click [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]]:
# Click [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]]:
## A task panel will open.
## The '''Mirrored parameters''' task panel opens.
## Select Plane {{ComboBox|Vertical sketch axis}} from the pulldown menu. The plane will be defined by this axis (the Y axis) and also by the Z axis of the sketch. We could also have selected '''Base_YZ_Plane''' to obtaining the same result.
## Select '''Plane''' {{ComboBox|Vertical sketch axis}} from the pulldown menu. The plane will be defined by this axis (the Y axis) and also by the Z axis of the sketch. Note that selecting '''Base YZ Plane''' would have the same result.
## Click {{Button|OK}}.
## Click {{Button|OK}}.
# If all has gone well, you should now have a part that looks like '''Fig: CC6'''.
# You should now have a part that looks like '''Fig: CC5'''.


</translate>
{{Clear}}
{{Clear}}
<translate>

== Sides == <!--T:68-->


<!--T:69-->
== Sides ==
The sides are created in a similar manner, but instead of removing material we will add material with a [[PartDesign_Pad|pad]] feature.


<!--T:70-->
'''<big>Sketch003</big>'''
'''<big>Sketch003</big>'''


</translate>
[[File:Pd tut sk3 1.png|thumb|300px|Fig: SD1]]
[[File:Pd tut pad001.png|thumb|300px|Fig: SD2]]
[[File:Pd_tut_sk3_1.png|thumb|300px|Fig: SD1]]
[[File:Pd tut pad02-mir.png|thumb|300px|Fig: SD3]]
[[File:Pd_tut_pad001.png|thumb|300px|Fig: SD2]]
[[File:Pd_tut_pad02-mir.png|thumb|300px|Fig: SD3]]
<translate>


<!--T:71-->
# Make sure '''Sketch''' is visible, and '''Mirrored''' is hidden.
# Make sure '''Sketch''' is visible, and '''Mirrored''' is hidden.
# Click on [[Image:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create new sketch]] and create the new sketch in '''XY_Plane'''; Sketch will be named '''Sketch003'''.
# Click [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]] and create a new sketch attached to the '''XY_Plane'''. The sketch will be named '''Sketch003'''.
# Select [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Rectangle]] tool, and create a rectangle, similar to those in '''Fig: SD1'''. This should not trigger any auto constraint, because we offset our rectangle from the x-axis.
# Click [[File:Sketcher_CreateRectangle.svg|24px|link=Sketcher_CreateRectangle]] [[Sketcher_CreateRectangle|Create rectangle]] and create a rectangle similar to the smaller rectangle in '''Fig: SD1'''. Because the rectangle is offset from the X axis this should not trigger an automatic [[File:Sketcher_ConstrainPointOnObject.svg|24px|link=Sketcher_ConstrainPointOnObject]] [[Sketcher_ConstrainPointOnObject|Point onto object constraint]].
# Exit the tool.
# Click [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]].
# Select the point '''P1''' as shown in '''Fig: CC2''' from '''Sketch'''.
# Exit the tool.
# Apply these constraints:
# Apply these constraints:
## Select one of the horizontal lines apply a horizontal distance constraint and a value of 7 mm.
## Select one of the horizontal lines, apply a [[File:Sketcher_ConstrainDistanceX.svg|24px|link=Sketcher_ConstrainDistanceX]] [[Sketcher_ConstrainDistanceX|Horizontal distance constraint]], and assign a value of '''7 mm'''.
## Select one of the vertical lines and give it a vertical distance constraint using an '''Expression''' and assigning the distance '''<code><<Sketch>>.Constraints.width</code>'''.
## Select one of the vertical lines, apply a [[File:Sketcher_ConstrainDistanceY.svg|24px|link=Sketcher_ConstrainDistanceY]] [[Sketcher_ConstrainDistanceY|Vertical distance constraint]], and assign this expression: '''<code><<Sketch>>.Constraints.width</code>'''.
## Select the '''top-left''' point of the created rectangle (marked '''TL''' in '''Fig: SD1''') and the newly added '''external geometry point''' and apply a [[File:Sketcher_ConstrainCoincident.svg|24px|link=Sketcher_ConstrainCoincident]] [[Sketcher_ConstrainCoincident|Coincident constraint]].
## Add an [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]] using the point '''P1''' as shown in '''Fig: CC3'''. (Vertices are somewhat finicky to select. Selecting any line containing P1 will create external references to both ends.)
## Select both the '''top-left''' point of created rectangle, (marked '''TL''' in in '''Fig: SD1''') and the newly added External Geometry reference to P1.
## Apply a [[File:Sketcher_ConstrainCoincident.svg|24px]] [[Sketcher_ConstrainCoincident|Coincident]] Constraint.
# The sketch should be fully constrained now.
# The sketch should be fully constrained now.
# Click {{Button|Close}} at the top of the task panel.
# Click {{Button|Close}}.


<!--T:72-->
'''<big>Pad001</big>'''
'''<big>Pad001</big>'''


<!--T:73-->
# Select '''Sketch003'''.
# Select '''Sketch003'''.
# Click [[File:PartDesign_Pad.svg|24px|link=PartDesign_Pad]] [[PartDesign_Pad|Pad]]:
# Click [[File:PartDesign_Pad.svg|24px|link=PartDesign_Pad]] [[PartDesign_Pad|Pad]]:
## Assign '''Type = ''' {{ComboBox|Dimension}}.
## Assign '''Type = ''' {{ComboBox|Dimension}}.
## Assign '''Length = 16.70 mm'''
## Assign '''Length = 16.7 mm'''
## Click {{Button|OK}}.
## Click {{Button|OK}}.
# You should have a result as shown in '''Fig: SD2'''
# You should have a result as shown in '''Fig: SD2'''


<!--T:74-->
'''<big>Mirrored001</big>'''
'''<big>Mirrored001</big>'''


<!--T:75-->
# Select '''Pad001'''.
# Select '''Pad001'''.
# Click on [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]]:
# Click [[File:PartDesign_Mirrored.svg|24px|link=PartDesign_Mirrored]] [[PartDesign_Mirrored|Mirrored]]:
## Make sure Plane {{ComboBox|Vertical sketch axis}} from the pulldown menu, is selected.
## Make sure '''Plane''' {{ComboBox|Vertical sketch axis}} is selected.
## Click {{Button|OK}}.
## Click {{Button|OK}}.
# If all has gone well, you should now have a part that looks like '''Fig: SD3'''.
# You should now have a part that looks like '''Fig: SD3'''.


<!--T:76-->
'''<big>Note:</big>'''
'''<big>Note</big>'''


<!--T:77-->
Our two mirror operations have a common symmetry plane, so we could have made our model a little simpler by combining them. We would
Our two mirror operations have a common symmetry plane, so we could have made our model a little simpler by combining them. We would:
# Omit the '''Mirror''' operation above
# Select both Pad001 and Pocket in step 1 of the above '''Mirrored001''' operation.
# Omit the first '''Mirror''' operation.
# Select both '''Pad001''' and '''Pocket''' in step 1 of the above '''Mirrored001''' operation.


<!--T:78-->
This emphasizes the important concept that we are mirroring the selected features (the operations we performed on the body, in the order selected), not the body itself.
This emphasizes the important concept that we are mirroring the selected features (the operations we performed on the body, in the selected order), not the body itself.


</translate>
{{Clear}}
{{Clear}}
<translate>


== Center hole ==
== Center hole == <!--T:79-->


<!--T:80-->
Now it is time for the most challenging part of our modeling, a challenge that arises because the central pocket dimensions are referred to the slanted face.
Now it is time for the most challenging part of our modeling, a challenge that arises because some of the dimensions of the center hole are defined along the slanted face. If you use this face, created by padding '''Sketch001''', as a reference for the next sketch, you expose yourself to the [[Topological_naming_problem|Topological Naming Problem]]. A better solution is to reference '''Sketch001''' itself.

If you use as a reference points on the slanted face created by padding '''Sketch001''', you expose yourself to the [[Topological_naming_problem|Topological naming problem]]. A better solution is to reference '''Sketch001''' itself when creating our next sketch as follows.


<!--T:81-->
'''<big>Sketch004</big>'''
'''<big>Sketch004</big>'''


</translate>
[[File:Pd tut cp01.png|thumb|240px|Fig: CH1]]
[[File:Pd tut cp02.png|thumb|240px|Fig: CH2]]
[[File:Pd_tut_cen01.png|thumb|240px|Fig: CH1]]
[[File:Pd_tut_cen02.png|thumb|240px|Fig: CH2]]
<translate>


<!--T:82-->
# Make '''Sketch''' visible, and '''Mirrored001''' hidden.
# Make '''Sketch001''' visible, and hide '''Sketch''' and '''Mirrored001'''.
# Click on [[Image:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create new sketch]], and create the new sketch in the '''YZ Plane'''. This will create a sketch named '''Sketch004'''.
# Using [[Image:Sketcher_CreatePolyline.svg|24px|link=Sketcher_CreatePolyline]] [[Sketcher_CreatePolyline|Polyline]] tool, trace a polyline like that indicated by the points '''P1, P2, P3, P4''' in '''Fig: CH1'''.
# Click [[File:PartDesign_NewSketch.svg|24px|link=PartDesign_NewSketch]] [[PartDesign_NewSketch|Create sketch]] and create a new sketch attached to the '''YZ_Plane'''. The sketch will be named '''Sketch004'''.
# Click [[File:Sketcher_CreatePolyline.svg|24px|link=Sketcher_CreatePolyline]] [[Sketcher_CreatePolyline|Create polyline]] and trace a polyline like that indicated by the points '''P1''', '''P2''', '''P3''' and '''P4''' in '''Fig: CH1'''.
# Remember to close the polyline by clicking the last point over the selected first point. This will create the required coincidence constraint.
# Remember to close the polyline by picking the first point. This will create the required [[File:Sketcher_ConstrainCoincident.svg|24px|link=Sketcher_ConstrainCoincident]] [[Sketcher_ConstrainCoincident|Coincident constraint]].
# Exit the tool.
# Check the applied constraints:
# Check the applied constraints:
#* If {{CheckBox|TRUE|Auto constraints}} was selected delete the redundant [[File:Sketcher_ConstrainVertical.svg|24px]] [[Sketcher_ConstrainVertical|Constraint vertical]] applied to the line defined by '''P1''' and '''P2'''.
#* Delete the redundant [[File:Sketcher_ConstrainVertical.svg|24px|link=Sketcher_ConstrainVertical]] [[Sketcher_ConstrainVertical|Vertical constraint]] applied to the line defined by '''P1''' and '''P2'''.
#* Make sure a [[File:Sketcher_ConstrainHorizontal.svg|24px|link=Sketcher_ConstrainHorizontal]] [[Sketcher_ConstrainHorizontal|Horizontal constraint]] has been applied to the lines defined by '''P1''' and '''P4''', and '''P2''' and '''P3'''.
#* If {{CheckBox|FALSE|Auto constraints}} was not selected apply the following constraints manually:
#*# [[File:Sketcher_ConstrainHorizontal.svg|24px]] [[Sketcher_ConstrainHorizontal|Constraint horizontal]] on lines defined by '''P1''' and '''P4''', and '''P2''' and '''P3'''.
#* Make sure a [[File:Sketcher_ConstrainPointOnObject.svg|24px|link=Sketcher_ConstrainPointOnObject]] [[Sketcher_ConstrainPointOnObject|Point onto object constraint]] has been applied to '''P1''' and the '''Y axis''', and to '''P2''' and the '''Y axis'''.
# Click [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]]
#*# [[File:Sketcher_ConstrainPointOnObject.svg|24px]] [[Sketcher_ConstrainPointOnObject|Point on object]] on '''P1''' and '''P2''' on the '''Y axis'''.
# Using [[File:Sketcher_External.svg|24px|link=Sketcher_External]] [[Sketcher_External|External geometry]] tool select line defined by '''EGP1''' and '''EGP2''' on '''Sketch001''' indicated in '''Fig: CH2''' with purple color.
# Select the line defined by '''EGP1''' and '''EGP2''' in '''Sketch001''', indicated by the purple color in '''Fig: CH2'''.
# Exit the tool.
# Apply [[File:Sketcher_ConstrainPointOnObject.svg|24px]] [[Sketcher_ConstrainPointOnObject|Point on object]] to '''P3''' and '''P4''', selecting the point and the external geometry, this will make line '''P3''' to '''P4''' coincident with line defined by '''EGP1''' and '''EGP2''' in '''Sketch001'''.
# Apply a [[File:Sketcher_ConstrainPointOnObject.svg|24px|link=Sketcher_ConstrainPointOnObject]] [[Sketcher_ConstrainPointOnObject|Point onto object constraint]] to '''P3''' and the '''external geometry''', and repeat this for '''P4'''. This will make the line defined by '''P3''' and '''P4''' coincident with the line defined by '''EGP1''' and '''EGP2'''.
# Apply [[File:Sketcher_ConstrainDistance.svg|24px]] [[Sketcher_ConstrainDistance|Distance]] to line '''P3''' to '''P4''' and assign '''Length = 17.00mm'''
# Apply [[File:Sketcher_ConstrainDistance.svg|24px]] [[Sketcher_ConstrainDistance|Distance]] to '''P4''' and '''EGP2''' and assign '''Length = 7.00mm'''.
# Select the line '''P3''' to '''P4''', apply a [[File:Sketcher_ConstrainDistance.svg|24px|link=Sketcher_ConstrainDistance]] [[Sketcher_ConstrainDistance|Distance constraint]], and assign '''Length = 17 mm'''
# Select the points '''EGP2''' and '''P4''', apply a [[File:Sketcher_ConstrainDistance.svg|24px|link=Sketcher_ConstrainDistance]] [[Sketcher_ConstrainDistance|Distance constraint]], and assign '''Length = 7 mm'''.
# This will result in a fully constrained sketch like in '''Fig: CH2'''.
# This will result in a fully constrained sketch like '''Fig: CH2'''.
# Click {{Button|Close}} at the top of the task panel.
# Click {{Button|Close}}.
# Hide '''Sketch001'''.


<!--T:83-->
'''<big>Pocket001</big>'''
'''<big>Pocket001</big>'''


<!--T:84-->
Now you have to model central pocket, Drawing specify its distance from side pad as 11mm. An easy calculation shows that with this dimension the pocket is centered, having modeled the solid symmetric around the '''Y axis''' is more easy to place the pocket.

# Select '''Sketch004'''.
# Select '''Sketch004'''.
# Select [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]] and configure the operation:
# Click [[File:PartDesign_Pocket.svg|24px|link=PartDesign_Pocket]] [[PartDesign_Pocket|Pocket]]:
## Select '''Type''' {{ComboBox|Two Dimensions}}.
## Select '''Type''' {{ComboBox|Two Dimensions}}.
## Assign '''8.50mm''' to '''Length''' and '''Length2''' values
## Assign '''8.5 mm''' to '''Length''' and '''2nd length'''.
## Click the {{Button|OK}} button.
## Click {{Button|OK}}.
# Select the newly created '''Pocket001'''.
# Select the newly created '''Pocket001'''.
# Change its '''Refine''' property to '''True'''.
# On the Data tab of the [[Property_editor|Property editor]] change its '''Refine''' property to '''True'''. The property editor can be found on the Model tab of the [[Combo_view|Combo View]].


<!--T:85-->
'''<big>Notes:</big>'''
'''<big>Notes</big>'''


<!--T:86-->
# '''Refine''' will try to delete "seams" left by previous operations. It is advisable to only '''''Refine''''' the final solid obtained, as some operations can fail if '''Refine''' is activated.<br>(However, there are also cases where '''Refine''' can make an operation succeed. So in case of problems check this property and test. Unfortunately there is not yet a general rule to follow.)
# Alternatively we could have used '''Type''' {{ComboBox|Dimension}}, checked '''Symmetric to Plane''' and entered '''17 mm''' for the '''Length''' value''
# For '''Pocket001''' we could have alternatively used '''Type''' {{ComboBox|Dimension}}, checked '''Symmetric to Plane''', and entered '''17 mm''' for the '''Length''' value.
# '''Refine''' will try to remove seams left by previous operations. It is advisable to only refine the final solid, as some operations can fail if a previous feature has been refined. However, there are also cases where refine can make an operation succeed. So in case of problems check this property and test. Unfortunately there is not yet a general rule to follow.


</translate>
{Clear}}
{{Clear}}
<translate>


== Result ==
== Result == <!--T:87-->


<!--T:88-->
Your model is complete. It should look like the image below.
The model is complete. It should look like the image below.


<!--T:89-->
Single click on '''Sketch''' in the Tree View. Look for Sketch|Constraints in the Data tab and check on the effects of changing the length and/or width properties. The model should change parametrically.
Finally, select '''Sketch''' in the [[Tree_view|Tree view]] and on the Data tab of the [[Property_editor|Property editor]] look for '''Sketch → Constraints'''. Expand that node and changed the '''length''' and '''width''' constraints. The model should change parametrically.


</translate>
[[File:Pd tut final solid.png]]
[[File:Pd_tut_final_solid.png]]
<translate>




</translate>
{{PartDesign Tools navi{{#translation:}}}}
{{PartDesign Tools navi{{#translation:}}}}
{{Sketcher Tools navi{{#translation:}}}}
{{Sketcher Tools navi{{#translation:}}}}

Latest revision as of 19:06, 18 March 2024

Tutorial
Topic
Modeling
Level
Beginner
Time to complete
1 hour
Authors
Carlo Dormeletti (onekk)
Ed Williams (edwilliams16)
Roy 043 (Roy 043)
FreeCAD version
0.19 or higher
Example files
None
See also
Basic Part Design Tutorial

Introduction

This is an updated version of the Basic Part Design Tutorial.

This tutorial introduces users to the Part Design Workbench. In this tutorial we will create a 3D solid model of the part shown in the image above. In the drawing at the end of this paragraph all the necessary dimensions to complete the task are given.

We will start by creating a core solid shape from a base Sketch and then build on that shape, adding what are known as features. These features will either add material to, or remove material from the solid by use of additional sketches and accompanying feature operations.

We will follow some of the techniques described in Advice for creating stable models:

  • We will use a master sketch.
  • Named constraints will be used to hold dimensions that can be referenced later in the model construction.
    For instance, to change the model width from 53 mm, as in the technical drawing, to 55 mm we need only modify the Length value of the appropriate named constraint in the master sketch and the whole model will modify accordingly. This is parametric design in action.
  • External geometries are potentially subject to the Topological Naming Problem. We will use them only when strictly necessary and will attempt to reference to the most stable elements available. Referencing edges and vertices of sketches is normally more stable than referencing edges and vertices of generated solid geometry.

This Tutorial will not use every feature and tool available in the Part Design Workbench, but will provide a basic foundation upon which users can build their knowledge and skills.

Feel free to signal any errors or problems in this forum thread: New Part Design Tutorial for FC 019 and 020.

Preliminary notes

  • This tutorial will provide detailed instructions when it describes an operation for the first time. Subsequent operations will have a more concise description. When in doubt, find the operation that contains the more detailed description. For instance, when creating a sketch for the first time the process of choosing the sketch plane will be explained in detail, for subsequent sketches it will not.
  • All mentioned tools can be accessed from toolbars and from the menu.
  • This tutorial assumes that Auto constraints in the Sketcher's Edit controls window is checked. This ensures that some constraints are applied automatically. Otherwise you will need to apply them yourself.
  • If the Sketcher Solver detects a redundant constraint it will turn the sketch orange in color. Before further constraints are added, redundant constraints should be removed. Redundant constraints are shown in the task panel, click the blue reference and press Delete.
  • The color mentioned above is a default color, it can be changed in the preferences. The same applies to the other colors mentioned in this tutorial.
  • You exit a Sketcher drawing tool by pressing the Esc key or by right-clicking an empty area of the 3D view. The mouse cursor will change to the standard arrow cursor. If you press Esc an additional time you will exit sketch edit mode. To return to the editor, click the Model tab, then either double-click the Sketch element in the Tree view, or right-click it and select Edit sketch from the context menu. To avoid leaving edit mode when pressing Esc too often, change the Esc can leave sketch edit mode preference, see Sketcher Preferences.
  • It's possible that some elements in a task panel, for instance the OK button, are not visible if the panel is not wide enough. You can make it wider by dragging its right border. Place your mouse pointer over the border, when the pointer changes to a two-way arrow, hold down the left mouse button and drag.
  • A >> button in a toolbar indicates that the toolbar is truncated. You can either use the mentioned button to expand it, or move the toolbar to a position where more room is available. To move a toolbar place your mouse pointer over the grip before the first icon in the toolbar, hold down the left mouse button and drag.
  • During the v0.21 development cycle a new icon was introduced for the Sketcher Create polyline tool: . The old icon looks like this: . In this tutorial we will use the new icon.
  • See Part Design Workbench Concepts for some conceptual background.
  • See the Sketcher WorkBench for a more detailed explanation of some of the terminology used here.

Startup

First make sure you are in the Part Design Workbench. If required select it from the Workbench dropdown list. Once there, you will want to create a new document if you have not done so already. It is a good habit to save your work often, so first save the new document, giving it any name you choose.

All work in Part Design begins with a body. Click Create new body to create and activate one. Note that it is also possible to skip this step: when creating a sketch using the Part Design Create sketch tool, if no existing body is found, a new one is automatically created and activated.

Master sketch

The master sketch contains the model's rectangular base shape and two named constraints that will supply correct dimensions to other parts of the model: length that will contain 53 mm (the result of adding the 39 mm dimension to the two 7 mm sides), and width that will contain 26 mm. To be able to take advantage of the model's symmetry in later steps, the top edge of the rectangle will be centered around the origin with a symmetrical constraint.

Sketch

Fig: MS1
Fig: MS2
Fig: MS3
Fig: MS4
Fig: MS5
Fig: MS6

Step A: Create the sketch

  1. Click Create sketch. This will create the sketch within the just created body. It will be named Sketch.
  2. A task panel like Fig: MS1 will open where you have to choose to which plane the sketch will be attached.
    1. Select XY_Plane from the list or select that plane in the 3D view.
    2. Click OK.
  3. FreeCAD automatically switches to the Sketcher Workbench.
  4. The sketch is opened in edit mode: you will see something like Fig: MS2. The X axis (the red line) and Y axis (the green line) of the sketch are indicated, as well as its origin (the red point).

Step B: Add geometry

  1. Click Create rectangle.
  2. While the tool is active the cursor has this appearance:
  3. Pick two points to create a rectangle roughly centered around the Y axis similar to Fig: MS3. Note:
    • Don't place points on an axis as the Solver will automatically apply constraints that will create problems later.
    • The dimensions of the rectangle are unimportant at this point. They will be assigned using constraints in a later step.
  4. Once done, press Esc or right-click to exit the tool.

Step C: Assign a horizontal distance constraint

  1. Select the line defined by P2 and P3 in Fig: MS3.
  2. Click Horizontal distance constraint:
    1. A dimension will appear between the endpoints of the selected line. This dimension is the current distance.
    2. Additionally a dialog will appear:
    3. Assign Length = 53 mm.
    4. To be able to reference this dimension later a name is required. You are free to use any name, it need only be unique within the sketch. Assign Name = length.
    5. Click OK.
  3. The result should resemble Fig: MS4

Step D: Assign a symmetrical constraint

  1. Select points P2 and P3 of the rectangle.
  2. Select the origin of the sketch. Note: the selection order of the points is important.
  3. Click Symmetrical constraint.
  4. You will end up with something that resembles Fig: MS5.

Step E: Assign a vertical distance constraint

Assign a vertical distance constraint following the same procedure as used for the previous horizontal distance constraint:
  1. Select the line defined by P3 and P4 in Fig: MS3.
  2. Click Vertical distance constraint:
    1. Assign Length = 26 mm
    2. Assign Name = width.
    3. Click OK.
  3. The result should resemble Fig: MS6.
  4. The sketch is fully constrained now:
    • The lines in the sketch are bright green.
    • The Solver messages section of the task panel displays Fully constrained.
    • If you select any line or vertex of the sketch and try to drag it, it won't move.

Step F: Close the sketch

Click Close at the top of the tasks panel to leave sketch edit mode.

Main profile

The main profile is created by padding a new sketch.

Sketch001

Fig. MP1
Fig: MP2

Step A: Create the sketch

Click Create sketch and create a sketch attached to the YZ_Plane. FreeCAD will assign the name Sketch001.

Step B: Add geometry

  1. Click Create polyline and make a shape like in Fig: MP1.
  2. The labels P1, P2 etc. will not appear in the sketch. They were added for reference.
  3. For the last point of the final segment make sure to pick the first point of the shape. The point will change color and you will see the symbol for a Coincident constraint appear near the cursor. Coincident constraints have to be explicit. Just having two points visually coincident is not sufficient.
  4. Press Esc or right-click to exit the tool.

Step C: Assign constraints

  1. The three vertical and horizontal constraints you see in the image should have been added automatically provided you drew those lines that way. If you didn't you need to add them.
  2. Select the point P2 and the Y axis of the sketch and apply a Point onto object constraint. Because the sketch is attached to the YZ_Plane, the Y axis of the sketch does not match the Y axis of the body.
  3. Select the origin and the point P1 and apply a Horizontal constraint. Why not a Coincident constraint? you might ask. Try it (and undo). The sketch will turn orange and a solver message Redundant constraints will appear. Because the line P1 to P2 has already been constrained to be vertical, the only remaining degree of freedom is P1's Y coordinate. The coincidence constraint sets both the X and Y coordinates to zero, but the X coordinate is already determined. The horizontal constraint, on the other hand, only sets the Y coordinate to zero, which is sufficient.
  4. Select the line defined by the points P2 and P3, apply a Horizontal distance constraint, and assign Length = 5 mm.
  5. Select the line defined by the points P1 and P2, apply a Vertical distance constraint, and assign Length = 26 mm.
  6. Select the line defined by the points P1 and P4 and apply a Horizontal distance constraint:
    1. For this value you will use a named constraint using Expressions. To do so you have to click the little button in the Length input field: .
    2. You will be presented with a new dialog named Formula editor that contains an input field and a Result: label, similar to the image below:

      When you start typing in the input field, you will be presented with some autocompletions.
    3. Select the label of the sketch. In our case we want <<Sketch>>.. Note the period after the label.
    4. To select the named constraint "width", you first have to enter Constraints. with the period. Here autocomplete works.
    5. To add "width", as yet autocompletion is not available, so complete the cell to read <<Sketch>>.Constraints.width. If all went well the red error message after Result: has been replaced by the correct value as in the image below:
    6. Click OK to close the Formula editor dialog.
    7. Click OK to close the Insert length dialog.
  7. You should have a fully constrained sketch similar to Fig: MP2.
  8. Note the different colors used for distance constraints assigned using expressions, and those assigned specifying a length.

Step D: Close the sketch

Click Close at the top of the tasks panel to leave sketch edit mode.

Pad

Fig: MP3
  1. Make sure Sketch001 is selected.
  2. Click Pad:
    1. The Pad parameters task panel opens.
    2. For Type select Dimension .
    3. For Length again use an expression, but this time enter <<Sketch>>.Constraints.length. This should evaluate to 53 mm.
    4. Select Symmetric to plane.
    5. Click OK to close the task panel.
  3. You should now have a solid as shown in Fig: MP3.

Corner cutouts

For the corner cutouts two features are added to the model. A pocket, based on another sketch, is used to create the first cutout, and this feature is then mirrored.

Sketch002

Fig: CC1
Fig: CC2
Fig: CC3

Step A: Hide the solid

Hide the just created solid: Select Pad and click the Spacebar.

Step B: Create the sketch

Click Create sketch and create a sketch attached to the XZ_Plane. The sketch will be named Sketch002.

Step C: Add geometry

  1. Select Create rectangle, and create a rectangle. Do not create it too near an axis, to avoid any automatic constraints that would make it difficult to move it into the correct position later.
  2. Exit the tool.

Step D: Assign dimensional constraints

  1. Select one of the horizontal lines, apply a Horizontal distance constraint, and assign a value of 11 mm.
  2. Select one of the vertical lines, apply a Vertical distance constraint, and assign a value of 5 mm.
  3. You should obtain something similar to Fig: CC1.

Step E: Close the sketch

Click Close. Sketch002 is not fully constrained at this stage.

Step F: Make previous sketches visible

To use external geometry, the sketches whose elements we want to reference must be visible. Make sure Sketch and Sketch001 are both visible. Use the Spacebar to toggle visibility if needed. Expand the Pad node in the Tree view to access Sketch001.

Step G: Add external geometry and fully constrain the sketch

  1. Double click Sketch002 to enter edit mode.
  2. Rotate the view so you can clearly see the points as shown in Fig: CC2. This will ease subsequent steps. Note that the rectangle's initial position may be different in your sketch.
  3. Click External geometry.
  4. While the tool is active the cursor has this appearance:
  5. Select point P1 in Fig: CC2. The selected point is added to the sketch as external geometry. In the Elements section of the task panel it will appear with a purple X icon or, introduced in version 0.21, a purple dot icon.
  6. With the tool still active select point P2 in Fig: CC2. This external geometry should also appear in the Elements section.
  7. Exit the tool.
  8. Select point P1 and point P3 and apply a Vertical constraint. The rectangle will be aligned with the X position of P1.
  9. Select point P2 and point P3 and apply a Horizontal constraint. The rectangle will be aligned with the Y position of P2.
  10. You should have a fully constrained sketch similar to Fig: CC3.

Step H: Close the sketch

Click Close.

Pocket

Fig: CC4
Fig: CC5

To create the cutouts we will use the Pocket tool. This tool is the opposite of the Pad tool. Whereas the Pad tool adds material, the Pocket tool removes material.

  1. Select Sketch002.
  2. Click Pocket:
    1. The Pocket parameters task panel opens.
    2. Select Type Through all .
    3. Check Reversed
    4. Click OK.
  3. You should have something that resembles Fig: CC4

Mirror

Instead of creating another sketch and pocketing it, we take advantage of the model's symmetry about the YZ plane and use Mirrored to create the second cutout.

  1. Select Pocket in the Tree view.
  2. Click Mirrored:
    1. The Mirrored parameters task panel opens.
    2. Select Plane Vertical sketch axis from the pulldown menu. The plane will be defined by this axis (the Y axis) and also by the Z axis of the sketch. Note that selecting Base YZ Plane would have the same result.
    3. Click OK.
  3. You should now have a part that looks like Fig: CC5.

Sides

The sides are created in a similar manner, but instead of removing material we will add material with a pad feature.

Sketch003

Fig: SD1
Fig: SD2
Fig: SD3
  1. Make sure Sketch is visible, and Mirrored is hidden.
  2. Click Create sketch and create a new sketch attached to the XY_Plane. The sketch will be named Sketch003.
  3. Click Create rectangle and create a rectangle similar to the smaller rectangle in Fig: SD1. Because the rectangle is offset from the X axis this should not trigger an automatic Point onto object constraint.
  4. Exit the tool.
  5. Click External geometry.
  6. Select the point P1 as shown in Fig: CC2 from Sketch.
  7. Exit the tool.
  8. Apply these constraints:
    1. Select one of the horizontal lines, apply a Horizontal distance constraint, and assign a value of 7 mm.
    2. Select one of the vertical lines, apply a Vertical distance constraint, and assign this expression: <<Sketch>>.Constraints.width.
    3. Select the top-left point of the created rectangle (marked TL in Fig: SD1) and the newly added external geometry point and apply a Coincident constraint.
  9. The sketch should be fully constrained now.
  10. Click Close.

Pad001

  1. Select Sketch003.
  2. Click Pad:
    1. Assign Type = Dimension .
    2. Assign Length = 16.7 mm
    3. Click OK.
  3. You should have a result as shown in Fig: SD2

Mirrored001

  1. Select Pad001.
  2. Click Mirrored:
    1. Make sure Plane Vertical sketch axis is selected.
    2. Click OK.
  3. You should now have a part that looks like Fig: SD3.

Note

Our two mirror operations have a common symmetry plane, so we could have made our model a little simpler by combining them. We would:

  1. Omit the first Mirror operation.
  2. Select both Pad001 and Pocket in step 1 of the above Mirrored001 operation.

This emphasizes the important concept that we are mirroring the selected features (the operations we performed on the body, in the selected order), not the body itself.

Center hole

Now it is time for the most challenging part of our modeling, a challenge that arises because some of the dimensions of the center hole are defined along the slanted face. If you use this face, created by padding Sketch001, as a reference for the next sketch, you expose yourself to the Topological Naming Problem. A better solution is to reference Sketch001 itself.

Sketch004

Fig: CH1
Fig: CH2
  1. Make Sketch001 visible, and hide Sketch and Mirrored001.
  2. Click Create sketch and create a new sketch attached to the YZ_Plane. The sketch will be named Sketch004.
  3. Click Create polyline and trace a polyline like that indicated by the points P1, P2, P3 and P4 in Fig: CH1.
  4. Remember to close the polyline by picking the first point. This will create the required Coincident constraint.
  5. Exit the tool.
  6. Check the applied constraints:
  7. Click External geometry
  8. Select the line defined by EGP1 and EGP2 in Sketch001, indicated by the purple color in Fig: CH2.
  9. Exit the tool.
  10. Apply a Point onto object constraint to P3 and the external geometry, and repeat this for P4. This will make the line defined by P3 and P4 coincident with the line defined by EGP1 and EGP2.
  11. Select the line P3 to P4, apply a Distance constraint, and assign Length = 17 mm
  12. Select the points EGP2 and P4, apply a Distance constraint, and assign Length = 7 mm.
  13. This will result in a fully constrained sketch like Fig: CH2.
  14. Click Close.
  15. Hide Sketch001.

Pocket001

  1. Select Sketch004.
  2. Click Pocket:
    1. Select Type Two Dimensions .
    2. Assign 8.5 mm to Length and 2nd length.
    3. Click OK.
  3. Select the newly created Pocket001.
  4. On the Data tab of the Property editor change its Refine property to True. The property editor can be found on the Model tab of the Combo View.

Notes

  1. For Pocket001 we could have alternatively used Type Dimension , checked Symmetric to Plane, and entered 17 mm for the Length value.
  2. Refine will try to remove seams left by previous operations. It is advisable to only refine the final solid, as some operations can fail if a previous feature has been refined. However, there are also cases where refine can make an operation succeed. So in case of problems check this property and test. Unfortunately there is not yet a general rule to follow.

Result

The model is complete. It should look like the image below.

Finally, select Sketch in the Tree view and on the Data tab of the Property editor look for Sketch → Constraints. Expand that node and changed the length and width constraints. The model should change parametrically.