Draft Clone/pl: Difference between revisions
No edit summary |
(Updating to match new version of source page) |
||
Line 11: | Line 11: | ||
}} |
}} |
||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/pl |
{{GuiCommand/pl |
||
|Name=Draft Clone |
|Name=Draft Clone |
||
Line 18: | Line 19: | ||
|SeeAlso=[[Draft_Move/pl|Przesuń]], [[Draft_Scale/pl|Skala]] |
|SeeAlso=[[Draft_Move/pl|Przesuń]], [[Draft_Scale/pl|Skala]] |
||
}} |
}} |
||
</div> |
|||
==Description== |
==Description== |
||
The |
The [[Image:Draft_Clone.svg|24px]] '''Draft Clone''' command creates linked copies, clones, of selected objects. The shape of a clone is parametric, it will update if its source object changes. But a clone does have its own position, rotation, and scale, and its own [[Property_editor|View properties]]. For [[Arch_Module|Arch]] objects the command creates a special type of clone: an Arch clone. |
||
The |
The command can be used on 2D objects created with the [[Draft_Module|Draft Workbench]] or [[Sketcher_Workbench|Sketcher Workbench]], but also on many 3D objects such as those created with the [[Part_Module|Part Workbench]], [[PartDesign_Workbench|PartDesign Workbench]] or [[Arch_Module|Arch Workbench]]. Clones of 2D objects can be used in [[PartDesign_Body|PartDesign Bodies]]. |
||
To create simple copies, that are completely independent from an original object, use [[Draft Move|Draft Move]], [[Draft Rotate|Draft Rotate]], and [[Draft Scale|Draft Scale]]. To position copies in an orthogonal array use [[Draft Array|Draft Array]]; to position copies along a path use [[Draft PathArray|Draft PathArray]]; to position copies at specified points use [[Draft PointArray|Draft PointArray]]. |
|||
[[Image:Draft_Clone_example.jpg|400px]] |
[[Image:Draft_Clone_example.jpg|400px]] |
||
{{Caption|Clone next to |
{{Caption|Draft Clone next to its source object}} |
||
==Usage== |
==Usage== |
||
# Optionally select one or more objects. |
|||
# Select an object that you wish to clone. |
|||
# There are several ways to invoke the command: |
|||
# Press the {{Button|[[Image: |
#* Press the {{Button|[[Image:Draft_Clone.svg|16px]] [[Draft_Clone|Draft Clone]]}} button. |
||
#* Select the {{MenuCommand|Modification → [[Image:Draft_Clone.svg|16px]] Clone}} option from the menu. |
|||
#* Use the keyboard shortcut: {{KEY|C}} then {{KEY|L}}. |
|||
# If you have not yet selected an object: select an object in the [[3D_view|3D view]]. |
|||
⚫ | |||
Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[Draft Scale|Draft Scale]]}} tool also creates a clone at a specified scale. |
|||
See also: [[property_editor|Property editor]]. |
|||
Clones of 2D objects created with the [[Draft Workbench|Draft]] or [[Sketcher Workbench|Sketcher Workbench]]es will also be 2D objects, and therefore can be used as such for the [[PartDesign Workbench|PartDesign Workbench]]. |
|||
An object created with the Draft Clone command is derived from a [[Part_Part2DObject|Part Part2DObject]], a [[Part_Feature|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: |
|||
All [[Arch Workbench|Arch Workbench]] objects have the possibility to behave as clones by using their {{PropertyData|CloneOf}} property. If you use the Draft Clone tool on a selected Arch object, you will produce such an Arch clone instead of a regular Draft clone. |
|||
=== |
===Data=== |
||
{{TitleProperty|Draft}} |
|||
Currently, [[Sketcher Workbench|Sketcher Sketches]] cannot be mapped to the faces of a clone. |
|||
⚫ | |||
==Options== |
|||
* {{PropertyData|Objects|LinkListGlobal}}: specifies the objects that are cloned. |
|||
⚫ | |||
There are no options for this tool. Either it works with the selected objects or not. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
* {{PropertyData|Fuse}}: if it is {{TRUE}} and {{PropertyData|Objects}} includes many shapes that intersect each other, the resulting clone will be fuse them together into a single shape, or make a compound of them. {{Version|0.17}} |
|||
==Scripting== |
==Scripting== |
||
See also: [https:// |
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
||
To create a clone use the {{incode|make_clone}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|clone}} method. |
|||
The Clone tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
|||
{{Code|code= |
{{Code|code= |
||
cloned_object = |
cloned_object = make_clone(obj, delta=None, forcedraft=False) |
||
}} |
}} |
||
* |
* {{incode|obj}} contains the objects to be cloned. It is either a single object or a list of objects. |
||
* |
* {{incode|delta}} is the displacement vector to be applied to the clone. |
||
* If {{incode|forcedraft}} is {{incode| |
* If {{incode|forcedraft}} is {{incode|False}} and {{incode|obj}} contains a single [[Arch Workbench|Arch object]] an Arch Clone is created. Set {{incode|forcedraft}} to {{incode|True}} to create a Draft Clone instead. |
||
* {{incode|cloned_object}} is returned with the clone object. |
|||
The fusion of the objects that are part of the clone can be achieved by setting its {{incode|Fuse}} attribute to {{incode|True}}. |
|||
Example: |
Example: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
doc = App.newDocument() |
|||
⚫ | |||
⚫ | |||
Polygon2 = Draft.makePolygon(5, 750, placement=place) |
|||
⚫ | |||
obj = [Polygon1, Polygon2] |
|||
⚫ | |||
⚫ | |||
polygon2 = Draft.make_polygon(5, 750, placement=place) |
|||
⚫ | |||
cloned_object = Draft.clone([polygon1, polygon2], delta=vector) |
|||
cloned_object.Fuse = True |
cloned_object.Fuse = True |
||
FreeCAD.ActiveDocument.recompute() |
|||
doc.recompute() |
|||
}} |
}} |
||
Revision as of 08:16, 16 June 2021
Draft: Klon |
Lokalizacja w menu |
---|
Modyfikacja → Klon |
Środowisko pracy |
Rysunek roboczy, Architektura |
Domyślny skrót |
brak |
Wprowadzono w wersji |
- |
Zobacz także |
Przesuń, Skala |
Description
The Draft Clone command creates linked copies, clones, of selected objects. The shape of a clone is parametric, it will update if its source object changes. But a clone does have its own position, rotation, and scale, and its own View properties. For Arch objects the command creates a special type of clone: an Arch clone.
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. Clones of 2D objects can be used in PartDesign Bodies.
Draft Clone next to its source object
Usage
- Optionally select one or more objects.
- 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.
- 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
isFalse
andobj
contains a single Arch object an Arch Clone is created. Setforcedraft
toTrue
to create a Draft Clone instead. cloned_object
is returned with the clone object.
Example:
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()
- Kreślenie: Linia, Polilinia, Zaokrąglenie, Łuk, Łuk przez 3 punkty, Okrąg, Elipsa, Wielokąt foremny, Krzywa złożona, Krzywa Bezier'a, Punkt, Łącznik ścian, Kształt z tekstu, Kreskowanie, Prostokąt
- Adnotacje: Adnotacja wieloliniowa, Wymiarowanie, Etykieta, Edytor stylów adnotacji, Widżet skali anotacji
- Modyfikacja: Przesuń, Obróć, Skala, Odbicie lustrzane, Odsunięcie, Przytnij, Rozciągnij, Klonuj, Szyk, Szyk biegunowy, Szyk kołowy, Szyk po ścieżce, Szyk powiązań po ścieżce, Szyk z punktów, Szyk powiązań w punktach, Edycja, Podświetl element podrzędny, Połącz, Rozdziel, Ulepsz kształt, Rozbij obiekt na elementy, Polilinia na krzywą złożoną, Rysunek Roboczy do szkicu, Nachylenie, Obróć wymiar, Widok 2D kształtu
- Tacka narzędziowa: Wybór płaszczyzny, Ustaw styl, Przełącz tryb konstrukcyjny, Grupowanie automatyczne
- Przyciąganie: Przełącz przyciąganie, Przyciągnij do punktu końcowego, Przyciągnij do punktu środkowego, Przyciągnij do środka, Przyciągnij do kąta, Przyciąganie do punktu przecięcia, Przyciągnij prostopadle, Rozszerz, Przyciągnij równolegle, Przyciągnij specjalnie, Przyciąganie do najbliższego, Przyciągnij ortogonalnie, Przyciągnij do siatki, Przyciągnij do płaszczyzny roboczej, Przyciągnij do wymiaru, Pokaż / ukryj siatkę
- Różności: Zastosuj bieżący styl, Warstwa, Zarządzaj warstwami, Dodaj grupę o nazwie, Dodaj do grupy, Wybierz grupę, Dodaj do grupy konstrukcyjnej, Przełącz tryb wyświetlania, Pośrednia płaszczyzna robocza, Ulecz, Przełącz tryb kontynuacji, Pokaż przybornik przyciągania
- Dodatkowe:: Wiązania, Wypełnienie wzorem, Preferencje, Ustawienia Importu i Eksportu, DXF/DWG, SVG, OCA, DAT
- Menu podręczne:
- Kontener warstwy: Połącz duplikaty warstw, Dodaj warstwę
- Warstwa: Aktywuj warstwę, Zaznacz zawartość warstwy
- Pośrednia płaszczyzna robocza: Zapisz ujęcie widoku, Zapisz stan obiektów
- Jak zacząć
- Instalacja: Pobieranie programu, Windows, Linux, Mac, Dodatkowych komponentów, Docker, AppImage, Ubuntu Snap
- Podstawy: Informacje na temat FreeCAD, Interfejs użytkownika, Profil nawigacji myszką, Metody wyboru, Nazwa obiektu, Edytor ustawień, Środowiska pracy, Struktura dokumentu, Właściwości, Pomóż w rozwoju FreeCAD, Dotacje
- Pomoc: Poradniki, Wideo poradniki
- Środowiska pracy: Strona Startowa, Architektura, Assembly, CAM, Rysunek Roboczy, MES, Inspekcja, Siatka, OpenSCAD, Część, Projekt Części, Punkty, Inżynieria Wsteczna, Robot, Szkicownik, Arkusz Kalkulacyjny, Powierzchnia 3D, Rysunek Techniczny, Test Framework