Draft CircularArray/it: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Caption|Una serie circolare di un oggetto.}}")
(Updating to match new version of source page)
Line 9: Line 9:
}}
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/it
{{GuiCommand/it
|Name=Draft CircularArray
|Name=Draft CircularArray
Line 17: Line 18:
|SeeAlso=[[Draft_Array/it|Serie]], [[Draft_PolarArray/it|Serie polare]], [[Draft_PathArray/it|Serie su tracciato]], [[Draft_PointArray/it|Serie su punti]], [[Draft_Clone/it|Clone]]
|SeeAlso=[[Draft_Array/it|Serie]], [[Draft_PolarArray/it|Serie polare]], [[Draft_PathArray/it|Serie su tracciato]], [[Draft_PointArray/it|Serie su punti]], [[Draft_Clone/it|Clone]]
}}
}}
</div>


==Descrizione==
==Descrizione==


<div class="mw-translate-fuzzy">
Lo strumento [[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray/it|Serie circolare]] crea una serie da un oggetto selezionato posizionando le copie lungo circonferenze concentriche. È come usare [[Image:Draft_PolarArray.svg|16px]] [[Draft PolarArray/it|Serie polare]] con un angolo polare di 360 gradi e creando diverse serie concentriche.
Lo strumento [[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray/it|Serie circolare]] crea una serie da un oggetto selezionato posizionando le copie lungo circonferenze concentriche. È come usare [[Image:Draft_PolarArray.svg|16px]] [[Draft PolarArray/it|Serie polare]] con un angolo polare di 360 gradi e creando diverse serie concentriche.
</div>


<div class="mw-translate-fuzzy">
Questo strumento può essere utilizzato su forme 2D create con [[Image:Workbench_Draft.svg|16px]] [[Draft_Workbench/it|Draft]] ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con [[Image:Workbench_Part.svg|16px]] [[Part_Workbench/it|Part]] o [[Image:Workbench_PartDesign.svg|16px]] [[PartDesign_Workbench/it|PartDesign]].
Questo strumento può essere utilizzato su forme 2D create con [[Image:Workbench_Draft.svg|16px]] [[Draft_Workbench/it|Draft]] ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con [[Image:Workbench_Part.svg|16px]] [[Part_Workbench/it|Part]] o [[Image:Workbench_PartDesign.svg|16px]] [[PartDesign_Workbench/it|PartDesign]].
</div>


* To create orthogonal or polar arrays, use the corresponding {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} and {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|PolarArray]]}} tools.
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]].
* 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]]}}.
* 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]]}}.


[[Image:Draft_CircularArray_example.png|400px]]
[[Image:Draft_CircularArray_example.png|400px]]
Line 32: Line 42:
==Utilizzo==
==Utilizzo==


# Select an object from which you wish to make the circular array.
# Select the object from which you wish to 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, you will be invited to select one before proceeding.
# The [[task_panel|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.
# Choose the radial distance, which determines the distance from the center of the array to the next circular layer, and between subsequent circular layers.
# 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.
# 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.
===Notes===
# 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.
# Optionally, check the fuse or link options.
# Press {{Button|OK}} to complete the command.


==Notes==
* 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 [[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.
* 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.


== Opzioni ==
== Opzioni ==


These are the options displayed in the [[task_panel|task panel]].
* 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.
* {{MenuCommand|Radial distance}}: the distance from the center of the array to the next circular layer, and between subsequent circular layers.
* 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.
* {{MenuCommand|Tangential distance}}: 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.
* {{MenuCommand|Number of circular layers}}: the original object is considered one layer by itself. There must be minimum 2, maximum 99.
* {{MenuCommand|Symmetry}}: determines how the objects will be distributed in the array.
:With symmetry 1 the first element needs to be rotated a full circle to reach the same position, with 2 a rotation of half a circle (180°) is sufficient, with 3 a one third rotation of a circle (120°) is enough. This means that the symmetry parameter determines a rotation of 360°/n. For large values of symmetry the number of objects in the circular layers decreases, that eventually no object will be placed in the inner circle at all. In most cases you want a number between 1 and 6.
* {{MenuCommand|Center of rotation}}: the coordinates through which the axis of rotation goes through.
* {{MenuCommand|Reset point}}: it resets the center of rotation to the origin {{Value|(0, 0, 0)}}.
* {{MenuCommand|Fuse}}: if it is checked, the resulting objects in the array will fuse together if they touch each other. This only works if {{MenuCommand|Link array}} is unchecked.
* {{MenuCommand|Link array}}: if it is checked, the resulting array will be a "Link array". This array internally uses [[App_Link|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 {{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.

{{Emphasis|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.


== Proprietà ==
== Proprietà ==


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_CircularArray|CircularArray]] object internally is the same object produced with the {{Button|[[Image:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} tool. It is based on [[Part_Feature|Part Feature]] ({{incode|Part::Feature}} class), and thus shares all properties of the latter.


See the {{Button|[[Image:Draft_Array.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} tool for the complete information.
See the {{Button|[[Image:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|OrthoArray]]}} tool for the complete description of the properties. All properties apply, except for those under the {{TitleProperty|Orthogonal array}} and {{TitleProperty|Polar array}} groups.

* For circular arrays, the {{PropertyData|Center|VectorDistance}} specifies an offset from the {{PropertyData|Placement}} of the {{PropertyData|Base}} object. That is, to keep the circular array centered on the {{PropertyData|Base}} object, keep {{PropertyData|Center}} to the default value {{Value|(0, 0, 0)}}.


== Script ==
== Script ==
Line 67: Line 85:


{{Code|code=
{{Code|code=
array_list = make_circular_array(obj, r_distance, tan_distance,
array = make_circular_array(base_object,
axis, center, number, symmetry,
r_distance=100, tan_distance=50,
use_link)
number=3, symmetry=1,
axis=App.Vector(0, 0, 1), center=App.Vector(0, 0, 0),
use_link=True):
}}
}}


* Creates an array from the objects contained in {{incode|obj}}, which can be a single object or a list of objects.
* Creates an {{incode|"Array"}} object from the {{incode|base_objectj}}.
* 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.
* The values of {{incode|axis}} and {{incode|center}} are vectors that describe the direction of the axis of rotation, and a point through which that axis goes.
** The value of {{incode|number}} is the number of circular layers in the circular pattern; the original object counts as the first layer.
** The value of {{incode|symmetry}} is an integer that participates in some calculations that affect the way the copies are distributed around the circumferences. Usual values are from 1 to 6; higher values are not recommended and will make the copies in the inner layers to disappear.
* The value of {{incode|number}} is the number of circular layers in the circular pattern; the original object counts as the first layer.
** The values of {{incode|axis}} and {{incode|center}} are vectors that describe the direction of the axis of rotation, and a point through which that axis goes.
* The value of {{incode|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 {{incode|use_link}} is {{TRUE}} the created copies will be [[App_Link|App Links]] and not regular copies.
** If {{incode|use_link}} is {{TRUE}} the created copies will be [[App_Link|App Links]] and not regular copies.
* {{incode|array_list}} is returned with the new copies.
** {{incode|array_list}} is either a single object or a list of objects, depending on the input {{incode|obj}}.


Esempio:
Esempio:
Line 85: Line 103:
import FreeCAD as App
import FreeCAD as App
import Draft
import Draft
import draftobjects.circulararray as ca


doc = App.newDocument()
doc = App.newDocument()


tri = Draft.makePolygon(3, 600)
tri = Draft.make_polygon(3, 600)

axis = App.Vector(0, 0, 1)
array = Draft.make_circular_array(tri, 1800, 1200, 4, 1)
center = App.Vector(0, 0, 0)
doc.recompute()
arr = ca.make_circular_array(tri, 1800, 1200, axis, center, 4, 1)
App.ActiveDocument.recompute()
}}
}}



Revision as of 19:38, 2 July 2020

Serie circolare

Posizione nel menu
Draft → Serie circolare
Ambiente
Draft
Avvio veloce
Nessuno
Introdotto nella versione
0.19
Vedere anche
Serie, Serie polare, Serie su tracciato, Serie su punti, Clone

Descrizione

Lo strumento Serie circolare crea una serie da un oggetto selezionato posizionando le copie lungo circonferenze concentriche. È come usare Serie polare con un angolo polare di 360 gradi e creando diverse serie concentriche.

Questo strumento può essere utilizzato su forme 2D create con Draft ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con Part o PartDesign.

Una serie circolare di un oggetto.

Utilizzo

  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 DatiArray Type property.

Opzioni

These are the options displayed in the task panel.

  • Radial distance: the distance from the center of the array to the next circular layer, and between subsequent circular layers.
  • Tangential distance: 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.
  • Number of circular layers: the original object is considered one layer by itself. There must be minimum 2, maximum 99.
  • Symmetry: determines how the objects will be distributed in the array.
With symmetry 1 the first element needs to be rotated a full circle to reach the same position, with 2 a rotation of half a circle (180°) is sufficient, with 3 a one third rotation of a circle (120°) is enough. This means that the symmetry parameter determines a rotation of 360°/n. For large values of symmetry the number of objects in the circular layers decreases, that eventually no object will be placed in the inner circle at all. In most cases you want a number between 1 and 6.
  • 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.

Proprietà

A CircularArray object internally is the same object produced with the OrthoArray tool. It is based on Part Feature (Part::Feature class), and thus shares all properties of the latter.

See the OrthoArray tool for the complete description of the properties. All properties apply, except for those under the Orthogonal array and Polar array groups.

  • For circular arrays, the DatiCenter (VectorDistance) specifies an offset from the DatiPlacement of the DatiBase object. That is, to keep the circular array centered on the DatiBase object, keep DatiCenter to the default value (0, 0, 0).

Script

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 = make_circular_array(base_object,
                            r_distance=100, tan_distance=50,
                            number=3, symmetry=1,
                            axis=App.Vector(0, 0, 1), center=App.Vector(0, 0, 0),
                            use_link=True):
  • Creates an "Array" object from the base_objectj.
    • The values of r_distance and tan_distance correspond to the radial and tangential distances of the elements in the array.
    • 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. Usual values are from 1 to 6; higher values are not recommended and will make the copies in the inner layers to disappear.
    • 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.
    • If use_link is true the created copies will be App Links and not regular copies.

Esempio:

import FreeCAD as App
import Draft

doc = App.newDocument()

tri = Draft.make_polygon(3, 600)

array = Draft.make_circular_array(tri, 1800, 1200, 4, 1)
doc.recompute()