Rysunek Roboczy: Klonuj

From FreeCAD Documentation
Revision as of 16:17, 26 November 2023 by Kaktus (talk | contribs) (Created page with "{{Caption|Klon obok obiektu źródłowego.}}")

Draft: Klonuj

Lokalizacja w menu
Modyfikacja → Klonuj
Środowisko pracy
Rysunek Roboczy, Architektura
Domyślny skrót
C L
Wprowadzono w wersji
-
Zobacz także
Skaluj

Opis

Polecenie Klonuj tworzy połączone kopie, klony, wybranych obiektów. Kształt klonu jest parametryczny, będzie aktualizowany, jeśli zmieni się jego obiekt źródłowy. Ale klon ma swoją własną pozycję, obrót i skalę oraz własne Edytor właściwości. Dla obiektów architektury polecenie tworzy specjalny typ klonu: klon Arch.

Polecenie może być używane na obiektach 2D utworzonych za pomocą środowisk pracy Rysunek Roboczy lub Szkicownik, ale także na wielu obiektach 3D, takich jak te utworzone za pomocą środowisk pracy Część, Projekt Części lub Architektura. Klony obiektów 2D mogą być używane w Zawartości środowiska Projekt Części.

Klon obok obiektu źródłowego.

Usage

  1. Optionally select one or more objects.
  2. There are several ways to invoke the command:
    • Press the Draft Clone button.
    • Select the Modification → Clone option from the menu.
    • Use the keyboard shortcut: C then L.
  3. If you have not yet selected an object: select an object in the 3D view.

Properties

See also: Property editor.

An object created with the Draft Clone command is derived from a Part Part2DObject, a Part Feature object or, if an Arch Clone is created, from the object type of the source object. It inherits all properties from that object. A clone derived from one of the first two objects also has the following additional properties:

Data

Draft

  • DANEFuse (Bool): specifies if overlapping shapes in the clone are fused or not.
  • DANEObjects (LinkListGlobal): specifies the objects that are cloned.
  • DANEScale (Vector): specifies the X, Y and Z scale factors.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a clone use the make_clone method (introduced in version 0.19) of the Draft module. This method replaces the deprecated clone method.

cloned_object = make_clone(obj, delta=None, forcedraft=False)
  • obj contains the objects to be cloned. It is either a single object or a list of objects.
  • delta is the displacement vector to be applied to the clone.
  • If forcedraft is False and obj contains a single Arch object an Arch Clone is created. Set forcedraft to True to create a Draft Clone instead.
  • cloned_object is returned with the clone object.

Przykład:

import FreeCAD as App
import Draft

doc = App.newDocument()

place = App.Placement(App.Vector(1000, 0, 0), App.Rotation())
polygon1 = Draft.make_polygon(3, 750)
polygon2 = Draft.make_polygon(5, 750, placement=place)

vector = App.Vector(2600, 500, 0)
cloned_object = Draft.clone([polygon1, polygon2], delta=vector)

cloned_object.Fuse = True

doc.recompute()