Basic Sketcher Tutorial/es

Introducción
Este tutorial fue escrito originalmente por Drei, y fue reescrito e ilustrado por vocx.

Este tutorial pretende introducir al lector en el flujo de trabajo básico del Ambiente de trabajo Croquizador.

El Ambiente de trabajo Croquizador existe como un módulo independiente, por lo que puede ser utilizado para dibujar objetos genéricos en 2D (planos). Sin embargo, se utiliza principalmente junto con el Ambiente de trabajo de DiseñoPiezas. Un croquis cerrado se utiliza normalmente para crear una cara o un perfil que se extruirá en un cuerpo sólido con una operación como.

El lector practicará:
 * La creación de geometría de construcción
 * Creación de geometría real
 * Aplicación de restricciones geométricas
 * Aplicación de restricciones de datos
 * Obtención de un perfil cerrado

Para una descripción más profunda del croquizador, lee la Referencia del croquizador.



Instalación
1. Abre FreeCAD, crea un nuevo documento vacío con.
 * 1.1. Cambie al Ambiente de trabajo Croquizador desde el selector ambiente de trabajo, o el menú.

Algunas acciones para recordar:
 * Pulsar el botón derecho del ratón, o pulsar en el teclado una vez, para deseleccionar la herramienta activa en el modo de edición.
 * Para salir del modo de edición de croquis, pulse el botón en el panel de tareas, o pulse  dos veces en el teclado.
 * Para entrar de nuevo en el modo de edición, haz doble clic en el croquis en la vista de árbol, o selecciónalo, y luego haz clic en el.

Crear un croquis
2. Haga clic en.
 * 2.1. Elige la orientación del croquis, es decir, uno de los planos base XY, XZ o YZ. Elija también si desea una orientación invertida, y un desplazamiento del plano base.
 * 2.2. Utilizaremos el plano y las opciones por defecto.
 * 2.3. Haga clic en para empezar a construir el croquis.

Ahora estamos dentro del modo de edición de croquis. Dentro de él, podemos hacer uso de la mayoría de las herramientas de este ambiente de trabajo.

la vista de árbol cambiará al panel de tareas; en esta interfaz expande la sección, y asegúrate de que la opción está activada. Otras opciones se pueden cambiar, incluyendo el tamaño de la rejilla visible, y si queremos ajustarnos a ella; en este tutorial no nos ajustaremos a la rejilla y también la ocultaremos. En otras secciones del panel de tareas también se puede ver qué elementos geométricos y restricciones se han definido.



Geometría de la construcción
3. La geometría de construcción se utiliza para guiar la creación de la geometría "real". La geometría real será la que se muestre fuera del modo de edición del croquis, mientras que la geometría de construcción sólo se mostrará dentro del modo de edición. Por lo tanto, puede utilizar tanta geometría de construcción como necesite para construir formas reales.
 * 3.1. Haz clic en . Ahora los elementos geométricos se dibujarán en.
 * 3.2. Haz clic en.
 * 3.3. Acércate al origen del croquis, el punto debe resaltar y cerca de tu cursor el Constraint_PointOnPoint.svg coincidente de restricción aparecerá.
 * 3.4. Haga clic en el punto y mueva el puntero para empezar a dibujar una nueva línea a partir de él. Mueva el puntero para que la línea tenga una longitud de alrededor de . No tiene que ser muy preciso en este paso; más tarde estableceremos la dimensión correcta.
 * 3.5. Repita este procedimiento cuatro veces más para colocar las líneas de construcción en forma de estrella. No te preocupes demasiado por su tamaño o posición, simplemente extiéndelas en los cuatro cuadrantes.
 * 3.6. Ahora sal del modo de construcción haciendo clic de nuevo en.

hasta este punto la herramienta línea sigue activa. Esto significa que podemos seguir haciendo clic en la Vista 3D para dibujar todas las líneas que queramos. Si queremos salir de esta herramienta, podemos pulsar el botón derecho del ratón, o pulsar en el teclado una vez. Al hacer esto el puntero ya no creará líneas, sólo será un puntero que nos permitirá seleccionar los objetos que acabamos de crear. En este modo de puntero podemos elegir y arrastrar los puntos finales de cada línea para ajustar su colocación.

no pulse por segunda vez, ya que saldrá del modo de edición de croquis. Si lo hace, vuelva a entrar en el modo de edición haciendo doble clic en el croquis en la vista de árbol.

Echa un vistazo al panel de tareas de nuevo. La sección ya indica que el croquis está poco restringido, y menciona el número de.

Look at the and  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.



Geometría real
Real geometry must make a closed shape if it is to be used as a profile that can be extruded by tools such as.

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

Arcos exteriores
4. Create a circle.
 * 4.1. Click on.
 * 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 . Again the dimension will be fixed later.

5. Create a series of arcs.
 * 5.1. Click on.
 * 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 Constraint_PointOnPoint.svg 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.
 * 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 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.



Arcos interiores
6. Create an arc between each pair of the previous O-arcs.
 * 6.1. Still with the tool active, click somewhere between two O-arcs but further away from the origin of the sketch, to set the center point of a new arc.
 * 6.2. Click somewhere close to the endpoint of one O-arc, and move the pointer to sweep another arc finishing close to another endpoint of a different O-arc, as if you were trying to join the endpoints. This time the concavity must point away from the origin.
 * 6.3. Repeat these steps, so that each pair of O-arcs has a new arc between them. We will call these I-arcs for inwards-arcs.

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.



Restricciones
Take a look at the task panel again. Due to the new geometrical elements that we have drawn, the section indicates even more. A (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.

Up to now when we have drawn lines and curves, the sketcher has added automatic constraints for us, those that keep the lines tied to the origin, and the O-arcs tied to the construction lines. But we haven't added other explicit constraints so the geometrical shapes can still be moved in many directions. Constraints are "rules" that tell us under which conditions a geometrical object can move and by how much. They are used to eliminate the degrees of freedom so that the sketch has a stable shape. If we eliminate all degrees of freedom, then the sketch is, and has a fixed shape, that is, its points cannot move at all. In general, it is a good idea to fully constrain sketches because this will result in stable models.

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

Igualdad de longitud y radio
7. Geometrically constrain the lines and arcs.
 * 7.1 Select all five construction lines. You only need to click once to select an element.
 * 7.2. Press.
 * this creates only four constraints. The constraints are chained, the first line has the same length as the second one, which has the same length as the third one, which again has the same length as the fourth one, which has the same length as the fifth one. So in this case, the first and the fifth have the same length.


 * 7.3. Select all five O-arcs, those centered on an endpoint of a construction line.
 * 7.4. Press.
 * 7.5. Repeat with all I-arcs, those between the O-arcs.
 * 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.


 * 7.6. Select the construction line that is closest to the vertical axis.
 * 7.7. Press (optional). If you drew the construction line downwards over the Y axis, an automatic Constraint_PointOnObject.svg Point on object constraint was already placed, keeping the construction line vertical. In this case, no additional Constraint_Vertical.svg Vertical constraint is necessary.

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.

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





Tangencia
8. Apply tangency to the arcs.
 * 8.1. Select one endpoint of an O-arc and then the closest endpoint of the adjacent I-arc.
 * 8.2. Press . This makes the two adjacent arcs connect smoothly at their endpoints.
 * 8.3. Repeat for all endpoints of the O-arcs and I-arcs to obtain a closed profile.

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.

As of this step, we have now created a closed profile, as all arcs have been tied together. Now we can provide datum constraints to fix the shape of the sketch. While the dimensions of lines and arcs remain unfixed, we can drag the points of the sketch and observe how the entire sketch changes.



Restricciones de los datos
These constraints specify the numerical distances between two points, and angles between two lines.

Distancias y ángulos
9. Adjust the size of the construction lines.
 * 9.1. Select the vertically constrained construction line.
 * 9.2. Press.
 * 9.3. Set the length to . Because all construction lines are constrained to have the same length, all these lines adjust their sizes at the same time.

10. Adjust the angle between the construction lines.
 * 10.1. Select the vertical construction line and the construction line closest to it.
 * 10.2. Press.
 * 10.3. Set the angle to.
 * 10.4. Repeat the same procedure for each pair of construction lines, and use the same angle.
 * at this stage, the sketch may have very few degrees of freedom left, meaning that its shape cannot be changed too much. If you attempt to add more constraints, these may cause a conflict with the previously added constraints. If this is the case, do not add these constraints, and proceed with the next steps.



Radio
11. Adjust the size of the arcs.
 * 11.1. Select one of the O-arcs, centered on the endpoint of a construction line.
 * 11.2. Press.
 * 11.3. Set the radius to . Because all O-arcs are constrained to have the same radius, all these arcs adjust their sizes at the same time.
 * 11.4. Select one of the I-arcs, between two O-arcs.
 * 11.5. Press.
 * 11.6. Set the radius to . Because all I-arcs are constrained to have the same radius, all these arcs adjust their sizes at the same time.




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

We should end up with a fully constrained sketch. It can be confirmed by noticing the change in color of the real geometry, and by the message that is shown in the task panel.



Extrusión
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, or pressing  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, choose the default XY-plane, and press . The sketch should appear now inside the Body.
 * 12.4. Select the sketch, and then press, choose the default options, and press to create a solid extrusion.



Información adicional
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.