Draft Clone/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "Kreslení Klon")
 
No edit summary
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft Clone|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Clone|SeeAlso=[[Draft Scale]]}}


{{Docnav
==Description==
|[[Draft_Stretch|Stretch]]
This tool produces a clone (a copy that is parametrically bound to the original object) of a selected object. If the original object changes, the clone changes too, but keeps its position, rotation and scale.
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/cs|Name=Draft Clone|Name/cs=Kreslení Klon|Workbenches=[[Draft_Workbench/cs|Kreslení]], [[Arch_Workbench/cs|Architektura]]|MenuLocation=Draft → Clone|SeeAlso=[[Draft Scale/cs|Kreslení Měřítko]]}}
</div>

==Description==

<div class="mw-translate-fuzzy">
==Popis==
Tento nástroj vytváří klon (kopie, která je parametricky svázaná s originálním objektem). Jestliže se změní originální objekt, změní se i klon, ale podrží si svoji pozici, otočení a měřítko.
</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]]. Clones of 2D objects can be used in [[PartDesign_Body|PartDesign Bodies]].


[[Image:Draft_Clone_example.jpg|400px]]
[[Image:Draft_Clone_example.jpg|400px]]
<div class="mw-translate-fuzzy">
[[Image:Draft_Clone_example.jpg|400px]]
</div>


==How to use==
==Usage==

# Select objects you wish to clone
<div class="mw-translate-fuzzy">
# Press the {{KEY|[[Image:Draft Clone.png|16px]] [[Draft Clone]]}} button
==Použití==
# Vyberte objekty, které chcete klonovat
# Stiskněte tlačítko {{KEY|[[Image:Draft Clone.png|16px]] [[Draft Clone/cs|Klon]]}}
</div>


==Properties==
==Properties==

* {{PropertyData|Scale}}: Specifies an optional scale factor for the clone
See also: [[property_editor|Property editor]].
* The result of the [[Draft Scale]] tool is also a clone

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:

===Data===

{{TitleProperty|Draft}}

<div class="mw-translate-fuzzy">
==Vlastnosti==
* {{PropertyData|Měřítko}}: Specifikuje volitelné měřítko pro klon
* Výsledek použití nástroje [[Draft Scale/cs|Kreslení Měřítko]] je také klon
</div>


==Scripting==
==Scripting==
The Clone tool can by used in [[macros]] and from the python console by using the following function:


<div class="mw-translate-fuzzy">
<syntaxhighlight>
==Skriptování==
clone (obj,[delta])
Nástroj Klon může být využit v [[macros/cs|makrech]] a z konzoly Pythonu použitím následující funkce:
</syntaxhighlight>
</div>
* Makes a clone of the given object(s).
* The clone is an exact, linked copy of the given object.
* If the original object changes, the final object changes too. Optionally, you can give a delta Vector to move the clone away from the original position.


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.
Example:
<syntaxhighlight>
import Draft
Draft.clone(FreeCAD.ActiveDocument.ActiveObject)


{{Code|code=
</syntaxhighlight>
cloned_object = make_clone(obj, delta=None, forcedraft=False)
{{clear}}
}}
<languages/>

<div class="mw-translate-fuzzy">
* Vytvoří klon(y) zadaného objektu(ů).
* Klon je přesná, propojená kopie zadaného objektu.
* Jestliže se změní originální objekt, změní se i finální objekt. Volitelně můžete zadat delta Vektor čímž posunete klon z originální pozice.
</div>

Příklad:

{{Code|code=
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()
}}


{{Docnav
|[[Draft_Stretch|Stretch]]
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 20:58, 29 August 2021

Kreslení Klon

Umístění Menu
Draft → Clone
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
Kreslení Měřítko

Description

Popis

Tento nástroj vytváří klon (kopie, která je parametricky svázaná s originálním objektem). Jestliže se změní originální objekt, změní se i klon, ale podrží si svoji pozici, otočení a měřítko.

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.

Usage

Použití

  1. Vyberte objekty, které chcete klonovat
  2. Stiskněte tlačítko Klon

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

Vlastnosti

  • ÚdajeMěřítko: Specifikuje volitelné měřítko pro klon
  • Výsledek použití nástroje Kreslení Měřítko je také klon

Scripting

Skriptování

Nástroj Klon může být využit v makrech a z konzoly Pythonu použitím následující funkce:

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)
  • Vytvoří klon(y) zadaného objektu(ů).
  • Klon je přesná, propojená kopie zadaného objektu.
  • Jestliže se změní originální objekt, změní se i finální objekt. Volitelně můžete zadat delta Vektor čímž posunete klon z originální pozice.

Příklad:

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