Basic Sketcher Tutorial/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(35 intermediate revisions by 3 users not shown)
Line 4: Line 4:
|Topic= Sketcher
|Topic= Sketcher
|Level= Base
|Level= Base
|Time= 10 minuti
|Time= 60 minuti
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei]
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei] e vocx
|FCVersion=0.16 o superiore
|FCVersion=0.19
|Files=[https://forum.freecadweb.org/viewtopic.php?f=36&t=43594 Basic Sketcher tutorial updated]
|Files=
}}
}}


<span id="Introduction"></span>
=== Introduzione ===
==Introduzione==
Questo tutorial ha lo scopo di introdurre il lettore al flusso di lavoro di base dell'ambiente [[Sketcher Workbench/it|Schizzo]]. Creeremo un disegno simile a quello mostrato qui sotto.


[[Category:Sketcher/it]]
[[Image:Sketcher_tutorial_result.png|480px]]


Questo tutorial ha lo scopo di introdurre il lettore al flusso di lavoro di base dell'ambiente [[Image:Workbench_Sketcher.svg|24px]] [[Sketcher Workbench/it|Schizzo]].
L'ambiente Sketcher esiste come modulo autonomo, ma è accessibile anche dall'ambiente [[PartDesign Workbench/it| PartDesign]] quando è necessario per creare un '''profilo'''.


L'ambiente[[Sketcher_Workbench/it|Sketcher ]] esiste come modulo autonomo, quindi può essere utilizzato per disegnare oggetti 2D generici (planari). Tuttavia, viene utilizzato principalmente in combinazione con [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench/it|PartDesign]]. Uno schizzo chiuso viene normalmente utilizzato per creare una faccia o un profilo da estrudere in un [[PartDesign_Body/it|corpo]] solido con un'operazione come [[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad/it|Pad]] di PartDesign .


Il lettore farà pratica su:
=== Requisiti ===
* Creazione della geometria di costruzione
* FreeCAD versione 0.16 o superiore
* Creazione di geometria reale
* Applicazione di vincoli geometrici
* Applicazione di vincoli di riferimento
* Ottenere un profilo chiuso


Per una descrizione più approfondita dello sketcher, leggere il [[Sketcher_reference/it|Manuale di riferimento per Sketcher]].
=== Procedura ===
==== Creare uno Schizzo ====
# Creare un nuovo documento
# Passare nell'ambiente Sketcher utilizzando il '''menu a discesa''' o cliccando su '''Visualizza> Workbench> Sketcher'''.
# Selezionare [[Image:Sketcher_NewSketch.png‎‎|32px]] [[Sketcher_NewSketch/it|Nuovo schizzo]]


[[File:00_Sk01_Sketcher_fully_constrained_final.png]]
All'interno di Sketcher è possibile utilizzare la maggior parte degli strumenti che questo ambiente mette a disposizione.
{{Caption|Risultato finale dello schizzo, con tutta la geometria completamente vincolata, inclusa la geometria di costruzione per il supporto.}}


<span id="Setup"></span>
Nella '''Vista combinata''', espandere le opzioni '''Modifica controlli''' e abilitare gli '''Autovincoli'''.
==Setup==


1. Open FreeCAD, create a new empty document with {{MenuCommand|File → [[File:Std_New.svg|16px]] [[Std_New|New]]}}.
==== Creare la geometria ====
: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}}.
===== La geometria di costruzione dello schizzo =====
La geometria di costruzione viene utilizzata come guida per creare dei profili complessi. Per accedervi, è necessario attivare la modalità '''Costruzione'''.


Some actions to remember:
* Press the right mouse button, or press {{KEY|Esc}} in the keyboard once, to 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]]}}.

<span id="Create_a_sketch"></span>
== Creare uno schizzo ==

2. Click on {{Button|[[Image:Sketcher_NewSketch.svg‎‎|16px]] [[Sketcher_NewSketch|New sketch]]}}.
:2.1. Choose the sketch orientation, that is, one of the base XY, XZ, or YZ planes. Also choose if you want an inverted orientation, and an offset from the base plane.
:2.2. We will use the default plane and options.
:2.3. Click {{Button|OK}} to start constructing the sketch.

Siamo ora nella modalità di modifica dello schizzo. Al suo interno, è possibile utilizzare la maggior parte degli strumenti di questo ambiente di lavoro.

{{Emphasis|Nota:}} la [[tree_view/it|vista ad albero]] passa alla [[task_panel/it|scheda azioni]]; in questa interfaccia espandere la sezione {{MenuCommand|Modifica controlli}} e assicurarsi che l'opzione {{MenuCommand|Vincoli automatici}} sia abilitata. Altre opzioni possono essere modificate inclusa la dimensione della griglia visibile e se si vuole agganciarla; in questo tutorial non ci agganceremo alla griglia e la nasconderemo anche. In altre sezioni della [[task_panel/it|scheda azioni]] si può anche vedere quali elementi geometrici e vincoli sono stati definiti.

[[File:01_Sk01_Sketcher_Task_panel.png|x400px]]

{{Caption|Upper part of the [[task_panel|task panel]] of the sketcher.}}

<span id="Construction_geometry"></span>
== La geometria di costruzione ==

<div class="mw-translate-fuzzy">
# Selezionare [[Image:Sketcher_ToggleConstruction.png|32px]] [[Sketcher_ToggleConstruction/it|Costruzione]]
# Selezionare [[Image:Sketcher_ToggleConstruction.png|32px]] [[Sketcher_ToggleConstruction/it|Costruzione]]
# Selezionare [[Image:Sketcher_Line.png|32px]] [[Sketcher_Line/it|Linea da 2 punti]]
# Selezionare [[Image:Sketcher_Line.png|32px]] [[Sketcher_CreateLine/it|Linea da 2 punti]]
# Nello schizzo avvicinare il cursore al '''punto di origine''', il punto viene evidenziato e vicino al cursore appare questa icona[[Image:Constraint_PointOnPoint.png|32px]].
# Nello schizzo avvicinare il cursore al '''punto di origine''', il punto viene evidenziato e vicino al cursore appare questa icona[[Image:Constraint_PointOnPoint.png|32px]].
# Selezionare il punto e tracciare una linea in diagonale con una lunghezza arbitraria.
# Selezionare il punto e tracciare una linea in diagonale con una lunghezza arbitraria.
# Ripetere questa procedura fino a creare cinque '''linee di costruzione'''. Accertarsi che siano disposte a raggera, come nella figura iniziale.
# Ripetere questa procedura fino a creare cinque '''linee di costruzione'''. Accertarsi che siano disposte a raggera, come nella figura iniziale.
# Per uscire dalla modalità di costruzione, è sufficiente cliccare nuovamente su [[Image:Sketcher_ToggleConstruction.png|32px]] [[Sketcher_ToggleConstruction/it|Costruzione]]
# Per uscire dalla modalità di costruzione, è sufficiente cliccare nuovamente su [[Image:Sketcher_ToggleConstruction.png|32px]] [[Sketcher_ToggleConstruction/it|Costruzione]]
</div>


{{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 allowing us to select the objects we just created. In this pointer mode we can pick and drag the endpoints of each line to adjust its placement.
===== La geometria dello schizzo =====
La geometria dello schizzo viene utilizzata per creare i profili chiusi necessari per eseguire le operazioni 3D nell'ambiente '''PartDesign'''.
# Selezionare [[Image:Sketcher_Circle.png|32px]] [[Sketcher_Circle/it|Cerchio]]
# Posizionare il suo '''centro''' nell'origine dello schizzo.
# Estendere la circonferenza per una lunghezza arbitraria.


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


Take a look at the [[task_panel|task panel]] again. The {{MenuCommand|Solver messages}} section already indicates that the sketch is under-constrained, and it mentions the number of {{Emphasis|degrees of freedom}}.
# Selezionare [[Image:Sketcher_Arc.png|32px]] [[Sketcher_Arc/it|Arco]]
# Avvicinarsi al '''punto finale''' di una linea di costruzione.
# Impostare il '''centro''' dell'arco '''coincidente''' con il punto finale.
# Selezionare una posizione arbitraria del cursore da impostare come inizio dell'arco, cliccando una volta.
# Estendere arbitrariamente l'arco, assicurandosi che la circonferenza si apra verso l'esterno (lo spazio vuoto sia rivolto verso il cerchio creato in precedenza).
# Ripetere questi passaggi per ogni linea di costruzione.


Look at the {{MenuCommand|Constraints}} and {{MenuCommand|Elements}} sections to see the new listed constraints and lines. Once your sketches have many elements, it may be difficult to select them in the [[3D_view|3D view]], so you can use these lists to select the object that you wish exactly.


[[File:02_Sk01_Sketcher_construction.png|x400px]]
# Creare un arco tra ogni coppia dei precedenti archi, con la loro circonferenza rivolta verso il cerchio.


{{Caption|Construction lines forming a star shape with its center in the origin.}}
Con queste operazioni sono state create le basi del profilo.


<span id="Real_geometry"></span>
==== I vincoli ====
== La geometria reale ==
I vincoli sono usati per determinare i '''gradi di libertà''' dei punti e delle curve all'interno di Sketcher.


La geometria reale deve creare una forma chiusa se deve essere utilizzata come profilo che può essere estruso da strumenti come [[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad/it|Pad]] di PartDesign.
===== I vincoli geometrici =====
Essi sono utilizzati per stabilire le relazioni tra i punti e le curve senza usare le dimensioni.


Make sure you are not in construction mode by clicking on {{Button|[[File:Sketcher_ToggleConstruction.svg|16px]] [[Sketcher_ToggleConstruction|Toggle construction]]}}, if you have not previously exited this mode.
# Selezionare tutte e cinque le linee di costruzione.
# Selezionare [[Image:Constraint_EqualLength.png|32px]] [[Sketcher ConstrainEqual/it|Uguale lunghezza]]


=== Outer arcs ===


4. Create a circle.
# Selezionare i cinque archi centrati sul punto finale di una linea.
:4.1. Click on {{Button|[[File:Sketcher_Circle.svg|16px]] [[Sketcher_CreateCircle|Create circle]]}}.
:4.2. Click on the '''origin''' of the sketch to position its center point.
:4.3. Click anywhere in the [[3D_view|3D view]] to set the circumference radius as a distance from the origin. Make it approximately {{Value|8 mm}}. Again the dimension will be fixed later.

5. Create a series of arcs.
:5.1. Click on {{Button|[[File:Sketcher_Arc.svg|16px]] [[Sketcher_CreateArc|Create arc]]}}.
:5.2. Approach the endpoint of one of the construction lines, and click on it. This will set the center point of the circular arc to be [[File:Constraint_PointOnPoint.svg|32px]] [[Sketcher_ConstrainCoincident|coincident]] with this line's endpoint.
:5.3. 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. Define an approximate radius of {{Value|8 mm}}.
:5.4. Move the pointer in an anti-clockwise direction to trace an arc that has its concavity pointing towards the origin of the sketch. Click to set the final endpoint of the arc, defining a circular arc that approximately sweeps {{Value|180°}} or half a circle.
:5.5. Repeat these steps with each construction line, so that each of them has a circular arc at its tip. We will call these O-arcs for outwards-arcs.

[[File:03_Sk01_Sketcher_outer_arcs.png|x400px]]

{{Caption|Circular arcs added at the endpoints of the construction lines. Also a central circle.}}

=== Inner arcs ===

6. Creare un arco tra ogni coppia degli archi O precedenti.
:6.1. Sempre con lo strumento {{Button|[[File:Sketcher_Arc.svg|16px]] [[Sketcher_CreateArc/it|Arco]]}} attivo, fare clic da qualche parte tra due archi O ma più lontano dall'origine dello schizzo, per impostare il punto centrale di un nuovo arco.
:6.2. Fare clic in un punto vicino al punto finale di un arco O e spostare il puntatore per tracciare un altro arco finendo vicino a un altro punto finale di un arco O diverso, come se si stesse tentando di unire i punti finali. Questa volta la concavità deve puntare lontano dall'origine.
:6.3. Ripetere questi passaggi, in modo che ogni coppia di archi O abbia un nuovo arco tra di loro. Chiameremo questi archi a I per archi verso l'interno.

To summarize, the O-arcs should have their curvature pointing outwards, and their concavity pointing towards the origin of the sketch; the I-arcs should have their curvature pointing inwards, and their concavity pointing away from the same origin.

[[File:04_Sk01_Sketcher_inner_arcs.png|x400px]]

{{Caption|Circular arcs added between the first set of arcs placed.}}

== Constraints ==

Take a look at the [[task_panel|task panel]] again. Due to the new geometrical elements that we have drawn, the {{MenuCommand|Solver messages}} section indicates even more {{Emphasis|degrees of freedom}}. A {{Emphasis|degree of freedom}} (DOF) indicates a possible movement of one element. For example, a point can be moved both in horizontal and vertical directions, so it has two degrees of freedom. A line is defined by two points, therefore in total it has four degrees of freedom. If we fix one of those points, then the entire system has only two degrees of freedom available; if we additionally fix the horizontal movement of the remaining point, we only have one degree of freedom left; and if we also fix the vertical movement of this point, then the last degree of freedom disappears, and the line cannot move from its position any more.

Finora quando abbiamo disegnato linee e curve, lo sketcher ha aggiunto per noi i vincoli automatici, quelli che mantengono le linee legate all'origine e gli archi O legati alle linee di costruzione. Ma non abbiamo aggiunto altri vincoli espliciti in modo che le forme geometriche possano ancora essere spostate in molte direzioni. '''I vincoli sono "regole" che ci dicono in quali condizioni un oggetto geometrico può muoversi e di quanto.''' Sono usati per eliminare i gradi di libertà in modo che lo schizzo abbia una forma stabile. Se eliminiamo tutti i gradi di libertà, lo schizzo è {{Emphasis|completamente vincolato}} e ha una forma fissa, ovvero i suoi punti non possono spostarsi affatto. In generale, è una buona idea vincolare completamente gli schizzi perché ciò si riflette in modelli stabili.

There are two principal types of constraints:
* {{Emphasis|Geometric constraints}} define characteristics of the shapes without specifying exact dimensions, for example, horizontality, verticality, parallelism, perpendicularity, and tangency.
* {{Emphasis|Datum constraints}} define characteristics of the shapes by specifying dimensions, for example, a numeric length or an angle.

<span id="Geometric_constraints"></span>
== I vincoli geometrici ==

=== Equal length and radius ===

<div class="mw-translate-fuzzy">
# Selezionare tutte e cinque le linee di costruzione.
# Selezionare [[Image:Constraint_EqualLength.png|32px]] [[Sketcher ConstrainEqual/it|Uguale lunghezza]]
# Selezionare [[Image:Constraint_EqualLength.png|32px]] [[Sketcher ConstrainEqual/it|Uguale lunghezza]]
</div>
# Ripetere l'operazione per i cinque archi che non sono centrati su un punto finale.


:7.3. Select all five O-arcs, those centered on an endpoint of a construction line.
:7.4. Press {{Button|[[File:Constraint_EqualLength.svg|16px]] [[Sketcher_ConstrainEqual|Equal length]]}}.
:7.5. Repeat with all I-arcs, those between the O-arcs.
:{{Emphasis|Note:}} again the constraints are chained. Therefore all O-arcs will have the same radius, and all I-arcs will have the same radius. At this moment, the specific value of these lengths is not fixed. You may use the pointer to drag a point and see how the sketch is updated while respecting the constraints in place.


<div class="mw-translate-fuzzy">
# Selezionare la linea di costruzione che è più vicina all'asse verticale.
# Selezionare la linea di costruzione che è più vicina all'asse verticale.
# Selezionare [[Image:Constraint_Vertical.png|32px]] [[Sketcher ConstrainVertical/it|Verticale]]
# Selezionare [[Image:Constraint_Vertical.png|32px]] [[Sketcher ConstrainVertical/it|Verticale]]
</div>


{{Emphasis|Note:}} as you add constraints, overlay symbols indicating the type of constraint appear over the geometry in the [[3D_view|3D view]]. If these symbols obfuscate your view, you can hide them by unchecking the constraint in the [[task_panel|task panel]]. Also note that the number of degrees of freedom decreases after adding each constraint.


{{Emphasis|Note 2:}} if you wish to temporarily disable the constraint, you may select it and press {{Button|[[File:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|Toggle active constraint]]}}. When you want to apply it again, press again the same button.

[[File:05a_Sk01_Sketcher_equality_constraints_lines.png|x400px]] [[File:05b_Sk01_Sketcher_equality_constraints_O-arcs.png|x400px]]

[[File:05c_Sk01_Sketcher_equality_constraints_I-arcs.png|x400px]]

{{Caption|Sketch with equality constraints applied to the construction lines, and to the two sets of arcs.}}

=== Tangency ===

<div class="mw-translate-fuzzy">
# Selezionare il punto finale in un arco e il più vicino punto finale di un altro arco.
# Selezionare il punto finale in un arco e il più vicino punto finale di un altro arco.
# Selezionare [[Image:Constraint_Tangent.png|32px]] [[Sketcher ConstrainTangent/it|Tangente]]
# Selezionare [[Image:Constraint_Tangent.png|32px]] [[Sketcher ConstrainTangent/it|Tangente]]
# Ripetere l'operazione per ogni punto finale, fino a quando il profilo viene chiuso.
# Ripetere l'operazione per ogni punto finale, fino a quando il profilo viene chiuso.
</div>


{{Emphasis|Note:}} applying the tangential constraint very often will move the geometry around in order to produce a smooth connection. You may have to use the pointer to reposition the points a bit before applying the next tangential constraint. Try placing the endpoints in such a way that two arcs aren't too far apart, so they can be connected with a short line rather than a long line.

<div class="mw-translate-fuzzy">
A questo punto, il profilo è chiuso e può essere regolato con le dimensioni desiderate.
A questo punto, il profilo è chiuso e può essere regolato con le dimensioni desiderate.
</div>


[[File:06_Sk01_Sketcher_tangency_constraints.png|x400px]]


{{Caption|Sketch with tangential constraints applied to the arcs, which closes the shape.}}
===== I vincoli di dati =====
Questi vincoli sono utilizzati per specificare la distanza tra i punti in una determinata direzione e le dimensioni delle curve.


<span id="Datum_constraints"></span>
== I vincoli di dati ==

These constraints specify the numerical distances between two points, and angles between two lines.

=== Distances and angles ===

<div class="mw-translate-fuzzy">
# Selezionare la linea di costruzione vincolata verticalmente.
# Selezionare la linea di costruzione vincolata verticalmente.
# Selezionare [[Image:Constraint_VerticalDistance.png|32px]] [[Sketcher ConstrainDistanceY/it|Lunghezza verticale]]
# Selezionare [[Image:Constraint_VerticalDistance.png|32px]] [[Sketcher ConstrainDistanceY/it|Lunghezza verticale]]
# Impostare la lunghezza a 30 mm.
# Impostare la lunghezza a 30 mm.
</div>


<div class="mw-translate-fuzzy">

# Selezionare la linea di costruzione verticale e la linea più vicina ad essa
# Selezionare la linea di costruzione verticale e la linea più vicina ad essa
# Selezionare [[Image:Constraint_InternalAngle.png|32px]] [[Sketcher ConstrainInternalAngle/it|Angolo interno]]
# Selezionare [[Image:Constraint_InternalAngle.png|32px]] [[Sketcher ConstrainAngle/it|Angolo interno]]
# Impostare l'angolo a 72°
# Impostare l'angolo a 72°
# Ripetere la stessa procedura per ciascuna coppia di linee adiacenti.
# Ripetere la stessa procedura per ciascuna coppia di linee adiacenti.
</div>


[[File:07a_Sk01_Sketcher_length_constraint.png|x400px]] [[File:07b_Sk01_Sketcher_angle_constraint.png|x400px]]


{{Caption|Sketch with length constraint applied to one vertical construction line (left), and angle constraints to three pairs of construction lines (right).}}
# Selezionare uno degli archi centrati sul punto finale di una linea.
# Selezionare [[Image:Constraint_Radius.png|32px]] [[Sketcher ConstrainRadius/it|Raggio]]
# Impostare il raggio a 8 mm.
# Fare la stessa cosa per un arco non centrato su un punto finale. Impostare la distanza a 11 mm.
# Impostare il raggio del cerchio centrale a 10 mm.


=== Radius ===
Alla fine si dovrebbe ottenere uno schizzo completamente vincolato. Questo è confermato dal cambiamento di colore di tutte le curve.


11. Regolare la dimensione degli archi.
<div class="mw-translate-fuzzy">
:11.1. Selezionare uno degli archi O, centrato sul punto finale di una linea di costruzione.
Il flusso di lavoro di base per l'ambiente [[Sketcher Module/it|Sketcher]] è concluso.
:11.2. Premere il pulsante {{Button|[[File:Constraint_Radius.svg|16px]] [[Sketcher_ConstrainRadius/it|Raggio]]}}.
</div>
:11.3. Impostare il raggio su {{Value|8 mm}}. Poiché tutti gli archi O sono vincolati per avere lo stesso raggio, tutti questi archi regolano le loro dimensioni contemporaneamente.
:11.4. Selezionare uno degli archi I, tra due archi O.
:11.5. Premere il pulsante {{Button|[[File:Constraint_Radius.svg|16px]] [[Sketcher_ConstrainRadius/it|Raggio]]}}.
:11.6. Impostare il raggio su {{Value|11 mm}}. Poiché tutti gli archi O sono vincolati per avere lo stesso raggio, tutti questi archi regolano le loro dimensioni contemporaneamente.


[[File:08a_Sk01_Sketcher_radius_1_constraint.png|x400px]] [[File:08b_Sk01_Sketcher_radius_2_constraint.png|x400px]]
<div class="mw-translate-fuzzy">

=== Approfondimenti ===
{{Caption|Sketch with radius constraints applied to the outwards arcs (left), and inwards arcs (right).}}
* Per maggiori informazioni su questo ambiente, vedere la pagina dedicata a [[Sketcher Workbench/it|Sketcher]]

</div>
:11.7. Finally, select the circle in the center of the sketch, press {{Button|[[File:Constraint_Radius.svg|16px]] [[Sketcher_ConstrainRadius|Radius]]}}, and set the value to {{Value|8 mm}}.

Alla fine si dovrebbe ottenere uno schizzo completamente vincolato. Questo può essere confermato dal cambio di colore della geometria reale e dal messaggio che viene mostrato nella [[task_panel/it|scheda azioni]].

[[File:09_Sk01_Sketcher_fully_constrained.png|x400px]]

{{Caption|Sketch with all geometrical and datum constraints applied.}}

== Extrusion ==

12. Now that we have a fully constrained sketch, it can be used to create a solid body.
:12.1. Exit the sketch edit mode by pressing the {{Button|Close}} button, or pressing {{KEY|Esc}} twice. The sketch should appear in the [[tree_view|tree view]] and the [[3D_view|3D view]].
:12.2. Switch to the [[PartDesign_Workbench|PartDesign Workbench]].
:12.3. With the sketch selected in the [[tree_view|tree view]], press {{Button|[[File:PartDesign_Body.svg|16px]] [[PartDesign_Body|PartDesign Body]]}}, choose the default XY-plane, and press {{Button|OK}}. The sketch should appear now inside the Body.
:12.4. Select the sketch, and then press {{Button|[[File:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}, choose the default options, and press {{Button|OK}} to create a solid extrusion.

[[File:09b_Sk01_Sketcher_fully_constrained_clean.png|x400px]] [[File:10_Sk01_Sketcher_solid_extrusion.png|x400px]]

{{Caption|Left: fully constrained sketch with only the most important constraints showing. Right: solid extrusion produced with [[PartDesign_Pad|PartDesign Pad]].}}

== Additional information ==


For a more in depth description of the sketcher, visit the [[Sketcher_Workbench|Sketcher Workbench]] documentation and also read the [[Sketcher_reference|Sketcher reference]].


Constraining a sketch can be done in many different ways. In general, it is recommended to use geometrical constraints first, and minimize the number of datum constraints, as this simplifies the task of the internal constraint solver. To investigate this, repeat this example, now adding the constraints in different order.
* First constrain the construction lines before drawing the arcs.
* Or constrain the size of the arcs before making them tangent.
* Or set the angle of the construction lines before adding more elements.
* Try using other construction geometry.


{{Sketcher Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 13:05, 14 April 2023

Tutorial
Argomento
Sketcher
Livello di difficoltà
Base
Tempo di esecuzione
60 minuti
Autori
Drei e vocx
Versione di FreeCAD
0.19
Files di esempio
Basic Sketcher tutorial updated
Vedere anche
Nessuno

Introduzione

Questo tutorial ha lo scopo di introdurre il lettore al flusso di lavoro di base dell'ambiente Schizzo.

L'ambienteSketcher esiste come modulo autonomo, quindi può essere utilizzato per disegnare oggetti 2D generici (planari). Tuttavia, viene utilizzato principalmente in combinazione con PartDesign. Uno schizzo chiuso viene normalmente utilizzato per creare una faccia o un profilo da estrudere in un corpo solido con un'operazione come Pad di PartDesign .

Il lettore farà pratica su:

  • Creazione della geometria di costruzione
  • Creazione di geometria reale
  • Applicazione di vincoli geometrici
  • Applicazione di vincoli di riferimento
  • Ottenere un profilo chiuso

Per una descrizione più approfondita dello sketcher, leggere il Manuale di riferimento per Sketcher.

Risultato finale dello schizzo, con tutta la geometria completamente vincolata, inclusa la geometria di costruzione per il supporto.

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 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.

Creare uno schizzo

2. Click on New sketch.

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

Siamo ora nella modalità di modifica dello schizzo. Al suo interno, è possibile utilizzare la maggior parte degli strumenti di questo ambiente di lavoro.

Nota: la vista ad albero passa alla scheda azioni; in questa interfaccia espandere la sezione Modifica controlli e assicurarsi che l'opzione Vincoli automatici sia abilitata. Altre opzioni possono essere modificate inclusa la dimensione della griglia visibile e se si vuole agganciarla; in questo tutorial non ci agganceremo alla griglia e la nasconderemo anche. In altre sezioni della scheda azioni si può anche vedere quali elementi geometrici e vincoli sono stati definiti.

Upper part of the task panel of the sketcher.

La geometria di costruzione

  1. Selezionare Costruzione
  2. Selezionare Linea da 2 punti
  3. Nello schizzo avvicinare il cursore al punto di origine, il punto viene evidenziato e vicino al cursore appare questa icona.
  4. Selezionare il punto e tracciare una linea in diagonale con una lunghezza arbitraria.
  5. Ripetere questa procedura fino a creare cinque linee di costruzione. Accertarsi che siano disposte a raggera, come nella figura iniziale.
  6. Per uscire dalla modalità di costruzione, è sufficiente cliccare nuovamente su Costruzione

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 allowing us to select the objects we just created. In this pointer mode we can pick and drag the endpoints of each line to adjust its placement.

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

Take a look at the task panel again. The Solver messages section already indicates that the sketch is under-constrained, and it mentions the number of degrees of freedom.

Look at the Constraints and Elements sections to see the new listed constraints and lines. Once your sketches have many elements, it may be difficult to select them in the 3D view, so you can use these lists to select the object that you wish exactly.

Construction lines forming a star shape with its center in the origin.

La geometria reale

La geometria reale deve creare una forma chiusa se deve essere utilizzata come profilo che può essere estruso da strumenti come Pad di PartDesign.

Make sure you are not in construction mode by clicking on Toggle construction, if you have not previously exited this mode.

Outer arcs

4. Create a circle.

4.1. Click on Create circle.
4.2. Click on the origin of the sketch to position its center point.
4.3. Click anywhere in the 3D view to set the circumference radius as a distance from the origin. Make it approximately 8 mm. Again the dimension will be fixed later.

5. Create a series of arcs.

5.1. Click on Create arc.
5.2. Approach the endpoint of one of the construction lines, and click on it. This will set the center point of the circular arc to be coincident with this line's endpoint.
5.3. Click once in the 3D view at an arbitrary location to set simultaneously the radius of the arc, and the first endpoint of it. Define an approximate radius of 8 mm.
5.4. Move the pointer in an anti-clockwise direction to trace an arc that has its concavity pointing towards the origin of the sketch. Click to set the final endpoint of the arc, defining a circular arc that approximately sweeps 180° or half a circle.
5.5. Repeat these steps with each construction line, so that each of them has a circular arc at its tip. We will call these O-arcs for outwards-arcs.

Circular arcs added at the endpoints of the construction lines. Also a central circle.

Inner arcs

6. Creare un arco tra ogni coppia degli archi O precedenti.

6.1. Sempre con lo strumento Arco attivo, fare clic da qualche parte tra due archi O ma più lontano dall'origine dello schizzo, per impostare il punto centrale di un nuovo arco.
6.2. Fare clic in un punto vicino al punto finale di un arco O e spostare il puntatore per tracciare un altro arco finendo vicino a un altro punto finale di un arco O diverso, come se si stesse tentando di unire i punti finali. Questa volta la concavità deve puntare lontano dall'origine.
6.3. Ripetere questi passaggi, in modo che ogni coppia di archi O abbia un nuovo arco tra di loro. Chiameremo questi archi a I per archi verso l'interno.

To summarize, the O-arcs should have their curvature pointing outwards, and their concavity pointing towards the origin of the sketch; the I-arcs should have their curvature pointing inwards, and their concavity pointing away from the same origin.

Circular arcs added between the first set of arcs placed.

Constraints

Take a look at the task panel again. Due to the new geometrical elements that we have drawn, the Solver messages section indicates even more degrees of freedom. A degree of freedom (DOF) indicates a possible movement of one element. For example, a point can be moved both in horizontal and vertical directions, so it has two degrees of freedom. A line is defined by two points, therefore in total it has four degrees of freedom. If we fix one of those points, then the entire system has only two degrees of freedom available; if we additionally fix the horizontal movement of the remaining point, we only have one degree of freedom left; and if we also fix the vertical movement of this point, then the last degree of freedom disappears, and the line cannot move from its position any more.

Finora quando abbiamo disegnato linee e curve, lo sketcher ha aggiunto per noi i vincoli automatici, quelli che mantengono le linee legate all'origine e gli archi O legati alle linee di costruzione. Ma non abbiamo aggiunto altri vincoli espliciti in modo che le forme geometriche possano ancora essere spostate in molte direzioni. I vincoli sono "regole" che ci dicono in quali condizioni un oggetto geometrico può muoversi e di quanto. Sono usati per eliminare i gradi di libertà in modo che lo schizzo abbia una forma stabile. Se eliminiamo tutti i gradi di libertà, lo schizzo è completamente vincolato e ha una forma fissa, ovvero i suoi punti non possono spostarsi affatto. In generale, è una buona idea vincolare completamente gli schizzi perché ciò si riflette in modelli stabili.

There are two principal types of constraints:

  • Geometric constraints define characteristics of the shapes without specifying exact dimensions, for example, horizontality, verticality, parallelism, perpendicularity, and tangency.
  • Datum constraints define characteristics of the shapes by specifying dimensions, for example, a numeric length or an angle.

I vincoli geometrici

Equal length and radius

  1. Selezionare tutte e cinque le linee di costruzione.
  2. Selezionare Uguale lunghezza
7.3. Select all five O-arcs, those centered on an endpoint of a construction line.
7.4. Press Equal length.
7.5. Repeat with all I-arcs, those between the O-arcs.
Note: again the constraints are chained. Therefore all O-arcs will have the same radius, and all I-arcs will have the same radius. At this moment, the specific value of these lengths is not fixed. You may use the pointer to drag a point and see how the sketch is updated while respecting the constraints in place.
  1. Selezionare la linea di costruzione che è più vicina all'asse verticale.
  2. Selezionare Verticale

Note: as you add constraints, overlay symbols indicating the type of constraint appear over the geometry in the 3D view. If these symbols obfuscate your view, you can hide them by unchecking the constraint in the task panel. Also note that the number of degrees of freedom decreases after adding each constraint.

Note 2: if you wish to temporarily disable the constraint, you may select it and press Toggle active constraint. When you want to apply it again, press again the same button.

Sketch with equality constraints applied to the construction lines, and to the two sets of arcs.

Tangency

  1. Selezionare il punto finale in un arco e il più vicino punto finale di un altro arco.
  2. Selezionare Tangente
  3. Ripetere l'operazione per ogni punto finale, fino a quando il profilo viene chiuso.

Note: applying the tangential constraint very often will move the geometry around in order to produce a smooth connection. You may have to use the pointer to reposition the points a bit before applying the next tangential constraint. Try placing the endpoints in such a way that two arcs aren't too far apart, so they can be connected with a short line rather than a long line.

A questo punto, il profilo è chiuso e può essere regolato con le dimensioni desiderate.

Sketch with tangential constraints applied to the arcs, which closes the shape.

I vincoli di dati

These constraints specify the numerical distances between two points, and angles between two lines.

Distances and angles

  1. Selezionare la linea di costruzione vincolata verticalmente.
  2. Selezionare Lunghezza verticale
  3. Impostare la lunghezza a 30 mm.
  1. Selezionare la linea di costruzione verticale e la linea più vicina ad essa
  2. Selezionare Angolo interno
  3. Impostare l'angolo a 72°
  4. Ripetere la stessa procedura per ciascuna coppia di linee adiacenti.

Sketch with length constraint applied to one vertical construction line (left), and angle constraints to three pairs of construction lines (right).

Radius

11. Regolare la dimensione degli archi.

11.1. Selezionare uno degli archi O, centrato sul punto finale di una linea di costruzione.
11.2. Premere il pulsante Raggio.
11.3. Impostare il raggio su 8 mm. Poiché tutti gli archi O sono vincolati per avere lo stesso raggio, tutti questi archi regolano le loro dimensioni contemporaneamente.
11.4. Selezionare uno degli archi I, tra due archi O.
11.5. Premere il pulsante Raggio.
11.6. Impostare il raggio su 11 mm. Poiché tutti gli archi O sono vincolati per avere lo stesso raggio, tutti questi archi regolano le loro dimensioni contemporaneamente.

Sketch with radius constraints applied to the outwards arcs (left), and inwards arcs (right).

11.7. Finally, select the circle in the center of the sketch, press Radius, and set the value to 8 mm.

Alla fine si dovrebbe ottenere uno schizzo completamente vincolato. Questo può essere confermato dal cambio di colore della geometria reale e dal messaggio che viene mostrato nella scheda azioni.

Sketch with all geometrical and datum constraints applied.

Extrusion

12. Now that we have a fully constrained sketch, it can be used to create a solid body.

12.1. Exit the sketch edit mode by pressing the Close button, or pressing Esc twice. The sketch should appear in the tree view and the 3D view.
12.2. Switch to the PartDesign Workbench.
12.3. With the sketch selected in the tree view, press PartDesign Body, choose the default XY-plane, and press OK. The sketch should appear now inside the Body.
12.4. Select the sketch, and then press PartDesign Pad, choose the default options, and press OK to create a solid extrusion.

Left: fully constrained sketch with only the most important constraints showing. Right: solid extrusion produced with PartDesign Pad.

Additional information

For a more in depth description of the sketcher, visit the Sketcher Workbench documentation and also read the Sketcher reference.

Constraining a sketch can be done in many different ways. In general, it is recommended to use geometrical constraints first, and minimize the number of datum constraints, as this simplifies the task of the internal constraint solver. To investigate this, repeat this example, now adding the constraints in different order.

  • First constrain the construction lines before drawing the arcs.
  • Or constrain the size of the arcs before making them tangent.
  • Or set the angle of the construction lines before adding more elements.
  • Try using other construction geometry.