Draft Array/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "==Popis== Nástroj Pole vytváří ortogonální (3-osy) nebo polární pole z vybraných objektů. Není-li vybrán žádný objekt, budete vyzváni k jeho výběru.")
 
(Updating to match new version of source page)
(43 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft_Array|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> Array}}

{{VeryImportantMessage|This command is deprecated in 0.19. For the new usage, see [[Draft_OrthoArray|Draft OrthoArray]], which works essentially the same way.
Also see [[Draft_PolarArray|Draft PolarArray]] and [[Draft_CircularArray|Draft CircularArray]].}}

{{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
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/cs|Name=Draft_Array|Name/cs=Kreslení Pole|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Draft → Array|SeeAlso=[[Draft PathArray/cs|PathArray]]}}
</div>


<div class="mw-translate-fuzzy">
==Popis==
==Popis==
Nástroj Pole vytváří ortogonální (3-osy) nebo polární pole z vybraných objektů. Není-li vybrán žádný objekt, budete vyzváni k jeho výběru.
Nástroj Pole vytváří ortogonální (3-osy) nebo polární pole z vybraných objektů. Není-li vybrán žádný objekt, budete vyzváni k jeho výběru.
</div>


The {{Button|[[Image:Draft Array.svg|16px]] [[Draft Array|Draft Array]]}} tool creates an orthogonal (3-axes), polar, or circular array from a selected object.

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]].

To create polar and circular arrays directly, use the corresponding [[Draft_PolarArray|PolarArray]] and [[Draft_CircularArray|CircularArray]] tools; 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]].

To create [[App_Link|App Links]] instead of simple copies, use [[Draft_LinkArray|LinkArray]], [[Draft_PathLinkArray|Path LinkArray]], and the proper option with [[Draft_PolarArray|PolarArray]] and [[Draft_CircularArray|CircularArray]] .

[[File:Draft_Array_example.png|x300px]] [[File:Draft_PolarArray_example.png|x300px]]
<div class="mw-translate-fuzzy">
[[Image:Draft_Array_example.jpg|400px]]
[[Image:Draft_Array_example.jpg|400px]]
</div>


[[File:Draft_CircularArray_example.png|x300px]]
==How to use==
# Select an object you wish to make an array with
# Press the {{KEY|[[Image:Draft Array.png|16px]] [[Draft Array]]}} button


{{Caption|Circular array from a solid object}}
==Options==
* The array starts as orthogonal by default, you can then change its mode in the properties.


<div class="mw-translate-fuzzy">
==Properties==
==Použití==
* {{PropertyData|Array Type}}: Specifies the type of the array, ortho or polar
# Vyberte objekt, ze kterého chcete udělat pole
# Stiskněte tlačítko {{KEY|[[Image:Draft Array.png|16px]] [[Draft Array/cs|Pole]]}}.
(pozn.překl.: Pro začátečníky jako jsem já - defaultně jsou intervaly X,Y a Z nastaveny na 1. Když pracujete v mm, tak to vypadá jakoby se pole nevytvořilo, protože se elementy překrývají. Je potřeba alespoň jeden index zvýšit minimálně na rozměr základního prvku.)
</div>

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.

== Options ==

There are no options for this tool. Either it works with the selected object or not.

== Properties ==
* {{PropertyData|Base}}: specifies the object to duplicate in the array.
* {{PropertyData|Array Type|Enumeration}}: specifies the type of array to create, {{value|"ortho"}}, {{value|"polar"}}, or {{value|"circular"}}.
* {{PropertyData|Fuse}}: if it is {{TRUE}}, and the copies intersect with each other, they will be fused together into a single shape.


For orthogonal arrays:
For orthogonal arrays:
* {{PropertyData|Interval X}}: The interval between each copy on the first axis
* {{PropertyData|Interval X}}: specifies the interval between each copy on the X axis.
* {{PropertyData|Interval Y}}: The interval between each copy on the second axis
* {{PropertyData|Interval Y}}: specifies the interval between each copy on the Y axis.
* {{PropertyData|Interval Z}}: The interval between each copy on the third axis
* {{PropertyData|Interval Z}}: specifies the interval between each copy on the Z axis.
* {{PropertyData|Number X}}: The number of copies on the first axis
* {{PropertyData|Number X}}: specifies the number of copies on the X axis.
* {{PropertyData|Number Y}}: The number of copies on the second axis
* {{PropertyData|Number Y}}: specifies the number of copies on the Y axis.
* {{PropertyData|Number Z}}: The number of copies on the third axis
* {{PropertyData|Number Z}}: specifies the number of copies on the Z axis.


For polar arrays:
For polar arrays:
* {{PropertyData|Axis}}: The normal direction of the array circle
* {{PropertyData|Axis}}: specifies the normal direction of the array circle.
* {{PropertyData|Center}}: The center point of the array
* {{PropertyData|Center}}: specifies the center point of the array circle.
* {{PropertyData|Angle}}: The angle to cover with copies
* {{PropertyData|Angle}}: specifies the aperture of the circular arc to cover with copies; use 360 to cover an entire circle.
* {{PropertyData|Number Polar}}: The number of copies
* {{PropertyData|Number Polar}}: specifies the number of copies to place in the circular arrangement.
* {{PropertyData|Interval Axis}}: specifies the interval between each copy on the {{PropertyData|Axis}} direction.

For circular arrays:
* {{PropertyData|Number Circles}}:
* {{PropertyData|Radial distance}}:
* {{PropertyData|Symmetry}}:
* {{PropertyData|Tangential Distance}}:

The number property, either X, Y, Z, or Polar, also includes the original object, so this number will be at least one.

An interval is not a simple distance, but a vector (x, y, z). If more than one value is non-zero, the copy will be created in the main direction, but will also be displaced in the other non-zero directions.

For example, if {{PropertyData|Interval X}} is (2 m, 1 m, 1 m), and {{PropertyData|Number X}} is 3, it will create 3 copies in the X direction; the first copy will be at the original position, the second will be displaced 2 m on X, 1 m on Y, and 1 m on Z; the third copy will be displaced 4 m on X, 2 m on Y, and 2 m on Z. Each array element will be moved slightly to one side (Y direction) and up (Z direction) beside the main X direction.

The {{PropertyData|Interval Axis}} property works in the same way. If the original shape lies on the XY plane, creating a polar array with {{PropertyData|Interval Axis}} (0, 0, z) allows you to make spiral arrangements.


==Scripting==
==Scripting==
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
The Array tool can by used in [[macros]] and from the python console by using one of the following functions.


The Array tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using two different functions, depending on if you wish to obtain standalone copies of your base object, or a parametric array object that stays linked to the original object.
For rectangular array:
<syntaxhighlight>
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
</syntaxhighlight>
For polar array:
<syntaxhighlight>
array (objectslist,center,totalangle,totalnum)
</syntaxhighlight>
* Creates an array of the objects contained in list (that can be an object or a list of objects) with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original.
* This function produces standalone copies of the base object(s)


<div class="mw-translate-fuzzy">
Or
==Volby==
* Pole začíná defaultně jako ortogonální, ve vlastnostech můžete změnit mód na polární.
</div>


{{Code|code=
For rectangular array:
array_list = array(objectslist, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None)
<syntaxhighlight>
}}
makeArray (object,xvector,yvector,xnum,ynum)

</syntaxhighlight>
To create a rectangular array, use it like this:
For polar array:

<syntaxhighlight>
{{Code|code=
makeArray (object,center,totalangle,totalnum)
array_list = array(objectslist, xvector, yvector, xnum, ynum)
</syntaxhighlight>
array_list = array(objectslist, xvector, yvector, zvector, xnum, ynum, znum)
* Creates an array of the given object with, in case of rectangular array, xnum of iterations in the x direction at xvector distance between iterations, and same for y direction with yvector and ynum. In case of polar array, center is a vector, totalangle is the angle to cover (in degrees) and totalnum is the number of objects, including the original.
}}
* The result of this function is a parametric Draft Array object.

<div class="mw-translate-fuzzy">
==Vlastnosti==
* {{PropertyData|Typ pole}}: Specifikuje typ pole ortogonální nebo polární
</div>

{{Code|code=
array_list = array(objectslist, center, totalangle, totalnum)
}}

<div class="mw-translate-fuzzy">
Příklad:
</div>

This function internally uses {{incode|Draft.move()}} and {{incode|Draft.rotate()}} with <code>copy=True</code>.


Example:
Example:
<syntaxhighlight>
import FreeCAD,Draft
Draft.array(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,0,0),FreeCAD.Vector(0,2,0),2,2)


{{Code|code=
</syntaxhighlight>
import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)

array_list = Draft.array(Rect, FreeCAD.Vector(1600, 0, 0), FreeCAD.Vector(0, 600, 0), 3, 4)
}}

<div class="mw-translate-fuzzy">
Pro polární pole:
* {{PropertyData|Osy}}: Kolmý směr kruhového pole
* {{PropertyData|Střed}}: Středový bod pole
* {{PropertyData|Úhel}}: Úhel, který má být kopiemi pokryt
* {{PropertyData|Počet kopií}}: Počet kopií
</div>

The basic signature is as follows:

{{Code|code=
Array = makeArray(baseobject, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, name="Array")
}}

<div class="mw-translate-fuzzy">
Pro obdélníkové pole:
</div>

{{Code|code=
Array = makeArray(baseobject, xvector, yvector, xnum, ynum, name="Array")
Array = makeArray(baseobject, xvector, yvector, zvector, xnum, ynum, znum, name="Array")
}}

<div class="mw-translate-fuzzy">
==Skriptování==
Nástroj Pole může být využit v [[macros/cs|makrech]] a z konzoly Pythonu použitím následujících funkcí, v závislosti na tom jestli chcete získat jednoduché, samostatné kopie základního objektu nebo parametrický objekt pole, který zůstává napojen na původní objekt.
</div>

{{Code|code=
Array = makeArray(baseobject, center, totalangle, totalnum, name="Array")
}}

<div class="mw-translate-fuzzy">
=== Jednoduché pole ===
Pro obdélníkové pole:
</div>

<div class="mw-translate-fuzzy">
Pro kruhové pole:
</div>
{{Code|code=
import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)
xvector = FreeCAD.Vector(1600, 0, 0)
yvector = FreeCAD.Vector(0, 600, 0)
Array = Draft.makeArray(Rect, xvector, yvector, 3, 4)

Tri = Draft.makePolygon(3, 600)
center = FreeCAD.Vector(-1600, 0, 0)
Array2 = Draft.makeArray(Tri, center, 360, 6)
}}

{{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
}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}
<languages/>

Revision as of 22:36, 18 March 2020

This command is deprecated in 0.19. For the new usage, see Draft OrthoArray, which works essentially the same way. Also see Draft PolarArray and Draft CircularArray.

Kreslení Pole

Umístění Menu
Draft → Array
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
PathArray

Popis

Nástroj Pole vytváří ortogonální (3-osy) nebo polární pole z vybraných objektů. Není-li vybrán žádný objekt, budete vyzváni k jeho výběru.

The Draft Array tool creates an orthogonal (3-axes), polar, or circular array from a selected object.

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

To create polar and circular arrays directly, use the corresponding PolarArray and CircularArray tools; to position copies along a path use PathArray; to position copies at specified points use PointArray; to create copies or clones, and manually place them use Move, Rotate, and Clone.

To create App Links instead of simple copies, use LinkArray, Path LinkArray, and the proper option with PolarArray and CircularArray .

Circular array from a solid object

Použití

  1. Vyberte objekt, ze kterého chcete udělat pole
  2. Stiskněte tlačítko Pole.

(pozn.překl.: Pro začátečníky jako jsem já - defaultně jsou intervaly X,Y a Z nastaveny na 1. Když pracujete v mm, tak to vypadá jakoby se pole nevytvořilo, protože se elementy překrývají. Je potřeba alespoň jeden index zvýšit minimálně na rozměr základního prvku.)

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.

Options

There are no options for this tool. Either it works with the selected object or not.

Properties

  • ÚdajeBase: specifies the object to duplicate in the array.
  • ÚdajeArray Type (Enumeration): specifies the type of array to create, "ortho", "polar", or "circular".
  • ÚdajeFuse: if it is true, and the copies intersect with each other, they will be fused together into a single shape.

For orthogonal arrays:

  • ÚdajeInterval X: specifies the interval between each copy on the X axis.
  • ÚdajeInterval Y: specifies the interval between each copy on the Y axis.
  • ÚdajeInterval Z: specifies the interval between each copy on the Z axis.
  • ÚdajeNumber X: specifies the number of copies on the X axis.
  • ÚdajeNumber Y: specifies the number of copies on the Y axis.
  • ÚdajeNumber Z: specifies the number of copies on the Z axis.

For polar arrays:

  • ÚdajeAxis: specifies the normal direction of the array circle.
  • ÚdajeCenter: specifies the center point of the array circle.
  • ÚdajeAngle: specifies the aperture of the circular arc to cover with copies; use 360 to cover an entire circle.
  • ÚdajeNumber Polar: specifies the number of copies to place in the circular arrangement.
  • ÚdajeInterval Axis: specifies the interval between each copy on the ÚdajeAxis direction.

For circular arrays:

  • ÚdajeNumber Circles:
  • ÚdajeRadial distance:
  • ÚdajeSymmetry:
  • ÚdajeTangential Distance:

The number property, either X, Y, Z, or Polar, also includes the original object, so this number will be at least one.

An interval is not a simple distance, but a vector (x, y, z). If more than one value is non-zero, the copy will be created in the main direction, but will also be displaced in the other non-zero directions.

For example, if ÚdajeInterval X is (2 m, 1 m, 1 m), and ÚdajeNumber X is 3, it will create 3 copies in the X direction; the first copy will be at the original position, the second will be displaced 2 m on X, 1 m on Y, and 1 m on Z; the third copy will be displaced 4 m on X, 2 m on Y, and 2 m on Z. Each array element will be moved slightly to one side (Y direction) and up (Z direction) beside the main X direction.

The ÚdajeInterval Axis property works in the same way. If the original shape lies on the XY plane, creating a polar array with ÚdajeInterval Axis (0, 0, z) allows you to make spiral arrangements.

Scripting

See also: Draft API and FreeCAD Scripting Basics.

The Array tool can be used in macros and from the Python console by using two different functions, depending on if you wish to obtain standalone copies of your base object, or a parametric array object that stays linked to the original object.

Volby

  • Pole začíná defaultně jako ortogonální, ve vlastnostech můžete změnit mód na polární.
array_list = array(objectslist, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None)

To create a rectangular array, use it like this:

array_list = array(objectslist, xvector, yvector, xnum, ynum)
array_list = array(objectslist, xvector, yvector, zvector, xnum, ynum, znum)

Vlastnosti

  • ÚdajeTyp pole: Specifikuje typ pole ortogonální nebo polární
array_list = array(objectslist, center, totalangle, totalnum)

Příklad:

This function internally uses Draft.move() and Draft.rotate() with copy=True.

Example:

import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)

array_list = Draft.array(Rect, FreeCAD.Vector(1600, 0, 0), FreeCAD.Vector(0, 600, 0), 3, 4)

Pro polární pole:

  • ÚdajeOsy: Kolmý směr kruhového pole
  • ÚdajeStřed: Středový bod pole
  • ÚdajeÚhel: Úhel, který má být kopiemi pokryt
  • ÚdajePočet kopií: Počet kopií

The basic signature is as follows:

Array = makeArray(baseobject, arg1, arg2, arg3, arg4=None, arg5=None, arg6=None, name="Array")

Pro obdélníkové pole:

Array = makeArray(baseobject, xvector, yvector, xnum, ynum, name="Array")
Array = makeArray(baseobject, xvector, yvector, zvector, xnum, ynum, znum, name="Array")

Skriptování

Nástroj Pole může být využit v makrech a z konzoly Pythonu použitím následujících funkcí, v závislosti na tom jestli chcete získat jednoduché, samostatné kopie základního objektu nebo parametrický objekt pole, který zůstává napojen na původní objekt.

Array = makeArray(baseobject, center, totalangle, totalnum, name="Array")

Jednoduché pole

Pro obdélníkové pole:

Pro kruhové pole:

import FreeCAD, Draft

Rect = Draft.makeRectangle(1500, 500)
xvector = FreeCAD.Vector(1600, 0, 0)
yvector = FreeCAD.Vector(0, 600, 0)
Array = Draft.makeArray(Rect, xvector, yvector, 3, 4)

Tri = Draft.makePolygon(3, 600)
center = FreeCAD.Vector(-1600, 0, 0)
Array2 = Draft.makeArray(Tri, center, 360, 6)