Draft Move/sv: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{Docnav |
|||
|[[Draft_AnnotationStyleEditor|AnnotationStyleEditor]] |
|||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL=Draft_AnnotationStyleEditor.svg |
|||
|IconR=Draft_Rotate.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
{{GuiCommand/sv|Name=Draft Move|Name/sv=Draft Move|Workbenches=[[ |
{{GuiCommand/sv|Name=Draft Move|Name/sv=Draft Move|Workbenches=[[Draft_Workbench/sv|Draft]], [[Arch_Workbench/sv|Arch]]|MenuLocation=Draft -> Move|Shortcut=M V}} |
||
</div> |
</div> |
||
<span id="Description"></span> |
|||
==Beskrivning== |
==Beskrivning== |
||
Line 8: | Line 20: | ||
Detta verktyg flyttar de markerade objekten från en punkt till en annan. Om inget objekt är valt, så kommer du ombes att välja ett. |
Detta verktyg flyttar de markerade objekten från en punkt till en annan. Om inget objekt är valt, så kommer du ombes att välja ett. |
||
</div> |
</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_Move_example.jpg|400px]] |
[[Image:Draft_Move_example.jpg|400px]] |
||
{{Caption|Moving an object from one point to another}} |
|||
<span id="Usage"></span> |
|||
==Bruk== |
==Bruk== |
||
See also: [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]]. |
|||
<div class="mw-translate-fuzzy"> |
|||
* Markera punkter i ett tomt område i 3d vyn, eller på ett existerande objekt. |
* Markera punkter i ett tomt område i 3d vyn, eller på ett existerande objekt. |
||
* Nedtryckning av {{KEY|CTRL}} kommer att [[Draft_Snap/sv|snäppa]] din punkt till tillgängliga snäpp-punkter. |
* Nedtryckning av {{KEY|CTRL}} kommer att [[Draft_Snap/sv|snäppa]] din punkt till tillgängliga snäpp-punkter. |
||
* Nedtryckning av {{KEY|SKIFT}} kommer att [[Draft_Constrain/sv|begränsa]] dig vertikalt eller horisontellt i relation till startpunkten. |
* Nedtryckning av {{KEY|SKIFT}} kommer att [[Draft_Constrain/sv|begränsa]] dig vertikalt eller horisontellt i relation till startpunkten. |
||
* Om du trycker på {{KEY|ESC}} så avbryts funktionen. |
* Om du trycker på {{KEY|ESC}} så avbryts funktionen. |
||
* Skriv in siffror för att |
* Skriv in siffror för att manuellt mata in en koordinat. |
||
* {{KEY|C}} växlar kopieringsläget på/av. Med kopiering på, så kommer objekt(en) att kopieras istället för att flyttas. |
* {{KEY|C}} växlar kopieringsläget på/av. Med kopiering på, så kommer objekt(en) att kopieras istället för att flyttas. |
||
* Nedtryckning av {{KEY|ALT}} kommer att skapa en kopia, även om kopieringsknappen är av. |
* Nedtryckning av {{KEY|ALT}} kommer att skapa en kopia, även om kopieringsknappen är av. |
||
* Om {{KEY|ALT}} är nedtryckt, så kan du göra multipla kopior ända tills {{KEY|ALT}} släpps. |
* Om {{KEY|ALT}} är nedtryckt, så kan du göra multipla kopior ända tills {{KEY|ALT}} släpps. |
||
</div> |
|||
==Options== |
|||
== Snapping, Constraining, and more == |
|||
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). |
|||
=== Preferences === |
|||
* To manually enter coordinates enter the X, Y and Z component, and press {{KEY|Enter}} after each. Or you can press the {{Button|[[Image:Draft_AddPoint.svg|16px]] Enter point}} button when you have the desired values. It is advisable to move the pointer out of the [[3D_view|3D view]] before entering coordinates. |
|||
Moving object around in 3D can be dreadful, and is most likely '''not''' what you want. FreeCAD comes with a lot more power to move object around, but first you must check your preferences to see how to activate those commands. |
|||
* To use polar coordinates enter a value for the {{MenuCommand|Length}} and a value for the {{MenuCommand|Angle}}, and press {{KEY|Enter}} after each. |
|||
* Check the {{MenuCommand|Angle}} checkbox to constrain the pointer to the specified angle. |
|||
* Press {{KEY|L}} to change the focus from the {{MenuCommand|X}} input box to the {{MenuCommand|Length}} input box and back. Depending on the input box that receives the focus the {{MenuCommand|Angle}} checkbox is checked or unchecked. |
|||
* Press {{KEY|R}} or click the {{MenuCommand|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 {{KEY|G}} or click the {{MenuCommand|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 [[Draft_SelectPlane|working plane]] coordinate system. {{Version|0.20}} |
|||
* Press {{KEY|N}} or click the {{MenuCommand|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 {{MenuCommand|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 [[#Preferences|Preferences]]. |
|||
* Press {{KEY|C}} or click the {{MenuCommand|Copy}} checkbox to toggle copy mode. If copy mode is on, the command will create moved copies instead of moving the original objects. |
|||
* Press {{KEY|B}} or click the {{MenuCommand|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 [[Draft_Line|Draft Lines]] or [[Draft_Wire|Draft Wires]]. |
|||
* If copy mode and subelement mode are both on, and edges of [[Draft_Wire|Draft Wires]] are selected, new wires will be created from those edges. |
|||
* Holding down {{KEY|Alt}} after picking the base point will also toggle copy mode. While {{KEY|Alt}} is held down multiple target points can be picked. Release {{KEY|Alt}} to finish the command and see the created copies. |
|||
* Press {{KEY|S}} to switch [[Draft_Snap|Draft snapping]] on or off. |
|||
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command. |
|||
==Notes== |
|||
Go to {{KEY|Edit}} -> {{KEY|Preferences}} -> {{KEY|DRAFT}}, then open the {{KEY|Grid and snapping}} tab. |
|||
* An Object that is [[Part_EditAttachment|attached]] cannot be moved with the Draft Move command. To move it either its {{PropertyData|Support}} object has to be moved, or its {{PropertyData|Attachment Offset}} has to be changed. |
|||
You will see there several options: |
|||
==Preferences== |
|||
[[File:Pref_Draft_Snapping.png]] |
|||
See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]]. |
|||
By default the option "Always snap (disable snap mod)" is activated, which means that the snapping tools will always be active (you don't need to press a key to activate them), note here what keys are assigned to activate the different modes, by default: |
|||
* To change the initial focus of the task panel to the {{MenuCommand|Length}} input box: {{MenuCommand|Edit → Preferences... → Draft → General → Set focus on Length instead of X coordinate}}. Note that you must move the pointer in the [[3D_view|3D view]] for the change to take effect. |
|||
* {{KEY|SHIFT}} activate the {{KEY|Constrain}} mode (move along an axis vector only) |
|||
* To reselect the base objects after copying objects: {{MenuCommand|Edit → Preferences... → Draft → General → Select base objects after copying}}. |
|||
* {{KEY|Ctl}} activate the {{KEY|SNAP}} mode (cursor will snap on specific points) |
|||
* {{KEY|Alt}} activate the {{KEY|ALT}} |
|||
==Scripting== |
|||
=== Moving along a specific axis === |
|||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
In order to move along a specific axis, you must first select a working plane containing this axis (see the [[Draft_SelectPlane|selecting working plane]] page for more information). |
|||
To move objects use the {{incode|move}} method of the Draft module. |
|||
After selecting the first point to move, start to move roughly in the axis direction and hold the {{KEY|SHIFT}} key. FreeCAD will automatically find which axis you are trying to follow and stick to this axis. |
|||
{{Code|code= |
|||
(This tool is especially powerful if you want to align a point to another one, regarding to an axis only). |
|||
moved_list = move(objectslist, vector, copy=False) |
|||
}} |
|||
* {{incode|objectslist}} contains the objects to be moved. It is either a single object or a list of objects. |
|||
More on constrain move [[Draft_Constrain|here]] |
|||
* {{incode|vector}} is the displacement. |
|||
* If {{incode|copy}} is {{incode|True}} copies are created instead of moving the original objects. |
|||
* {{incode|moved_list}} is returned with the original moved objects, or with the new copies. It is either a single object or a list of objects, depending on {{incode|objectslist}}. |
|||
Example: |
|||
=== Snapping === |
|||
{{Code|code= |
|||
If you have a point that you want to directly match on a solid, you can use snapping see the [[Draft_Snap|snapping]] page on how to activate the snap. Select the first point (using snap or not), and then hover to the second point until you see it highlighted. |
|||
import FreeCAD as App |
|||
import Draft |
|||
doc = App.newDocument() |
|||
By default the snapping mode is activated, but you may have it deactivated in the preferences (see preceding section), in that case, you will have to hold the Snapping key {{KEY|Ctrl}} by default. |
|||
polygon1 = Draft.make_polygon(5, radius=1000) |
|||
=== Alt Mode === |
|||
polygon2 = Draft.make_polygon(3, radius=500) |
|||
polygon3 = Draft.make_polygon(6, radius=220) |
|||
Draft.move(polygon1, App.Vector(500, 500, 0)) |
|||
Alt mode allows you to copy and object instead of moving it only. |
|||
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] |
|||
==Options== |
|||
vector = App.Vector(-2000, -2000, 0) |
|||
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis. |
|||
list2 = Draft.move(list1, vector, copy=True) |
|||
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component. |
|||
list3 = Draft.move(list1, -2*vector, copy=True) |
|||
* Press {{KEY|R}} or click the checkbox to check/uncheck the {{KEY|'''Relative'''}} button. If relative mode is on, the coordinates of the next point are relative to the last one. If not, they are absolute, taken from the (0,0,0) origin point. |
|||
* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the Move tool will restart after you finish or close it, allowing you to move or copy the objects another time without pressing the Move button again. |
|||
* Pressing {{KEY|ALT}} or {{KEY|C}} or clicking the {{KEY|'''Copy'''}} button will make a copy of the objects, instead of moving them. If you keep {{KEY|ALT}} pressed after clicking the second 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. |
|||
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the last one. |
|||
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current command. |
|||
doc.recompute() |
|||
==Scripting== |
|||
The Move tool can by used in [[macros]] and from the python console by using the following function: |
|||
{{Code|code= |
|||
move (FreeCAD.Object or list, Vector, [copymode]) |
|||
}} |
}} |
||
* Moves the given object or the objects contained in the given list in the direction and distance indicated by the given vector. |
|||
* If copymode is True, the actual objects are not moved, but copies are created instead. Returns the object(s) (or their copies if copymode was True) |
|||
* A list of the moved object (or the copies) is returned |
|||
{{Docnav |
|||
Example: |
|||
|[[Draft_AnnotationStyleEditor|AnnotationStyleEditor]] |
|||
|[[Draft_Rotate|Rotate]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL=Draft_AnnotationStyleEditor.svg |
|||
|IconR=Draft_Rotate.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
{{Draft Tools navi{{#translation:}}}} |
|||
{{Code|code= |
|||
{{Userdocnavi{{#translation:}}}} |
|||
import FreeCAD,Draft |
|||
Draft.move(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,2,0)) |
|||
}} |
|||
==Limitations== |
|||
* When moving (or changing Placement of) a document object (eg: Pad, Revolution, etc) which is based on a Sketch (from Sketcher/Part Design), you must move the original sketch. If you move the derived object, it will just go back to the position defined by the sketch. |
|||
<languages/> |
Latest revision as of 05:00, 9 January 2024
|
Menyplacering |
---|
Draft -> Move |
Arbetsbänkar |
Draft, Arch |
Standard genväg |
M V |
Introducerad i version |
- |
Se även |
Ingen |
Beskrivning
Detta verktyg flyttar de markerade objekten från en punkt till en annan. Om inget objekt är valt, så kommer du ombes att välja ett.
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
Bruk
See also: Draft Snap and Draft Constrain.
- Markera punkter i ett tomt område i 3d vyn, eller på ett existerande objekt.
- Nedtryckning av CTRL kommer att snäppa din punkt till tillgängliga snäpp-punkter.
- Nedtryckning av SKIFT kommer att begränsa dig vertikalt eller horisontellt i relation till startpunkten.
- Om du trycker på ESC så avbryts funktionen.
- Skriv in siffror för att manuellt mata in en koordinat.
- C växlar kopieringsläget på/av. Med kopiering på, så kommer objekt(en) att kopieras istället för att flyttas.
- Nedtryckning av ALT kommer att skapa en kopia, även om kopieringsknappen är av.
- Om ALT är nedtryckt, så kan du göra multipla kopior ända tills ALT släpps.
Options
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).
- To manually enter coordinates enter the X, Y and Z component, and press Enter after each. Or you can press the
Enter point button when you have the desired values. It is advisable to move the pointer out of the 3D view before entering coordinates.
- To use polar coordinates enter a value for the Length and a value for the Angle, and press Enter after each.
- Check the Angle checkbox to constrain the pointer to the specified angle.
- Press L 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 R 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 G 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 working plane coordinate system. introduced in version 0.20
- Press N 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 Preferences.
- Press C 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 B 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 Draft Lines or Draft Wires.
- 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 Alt after picking the base point will also toggle copy mode. While Alt is held down multiple target points can be picked. Release Alt to finish the command and see the created copies.
- Press S to switch Draft snapping on or off.
- Press Esc or the Close button to abort the command.
Notes
- An Object that is attached cannot be moved with the Draft Move command. To move it either its DataSupport object has to be moved, or its DataAttachment Offset has to be changed.
Preferences
See also: Preferences Editor and Draft Preferences.
- To change the initial focus of the task panel to the Length input box: Edit → Preferences... → Draft → General → 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 reselect the base objects after copying objects: Edit → Preferences... → Draft → General → Select base objects after copying.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To move objects use the move
method of the Draft module.
moved_list = move(objectslist, vector, copy=False)
objectslist
contains the objects to be moved. It is either a single object or a list of objects.vector
is the displacement.- If
copy
isTrue
copies are created instead of moving the original objects. moved_list
is returned with the original moved objects, or with the new copies. It is either a single object or a list of objects, depending onobjectslist
.
Example:
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()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
![](/images/thumb/9/94/User_hub.png/24px-User_hub.png)
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub