|Modification → Move|
|Introduced in version|
The Draft Move command moves or copies selected objects from one point to another. In subelement mode the command moves selected points and edges, or copies selected edges, of Draft Lines and Draft Wires.
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.
Moving an object from one point to another
- Optionally select one or more objects, or one or more subelements of Draft Lines or Draft Wires.
- There are several ways to invoke the command:
- If you have not yet selected an object: select an object in the 3D view.
- The Move task panel opens. See Options for more information.
- If subelements have been selected: check the Modify subelements checkbox to switch on subelement mode.
- Pick the first point, the base point, in the 3D view, or type coordinates and press the button.
- Pick the second point, the target point, in the 3D view, or type coordinates and press the button.
The single character keyboard shortcuts mentioned here can be changed. See Draft Preferences.
- To manually enter coordinates enter the X, Y and Z component, and press 3D view before entering coordinates. after each. Or you can press the button when you have the desired values. It is advisable to move the pointer out of the
- To use polar coordinates enter a value for the Length and a value for the Angle, and press after each.
- Check the Angle checkbox to constrain the pointer to the specified angle.
- Press to change the focus from the X input box to the Length input box and back. Depending on the input box that receives the focus the Angle checkbox is checked or unchecked.
- Press or click the Relative checkbox to toggle relative mode. If relative mode is on, the coordinates of the second point are relative to the first point, else they are relative to the coordinate system origin.
- Press working plane coordinate system. introduced in version 0.20 or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the
- Press Preferences. or click the Continue checkbox to toggle continue mode. If continue mode is on, the command will restart after finishing. This mode really only makes sense if copy mode is switched on. Depending on the Select base objects after copying preference, either the original objects are selected for the next command call or the copies that were created last. See
- Press or click the Copy checkbox to toggle copy mode. If copy mode is on, the command will create moved copies instead of moving the original objects.
- Press Draft Lines or Draft Wires. or click the Modify subelements checkbox to toggle subelement mode. If subelement mode is on, the command will use the selected subelements instead of the whole objects. The subelements must belong to
- If copy mode and subelement mode are both on, and edges of Draft Wires are selected, new wires will be created from those edges.
- Holding down after picking the base point will also toggle copy mode. While is held down multiple target points can be picked. Release to finish the command and see the created copies. This option does not work in FreeCAD version 0.19.
- Press Draft snapping on or off. to switch
- Press or the button to abort the command.
- An Object that is attached cannot be moved with the Draft Move command. To move it either its DadosSupport object has to be moved, or its DadosAttachment Offset has to be changed.
- To change the number of decimals used for the input of coordinates, lengths and angles: Edit → Preferences... → General → Units → Units settings → Number of decimals.
- To change the initial focus of the task panel to the Length input box: Edit → Preferences... → Draft → General settings → Draft tools options → Set focus on Length instead of X coordinate. Note that you must move the pointer in the 3D view for the change to take effect.
- To store and reuse the same copy mode setting across commands: Edit → Preferences... → Draft → General settings → Draft tools options → Global copy mode.
- To reselect the base objects after copying objects: Edit → Preferences... → Draft → General settings → Draft tools options → Select base objects after copying.
To move objects use the
move method of the Draft module.
moved_list = move(objectslist, vector, copy=False)
objectslistcontains the objects to be moved. It is either a single object or a list of objects.
vectoris the displacement.
Truecopies are created instead of moving the original objects.
moved_listis returned with the original moved objects, or with the new copies. It is either a single object or a list of objects, depending on
import FreeCAD as App import Draft doc = App.newDocument() polygon1 = Draft.make_polygon(5, radius=1000) polygon2 = Draft.make_polygon(3, radius=500) polygon3 = Draft.make_polygon(6, radius=220) Draft.move(polygon1, App.Vector(500, 500, 0)) Draft.move(polygon1, App.Vector(500, 500, 0)) Draft.move(polygon2, App.Vector(1000, -1000, 0)) Draft.move(polygon3, App.Vector(-500, -500, 0)) list1 = [polygon1, polygon2, polygon3] vector = App.Vector(-2000, -2000, 0) list2 = Draft.move(list1, vector, copy=True) list3 = Draft.move(list1, -2*vector, copy=True) doc.recompute()