Draft Array: Difference between revisions

From FreeCAD Documentation
(→‎Properties: New Options section. There are no options for this tool. Either it works with the selected object or not.)
m (Redaction)
Line 20: Line 20:


==How to use== <!--T:4-->
==How to use== <!--T:4-->
# Select an object that you wish to make an array with.
# Select an object with which you wish to make an array.
# 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]]}} 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.
# The Array object is immediately created. You must change the properties of the array to change the number and direction of copies created.

Revision as of 00:51, 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

  1. Select DataArray Type: Specifies the type of the array, ortho or polar
  2. For orthogonal arrays:
    1. DataInterval X: The interval between each copy on the first axis
    2. DataInterval Y: The interval between each copy on the second axis
    3. DataInterval Z: The interval between each copy on the third axis
    4. DataNumber X: The number of copies on the first axis
    5. DataNumber Y: The number of copies on the second axis
    6. DataNumber Z: The number of copies on the third axis
  3. For polar arrays:
    1. DataAxis: The normal direction of the array circle
    2. DataCenter: The center point of the array
    3. DataAngle: The angle to cover with copies
    4. DataNumber Polar: The number of copies

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)