Draft Clone: Difference between revisions
m ((Vertical Docnav) [[ | ]]) |
(Button text.) |
||
(42 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:19--> |
<!--T:19--> |
||
{{Docnav |
{{Docnav |
||
|[[Draft_Stretch|Stretch]] |
|||
|[[Draft_PointArray|Point Array]] |
|||
|[[Draft_OrthoArray|OrthoArray]] |
|||
|[[Draft_Drawing|Drawing]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL= |
|IconL=Draft_Stretch.svg |
||
⚫ | |||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
⚫ | |||
}} |
}} |
||
Line 14: | Line 15: | ||
{{GuiCommand |
{{GuiCommand |
||
|Name=Draft Clone |
|Name=Draft Clone |
||
|MenuLocation= |
|MenuLocation=Modification → Clone |
||
|Workbenches=[[ |
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]] |
||
|Shortcut={{KEY|C}} {{KEY|L}} |
|||
|SeeAlso=[[Draft Move|Draft Move]], [[Draft Scale|Draft Scale]] |
|||
|SeeAlso=[[Draft_Scale|Draft Scale]] |
|||
}} |
}} |
||
==Description== <!--T: |
==Description== <!--T:22--> |
||
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 [[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_Workbench|Arch]] objects the command creates a special type of clone: an Arch clone. |
|||
<!--T:10--> |
<!--T:10--> |
||
The |
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]]. |
|||
</translate> |
</translate> |
||
Line 32: | Line 33: | ||
<translate> |
<translate> |
||
<!--T:3--> |
<!--T:3--> |
||
{{Caption|Clone next to |
{{Caption|Draft Clone next to its source object}} |
||
== |
==Usage== <!--T:23--> |
||
# Select an object that you wish to clone. |
|||
⚫ | |||
<!--T: |
<!--T:4--> |
||
# Optionally select one or more objects. |
|||
Depending on its options, the {{Button|[[Image:Draft Scale.svg|16px]] [[Draft Scale|Draft Scale]]}} tool also creates a clone at a specified scale. |
|||
# There are several ways to invoke the command: |
|||
⚫ | |||
#* 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]]. |
|||
<!--T: |
==Properties== <!--T:26--> |
||
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]]. |
|||
<!--T: |
<!--T:28--> |
||
See also: [[property_editor|Property editor]]. |
|||
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. |
|||
<!--T:24--> |
|||
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: |
|||
Currently, [[Sketcher Workbench|Sketcher Sketches]] cannot be mapped to the faces of a clone. |
|||
== |
===Data=== <!--T:29--> |
||
There are no options for this tool. Either it works with the selected objects or not. |
|||
<!--T:30--> |
|||
{{TitleProperty|Draft}} |
|||
⚫ | |||
⚫ | |||
* {{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}} |
|||
<!--T:5--> |
|||
* {{PropertyData|Fuse|Bool}}: specifies if overlapping shapes in the clone are fused or not. |
|||
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
⚫ | |||
⚫ | |||
==Scripting== <!--T:27--> |
|||
⚫ | |||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:16--> |
<!--T:16--> |
||
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: |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
cloned_object = |
cloned_object = make_clone(obj, delta=None, forcedraft=False) |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:7--> |
<!--T:7--> |
||
* |
* {{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}}. |
|||
<!--T:8--> |
<!--T:8--> |
||
Example: |
Example: |
||
</translate> |
</translate> |
||
{{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() |
|||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:18--> |
<!--T:18--> |
||
{{Docnav |
{{Docnav |
||
|[[Draft_Stretch|Stretch]] |
|||
|[[Draft_PointArray|Point Array]] |
|||
|[[Draft_OrthoArray|OrthoArray]] |
|||
|[[Draft_Drawing|Drawing]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL= |
|IconL=Draft_Stretch.svg |
||
⚫ | |||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
⚫ | |||
}} |
}} |
||
<!--T:20--> |
|||
⚫ | |||
<!--T:21--> |
|||
⚫ | |||
</translate> |
</translate> |
||
⚫ | |||
{{clear}} |
|||
⚫ |
Latest revision as of 17:08, 3 December 2023
Draft Clone |
Menu location |
---|
Modification → Clone |
Workbenches |
Draft, Arch |
Default shortcut |
C L |
Introduced in version |
- |
See also |
Draft Scale |
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 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
- DataFuse (
Bool
): specifies if overlapping shapes in the clone are fused or not. - DataObjects (
LinkListGlobal
): specifies the objects that are cloned. - DataScale (
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()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub