Draft PolarArray

From FreeCAD Documentation
Revision as of 12:39, 30 June 2020 by Vocx (talk | contribs) (The angle is positive in the counter-clockwise direction, and negative in the clockwise direction.)

Draft PolarArray

Menu location
Draft → Polar array
Workbenches
Draft
Default shortcut
None
Introduced in version
0.19
See also
OrthoArray, CircularArray, PathArray, PathLinkArray, PointArray, Clone

Description

The Draft PolarArray tool creates an array from a selected object placing the copies along a circumference.

This tool can be used on any object that has a Part TopoShape, meaning 2D shapes created with the Draft Workbench, but also 3D solids created with other workbenches, for example, Part, PartDesign, or Arch. It can also create App Links instead of simple copies.

A polar array of an object.

Usage

  1. Select the object that you wish to array.
  2. Press the Polar array button. If no object is selected, you will be invited to select one before proceeding.
  3. The task panel is launched where you can select the polar angle, the number of elements, and the center of the axis of rotation.
  4. You can click on the 3D view to simultaneously set the position of the center of rotation, and complete the command. Otherwise, just press Enter or the OK button to finish.

Notes:

  • By default, the axis of rotation is the positive Z axis (0, 0, 1). This can be changed in the property editor after the object is 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.
  • This command creates the same parametric "Array" object as the one created with the OrthoArray and CircularArray tools. Therefore, the array can be converted to orthogonal, polar, or circular by changing its DataArray Type property.

Options

These are the options displayed in the task panel.

  • Polar angle: the angle which determines where the last element of the array will be placed in the polar arrangement. The angle is positive in the counter-clockwise direction, and negative in the clockwise direction.
  • Number of elements: the number of elements in the array. Minimum of 2, maximum of 99.
  • Center of rotation: the coordinates through which the axis of rotation goes through.
  • Reset point: it resets the center of rotation to the origin (0, 0, 0).
  • Fuse: if it is checked, the resulting objects in the array will fuse together if they touch each other. This only works if Link array is unchecked.
  • Link array: if it is checked, the resulting array will be a "Link array". This array internally uses App Link objects, so it is more efficient when handling many copies of complex shapes. However, in this case, the objects cannot be fused together.
  • Press Esc or the Cancel button to abort the current command.

Note: if a Link array is created, this object cannot be converted to a regular array. And similarly, a regular array cannot be converted to a Link array. Therefore, you must choose the type of array that you want at creation time.

Properties

An Array object is based on Part Feature (Part::Feature class), and thus shares all properties of the latter. In addition to the properties listed in Part Feature, the Array object has additional properties.

See the OrthoArray tool for the complete information.

Scripting

See also: Draft API and FreeCAD Scripting Basics.

The PolarArray tool can be used in macros and from the Python console by using the following function.

Older call:

array = makeArray(baseobject, center, totalangle, totalnum, use_link=False)

New call:

array = make_polar_array(base_object,
                         number=5, angle=360, center=App.Vector(0, 0, 0),
                         use_link=True)
  • Creates an "Array" object from the base_object.
    • number is the number of copies in the polar pattern, including the original object.
    • angle is the angle of the polar arc in degrees.
    • center is a vector that defines the center of the array pattern.
    • If use_link is true the created copies will be App Links and not regular copies.

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

tri = Draft.make_polygon(3, 600)
center = App.Vector(-1600, 0, 0)
array = Draft.make_polar_array(tri, 8, 270, center)
doc.recompute()