Draft Rotate/es: Difference between revisions

From FreeCAD Documentation
(Created page with "Esta herramienta gira o copia y gira los objetos seleccionados un ángulo dado alrededor de un punto en el plano de trabajo actual. Si no se han sele...")
(Updating to match new version of source page)
 
(30 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand/es|Name=Draft Rotate|Workbenches=[[Draft Module/es|Croquis]], [[Arch Module/es|Arquitectura]]|MenuLocation=Croquis -> Girar|Shortcut=R O}}

{{Docnav
|[[Draft_Move|Move]]
|[[Draft_Scale|Scale]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Move.svg
|IconR=Draft_Scale.svg
|IconC=Workbench_Draft.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/es
|Name=Draft Rotate
|Name/es=Draft Rotate
|Workbenches=[[Draft_Workbench/es|Croquis]], [[Arch_Workbench/es|Arquitectura]]
|MenuLocation=Croquis → Girar
|Shortcut={{KEY|R}} {{KEY|O}}
}}
</div>


<span id="Description"></span>
==Descripción==
==Descripción==


<div class="mw-translate-fuzzy">
Esta herramienta gira o copia y gira los objetos seleccionados un ángulo dado alrededor de un punto en el [[Draft Workingplane/es|plano de trabajo]] actual. Si no se han seleccionado objetos, te invitará a seleccionar uno. Luego, se pregunta al usuario por el centro de rotación, el ángulo de inicio y el ángulo de giro.
Esta herramienta gira o copia y gira los objetos seleccionados un ángulo dado alrededor de un punto en el [[Draft SelectPlane/es|plano de trabajo]] actual. Si no se han seleccionado objetos, te invitará a seleccionar uno. Luego, se pregunta al usuario por el centro de rotación, el ángulo de inicio y el ángulo de giro.
</div>

The command can be used on 2D objects created with the [[Draft_Workbench|Draft Workbench]] or [[Sketcher_Workbench|Sketcher Workbench]], but also on many 3D objects such as those created with the [[Part_Workbench|Part Workbench]], [[PartDesign_Workbench|PartDesign Workbench]] or [[Arch_Workbench|Arch Workbench]].


[[Image:Draft_Rotate_example.jpg|400px]]
[[Image:Draft_Rotate_example.jpg|400px]]
{{Caption|Rotating an object around a center point}}


<span id="Usage"></span>
==How to use==
<div class="mw-translate-fuzzy">
==Utilización==
</div>


See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Select objects you wish to rotate or copy
# Press the {{KEY|[[Image:Draft Rotate.png|16px]] [[Draft Rotate]]}} button, or press {{KEY|R}} then {{KEY|O}} keys
# Click a center point on the 3D view, or type a [[Draft_Coordinates|coordinate]]
# Click a second point on the 3D view, or give a reference angle
# Click a third point on the 3D view, or give a rotation angle


<div class="mw-translate-fuzzy">
==Options==
# Selecciona los objetos que desees girar o copiar
# Presiona el botón {{KEY|[[Image:Draft Rotate.png|16px]] [[Draft Rotate/es|girar]]}}, o presiona las teclas {{KEY|R}} y {{KEY|O}}
# Designa un punto central en la vista 3D, o escribe unas coordenadas
# Designa un segundo punto en la vista 3D, o indica un ángulo de referencia
# Designa un tercer punto en la vista 3D, o indica un ángulo de rotación
</div>


<span id="Options"></span>
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis.
==Opciones==
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.

* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the Rotate tool will restart after you finish or close it, allowing you to rotate or copy the objects another time without pressing the Rotate button again.
The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts (for version 0.22).
* Pressing {{KEY|ALT}} or {{KEY|C}} or clicking the {{KEY|'''Copy'''}} button will make a copy of the objects, instead of rotating them. If you keep {{KEY|ALT}} pressed after clicking the third point, you will be able to place more copies, until you release the {{KEY|ALT}} key.

* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
<div class="mw-translate-fuzzy">
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the rotation center.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.
* Presiona {{KEY|X}}, {{KEY|Y}} o {{KEY|Z}} después de un punto para restringir el siguiente punto sobre el eje indicado.
* Para introducir coordenadas manualmente, simplemente introduce los números y presiona {{KEY|ENTER}} entre cada componente X, Y y Z.
* Presiona {{KEY|T}} o selecciona la casilla para activar/desactivar el botón {{KEY|'''Continuar'''}}. Si el modo continuar está activado, la herramienta Girar se reiniciará al terminar permitiendo que gires o copies otros objetos sin necesidad de volver a presionar el botón de Girar.
* Presionando {{KEY|ALT}} o {{KEY|C}} o seleccionando el botón {{KEY|'''Copiar'''}} se creará una copia de los objetos, en lugar de girarlos. Si mantienes presionada la tecla {{KEY|ALT}} después de indicar el tercer punto, podrás situar más copias, hasta que liberes la tecla {{KEY|ALT}}.
* Presiona {{KEY|CTRL}} mientras dibujas para forzar el [[Draft_Snap/es|ajuste]] de tu punto a la posición de ajuste más cercana, independientemente de la distancia.
* Presiona {{KEY|SHIFT}} mientras dibujas para [[Draft_Constrain/es|restringir]] tu siguiente punto horizontal o verticalmente en relación al centro de giro.
* Presiona {{KEY|ESC}} o el botón {{KEY|'''Cancelar'''}} para abortar el comando actual.
</div>

==Notes==

* An Object that is [[Part_EditAttachment|attached]] cannot be rotated with the Draft Rotate command. To rotate it either its {{PropertyData|Support}} object has to be rotated, or its {{PropertyData|Attachment Offset}} has to be changed.
* The base angle concept can be somewhat confusing. Especially since it works only when selecting points, not when specifying the angle using the input field. An explanation of how it works, with an example, can be found in [https://forum.freecad.org/viewtopic.php?p=736674#p736674 this forum thread].

==Preferences==

See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].

* To reselect the base objects after copying objects: {{MenuCommand|Edit → Preferences... → Draft → General → Select base objects after copying}}.


==Scripting==
==Scripting==


<div class="mw-translate-fuzzy">
The Rotate tool can by used in [[macros]] and from the python console by using the following function:
==Programación==
</div>


<div class="mw-translate-fuzzy">
<syntaxhighlight>
La herramienta Girar puede utilizarse en [[macros/es|macros]] y desde la consola de Python utilizando la siguiente función:
rotate (FreeCAD.Object or list, angle, [center], [axis] ,[copymode])
</div>
</syntaxhighlight>
* Rotates the given object or the objects contained in the given list with the given angle around the given center if provided, using axis as a rotation axis.
* If axis is omitted, the rotation will be around the vertical Z axis.
* If copymode is True, the actual objects are not moved, but copies are created instead.
* Returns the objects (or their copies is copymode was True).


{{Code|code=
Example:
rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)
}}


<div class="mw-translate-fuzzy">
<syntaxhighlight>
* Gira el objeto dado o los objetos contenidos
import FreeCAD,Draft
en la lista dada alrededor de un centro indicado si se proporciona, utilizando el eje como eje de rotación.
Draft.rotate(FreeCAD.ActiveDocument.ActiveObject,45)
* Si se omite el eje, la rotación se realizará alrededor del eje vertical Z.
</syntaxhighlight>
* Si copymode es True, los objetos en realidad no se mueven sino que se crean unas copias.
* Devuelve los objetos (o sus copias si copymode es True).
</div>


Ejemplo:
<languages/>

{{Code|code=
import FreeCAD as App
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(3, radius=300)
Draft.move(polygon1, App.Vector(1000, 0, 0))

# Rotation around the origin
angle1 = 45
rot2 = Draft.rotate(polygon1, angle1, copy=True)
rot3 = Draft.rotate(polygon1, 2*angle1, copy=True)
rot4 = Draft.rotate(polygon1, 4*angle1, copy=True)

polygon2 = Draft.make_polygon(3, radius=1000)
polygon3 = Draft.make_polygon(5, radius=500)
Draft.move(polygon2, App.Vector(2000, 0, 0))
Draft.move(polygon3, App.Vector(2000, 0, 0))

# Rotation around another point
angle2 = 60
cen = App.Vector(3100, 0, 0)
list2 = [polygon2, polygon3]
rot_list2 = Draft.rotate(list2, angle2, center=cen, copy=True)
rot_list3 = Draft.rotate(list2, 2*angle2, center=cen, copy=True)
rot_list4 = Draft.rotate(list2, 4*angle2, center=cen, copy=True)

doc.recompute()
}}


{{Docnav
|[[Draft_Move|Move]]
|[[Draft_Scale|Scale]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Move.svg
|IconR=Draft_Scale.svg
|IconC=Workbench_Draft.svg
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 17:29, 26 February 2024

Draft Rotate

Ubicación en el Menú
Croquis → Girar
Entornos de trabajo
Croquis, Arquitectura
Atajo de teclado por defecto
R O
Introducido en versión
-
Ver también
Ninguno

Descripción

Esta herramienta gira o copia y gira los objetos seleccionados un ángulo dado alrededor de un punto en el plano de trabajo actual. Si no se han seleccionado objetos, te invitará a seleccionar uno. Luego, se pregunta al usuario por el centro de rotación, el ángulo de inicio y el ángulo de giro.

The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or Arch Workbench.

Rotating an object around a center point

Utilización

See also: Draft Snap and Draft Constrain.

  1. Selecciona los objetos que desees girar o copiar
  2. Presiona el botón girar, o presiona las teclas R y O
  3. Designa un punto central en la vista 3D, o escribe unas coordenadas
  4. Designa un segundo punto en la vista 3D, o indica un ángulo de referencia
  5. Designa un tercer punto en la vista 3D, o indica un ángulo de rotación

Opciones

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 0.22).

  • Presiona X, Y o Z después de un punto para restringir el siguiente punto sobre el eje indicado.
  • Para introducir coordenadas manualmente, simplemente introduce los números y presiona ENTER entre cada componente X, Y y Z.
  • Presiona T o selecciona la casilla para activar/desactivar el botón Continuar. Si el modo continuar está activado, la herramienta Girar se reiniciará al terminar permitiendo que gires o copies otros objetos sin necesidad de volver a presionar el botón de Girar.
  • Presionando ALT o C o seleccionando el botón Copiar se creará una copia de los objetos, en lugar de girarlos. Si mantienes presionada la tecla ALT después de indicar el tercer punto, podrás situar más copias, hasta que liberes la tecla ALT.
  • Presiona CTRL mientras dibujas para forzar el ajuste de tu punto a la posición de ajuste más cercana, independientemente de la distancia.
  • Presiona SHIFT mientras dibujas para restringir tu siguiente punto horizontal o verticalmente en relación al centro de giro.
  • Presiona ESC o el botón Cancelar para abortar el comando actual.

Notes

  • An Object that is attached cannot be rotated with the Draft Rotate command. To rotate it either its DatosSupport object has to be rotated, or its DatosAttachment Offset has to be changed.
  • The base angle concept can be somewhat confusing. Especially since it works only when selecting points, not when specifying the angle using the input field. An explanation of how it works, with an example, can be found in this forum thread.

Preferences

See also: Preferences Editor and Draft Preferences.

  • To reselect the base objects after copying objects: Edit → Preferences... → Draft → General → Select base objects after copying.

Scripting

Programación

La herramienta Girar puede utilizarse en macros y desde la consola de Python utilizando la siguiente función:

rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)
  • Gira el objeto dado o los objetos contenidos
en la lista dada alrededor de un centro indicado si se proporciona, utilizando el eje como eje de rotación.
  • Si se omite el eje, la rotación se realizará alrededor del eje vertical Z.
  • Si copymode es True, los objetos en realidad no se mueven sino que se crean unas copias.
  • Devuelve los objetos (o sus copias si copymode es True).

Ejemplo:

import FreeCAD as App
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(3, radius=300)
Draft.move(polygon1, App.Vector(1000, 0, 0))

# Rotation around the origin
angle1 = 45
rot2 = Draft.rotate(polygon1, angle1, copy=True)
rot3 = Draft.rotate(polygon1, 2*angle1, copy=True)
rot4 = Draft.rotate(polygon1, 4*angle1, copy=True)

polygon2 = Draft.make_polygon(3, radius=1000)
polygon3 = Draft.make_polygon(5, radius=500)
Draft.move(polygon2, App.Vector(2000, 0, 0))
Draft.move(polygon3, App.Vector(2000, 0, 0))

# Rotation around another point
angle2 = 60
cen = App.Vector(3100, 0, 0)
list2 = [polygon2, polygon3]
rot_list2 = Draft.rotate(list2, angle2, center=cen, copy=True)
rot_list3 = Draft.rotate(list2, 2*angle2, center=cen, copy=True)
rot_list4 = Draft.rotate(list2, 4*angle2, center=cen, copy=True)

doc.recompute()