Draft Array: Difference between revisions

From FreeCAD Documentation
(To create App Links instead of simple copies, use LinkArray, Path LinkArray, and the proper option with PolarArray and CircularArray .)
(VeryImportantMessage: Added V0.21+)
 
(32 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:37-->
<!--T:37-->
{{Docnav
{{Docnav
|
|[[Draft_Draft2Sketch|Draft to Sketch]]
|
|[[Draft_LinkArray|Link Array]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Draft2Sketch.svg
|IconL=
|IconR=
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_LinkArray.svg
}}
}}

<!--T:46-->
{{VeryImportantMessage|THIS COMMAND IS OBSOLETE<br>
It is not be available in {{VersionPlus|0.21}}. Use [[Draft_OrthoArray|Draft OrthoArray]], [[Draft_PolarArray|Draft PolarArray]] or [[Draft_CircularArray|Draft CircularArray]] instead.}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Draft Array
|Name=Draft Array
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|MenuLocation=Draft → Array
|SeeAlso=[[Draft_OrthoArray|Draft OrthoArray]], [[Draft_PolarArray|Draft PolarArray]], [[Draft_CircularArray|Draft CircularArray]]
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]
|Version=circular array added in v0.19
|SeeAlso=[[Draft PathArray|PathArray]], [[Draft PointArray|Draft PointArray]], [[Draft Clone|Draft Clone]]
}}
}}


==Description== <!--T:2-->
==Description== <!--T:2-->


<!--T:44-->
The [[Draft_Array|Draft Array]] tool creates an orthogonal (3-axes), polar, or circular array from a selected object.
The [[Image:Draft_Array.svg|24px]] '''Draft Array''' command creates an orthogonal (3-axes) array from a selected object. The created array can be turned into a [[Draft_PolarArray|polar array]] or a [[Draft_CircularArray|circular array]] by changing its {{PropertyData|Array Type}} property.


<!--T:19-->
<!--T:19-->
This 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 Workbench]] or [[PartDesign_Workbench|PartDesign Workbench]].
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]].


<!--T:20-->
<!--T:47-->
This command is now obsolete. Use the [[Draft_OrthoArray|Draft OrthoArray]], [[Draft_PolarArray|Draft PolarArray]] or [[Draft_CircularArray|Draft CircularArray]] command instead.
To create polar and circular arrays directly, use the corresponding [[Draft_PolarArray|PolarArray]] and [[Draft_CircularArray|CircularArray]] tools; to position copies along a path use [[Draft_PathArray|PathArray]]; to position copies at specified points use [[Draft_PointArray|PointArray]]; to create copies or clones, and manually place them use [[Draft_Move|Move]], [[Draft_Rotate|Rotate]], and [[Draft_Clone|Clone]].


==Usage== <!--T:48-->
To create [[App_Link|App Links]] instead of simple copies, use [[Draft_LinkArray|LinkArray]], [[Draft_PathLinkArray|Path LinkArray]], and the proper option with [[Draft_PolarArray|PolarArray]] and [[Draft_CircularArray|CircularArray]] .


<!--T:4-->
</translate>
# To use this command in FreeCAD version 0.19 and later you need to add a button to a custom toolbar. See [[Interface_Customization|Interface Customization]].
[[File:Draft_Array_example.png|x300px]] [[File:Draft_PolarArray_example.png|x300px]]
# Optionally select one object.
<translate>
# Press the {{Button|[[Image:Draft_Array.svg|16px]] [[Draft_Array|Draft Array]]}} button.
<!--T:3-->
# If you have not yet selected an object: select one object.
{{Caption|Orthogonal array (left) and polar array (right) from a solid object.}}
# The array is created.
# Optionally change its [[Draft_OrthoArray#Properties|properties]].


<!--T:41-->
==Properties== <!--T:49-->
[[File:Draft_CircularArray_example.png|x300px]]


<!--T:42-->
<!--T:24-->
See [[Draft_OrthoArray#Properties|Draft OrthoArray]].
{{Caption|Circular array from a solid object}}


==How to use== <!--T:4-->
==Scripting== <!--T:50-->
# Select an object with which you wish to make an array.
# Press the {{Button|[[Image:Draft Array.svg|16px]] [[Draft Array|Draft Array]]}} button. If no object is selected, you will be invited to select one.
# The Array object is immediately created. You must change the properties of the array to change the number and direction of copies created.


<!--T:21-->
<!--T:18-->
See [[Draft_OrthoArray#Scripting|Draft OrthoArray]].
Each element in the array is an exact clone of the original object, but the entire array is considered a single unit in terms of properties and appearance.


== Options == <!--T:22-->

<!--T:23-->
There are no options for this tool. Either it works with the selected object or not.

== Properties == <!--T:24-->
* {{PropertyData|Base}}: specifies the object to duplicate in the array.
* {{PropertyData|Array Type}}: specifies the type of array to create, either "ortho" or "polar".
* {{PropertyData|Fuse}}: if it is {{TRUE}}, and the copies intersect with each other, they will be fused together into a single shape.

<!--T:25-->
For orthogonal arrays:
* {{PropertyData|Interval X}}: specifies the interval between each copy on the X axis.
* {{PropertyData|Interval Y}}: specifies the interval between each copy on the Y axis.
* {{PropertyData|Interval Z}}: specifies the interval between each copy on the Z axis.
* {{PropertyData|Number X}}: specifies the number of copies on the X axis.
* {{PropertyData|Number Y}}: specifies the number of copies on the Y axis.
* {{PropertyData|Number Z}}: specifies the number of copies on the Z axis.

<!--T:26-->
For polar arrays:
* {{PropertyData|Axis}}: specifies the normal direction of the array circle.
* {{PropertyData|Center}}: specifies the center point of the array circle.
* {{PropertyData|Angle}}: specifies the aperture of the circular arc to cover with copies; use 360 to cover an entire circle.
* {{PropertyData|Number Polar}}: specifies the number of copies to place in the circular arrangement.
* {{PropertyData|Interval Axis}}: specifies the interval between each copy on the {{PropertyData|Axis}} direction.

<!--T:43-->
For circular arrays:
* {{PropertyData|Number Circles}}:
* {{PropertyData|Radial distance}}:
* {{PropertyData|Symmetry}}:
* {{PropertyData|Tangential Distance}}:

<!--T:27-->
The number property, either X, Y, Z, or Polar, also includes the original object, so this number will be at least one.

<!--T:28-->
An interval is not a simple distance, but a vector (x, y, z). If more than one value is non-zero, the copy will be created in the main direction, but will also be displaced in the other non-zero directions.

<!--T:29-->
For example, if {{PropertyData|Interval X}} is (2 m, 1 m, 1 m), and {{PropertyData|Number X}} is 3, it will create 3 copies in the X direction; the first copy will be at the original position, the second will be displaced 2 m on X, 1 m on Y, and 1 m on Z; the third copy will be displaced 4 m on X, 2 m on Y, and 2 m on Z. Each array element will be moved slightly to one side (Y direction) and up (Z direction) beside the main X direction.

<!--T:30-->
The {{PropertyData|Interval Axis}} property works in the same way. If the original shape lies on the XY plane, creating a polar array with {{PropertyData|Interval Axis}} (0, 0, z) allows you to make spiral arrangements.

==Scripting== <!--T:18-->
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].

<!--T:31-->
The Array tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using two different functions, depending on if you wish to obtain standalone copies of your base object, or a parametric array object that stays linked to the original object.

=== Simple array === <!--T:5-->
The basic signature is as follows:

</translate>
{{Code|code=
array_list = array(objectslist, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None)
}}
<translate>

<!--T:32-->
To create a rectangular array, use it like this:

</translate>
{{Code|code=
array_list = array(objectslist, xvector, yvector, xnum, ynum)
array_list = array(objectslist, xvector, yvector, zvector, xnum, ynum, znum)
}}
<translate>

<!--T:6-->
To create a polar array, use it like this:

</translate>
{{Code|code=
array_list = array(objectslist, center, totalangle, totalnum)
}}
<translate>

<!--T:17-->
* Creates an array from the objects contained in {{incode|objectslist}}, which can be a single object or a list of objects.
* In case of a rectangular array, {{incode|xvector}}, {{incode|yvector}}, and {{incode|zvector}} determine the distance between the base points of each copy, in the X, Y, and Z directions; and {{incode|xnum}}, {{incode|ynum}}, and {{incode|znum}} are the number of copies in the respective direction.
* In case of a polar array, {{incode|center}} defines the center of the array circle, {{incode|totalangle}} is the angle of the arc in degrees to cover with copies, and {{incode|totalnum}} is the number of copies to arrange around the circle, including the original object.
* {{incode|array_list}} is returned with the new copies.
** {{incode|array_list}} is either a single object or a list of objects, depending on the input {{incode|objectslist}}.

<!--T:33-->
This function internally uses {{incode|Draft.move()}} and {{incode|Draft.rotate()}} with <code>copy=True</code>.

<!--T:34-->
Example:

</translate>
{{Code|code=
import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)

array_list = Draft.array(Rect, FreeCAD.Vector(1600, 0, 0), FreeCAD.Vector(0, 600, 0), 3, 4)
}}
<translate>

=== Parametric array === <!--T:8-->

<!--T:35-->
The basic signature is as follows:

</translate>
{{Code|code=
Array = makeArray(baseobject, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, name="Array")
}}
<translate>

<!--T:14-->
To create a rectangular array, use it like this:

</translate>
{{Code|code=
Array = makeArray(baseobject, xvector, yvector, xnum, ynum, name="Array")
Array = makeArray(baseobject, xvector, yvector, zvector, xnum, ynum, znum, name="Array")
}}
<translate>

<!--T:9-->
To create a polar array, use it like this:

</translate>
{{Code|code=
Array = makeArray(baseobject, center, totalangle, totalnum, name="Array")
}}
<translate>

<!--T:10-->
* Creates an {{incode|Array}} object from the given {{incode|baseobject}}.
* In case of a rectangular array, {{incode|xvector}}, {{incode|yvector}}, and {{incode|zvector}} determine the distance between the base points of each copy, in the X, Y, and Z directions; and {{incode|xnum}}, {{incode|ynum}}, and {{incode|znum}} are the number of copies in the respective direction.
* In case of a polar array, {{incode|center}} defines the center of the array circle, {{incode|totalangle}} is the angle of the arc in degrees to cover with copies, and {{incode|totalnum}} is the number of copies to arrange around the circle, including the original object.

<!--T:11-->
Example:
</translate>
{{Code|code=
import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)
xvector = FreeCAD.Vector(1600, 0, 0)
yvector = FreeCAD.Vector(0, 600, 0)
Array = Draft.makeArray(Rect, xvector, yvector, 3, 4)

Tri = Draft.makePolygon(3, 600)
center = FreeCAD.Vector(-1600, 0, 0)
Array2 = Draft.makeArray(Tri, center, 360, 6)
}}
<translate>


<!--T:36-->
<!--T:36-->
{{Docnav
{{Docnav
|
|[[Draft_Draft2Sketch|Draft to Sketch]]
|
|[[Draft_LinkArray|Link Array]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Draft2Sketch.svg
|IconL=
|IconR=
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_LinkArray.svg
}}
}}

<!--T:38-->
{{Draft Tools navi}}

<!--T:39-->
{{Userdocnavi}}


</translate>
</translate>
{{Draft Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 08:24, 20 May 2023

THIS COMMAND IS OBSOLETE
It is not be available in version 0.21 and above. Use Draft OrthoArray, Draft PolarArray or Draft CircularArray instead.

Draft Array

Menu location
None
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
Draft OrthoArray, Draft PolarArray, Draft CircularArray

Description

The Draft Array command creates an orthogonal (3-axes) array from a selected object. The created array can be turned into a polar array or a circular array by changing its DataArray Type property.

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.

This command is now obsolete. Use the Draft OrthoArray, Draft PolarArray or Draft CircularArray command instead.

Usage

  1. To use this command in FreeCAD version 0.19 and later you need to add a button to a custom toolbar. See Interface Customization.
  2. Optionally select one object.
  3. Press the Draft Array button.
  4. If you have not yet selected an object: select one object.
  5. The array is created.
  6. Optionally change its properties.

Properties

See Draft OrthoArray.

Scripting

See Draft OrthoArray.