Draft Array/de: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 29: Line 29:
## Für jede neue Kopie des Objekts lässt sich die Feld-Achse neu positionieren ({{PropertyData|Interval Axis}}). Bei Angabe eines z-Wertes (Feldachse sei zur z-Achse parallel) wandern die Kopien in dieser Richtung, sie liegen auf einer Schraubenlinie. Mit von Null verschiedenen y- und/oder z-Werten wird das Ergebnis unübersichtlich.
## Für jede neue Kopie des Objekts lässt sich die Feld-Achse neu positionieren ({{PropertyData|Interval Axis}}). Bei Angabe eines z-Wertes (Feldachse sei zur z-Achse parallel) wandern die Kopien in dieser Richtung, sie liegen auf einer Schraubenlinie. Mit von Null verschiedenen y- und/oder z-Werten wird das Ergebnis unübersichtlich.
# Wähle wahr (true) für Vereinigen ({{PropertyData|Fuse}}), wenn die Objekte des Feldes zu einem einzigen Objekt vereinigt werden sollen.
# Wähle wahr (true) für Vereinigen ({{PropertyData|Fuse}}), wenn die Objekte des Feldes zu einem einzigen Objekt vereinigt werden sollen.

.

.

.

.


==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 ===
For rectangular array:
{{Code|code=
{{Code|code=
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
array (objectslist,xvector,yvector,xnum,ynum,[zvector,znum])
}}
}}
.
For polar array:
{{Code|code=
{{Code|code=
array (objectslist,center,totalangle,totalnum)
array (objectslist,center,totalangle,totalnum)
Line 53: Line 44:
* This function produces standalone copies of the base object(s)
* This function produces standalone copies of the base object(s)


.
=== Parametric array ===


For rectangular array:
For rectangular array:
Line 66: Line 57:
* The result of this function is a parametric Draft Array object.
* The result of this function is a parametric Draft Array object.


For polar array:
Beispiel:
{{Code|code=
{{Code|code=
import FreeCAD,Draft
import FreeCAD,Draft

Revision as of 16:52, 2 February 2017

Draft Array

Menu location
Draft → Array
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
PathArray

Beschreibung

Mit dem Werkzeug Feld (Array) können Felder mit linearer oder kreisförmiger Struktur aus einem gewählten Objekt erzeugt werden. Lineare Felder können 1- bis 3-dimensional sein: lineare Anordnung in eine (Reihe), zwei (Feld) oder drei (Felder übereinander) Richtungen. Die drei Richtungen sind unabhängig vom internen kartesischen Koordinatensystem und unabhängig voneinander wählbar. Ein polares Feld besteht nur aus auf einem Kreis angeordneten Objektkopien.

Anwendung

  1. Wähle das für ein Feld vorgesehene Objekt.
  2. Klicke auf Draft Array.
  3. Wähle den Feld-Typ (DatenArray Type)
  4. Für den Feld-Typ linear (ortho) wähle:
    1. Zahl der Objekte:
      1. in erster Richtung (DatenNumber X)
      2. in zweiter Richtung (DatenNumber Y)
      3. in dritter Richtung (DatenNumber Z)
    2. Abstand zwischen den Objekten:
      1. in erster Richtung (DatenInterval X)
      2. in zweiter Richtung (DatenInterval Y)
      3. in dritter Richtung (DatenInterval Z);
      4. Anmerkung: Die drei Richtungen stimmen mit den Achsrichtungen des internen x-y-z-Koordinatensystems überein, wenn man für die erste nur einen Abstands-Wert für x, für die zweite nur einen für y und für die dritte nur einen für z einsetzt.
  5. Für den Feld-Typ polar (polar) wähle:
    1. Zahl der Objekte (DatenNumber Polar)
    2. Richtung der Feld-Achse (DatenAxis)
    3. Mittelpunkt des Feldes (DatenCenter)
    4. Sektorwinkel des Feldes (DatenAngle)
    5. Für jede neue Kopie des Objekts lässt sich die Feld-Achse neu positionieren (DatenInterval Axis). Bei Angabe eines z-Wertes (Feldachse sei zur z-Achse parallel) wandern die Kopien in dieser Richtung, sie liegen auf einer Schraubenlinie. Mit von Null verschiedenen y- und/oder z-Werten wird das Ergebnis unübersichtlich.
  6. Wähle wahr (true) für Vereinigen (DatenFuse), wenn die Objekte des Feldes zu einem einzigen Objekt vereinigt werden sollen.

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.

.

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

.

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)

.

For rectangular array:

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.

For polar array:

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