Draft Array/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 30: Line 30:
For rectangular array:
For rectangular array:
{{Code|code=
{{Code|code=
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
array (objectslist,xvector,yvector,xnum,ynum)
array (objectslist,xvector,yvector,zvector,xnum,ynum,znum)
}}
}}
For polar array:
For polar array:
Line 36: Line 37:
array (objectslist,center,totalangle,totalnum)
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. 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.
* 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)
* This function produces standalone copies of the base object(s)


Line 43: Line 44:
For rectangular array:
For rectangular array:
{{Code|code=
{{Code|code=
makeArray (object,xvector,yvector,xnum,ynum)
makeArray (object,xvector,yvector,xnum,ynum,[name])
makeArray (object,xvector,yvector,zvector,xnum,ynum,znum,[name])
}}
}}
For polar array:
For polar array:
{{Code|code=
{{Code|code=
makeArray (object,center,totalangle,totalnum)
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. 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.
* 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.
* The result of this function is a parametric Draft Array object.



Revision as of 06:43, 8 September 2018

Draft Array

poziția meniului
Draft → Array
Ateliere
Draft, Arch
scurtătură
nici unul
Prezentat în versiune
-
A se vedea, de asemenea,
PathArray

Description

The Array tool creates an orthogonal (3-axes) or polar array from a selected object. If no object is selected, you will be invited to select one.

How to use

  1. Select an object you wish to make an array with
  2. Press the Draft Array button
  3. Select DateArray Type: Specifies the type of the array, ortho or polar
  4. For orthogonal arrays:
    1. DateInterval X: The interval between each copy on the first axis
    2. DateInterval Y: The interval between each copy on the second axis
    3. DateInterval Z: The interval between each copy on the third axis
    4. DateNumber X: The number of copies on the first axis
    5. DateNumber Y: The number of copies on the second axis
    6. DateNumber Z: The number of copies on the third axis
  5. For polar arrays:
    1. DateAxis: The normal direction of the array circle
    2. DateCenter: The center point of the array
    3. DateAngle: The angle to cover with copies
    4. DateNumber 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)