Draft Clone/tr: Difference between revisions

From FreeCAD Documentation
mNo edit summary
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
<div class="mw-translate-fuzzy">
{{GuiCommand/tr|Name=Draft Clone|Name/tr=Klonla|Workbenches=[[Draft Module/tr|Draft]], [[Arch Module/tr|Arch]]|MenuLocation=Draft → Clone|SeeAlso=[[Draft Scale/tr|Draft Scale]]}}
{{GuiCommand/tr|Name=Draft Clone|Name/tr=Klonla|Workbenches=[[Draft Module/tr|Draft]], [[Arch Module/tr|Arch]]|MenuLocation=Draft → Clone|SeeAlso=[[Draft Scale/tr|Draft Scale]]}}
</div>


==Description==
==Description==
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.
The Draft Clone tool produces linked copies of a selected shape. This means that if the original object changes its shape and properties, all clones change as well. Nevertheless, each clone retains its unique position, rotation, and scale, as well as its view properties like shape color, line width, and transparency.

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.

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]].


[[Image:Draft_Clone_example.jpg|400px]]
[[Image:Draft_Clone_example.jpg|400px]]
{{Caption|Clone next to the original object}}


==How to use==
==How to use==
# Select objects you wish to clone
# Select an object that you wish to clone.
# Press the {{KEY|[[Image:Draft Clone.png|16px]] [[Draft Clone]]}} button
# Press the {{Button|[[Image:Draft Clone.svg|16px]] [[Draft Clone]]}} button.

Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[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]].

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.

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


==Options==
==Options==
There are no options for this tool. Either it works with the selected objects or not.
* Clones of 2D objects (Draft or Sketch) will also be 2D objects, and therefore can be used as such for [[PartDesign Workbench|Part Design]].
* All [[Arch Workbench|Arch]] objects have the possibility to behave as a clone (using their CloneOf property). If you use the Draft Clone tool on a selected Arch object, you will produce such an Arch cloned object instead of a regular Draft clone.


==Properties==
==Properties==
* {{PropertyData|Scale}}: Specifies an optional scale factor for the clone
* {{PropertyData|Objects}}: specifies a list of base objects which are being cloned.
* {{PropertyData|Fuse}}: If this clone is using several objects, this specifies if the result is a fusion or a compound {{Version|0.17}}
* {{PropertyData|Scale}}: specifies the scaling factor for the clone, in each X, Y, and Z direction.
* {{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}}
* The result of the [[Draft Scale]] tool is also a clone
* No sketches can be mapped to faces of a clone. That is at the moment a known limitation.


==Scripting==
==Scripting==
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]].
The Clone tool can by used in [[macros]] and from the python console by using the following function:


The Clone tool can be used in [[macros]] and from the [[Python]] console by using the following function:
{{Code|code=
{{Code|code=
clone (obj,[delta])
cloned_object = clone(obj, delta=None, forcedraft=False)
}}
}}

* Makes a clone of the given object(s).
* Creates a {{incode|cloned_object}} from {{incode|obj}}, which can be a single object or a list of objects.
* 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.
* If given, {{incode|delta}} is a {{incode|FreeCAD.Vector}} that moves the new clone away from the original position of the base object.
* If {{incode|forcedraft}} is {{incode|True}}, the resulting object will be a Draft clone, and not an Arch clone, even if {{incode|obj}} is an [[Arch Workbench]] 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 Draft
import FreeCAD, Draft

Draft.clone(FreeCAD.ActiveDocument.ActiveObject)
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()
}}
}}


{{Draft Tools navi}}
{{Userdocnavi}}
{{clear}}
{{clear}}

Revision as of 13:11, 8 January 2019

Klonla

Menü konumu
Draft → Clone
Tezgahlar
Draft, Arch
Varsayılan kısayol
Hiçbiri
Versiyonda tanıtıldı
-
Ayrıca bkz
Draft Scale

Description

The Draft Clone tool produces linked copies of a selected shape. This means that if the original object changes its shape and properties, all clones change as well. Nevertheless, each clone retains its unique position, rotation, and scale, as well as its view properties like shape color, line width, and transparency.

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.

Clone next to the original object

How to use

  1. Select an object that you wish to clone.
  2. Press the Draft Clone button.

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 VeriCloneOf 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.

Properties

  • VeriObjects: specifies a list of base objects which are being cloned.
  • VeriScale: specifies the scaling factor for the clone, in each X, Y, and Z direction.
  • VeriFuse: if it is true and VeriObjects 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. introduced in version 0.17

Scripting

See also: Draft API and FreeCAD Scripting Basics.

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)
  • Creates a cloned_object from obj, which can be a single object or a list of objects.
  • If given, delta is a FreeCAD.Vector that moves the new clone away from the original position of the base object.
  • If forcedraft is True, the resulting object will be a Draft clone, and not an Arch clone, even if obj is an Arch Workbench object.

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

Example:

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