Draft PolarArray: Difference between revisions

From FreeCAD Documentation
No edit summary
(Removed Preferences paragraph.)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Page_in_progress}}
<languages/>
<languages/>
<translate>
<translate>
Line 7: Line 6:
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_CircularArray|CircularArray]]
|[[Draft_CircularArray|CircularArray]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_OrthoArray.svg
|IconL=Draft_OrthoArray.svg
|IconR=Draft_CircularArray.svg
|IconR=Draft_CircularArray.svg
Line 17: Line 16:
|Name=Draft PolarArray
|Name=Draft PolarArray
|MenuLocation=Modification → Array tools → Polar array
|MenuLocation=Modification → Array tools → Polar array
|Workbenches=[[Draft Module|Draft]]
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]]
|Version=0.19
|Version=0.19
|SeeAlso=[[Draft_OrthoArray|Draft OrthoArray]], [[Draft_CircularArray|Draft CircularArray]], [[Draft_PathArray|Draft PathArray]], [[Draft_PathLinkArray|Draft PathLinkArray]], [[Draft_PointArray|Draft PointArray]], [[Draft_Clone|Draft Clone]]
|SeeAlso=[[Draft_OrthoArray|Draft OrthoArray]], [[Draft_CircularArray|Draft CircularArray]], [[Draft_PathArray|Draft PathArray]], [[Draft_PathLinkArray|Draft PathLinkArray]], [[Draft_PointArray|Draft PointArray]], [[Draft_PointLinkArray|Draft PointLinkArray]]
}}
}}


Line 25: Line 24:


<!--T:4-->
<!--T:4-->
The {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Draft PolarArray]]}} tool creates an array from a selected object placing the copies along a circumference.
The [[Image:Draft_PolarArray.svg|24px]] '''Draft PolarArray''' command creates an array from a selected object by placing copies along a circumference. The command can optionally create a [[App_Link|Link]] array, which is more efficient than a regular array.


<!--T:5-->
<!--T:5-->
This tool can be used on any object that has a [[Part_TopoShape|Part TopoShape]], meaning 2D shapes created with the [[Draft_Workbench|Draft Workbench]], but also 3D solids created with other workbenches, for example, [[Part_Workbench|Part]], [[PartDesign_Workbench|PartDesign]], or [[Arch_Workbench|Arch]]. It can also create [[App_Link|App Links]] instead of simple copies.
The command can be used on 2D objects created with the [[Draft_Workbench|Draft Workbench]] or [[Sketcher_Workbench|Sketcher Workbench]], but also on many 3D objects such as those created with the [[Part_Workbench|Part Workbench]], [[PartDesign_Workbench|PartDesign Workbench]] or [[Arch_Workbench|Arch Workbench]].

<!--T:6-->
* To create orthogonal or circular arrays, use the corresponding {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} and {{Button|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|CircularArray]]}} tools.
* To position copies along a path use {{Button|[[File:Draft_PathArray.svg|16px]] [[Draft_PathArray|PathArray]]}} or {{Button|[[File:Draft_PathLinkArray.svg|16px]] [[Draft_PathLinkArray|PathLinkArray]]}}.
* To position copies at specified points use {{Button|[[File:Draft_PointArray.svg|16px]] [[Draft_PointArray|PointArray]]}} or {{Button|[[File:Draft_PointLinkArray.svg|16px]] [[Draft_PointLinkArray|PointLinkArray]]}}.
* To create copies and manually place them use {{Button|[[File:Draft_Move.svg|16px]] [[Draft_Move|Move]]}} or {{Button|[[File:Draft_Rotate.svg|16px]] [[Draft_Rotate|Rotate]]}}.
* To create exact copies and manually place or scale them, use {{Button|[[File:Draft_Clone.svg|16px]] [[Draft_Clone|Clone]]}} or {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}}.


</translate>
</translate>
Line 41: Line 33:
<translate>
<translate>
<!--T:7-->
<!--T:7-->
{{Caption|A polar array of an object.}}
{{Caption|Draft PolarArray}}


== Usage == <!--T:8-->
== Usage == <!--T:8-->

<!--T:35-->
See also: [[Draft_Snap|Draft Snap]].


<!--T:9-->
<!--T:9-->
# Select the object that you wish to array.
# Optionally select one object.
# There are several ways to invoke the command:
# Press the {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Polar array]]}} button. If no object is selected, you will be invited to select one before proceeding.
#* Press the {{Button|[[Image:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Polar array]]}} button.
# The [[task_panel|task panel]] is launched where you can select the polar angle, the number of elements, and the center of the axis of rotation.
#* Select the {{MenuCommand|Modification → Array tools → [[Image:Draft_PolarArray.svg|16px]] Polar array}} option from the menu.
# You can click on the [[3D_view|3D view]] to simultaneously set the position of the center of rotation, and complete the command. Otherwise, just press {{KEY|Enter}} or the {{Button|OK}} button to complete the operation.
# The {{MenuCommand|Polar array}} task panel opens. See [[#Options|Options]] for more information.
# If you have not yet selected an object: select one object.
# Enter the required parameters in the task panel.
# To finish the command do one of the following:
#* Pick a point in the [[3D_view|3D view]] for the {{MenuCommand|Center of rotation}}.
#* Press {{KEY|Enter}}.
#* Press the {{Button|OK}} button.


== Options == <!--T:11-->
== Options == <!--T:11-->
Line 56: Line 58:
* Enter the {{MenuCommand|Polar angle}} to specify the total angle of the array. The angle is positive in the counter-clockwise direction.
* Enter the {{MenuCommand|Polar angle}} to specify the total angle of the array. The angle is positive in the counter-clockwise direction.
* Enter the {{MenuCommand|Number of elements}}. Must be at least {{Value|2}}. The maximum that can be entered in the task panel is {{Value|99}}, but higher values are possible by changing the {{PropertyData|Number Polar}} property of the array.
* Enter the {{MenuCommand|Number of elements}}. Must be at least {{Value|2}}. The maximum that can be entered in the task panel is {{Value|99}}, but higher values are possible by changing the {{PropertyData|Number Polar}} property of the array.
* Pick a point in the [[3D_view|3D view]] or type [[Draft_Coordinates|coordinates]] for the {{MenuCommand|Center of rotation}}. The rotation axis of the array will pass through this point. It is advisable to move the pointer out of the [[3D_view|3D view]] before entering coordinates.
* Pick a point in the [[3D_view|3D view]], note that this will also finish the command, or type coordinates for the {{MenuCommand|Center of rotation}}. The rotation axis of the array will pass through this point. It is advisable to move the pointer out of the [[3D_view|3D view]] before entering coordinates.
* Press the {{MenuCommand|Reset point}} button to reset the {{MenuCommand|Center of rotation}} to the origin.
* Press the {{MenuCommand|Reset point}} button to reset the {{MenuCommand|Center of rotation}} to the origin.
* If the {{MenuCommand|Fuse}} checkbox is checked overlapping elements in the array are fused. This does not work for Link arrays.
* If the {{MenuCommand|Fuse}} checkbox is checked overlapping elements in the array are fused. This does not work for Link arrays.
Line 62: Line 64:
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.


== Notes == <!--T:34-->
==Notes== <!--T:36-->


<!--T:10-->
<!--T:10-->
Line 79: Line 81:
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


=== Parametric array ===
===Parametric array=== <!--T:40-->


<!--T:18-->
<!--T:18-->
To create a parametric polar array use the {{incode|make_array}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeArray}} method. The {{incode|make_array}} method can create [[Draft_OrthoArray|Draft OrthoArrays]], Draft PolarArrays and [[Draft_CircularArray|Draft CircularArrays]]. For each array type one or more wrappers are available.
To create a parametric polar array use the {{incode|make_array}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeArray}} method. The {{incode|make_array}} method can create [[Draft_OrthoArray|Draft OrthoArrays]], Draft PolarArrays and [[Draft_CircularArray|Draft CircularArrays]]. For each array type one or more wrappers are available.


<!--T:41-->
The main method:
The main method:


Line 92: Line 95:
<translate>
<translate>


<!--T:42-->
The wrapper for polar arrays is:
The wrapper for polar arrays is:


Line 128: Line 132:
<translate>
<translate>


=== Non-parametric array ===
===Non-parametric array=== <!--T:43-->


<!--T:29-->
<!--T:29-->
Line 162: Line 166:
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_OrthoArray|OrthoArray]]
|[[Draft_CircularArray|CircularArray]]
|[[Draft_CircularArray|CircularArray]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_OrthoArray.svg
|IconL=Draft_OrthoArray.svg
|IconR=Draft_CircularArray.svg
|IconR=Draft_CircularArray.svg

Latest revision as of 19:48, 7 December 2023

Draft PolarArray

Menu location
Modification → Array tools → Polar array
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
0.19
See also
Draft OrthoArray, Draft CircularArray, Draft PathArray, Draft PathLinkArray, Draft PointArray, Draft PointLinkArray

Description

The Draft PolarArray command creates an array from a selected object by placing copies along a circumference. The command can optionally create a Link array, which is more efficient than a regular array.

The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or Arch Workbench.

Draft PolarArray

Usage

See also: Draft Snap.

  1. Optionally select one object.
  2. There are several ways to invoke the command:
    • Press the Polar array button.
    • Select the Modification → Array tools → Polar array option from the menu.
  3. The Polar array task panel opens. See Options for more information.
  4. If you have not yet selected an object: select one object.
  5. Enter the required parameters in the task panel.
  6. To finish the command do one of the following:
    • Pick a point in the 3D view for the Center of rotation.
    • Press Enter.
    • Press the OK button.

Options

  • Enter the Polar angle to specify the total angle of the array. The angle is positive in the counter-clockwise direction.
  • Enter the Number of elements. Must be at least 2. The maximum that can be entered in the task panel is 99, but higher values are possible by changing the DataNumber Polar property of the array.
  • Pick a point in the 3D view, note that this will also finish the command, or type coordinates for the Center of rotation. The rotation axis of the array will pass through this point. It is advisable to move the pointer out of the 3D view before entering coordinates.
  • Press the Reset point button to reset the Center of rotation to the origin.
  • If the Fuse checkbox is checked overlapping elements in the array are fused. This does not work for Link arrays.
  • If the Link array checkbox is checked a Link array instead of a regular array is created. A Link array is more efficient because its elements are App Link objects.
  • Press Esc or the Cancel button to abort the command.

Notes

  • The default rotation axis for the array is the positive Z axis. This can be changed by editing its DataAxis property.
  • A Draft PolarArray can be turned into a Draft OrthoArray or a Draft CircularArray by changing its DataArray Type property.
  • A Link array cannot be turned into a regular array or vice versa. The type of array must be decided at creation time.

Properties

See Draft OrthoArray.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

Parametric array

To create a parametric polar array use the make_array method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeArray method. The make_array method can create Draft OrthoArrays, Draft PolarArrays and Draft CircularArrays. For each array type one or more wrappers are available.

The main method:

array = make_array(base_object, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, use_link=True)

The wrapper for polar arrays is:

array = make_polar_array(base_object,
                         number=5, angle=360, center=App.Vector(0, 0, 0),
                         use_link=True)
  • base_object is the object to be arrayed. It can also be the Label (string) of an object in the current document.
  • number is the number of elements in the pattern, including the original object.
  • angle is the angle of the polar arc in degrees.
  • center is the vector that defines the center of the pattern.
  • If use_link is True the created elements are App Links instead of regular copies.
  • array is returned with the created array object.

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()

Non-parametric array

To create a non-parametric polar array use the array method of the Draft module. This method returns None.

array(objectslist, center, angle, number)

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

tri = Draft.make_polygon(3, 600)
center = App.Vector(-1600, 0, 0)

Draft.array(tri, center, 270, 8)
doc.recompute()