Draft Array: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Module to Workbench renaming.)
(42 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_PathArray|Path Array]]|[[Draft_Module|Draft_Module]]}}
|
|
|[[Draft_Workbench|Draft]]
|IconL=
|IconR=
|IconC=Workbench_Draft.svg
}}

<!--T:46-->
{{VeryImportantMessage|THIS COMMAND IS OBSOLETE<br>
It was deprecated in FreeCAD version 0.19. 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]]
|SeeAlso=[[Draft PathArray|PathArray]], [[Draft PointArray]], [[Draft Clone]]
}}
}}


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

The Array tool creates an orthogonal (3-axes) or polar array from a selected object.
<!--T:44-->
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]] but can also be used on many types of 3D objects such as those created with the [[Part Workbench]] or [[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 position copies along a path use [[Draft PathArray]]; to position copies at specified points use [[Draft PointArray]]; to create copies or clones, and manually place them use [[Draft Move]], [[Draft Rotate]], and [[Draft Clone]].


==Usage== <!--T:48-->
</translate>
[[Image:Draft_Array_example.jpg|400px]]
<translate>
<!--T:3-->
{{Caption|An orthogonal array and a polar array from a solid object}}


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


<!--T:21-->
==Properties== <!--T:49-->
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:24-->
See [[Draft_OrthoArray#Properties|Draft OrthoArray]].


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


== Properties == <!--T:24-->
<!--T:18-->
See [[Draft_OrthoArray#Scripting|Draft OrthoArray]].
* {{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-->
<!--T:36-->
{{Docnav
For polar arrays:
|
* {{PropertyData|Axis}}: specifies the normal direction of the array circle.
|
* {{PropertyData|Center}}: specifies the center point of the array circle.
|[[Draft_Workbench|Draft]]
* {{PropertyData|Angle}}: specifies the aperture of the circular arc to cover with copies; use 360 to cover an entire circle.
|IconL=
* {{PropertyData|Number Polar}}: specifies the number of copies to place in the circular arrangement.
|IconR=
* {{PropertyData|Interval Axis}}: specifies the interval between each copy on the {{PropertyData|Axis}} direction.
|IconC=Workbench_Draft.svg

<!--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]] and [[FreeCAD Scripting Basics]].

<!--T:31-->
The Array tool can be used in [[macros]] and from the [[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-->
{{docnav|[[Draft_Draft2Sketch|Draft to Sketch]]|[[Draft_PathArray|Path Array]]|[[Draft_Module|Draft_Module]]}}
{{Draft Tools navi}}
{{Userdocnavi}}
</translate>
</translate>
{{Draft Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}

Revision as of 19:55, 24 August 2021

THIS COMMAND IS OBSOLETE
It was deprecated in FreeCAD version 0.19. 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.