Draft Clone/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav
{{Docnav|[[Draft_PointArray|Point Array]]|[[Draft_Drawing|Drawing]]|[[Draft_Module|Draft]]|IconL=Draft_PointArray.svg|IconC=Workbench_Draft.svg|IconR=Draft_Drawing.svg}}
|[[Draft_PointArray|Point Array]]
|[[Draft_Drawing|Drawing]]
|[[Draft_Module|Draft]]
|IconL=Draft_PointArray.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Drawing.svg
}}


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


The Clone tool can be used on 2D shapes created with the [[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]]es.
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.


To create simple copies, that are completely independent from an original object, use [[Draft Move]], [[Draft Rotate]], and [[Draft Scale]]. To position copies in an orthogonal array use [[Draft Array]]; to position copies along a path use [[Draft PathArray]]; to position copies at specified points use [[Draft PointArray]].
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 33:
</div>
</div>


Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[Draft Scale]]}} tool also creates a clone at a specified scale.
Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[Draft Scale|Draft Scale]]}} tool also creates a clone at a specified scale.


Clones of 2D objects created with the [[Draft Workbench|Draft]] or [[Sketcher Workbench]]es will also be 2D objects, and therefore can be used as such for the [[PartDesign Workbench]].
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]].


All [[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.
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 ===
===Limitations ===
Line 49: Line 56:
</div>
</div>


The Clone tool can be used in [[macros]] and from the [[Python]] console by using the following function:
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 = clone(obj, delta=None, forcedraft=False)
Line 78: Line 85:
}}
}}


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


{{Draft Tools navi}}
{{Draft Tools navi}}

Revision as of 10:00, 28 October 2019

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

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

To create simple copies, that are completely independent from an original object, use Draft Move, Draft Rotate, and Draft Scale. To position copies in an orthogonal array use Draft Array; to position copies along a path use Draft PathArray; to position copies at specified points use Draft PointArray.

Použití

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

Depending on its options, the Draft Scale tool also creates a clone at a specified scale.

Clones of 2D objects created with the Draft or Sketcher Workbenches will also be 2D objects, and therefore can be used as such for the PartDesign Workbench.

All Arch Workbench objects have the possibility to behave as clones by using their ÚdajeCloneOf 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

Currently, Sketcher Sketches cannot be mapped to the faces of a clone.

Options

There are no options for this tool. Either it works with the selected objects or not.

Vlastnosti

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

Skriptování

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

The Clone tool can be used in macros and from the Python console by using the following function:

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

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

Příklad:

import FreeCAD, Draft

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

obj = [Polygon1, Polygon2]
vector = FreeCAD.Vector(2600, 500, 0)
cloned_object = Draft.clone(obj, delta=vector)

cloned_object.Fuse = True
FreeCAD.ActiveDocument.recompute()