Rysunek Roboczy: Przesuń

From FreeCAD Documentation
Revision as of 14:20, 12 June 2021 by Kaktus (talk | contribs) (Created page with "{{Caption|Przemieszczanie obiektu z jednego punktu do innego}}")
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Draft: Move

Lokalizacja w menu
Modyfikacja → Przesuń
Środowisko pracy
Rysunek roboczy, Architektura
Domyślny skrót
M V
Wprowadzono w wersji
0.7
Zobacz także
Szyk, Szyk po ścieżce

Opis

Narzędzie Przesunięcie przesuwa lub kopiuje wybrane obiekty z jednego punktu do drugiego.

Narzędzie Przesuń może być używane na kształtach 2D utworzonych za pomocą środowisk pracy Rysunek Roboczy lub Szkicownik, ale może być również używane dla wielu typów obiektów 3D, takich jak te utworzone za pomocą środowisk pracy Część lub Architektura.

Do tworzenia wielu kopii w różnych układach użyj narzędzi Szyk, Szyk po ścieżce i Szyk punktów.

Przemieszczanie obiektu z jednego punktu do innego

Użycie

  1. Select the objects that you wish to move or copy.
  2. Press the Draft Move button, or press M then V keys. If no object is selected, you will be invited to select one.
  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.
  4. Click another point on the 3D view, or type a coordinate and press the add point button. This is the new position of the base point.


Ograniczenia

When moving 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.

Opcje

  • 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. You can press the add point button when you have the desired values to insert the point.
  • Press R or click the checkbox to toggle relative mode. 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 origin (0,0,0).
  • Press T or click the checkbox to toggle continue mode. If continue mode is on, the Move tool will restart after you finish the operation, allowing you to move or copy the objects again without pressing the tool button again.
  • Press P or click the checkbox to toggle copy mode. If copy mode is on, the Move tool will keep the original shape in its place but will make a copy at the second point.
You can use both T and P to place several copies in sequence. In this case, the duplicated element is the last placed copy.
  • Hold Alt after the first point to also toggle copy mode. Keeping Alt pressed after clicking on the second point will allow you to continue placing copies; release Alt to finish the operation and see all copies.
  • Hold Ctrl while moving to force snapping your point to the nearest snap location, independently of the distance.
  • Hold Shift while moving to constrain your next point horizontally or vertically in relation to the last one.
  • Press Esc or the Close button to abort the current command; copies already placed will remain.

Tworzenie skryptów

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 indicates the displacement.
  • If copy is True 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 on objectslist.

Przykład:

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