Draft Rotate/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand/ro|Name=Draft Rotate|Name/ro=Draft Rotate|Workbenches=[[Draft Module/ro|Draft]], [[Arch Module/ro|Arch]]|MenuLocation=Draft -> Rotate|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/ro
|Name=Draft Rotate
|Name/ro=Draft Rotate
|MenuLocation=Draft → Rotate
|Workbenches=[[Draft_Workbench/ro|Draft]], [[Arch_Workbench/ro|Arch]]
|Shortcut={{KEY|R}} {{KEY|O}}
}}
</div>

<span id="Description"></span>
==Descriere==


<div class="mw-translate-fuzzy">
==Description==
Acest instrument rotește sau copiază obiectele selectate cu un unghi dat în jurul unui punct de pe [[Draft SelectPlane|work plane]] curent. Dacă nu este selectat niciun obiect, veți fi invitat să selectați unul ..
</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]].
This tool rotates or copies the selected objects by a given angle around a point on the current [[Draft SelectPlane|work plane]]. If no object is selected, you will be invited to select one.


[[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">
== Cum se folosește ==
</div>


See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].

<div class="mw-translate-fuzzy">
# 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
# Click a center point on the 3D view, or type a [[Draft_Coordinates|coordinate]]
# Click a center point on the 3D view, or type a coordinate
# Click a second point on the 3D view, or give a reference angle
# 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
# Click a third point on the 3D view, or give a rotation angle
</div>


==Options==
<span id="Options"></span>
== Opţiuni ==


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

<div class="mw-translate-fuzzy">
* 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 24: Line 60:
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the rotation center.
* 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.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command.
</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">
==Script==
</div>

<div class="mw-translate-fuzzy">
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:
</div>


{{Code|code=
{{Code|code=
rotate (FreeCAD.Object or list, angle, [center], [axis] ,[copymode])
rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)
}}
}}

<div class="mw-translate-fuzzy">
* 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.
* If copymode is True, the actual objects are not moved, but copies are created instead.
* 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).
* Returns the objects (or their copies is copymode was True).
</div>


Exempluː
Example:


{{Code|code=
{{Code|code=
import FreeCAD,Draft
import FreeCAD as App
import Draft
Draft.rotate(FreeCAD.ActiveDocument.ActiveObject,45)

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()
}}
}}

<languages/>

{{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:30, 26 February 2024

Draft Rotate

poziția meniului
Draft → Rotate
Ateliere
Draft, Arch
scurtătură
R O
Prezentat în versiune
-
A se vedea, de asemenea,
nici unul

Descriere

Acest instrument rotește sau copiază obiectele selectate cu un unghi dat în jurul unui punct de pe work plane curent. Dacă nu este selectat niciun obiect, veți fi invitat să selectați unul ..

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

Cum se folosește

See also: Draft Snap and Draft Constrain.

  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

Opţiuni

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

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

Notes

  • An Object that is attached cannot be rotated with the Draft Rotate command. To rotate it either its DateSupport object has to be rotated, or its DateAttachment 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

Script

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

rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)
  • 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).

Exempluː

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()