Difference between revisions of "Draft CircularArray"

From FreeCAD Documentation
Jump to navigation Jump to search
(The Draft CircularArray tool creates an array from a selected object placing the copies along concentric circumferences.)
(See the OrthoArray tool for the complete information.)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{UnfinishedDocu}}
 
 
<languages/>
 
<languages/>
 
<translate>
 
<translate>
 +
<!--T:1-->
 
{{Docnav
 
{{Docnav
 
|[[Draft_Draft2Sketch|Draft to Sketch]]
 
|[[Draft_Draft2Sketch|Draft to Sketch]]
Line 11: Line 11:
 
}}
 
}}
  
 +
<!--T:2-->
 
{{GuiCommand
 
{{GuiCommand
 
|Name=Draft CircularArray
 
|Name=Draft CircularArray
Line 19: Line 20:
 
}}
 
}}
  
==Description==
+
==Description== <!--T:3-->
  
The [[Draft_CircularArray|Draft CircularArray]] tool creates an array from a selected object placing the copies along concentric circumferences. This is like using [[Draft_PolarArray|PolarArray]] with a polar angle of 360 degrees, and creating several such concentric arrays.
+
<!--T:4-->
 +
The {{Button|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|Draft CircularArray]]}} tool creates an array from a selected object placing the copies along concentric circumferences. This is like using [[Image:Draft_PolarArray.svg|16px]] [[Draft PolarArray|Draft PolarArray]] with a polar angle of 360 degrees, and creating several such concentric arrays.
  
This tool can be used on 2D shapes created with the [[Draft_Workbench|Draft Workbench]] but can also be used on many types of 3D objects such as those created with the [[Part_Workbench|Part Workbench]] or [[PartDesign_Workbench|PartDesign Workbench]].
+
<!--T:5-->
 +
This tool can be used on 2D shapes created with the [[Image:Workbench_Draft.svg|16px]] [[Draft_Workbench|Draft Workbench]] but can also be used on many types of 3D objects such as those created with the [[Image:Workbench_Part.svg|16px]] [[Part_Workbench|Part Workbench]] or [[Image:Workbench_PartDesign.svg|16px]] [[PartDesign_Workbench|PartDesign Workbench]].
  
To position copies in a rectangular grid use [[Draft_Array|Array]]; to position in a polar pattern use [[Draft_PolarArray|PolarArray]]; 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]].
+
<!--T:6-->
 +
To position copies in a rectangular grid use [[Image:Draft_Array.svg|16px]] [[Draft_Array|Array]]; to position in a polar pattern use [[Image:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|PolarArray]]; to position copies along a path use [[Image:Draft_PathArray.svg|16px]] [[Draft_PathArray|PathArray]]; to position copies at specified points use [[Image:Draft_PointArray.svg|16px]] [[Draft_PointArray|PointArray]]; to create copies or clones, and manually place them use [[Image:Draft_Move.svg|16px]] [[Draft_Move|Move]], [[Image:Draft_Rotate.svg|16px]] [[Draft_Rotate|Rotate]], and [[Image:Draft_Clone.svg|16px]] [[Draft_Clone|Clone]].
  
 
</translate>
 
</translate>
Line 31: Line 35:
 
<translate>
 
<translate>
  
 +
<!--T:7-->
 
{{Caption|A circular array of an object.}}
 
{{Caption|A circular array of an object.}}
  
== How to use ==
+
== Usage == <!--T:8-->
  
 +
<!--T:9-->
 
# Select an object from which you wish to make the circular array.
 
# Select an object from which you wish to make the circular array.
 
# Press the {{Button|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|Circular 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|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|Circular array]]}} button. If no object is selected, the [[task_panel|task panel]] will open, but you still need to select an object to proceed.
Line 40: Line 46:
 
# Choose the tangential distance, which determines the distance from one element in the array to the next element in the same circular layer. This distance determines how many elements will be in the array; if the number is small, there will be many tightly packed copies; if the number is large, there will only be a few copies. This distance cannot be zero.
 
# Choose the tangential distance, which determines the distance from one element in the array to the next element in the same circular layer. This distance determines how many elements will be in the array; if the number is small, there will be many tightly packed copies; if the number is large, there will only be a few copies. This distance cannot be zero.
 
# Choose the number of circular layers. The original object is considered one layer by itself. Minimum of 2, maximum of 99.
 
# Choose the number of circular layers. The original object is considered one layer by itself. Minimum of 2, maximum of 99.
# Choose the symmetry number, which determines how the objects will be distributed in the array. Choose a number between 1 and 10.
+
# Choose the symmetry, which determines how symmetric the objects will be distributed in the array.<br />With symmetry = 1 you might have to rotate the array a full circle to match ''positions'' on itself, with symmetry = 2 a rotation of half a circle (180°) is always sufficient, with symmetry = 3 a rotation of ⅓ of a circle (120°), …, with symmetry = n a rotation of 360°/n. If symmetry gets higher the number of objects in some circles decreases, it even might not be possible to place objects in the inner circle(s) at all.<br />In most cases you want a number between 1 and 6.
 
# 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.
 
# 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.
 
# Optionally, check the fuse or link options.
 
# Optionally, check the fuse or link options.
 
# Press {{Button|OK}} to complete the command.
 
# Press {{Button|OK}} to complete the command.
  
Notes:
+
==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.  
* This command creates the same object as the one created with the [[Draft_Array|Array]] and [[Draft_PolarArray|PolarArray]] tools. Therefore, the array can be converted to orthogonal, polar, or circular just by changing its properties.
+
* This command creates the same object as the one created with the [[Image:Draft_Array.svg|16px]] [[Draft_Array|Array]] and [[Image:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|PolarArray]] tools. Therefore, the array can be converted to orthogonal, polar, or circular just by changing its properties.
  
== Options ==
+
== Options == <!--T:11-->
  
 +
<!--T:12-->
 
* Press {{Button|Reset point}} to set the center of the circular patterns to the origin {{Value|(0, 0, 0)}}.
 
* Press {{Button|Reset point}} to set the center of the circular patterns to the origin {{Value|(0, 0, 0)}}.
 
* 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.
 
* 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.
Line 57: Line 64:
 
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the current command.
 
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the current command.
  
== Properties ==
+
== Properties == <!--T:13-->
  
 +
<!--T:14-->
 
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.
 
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.
  
See the [[Draft_Array|Array]] tool for the complete information.
+
<!--T:15-->
 +
See the {{Button|[[Image:Draft_Array.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} tool for the complete information.
  
== Scripting ==
+
== Scripting == <!--T:16-->
  
 +
<!--T:17-->
 
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
 
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
  
 +
<!--T:18-->
 
The Array tool can be used in [[macros|macros]] and from the [[Python_console|Python console]] by using the following function.
 
The Array tool can be used in [[macros|macros]] and from the [[Python_console|Python console]] by using the following function.
  
Line 77: Line 88:
 
<translate>
 
<translate>
  
 +
<!--T:19-->
 
* Creates an array from the objects contained in {{incode|obj}}, which can be a single object or a list of objects.
 
* Creates an array from the objects contained in {{incode|obj}}, which can be a single object or a list of objects.
 
* The values of {{incode|r_distance}} and {{incode|tan_distance}} correspond to the radial and tangential distances of the elements in the array.
 
* The values of {{incode|r_distance}} and {{incode|tan_distance}} correspond to the radial and tangential distances of the elements in the array.
Line 86: Line 98:
 
** {{incode|array_list}} is either a single object or a list of objects, depending on the input {{incode|obj}}.
 
** {{incode|array_list}} is either a single object or a list of objects, depending on the input {{incode|obj}}.
  
 +
<!--T:20-->
 
Example:
 
Example:
 
</translate>
 
</translate>
Line 103: Line 116:
 
<translate>
 
<translate>
  
{{Draft Tools navi}}
+
<!--T:21-->
{{Userdocnavi}}
+
{{Docnav
 +
|[[Draft_Draft2Sketch|Draft to Sketch]]
 +
|[[Draft_LinkArray|Link Array]]
 +
|[[Draft_Module|Draft]]
 +
|IconL=Draft_Draft2Sketch.svg
 +
|IconC=Workbench_Draft.svg
 +
|IconR=Draft_LinkArray.svg
 +
}}
 +
 
 
</translate>
 
</translate>
 +
{{Draft Tools navi{{#translation:}}}}
 +
{{Userdocnavi{{#translation:}}}}
 +
{{clear}}

Latest revision as of 05:16, 25 March 2020

Other languages:
English • ‎français
Arrow-left.svg Previous: Draft Draft2Sketch.svg Draft to Sketch
Next: Link Array Draft LinkArray.svg Arrow-right.svg

Draft CircularArray.svg Draft CircularArray

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


Description

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

This tool can be used on 2D shapes created with the Workbench Draft.svg Draft Workbench but can also be used on many types of 3D objects such as those created with the Workbench Part.svg Part Workbench or Workbench PartDesign.svg PartDesign Workbench.

To position copies in a rectangular grid use Draft Array.svg Array; to position in a polar pattern use Draft PolarArray.svg PolarArray; to position copies along a path use Draft PathArray.svg PathArray; to position copies at specified points use Draft PointArray.svg PointArray; to create copies or clones, and manually place them use Draft Move.svg Move, Draft Rotate.svg Rotate, and Draft Clone.svg Clone.

Draft CircularArray example.png

A circular array of an object.


Usage

  1. Select an object from which you wish to make the circular array.
  2. Press the Draft CircularArray.svg Circular array button. If no object is selected, the task panel will open, but you still need to select an object to proceed.
  3. Choose the radial distance, which determines the distance from the center of the array to the next circular layer, and between subsequent circular layers.
  4. Choose the tangential distance, which determines the distance from one element in the array to the next element in the same circular layer. This distance determines how many elements will be in the array; if the number is small, there will be many tightly packed copies; if the number is large, there will only be a few copies. This distance cannot be zero.
  5. Choose the number of circular layers. The original object is considered one layer by itself. Minimum of 2, maximum of 99.
  6. Choose the symmetry, which determines how symmetric the objects will be distributed in the array.
    With symmetry = 1 you might have to rotate the array a full circle to match positions on itself, with symmetry = 2 a rotation of half a circle (180°) is always sufficient, with symmetry = 3 a rotation of ⅓ of a circle (120°), …, with symmetry = n a rotation of 360°/n. If symmetry gets higher the number of objects in some circles decreases, it even might not be possible to place objects in the inner circle(s) at all.
    In most cases you want a number between 1 and 6.
  7. Choose the center of the axis of rotation. You can click on the 3D view, to simultaneously set the position of the center of rotation, and complete the command.
  8. Optionally, check the fuse or link options.
  9. Press OK to complete the command.

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 Draft Array.svg Array and Draft PolarArray.svg 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 Draft Array.svg 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()
Arrow-left.svg Previous: Draft Draft2Sketch.svg Draft to Sketch
Next: Link Array Draft LinkArray.svg Arrow-right.svg