Draft PolarArray: Difference between revisions
(Link to OrthoArray) |
(Removed Preferences paragraph.) |
||
(50 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:1--> |
<!--T:1--> |
||
{{Docnav |
{{Docnav |
||
|[[Draft_OrthoArray|OrthoArray]] |
|||
|[[Draft_Draft2Sketch|Draft to Sketch]] |
|||
|[[Draft_CircularArray|CircularArray]] |
|||
|[[Draft_LinkArray|Link Array]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL= |
|IconL=Draft_OrthoArray.svg |
||
|IconR=Draft_CircularArray.svg |
|||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
|IconR=Draft_LinkArray.svg |
|||
}} |
}} |
||
Line 14: | Line 15: | ||
{{GuiCommand |
{{GuiCommand |
||
|Name=Draft PolarArray |
|Name=Draft PolarArray |
||
|MenuLocation= |
|MenuLocation=Modification → Array tools → Polar array |
||
|Workbenches=[[Draft |
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]] |
||
|Version=0.19 |
|Version=0.19 |
||
|SeeAlso=[[Draft_OrthoArray|OrthoArray]], [[Draft_CircularArray|CircularArray]], [[Draft_PathArray|PathArray]], [[Draft_PathLinkArray|PathLinkArray]], [[Draft_PointArray|PointArray]], [[ |
|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 23: | Line 24: | ||
<!--T:4--> |
<!--T:4--> |
||
The |
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--> |
||
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 position copies in a rectangular grid use [[Draft_Array|Array]]; to position in a circular pattern use [[Draft_CircularArray|CircularArray]]; to position copies along a path use [[Draft_PathArray|PathArray]]; to position copies at specified points use [[Draft_PointArray|PointArray]]; to create copies or clones, and manually place them use [[Draft_Move|Move]], [[Draft_Rotate|Rotate]], and [[Draft_Clone|Clone]]. |
|||
</translate> |
</translate> |
||
[[Image:Draft_PolarArray_example.png|400px]] |
[[Image:Draft_PolarArray_example.png|400px]] |
||
<translate> |
<translate> |
||
<!--T:7--> |
<!--T:7--> |
||
{{Caption| |
{{Caption|Draft PolarArray}} |
||
== Usage == <!--T:8--> |
== Usage == <!--T:8--> |
||
<!--T:35--> |
|||
See also: [[Draft_Snap|Draft Snap]]. |
|||
<!--T:9--> |
<!--T:9--> |
||
# Optionally select one object. |
|||
# Select an object from which you wish to make the polar array. |
|||
# 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, the [[task_panel|task panel]] will open, but you still need to select an object to proceed. |
|||
#* Press the {{Button|[[Image:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Polar array]]}} button. |
|||
# Choose the polar angle, which determines where the last element of the array will be. |
|||
#* Select the {{MenuCommand|Modification → Array tools → [[Image:Draft_PolarArray.svg|16px]] Polar array}} option from the menu. |
|||
# Choose the number of elements in the array. Minimum of 2, maximum of 99. |
|||
# The {{MenuCommand|Polar array}} task panel opens. See [[#Options|Options]] for more information. |
|||
# Choose the center of the axis of rotation. You can click on the [[3D_view|3D view]], to simultaneously set the position of the center of rotation, and complete the command. |
|||
# If you have not yet selected an object: select one object. |
|||
# Optionally, check the fuse or link options. |
|||
# Enter the required parameters in the task panel. |
|||
# Press {{Button|OK}} to complete the command. |
|||
# To finish the command do one of the following: |
|||
#* Pick a point in the [[3D_view|3D view]] for the {{MenuCommand|Center of rotation}}. |
|||
<!--T:10--> |
|||
#* Press {{KEY|Enter}}. |
|||
Notes: |
|||
#* Press the {{Button|OK}} button. |
|||
* 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. |
|||
* The polar angle is positive in the counter-clockwise direction, and negative in the clockwise direction. |
|||
* 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 [[Draft_Array|Array]] and [[Draft_CircularArray|CircularArray]] tools. Therefore, the array can be converted to orthogonal, polar, or circular just by changing its properties. |
|||
== Options == <!--T:11--> |
== Options == <!--T:11--> |
||
<!--T:12--> |
<!--T:12--> |
||
* Enter the {{MenuCommand|Polar angle}} to specify the total angle of the array. The angle is positive in the counter-clockwise direction. |
|||
* Press {{Button|Reset point}} to set the center of rotation to the origin {{Value|(0, 0, 0)}}. |
|||
* 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. |
|||
* If the {{MenuCommand|Fuse}} checkbox is ticked, the resulting objects in the array will be fused into a single shape, if they touch or intersect each other. |
|||
* 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. |
|||
* If the {{MenuCommand|Use Links}} checkbox is ticked, the resulting objects in the array will be [[App_Link|App Links]] instead of simple copies. This improves the memory usage of the array, as the App Link re-uses the [[Shape|shape]] of the original object, and does not create new shapes. If this option is used, the {{MenuCommand|Fuse}} checkbox has no effect. |
|||
* Press {{ |
* 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|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|App Link]] objects. |
|||
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command. |
|||
== |
==Notes== <!--T:36--> |
||
<!--T: |
<!--T:10--> |
||
* The default rotation axis for the array is the positive Z axis. This can be changed by editing its {{PropertyData|Axis}} property. |
|||
An [[Draft_PolarArray|Array]] object is based on [[Part_Feature|Part Feature]] ({{incode|Part::Feature}} class), and thus shares all properties of the latter. In addition to the properties listed in [[Part_Feature|Part Feature]], the Array object has additional properties. |
|||
* A Draft PolarArray can be turned into a [[Draft_OrthoArray|Draft OrthoArray]] or a [[Draft_CircularArray|Draft CircularArray]] by changing its {{PropertyData|Array 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 == <!--T:13--> |
|||
<!--T:15--> |
<!--T:15--> |
||
See [[Draft_OrthoArray#Properties|Draft OrthoArray]]. |
|||
See the {{Button|[[Image:Draft_Array.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} tool for the complete information. |
|||
== Scripting == <!--T:16--> |
== Scripting == <!--T:16--> |
||
<!--T:17--> |
<!--T:17--> |
||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]]. |
|||
===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. |
|||
The PolarArray tool can be used in [[macros|macros]] and from the [[Python_console|Python console]] by using the following function. |
|||
<!--T:41--> |
|||
The main method: |
|||
Older call: |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
array = |
array = make_array(base_object, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, use_link=True) |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:42--> |
|||
New call: |
|||
The wrapper for polar arrays is: |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
Line 97: | Line 107: | ||
<!--T:19--> |
<!--T:19--> |
||
* |
* {{incode|base_object}} is the object to be arrayed. It can also be the {{incode|Label}} (string) of an object in the current document. |
||
* {{incode|number}} is the number of elements in the pattern, including the original object. |
|||
* {{incode|angle}} is the angle of the polar arc in degrees. |
|||
* {{incode|center}} is the vector that defines the center of the pattern. |
|||
* If {{incode|use_link}} is {{incode|True}} the created elements are [[App_Link|App Links]] instead of regular copies. |
|||
* {{incode|array}} is returned with the created array object. |
|||
<!--T:20--> |
<!--T:20--> |
||
Example: |
Example: |
||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
Line 114: | Line 126: | ||
tri = Draft.make_polygon(3, 600) |
tri = Draft.make_polygon(3, 600) |
||
center = App.Vector(-1600, 0, 0) |
center = App.Vector(-1600, 0, 0) |
||
array = Draft.make_polar_array(tri, 8, 270, center) |
array = Draft.make_polar_array(tri, 8, 270, center) |
||
doc.recompute() |
doc.recompute() |
||
}} |
}} |
||
<translate> |
<translate> |
||
===Non-parametric array=== <!--T:43--> |
|||
<!--T:29--> |
|||
To create a non-parametric polar array use the {{incode|array}} method of the Draft module. This method returns {{incode|None}}. |
|||
</translate> |
|||
{{Code|code= |
|||
array(objectslist, center, angle, number) |
|||
}} |
|||
<translate> |
|||
<!--T:33--> |
|||
Example: |
|||
</translate> |
|||
{{Code|code= |
|||
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() |
|||
}} |
|||
<translate> |
|||
<!--T:21--> |
<!--T:21--> |
||
{{Docnav |
{{Docnav |
||
|[[Draft_OrthoArray|OrthoArray]] |
|||
|[[Draft_Draft2Sketch|Draft to Sketch]] |
|||
|[[Draft_CircularArray|CircularArray]] |
|||
|[[Draft_LinkArray|Link Array]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL= |
|IconL=Draft_OrthoArray.svg |
||
|IconR=Draft_CircularArray.svg |
|||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
|IconR=Draft_LinkArray.svg |
|||
}} |
}} |
||
Line 132: | Line 175: | ||
{{Draft Tools navi{{#translation:}}}} |
{{Draft Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{clear}} |
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.
- Optionally select one object.
- There are several ways to invoke the command:
- Press the Polar array button.
- Select the Modification → Array tools → Polar array option from the menu.
- The Polar array task panel opens. See 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 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 is99
, 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 theLabel
(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
isTrue
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()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub