Draft Array/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
Line 1: Line 1:
{{GuiCommand|Name=Draft Array|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft → Array|SeeAlso=[[Draft PathArray|PathArray]]}}
{{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]]}}


==Popis==
==Popis==
Line 6: Line 6:
[[Image:Draft_Array_example.jpg|400px]]
[[Image:Draft_Array_example.jpg|400px]]


==Použití==
==How to use==
# Select an object you wish to make an array with
# Vyberte objekt, ze kterého chcete udělat pole
# Stiskněte tlačítko {{KEY|[[Image:Draft Array.png|16px]] [[Draft Array/cs|Pole]]}}.
# Press the {{KEY|[[Image:Draft Array.png|16px]] [[Draft Array]]}} button
# Select {{PropertyData|Array Type}}: Specifies the type of the array, ortho or polar
(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.)
# For orthogonal arrays:
## {{PropertyData|Interval X}}: The interval between each copy on the first axis
## {{PropertyData|Interval Y}}: The interval between each copy on the second axis
## {{PropertyData|Interval Z}}: The interval between each copy on the third axis
## {{PropertyData|Number X}}: The number of copies on the first axis
## {{PropertyData|Number Y}}: The number of copies on the second axis
## {{PropertyData|Number Z}}: The number of copies on the third axis
# For polar arrays:
## {{PropertyData|Axis}}: The normal direction of the array circle
## {{PropertyData|Center}}: The center point of the array
## {{PropertyData|Angle}}: The angle to cover with copies
## {{PropertyData|Number Polar}}: The number of copies


==Scripting==
==Scripting==
The Array tool can by used in [[macros]] and from the python console by using one of the following functions, depending if you wish to obtain simple, standalone copies of your base object, or a parametric array object, that stays linked to the original object.
The Array tool can by used in [[macros]] and from the python console by using one of the following functions, depending if you wish to obtain simple, standalone copies of your base object, or a parametric array object, that stays linked to the original object.


=== Simple array ===
==Volby==
For rectangular array:
* Pole začíná defaultně jako ortogonální, ve vlastnostech můžete změnit mód na polární.
{{Code|code=
{{Code|code=
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
Line 26: Line 38:
* This function produces standalone copies of the base object(s)
* This function produces standalone copies of the base object(s)


=== Parametric array ===
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í


Pro obdélníkové pole:
Pro obdélníkové pole:
Line 43: Line 51:
* The result of this function is a parametric Draft Array object.
* The result of this function is a parametric Draft Array object.


Example:
Pro kruhové pole:
{{Code|code=
{{Code|code=
import FreeCAD,Draft
import FreeCAD,Draft

Revision as of 17:19, 11 February 2017

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.

How to use

  1. Select an object you wish to make an array with
  2. Press the Draft Array button
  3. Select ÚdajeArray Type: Specifies the type of the array, ortho or polar
  4. For orthogonal arrays:
    1. ÚdajeInterval X: The interval between each copy on the first axis
    2. ÚdajeInterval Y: The interval between each copy on the second axis
    3. ÚdajeInterval Z: The interval between each copy on the third axis
    4. ÚdajeNumber X: The number of copies on the first axis
    5. ÚdajeNumber Y: The number of copies on the second axis
    6. ÚdajeNumber Z: The number of copies on the third axis
  5. For polar arrays:
    1. ÚdajeAxis: The normal direction of the array circle
    2. ÚdajeCenter: The center point of the array
    3. ÚdajeAngle: The angle to cover with copies
    4. ÚdajeNumber Polar: The number of copies

Scripting

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

Simple array

For rectangular array:

array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])

For polar array:

array (objectslist,center,totalangle,totalnum)
  • 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)

Parametric array

Pro obdélníkové pole:

makeArray (object,xvector,yvector,xnum,ynum)

For polar array:

makeArray (object,center,totalangle,totalnum)
  • 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.

Example:

import FreeCAD,Draft
Draft.array(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,0,0),FreeCAD.Vector(0,2,0),2,2)