Draft Array: Difference between revisions

From FreeCAD Documentation
m (Redaction)
(→‎Properties: More information on the properties)
Line 31: Line 31:


== Properties ==
== Properties ==
# Select {{PropertyData|Array Type}}: Specifies the type of the array, ortho or polar
* {{PropertyData|Base}}: specifies the object to duplicate in the array.
* {{PropertyData|Array Type}}: specifies the type of array to create, either "ortho" or "polar".
# For orthogonal arrays:
## {{PropertyData|Interval X}}: The interval between each copy on the first axis
* {{PropertyData|Fuse}}: if it is {{TRUE}}, and the copies intersect with each other, they will be fused together into a single shape.

## {{PropertyData|Interval Y}}: The interval between each copy on the second axis
For orthogonal arrays:
## {{PropertyData|Interval Z}}: The interval between each copy on the third axis
## {{PropertyData|Number X}}: The number of copies on the first axis
* {{PropertyData|Interval X}}: specifies the interval between each copy on the X axis.
## {{PropertyData|Number Y}}: The number of copies on the second axis
* {{PropertyData|Interval Y}}: specifies the interval between each copy on the Y axis.
## {{PropertyData|Number Z}}: The number of copies on the third 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.
# For polar arrays:
## {{PropertyData|Axis}}: The normal direction of the array circle
* {{PropertyData|Number Y}}: specifies the number of copies on the Y axis.
## {{PropertyData|Center}}: The center point of the array
* {{PropertyData|Number Z}}: specifies the number of copies on the Z axis.

## {{PropertyData|Angle}}: The angle to cover with copies
For polar arrays:
## {{PropertyData|Number Polar}}: The number of copies
* {{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.


==Scripting== <!--T:18-->
==Scripting== <!--T:18-->

Revision as of 01:09, 15 November 2018

Draft Array

Menu location
Draft → Array
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
PathArray, Draft PointArray, Draft Clone

Description

The Array tool creates an orthogonal (3-axes) or polar array from a selected object.

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.

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.

How to use

  1. Select an object with which you wish to make an array.
  2. Press the Draft Array button. If no object is selected, you will be invited to select one.
  3. The Array object is immediately created. You must change the properties of the array to change the number and direction of copies created.

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

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

Properties

  • DataBase: specifies the object to duplicate in the array.
  • DataArray Type: specifies the type of array to create, either "ortho" or "polar".
  • DataFuse: if it is true, and the copies intersect with each other, they will be fused together into a single shape.

For orthogonal arrays:

  • DataInterval X: specifies the interval between each copy on the X axis.
  • DataInterval Y: specifies the interval between each copy on the Y axis.
  • DataInterval Z: specifies the interval between each copy on the Z axis.
  • DataNumber X: specifies the number of copies on the X axis.
  • DataNumber Y: specifies the number of copies on the Y axis.
  • DataNumber Z: specifies the number of copies on the Z axis.

For polar arrays:

  • DataAxis: specifies the normal direction of the array circle.
  • DataCenter: specifies the center point of the array circle.
  • DataAngle: specifies the aperture of the circular arc to cover with copies; use 360 to cover an entire circle.
  • DataNumber Polar: specifies the number of copies to place in the circular arrangement.
  • DataInterval Axis: specifies the interval between each copy on the DataAxis direction.

Scripting

The Array tool can by used in macros and from the python console by using one of the following functions, depending if you wish to obtain simple, standalone copies of your base object, or a parametric array object, that stays linked to the original object.

Simple array

For rectangular array:

array (objectslist,xvector,yvector,xnum,ynum)
array (objectslist,xvector,yvector,zvector,xnum,ynum,znum)

For polar array:

array (objectslist,center,totalangle,totalnum)
  • Creates an array of the objects contained in list (that can be an object or a list of objects) with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum, and same for z direction with zvector and znum if that version is used. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original.
  • This function produces standalone copies of the base object(s)

Parametric array

For rectangular array:

makeArray (object,xvector,yvector,xnum,ynum,[name])
makeArray (object,xvector,yvector,zvector,xnum,ynum,znum,[name])

For polar array:

makeArray (object,center,totalangle,totalnum,[name])
  • Creates an array of the given object with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum, and for zvector and znum if that version is used. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original.
  • The result of this function is a parametric Draft Array object.

Example:

import FreeCAD,Draft
Draft.array(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,0,0),FreeCAD.Vector(0,2,0),2,2)