Draft Rotate

From FreeCAD Documentation
Revision as of 19:57, 12 November 2018 by Vocx (talk | contribs) (This)

Draft Rotate

Menu location
Draft → Rotate
Workbenches
Draft, Arch
Default shortcut
R O
Introduced in version
0.7
See also
Draft Move, Draft Array

Description

The Rotate tool rotates or copies the selected objects by a given angle around a reference point. If no object is selected, you will be invited to select one.

The move without rotation, use Draft Move. To produce various copies in different arrangements use Draft Array, Draft PathArray and Draft PointArray.

How to use

  1. Select the objects that you wish to move or copy.
  2. Press the Draft Rotate button, or press R then O keys.
  3. Click a first point on the 3D view, or type a coordinate and press the add point button. This serves as the base point of the operation, through which the axis of rotation will pass.
  4. Click a second point on the 3D view, or type a base angle. This defines a baseline that will rotate around the first point.
  5. Click a third point on the 3D view, or type a rotation angle. This indicates the rotation of the baseline, and thus the objects.

This operation can be used on 2D shapes created with the Draft Workbench or Sketcher Workbench, but can also be used on many types of 3D objects such as those created with the Part Workbench or Arch Workbench.

Limitations

When rotating an object that is based on a Sketcher Sketch, for example, a feature created with the PartDesign Workbench (Pad, Revolution, etc.) you must move the original sketch. If you move the derived object, it will just go back to the position defined by the sketch.

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)