# Containers 2D¶

<align2d> (or <align>)

Corresponding Python class: plask.geometry.Align2D.

Container in which all the items must have explicitly specified position. As the objects in this container may overlap, their order matters: latter items overwrite the former ones.

Attributes: name – Object name for further reference. In the script section, the object is available by GEO table, which is indexed by names of geometry objects. axes – Specification of the axes. Most popular values are xy, yz, rz (letters are names of the horizontal and vertical axis, respectively). role – Object role. Important for some solvers. left – Default value for horizontal alignment specification: position of the left edge of the bounding box of each element. (float [µm]) right – Default value for horizontal alignment specification: position of the right edge of the bounding box of each element. (float [µm]) trancenter – Default value for horizontal alignment specification: position of the center of the bounding box of each element. (float [µm]) {X}center – (where {X} is the transverse axis name): Alias for trancenter. {X} – (where {X} is the transverse axis name): Default value for horizontal alignment specification: position of the origin of each element. (float [µm]) top – Default value for vertical alignment specification: position of the top edge of the bounding box of each element. (float [µm]) bottom – Default value for vertical alignment specification: position of the bottom edge of the bounding box of each element. (float [µm]) vertcenter – Default value for vertical alignment specification: position of the center of the bounding box of each element. (float [µm]) {Y}center – (where {Y} is the vertical axis name): Alias for vertcenter. {Y} – (where {Y} is the vertical axis name): Default value for vertical alignment specification: position of the origin of each element. (float [µm])

Attributes left, right, trancenter, {X}center, {X}, are mutually exclusive. Attributes top, bottom, vertcenter, {Y}center, and {Y} are mutually exclusive. At most one alignment specification for each axis can be given. If alignment specification for some direction is not given, elements will be not alignment in this direction by default.

Contents:

The content of this element can be any number of other two-dimensional geometry object (is such case defaul alignment specifications are used) or <item> elements, which are aligned in the container according to its specification.

object

<item>
Attributes: path – Name of a path that can be later on used to distinguish between multiple occurrences of the same object. left – Horizontal alignment specification: position of the left edge of the bounding box of the element. (float [µm]) right – Horizontal alignment specification: position of the right edge of the bounding box of the element. (float [µm]) trancenter – Horizontal alignment specification: position of the center of the bounding box of the element. (float [µm]) {X}center – where {X} is the transverse axis name: Alias for trancenter. {X} – where {X} is the transverse axis name: Horizontal alignment specification: position of the origin of the element. (float [µm]) top – Vertical alignment specification: position of the top edge of the bounding box of the element. (float [µm]) bottom – Vertical alignment specification: position of the bottom edge of the bounding box of the element. (float [µm]) vertcenter – Vertical alignment specification: position of the center of the bounding box of the element. (float [µm]) {Y}center – where {Y} is the vertical axis name: Alias for vertcenter. {Y} – where {Y} is the vertical axis name: Vertical alignment specification: position of the origin of the element. (float [µm])

Attributes left, right, trancenter, {X}center, {X}, are mutually exclusive. Attributes top, bottom, vertcenter, {Y}center, and {Y} are mutually exclusive. At most one alignment specification for each axis can be given. If alignment specification for some direction is not given, default value is used.

Contents:
A single two-dimensional geometry object.
<container2d> (or <container>)

Alias for <align2d>.

<shelf2d> (or shelf)

Corresponding Python class: plask.geometry.Shelf2D (if repeat=1), plask.geometry.MultiShelf2D (if repeat>1).

Container organizing objects side-by-side to each other, like books on a bookshelf. Items on the shelf are all bottom-aligned. Optionally it is possible to require that all the items have the same height in order to avoid the vertical gaps. However it is possible to insert intentional horizontal gaps to the shelf.

Attributes: name – Object name for further reference. In the script section, the object is available by GEO table, which is indexed by names of geometry objects. axes – Specification of the axes. Most popular values are xy, yz, rz (letters are names of the horizontal and vertical axis, respectively). role – Object role. Important for some solvers. repeat – Number of repetitive occurrences of stack content. This attribute allows to create periodic horizontal structures easily. Defaults to 1. (integer) flat – The value of this attribute can be either true of false. It specifies whether all the items in the shelf are required to have the same height (therefore the top edge of the shelf is flat). Defaults to true. shift – Horizontal position of the shelf left edge in its local coordinates. Defaults to 0. (float [µm])
Contents:

The content of this element can any number of other two-dimensional geometry object which are organized horizontally adjacent to each other, starting from the left.

object

<gap/>

Horizontal gap between two objects. The size of the gap can be specified either as the absolute value in µm or as the total horizontal size of the shelf.

Attributes: size – Size of the gap. (float [µm]) total – Total size of the shelf. The gap will adjust automatically. (float [µm])

Exactly one of the above attributes must be specified and only one gap in the shelf can have the total attribute.

<item>

Tag that allows to specify additional item attributes.

Attributes: path – Name of a path that can be later on used to distinguish between multiple occurrences of the same object. zero – The attribute can be specified only for one item. If present the shelf must not have the shift attribute and there must be no  tag in the stack. For the item with zero attribute, the shelf coordinates are matched to the local coordinates of the item: the origin of the stack will be horizontally alligned with the item’s local horizontal coordinate specified as the attribute value.
<zero/>

This tag can appear as a shelf content only once and only if no item has zero attribute specified and the stack does not have the shift attribute. If present, it indicates the horizontal position of origin of the local coordinate system. Hence, it is an alternative method of specifying shift value.

<stack2d> (or <stack>)

Corresponding Python classes: plask.geometry.SingleStack2D (if repeat=1), plask.geometry.MultiStack2D (if repeat>1).

Stack organizing its elements on top of the other. Horizontal alignment of the stack elements can be controlled by the alignment attributes of the whole stack or its items.

Attributes: name – Object name for further reference. In the script section, the object is available by GEO table, which is indexed by names of geometry objects. axes – Specification of the axes. Most popular values are xy, yz, rz (letters are names of the horizontal and vertical axis, respectively). role – Object role. Important for some solvers. repeat – Number of repetitive occurrences of stack content. This attribute allows to create periodic vertical structures (e. g. DBRs) easily. Defaults to 1. (integer) shift – Vertical position of the stack bottom edge in its local coordinates. Defaults to 0. (float [µm]) left – Default horizontal alignment specification: position of the left edge of the bounding box of each element. (float [µm]) right – Default horizontal alignment specification: position of the right edge of the bounding box of each element. (float [µm]) trancenter – Default horizontal alignment specification: position of the center of the bounding box of each element. (float [µm]) {X}center – where {X} is the transverse axis name: Alias for trancenter. {X} – where {X} is the transverse axis name: Default horizontal alignment specification: position of the origin of the element. (float [µm])

Attributes left, right, trancenter, {X}center and {X} are mutually exclusive. Default alignment is left="0".

Contents:

The content of this element can any number of other two-dimensional geometry object or <item> elements which are organized in the vertical stack, ordered from top to bottom.

object

<item>

Tag that allows to specify additional item attributes.

Attributes: path – Name of a path that can be later on used to distinguish between multiple occurrences of the same object. zero – The attribute can be specified only for one item. If present the stack must not have the shift attribute and there must be no  tag in the stack. For the item with zero attribute, the stack coordinates are matched to the local coordinates of the item: the origin of the stack will be vertically alligned with the item’s local vertical coordinate specified as the attribute value. {alignment} – Any of the stack alignment specification attributes (left, right, trancenter, Xcenter, X) that overrides the stack default for the particular item.
Contents:
A single two-dimensional geometry object.
<zero/>

This tag can appear as a stack content only once and only if no item has zero attribute specified and the stack does not have the shift attribute. If present, it indicates the vertical position of origin of the local coordinate system. Hence, it is an alternative method of specifying shift value.