Draft CircularArray: Difference between revisions

From FreeCAD Documentation
(Clean up usage)
(Subsection)
Line 55: Line 55:
* This command creates the same parametric "Array" object as the one created with the {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} and {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|PolarArray]]}} tools. Therefore, the array can be converted to orthogonal, polar, or circular by changing its {{PropertyData|Array Type}} property.
* This command creates the same parametric "Array" object as the one created with the {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} and {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|PolarArray]]}} tools. Therefore, the array can be converted to orthogonal, polar, or circular by changing its {{PropertyData|Array Type}} property.


==Notes== <!--T:10-->
===Notes===

<!--T:10-->
* By default, the axis of rotation is the positive Z axis {{Value|(0, 0, 1)}}. This can be changed in the [[property_editor|property editor]] after the object is created.
* By default, the axis of rotation is the positive Z axis {{Value|(0, 0, 1)}}. This can be changed in the [[property_editor|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.
* 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.

Revision as of 22:55, 1 July 2020

Draft CircularArray

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

Description

The Draft CircularArray tool creates an array from a selected object placing the copies along concentric circumferences. This is similar to using PolarArray with a polar angle of 360 degrees, and creating several concentric arrays.

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 circular array of an object.

Usage

  1. Select the object from which you wish to array.
  2. Press the Circular 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 radial distance, the tangential distance, the number of circular layers, the symmetry parameter, 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 complete the operation.

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 PolarArray tools. Therefore, the array can be converted to orthogonal, polar, or circular by changing its DataArray Type property.

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 object as the one created with the Array and PolarArray tools. Therefore, the array can be converted to orthogonal, polar, or circular just by changing its properties.

Options

  • Press Reset point to set the center of the circular patterns to the origin (0, 0, 0).
  • If the Fuse checkbox is ticked, the resulting objects in the array will be fused into a single shape, if they touch or intersect each other.
  • If the Use Links checkbox is ticked, the resulting objects in the array will be App Links instead of simple copies. This improves the memory usage of the array, as the App Link re-uses the shape of the original object, and does not create new shapes. If this option is used, the Fuse checkbox has no effect.
  • Press Esc or the Cancel button to abort the current command.

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 Array tool can be used in macros and from the Python console by using the following function.

array_list = make_circular_array(obj, r_distance, tan_distance,
                                 axis, center, number, symmetry,
                                 use_link)
  • Creates an array from the objects contained in obj, which can be a single object or a list of objects.
  • The values of r_distance and tan_distance correspond to the radial and tangential distances of the elements in the array.
  • The values of axis and center are vectors that describe the direction of the axis of rotation, and a point through which that axis goes.
  • The value of number is the number of circular layers in the circular pattern; the original object counts as the first layer.
  • The value of symmetry is an integer that participates in some calculations that affect the way the copies are distributed around the circumferences. Try different values, from 1 to 10, to get different placements of the copies.
  • If use_link is true the created copies will be App Links and not regular copies.
  • array_list is returned with the new copies.
    • array_list is either a single object or a list of objects, depending on the input obj.

Example:

import FreeCAD as App
import Draft
import draftobjects.circulararray as ca

doc = App.newDocument()

tri = Draft.makePolygon(3, 600)
axis = App.Vector(0, 0, 1)
center = App.Vector(0, 0, 0)
arr = ca.make_circular_array(tri, 1800, 1200, axis, center, 4, 1)
App.ActiveDocument.recompute()