Draft Clone/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav
|[[Draft_Stretch|Stretch]]
|[[Draft_PointArray|Point Array]]
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_Drawing|Drawing]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_PointArray.svg
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Drawing.svg
}}
}}


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

==Description==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 18: Line 21:
</div>
</div>


The Clone tool can be used on 2D shapes created with the [[Draft Workbench|Draft Workbench]], but can also be used on many types of 3D objects such as those created with the [[Part Workbench|Part]], [[PartDesign Workbench|PartDesign]], or [[Arch Workbench|Arch Workbench]]es.
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]].

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]]
Line 26: Line 27:
[[Image:Draft_Clone_example.jpg|400px]]
[[Image:Draft_Clone_example.jpg|400px]]
</div>
</div>

==Usage==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 33: Line 36:
</div>
</div>


==Properties==
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.


===Limitations ===
===Data===
Currently, [[Sketcher Workbench|Sketcher Sketches]] cannot be mapped to the faces of a clone.


{{TitleProperty|Draft}}
==Options==
There are no options for this tool. Either it works with the selected objects or not.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 50: Line 51:
* Výsledek použití nástroje [[Draft Scale/cs|Kreslení Měřítko]] je také klon
* Výsledek použití nástroje [[Draft Scale/cs|Kreslení Měřítko]] je také klon
</div>
</div>

==Scripting==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 56: Line 59:
</div>
</div>


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 = clone(obj, delta=None, forcedraft=False)
cloned_object = make_clone(obj, delta=None, forcedraft=False)
}}
}}


Line 67: Line 70:
* 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.
* 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>
</div>

The fusion of the objects that are part of the clone can be achieved by setting its {{incode|Fuse}} attribute to {{incode|True}}.


Příklad:
Příklad:


{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft


doc = App.newDocument()
place = FreeCAD.Placement(FreeCAD.Vector(1000, 0, 0), FreeCAD.Rotation())
Polygon1 = Draft.makePolygon(3, 750)
Polygon2 = Draft.makePolygon(5, 750, placement=place)


place = App.Placement(App.Vector(1000, 0, 0), App.Rotation())
obj = [Polygon1, Polygon2]
polygon1 = Draft.make_polygon(3, 750)
vector = FreeCAD.Vector(2600, 500, 0)
cloned_object = Draft.clone(obj, delta=vector)
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
cloned_object.Fuse = True

FreeCAD.ActiveDocument.recompute()
doc.recompute()
}}
}}



{{Docnav
{{Docnav
|[[Draft_Stretch|Stretch]]
|[[Draft_PointArray|Point Array]]
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_Drawing|Drawing]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_PointArray.svg
|IconL=Draft_Stretch.svg
|IconR=Draft_OrthoArray.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Drawing.svg
}}
}}


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

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