Draft Rotate: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
Line 1: Line 1:
<translate>
<translate>
<!--T:1-->
{{GuiCommand|Name=Draft Rotate|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Rotate|Shortcut=R O}}
{{GuiCommand|Name=Draft Rotate|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Rotate|Shortcut=R O}}


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


<!--T:3-->
This tool rotates or copies the selected objects by a given angle around a point on the current [[Draft Workingplane|work plane]]. If no object is selected, you will be invited to select one.
This tool rotates or copies the selected objects by a given angle around a point on the current [[Draft Workingplane|work plane]]. If no object is selected, you will be invited to select one.


Line 10: Line 12:
<translate>
<translate>


==How to use==
==How to use== <!--T:4-->


<!--T:5-->
# Select objects you wish to rotate or copy
# 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
# Press the {{KEY|[[Image:Draft Rotate.png|16px]] [[Draft Rotate]]}} button, or press {{KEY|R}} then {{KEY|O}} keys
Line 18: Line 21:
# Click a third point on the 3D view, or give a rotation angle
# Click a third point on the 3D view, or give a rotation angle


==Options==
==Options== <!--T:6-->


<!--T:7-->
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis.
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.
Line 28: Line 32:
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.


==Scripting==
==Scripting== <!--T:8-->


<!--T:9-->
The Rotate tool can by used in [[macros]] and from the python console by using the following function:
The Rotate tool can by used in [[macros]] and from the python console by using the following function:


Line 37: Line 42:
</syntaxhighlight>
</syntaxhighlight>
<translate>
<translate>
<!--T:10-->
* 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.
* 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 axis is omitted, the rotation will be around the vertical Z axis.
Line 42: Line 48:
* Returns the objects (or their copies is copymode was True).
* Returns the objects (or their copies is copymode was True).


<!--T:11-->
Example:
Example:



Revision as of 15:40, 13 February 2014

Draft Rotate

Menu location
Draft -> Rotate
Workbenches
Draft, Arch
Default shortcut
R O
Introduced in version
-
See also
None

Description

This tool rotates or copies the selected objects by a given angle around a point on the current work plane. If no object is selected, you will be invited to select one.

How to use

  1. Select objects you wish to rotate or copy
  2. Press the Draft Rotate button, or press R then O keys
  3. Click a center point on the 3D view, or type a coordinate
  4. Click a second point on the 3D view, or give a reference angle
  5. Click a third point on the 3D view, or give a rotation angle

Options

  • Press X, Y or Z after a point to constrain the next point on the given axis.
  • To enter coordinates manually, simply enter the numbers, then press ENTER between each X, Y and Z component.
  • Press T or click the checkbox to check/uncheck the 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.
  • Pressing ALT or C or clicking the Copy button will make a copy of the objects, instead of rotating them. If you keep ALT pressed after clicking the third point, you will be able to place more copies, until you release the ALT key.
  • Press CTRL while drawing to force snapping your point to the nearest snap location, independently of the distance.
  • Press SHIFT while drawing to constrain your next point horizontally or vertically in relation to the rotation center.
  • Press ESC or the Cancel button to abort the current command.

Scripting

The Rotate tool can by used in macros and from the python console by using the following function:

 rotate (FreeCAD.Object or list, angle, [center], [axis] ,[copymode])
  • 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).

Example:

 import FreeCAD,Draft
 Draft.rotate(FreeCAD.ActiveDocument.ActiveObject,45)