#coding: utf8
"""
PLaSK geometry classes.

Classes and functions defined in this module can be used to create and modify
geometry description in PLaSK. See :ref:`sec-geometry-python` for more details.

Example:
    To create a simple stack with two identical rectangles and check its total
    size, use the following commands:

    >>> rectangle = geometry.Block2D(4, 2, 'GaAs')
    >>> stack = geometry.Stack2D()
    >>> stack.prepend(rectangle)
    <plask.geometry.PathHint at 0x40a52f8>
    >>> stack.prepend(rectangle)
    <plask.geometry.PathHint at 0x40a50d8>
    >>> stack.bbox
    plask.geometry.Box2D(0, 0, 4, 4)

    Now, to create a Cartesian two-dimensional geometry over it:

    >>> geometry.Cartesian2D(stack)
    <plask.geometry.Cartesian2D object at (0x571acd0)>

    You may also modify any existing geometry object:

    >>> rectangle.height = 3
    >>> stack.bbox
    plask.geometry.Box2D(0, 0, 4, 6)

See also:
    Section :ref:`sec-geometry` for detailed information of geometry.

    XPL section :xml:tag:`geometry` for reference of the geometry definition
    in the XPL file.
"""


class GeometryObject(object):
    """
    Base class for all geometry objects.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class GeometryObject2D(GeometryObject):
    """
    Base class for 2D geometry objects.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Container2D(GeometryObject2D):
    """
    Base class for all 2D containers.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Align2D(Container2D):
    """
    Align2D()
    
    Container with its items located according to specified alignment.
    
    Container in which every item is located according to its alignment
    specification. Items in this container can overlap with each other so, although
    their order matches, you can cretate any arrangement you wish.
    
    Example:
        To create a trapezoid of the height 2µm and lower and upper bases of 4µm and
        3µm, respectively, you can issue the following commands:
    
        >>> trapezoid = plask.geometry.Align2D()
        >>> trapezoid.append(plask.geometry.Rectangle(4, 2, 'GaAs'), 0, 0)
        >>> trapezoid.append(plask.geometry.Triangle((0, 2), (-1, 2), 'air'),
                             bottom=0, right=4)
    
        The triangle now overlaps a part of the rectangle.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        append(self, item, translation=plask)
        append(self, item, c0, c1)
        
        object append(tuple args, dict kwds)
        
            append(item, **alignments)
            
            Add new object to the container with provided alignment.
            
            Args:
                item (geometry object): Item to add.
                translation (:class:`plask.vec`): Two-dimensional vector specifying
                                                  the position of the item origin.
                c0 (float): Horizontal component of the vector specifying the position
                            of the item origin.
                c1 (float): Vertical component of the vector specifying the position
                            of the item origin.
                alignments (dict): Alignment specifications. The keys in this dictionary
                                   can be ``left``, ``right``, ``top``, ``bottom``,
                                   ``#center``, and `#`` where `#` is an axis name.
                                   The corresponding values are positions of a given
                                   edge/center/origin of the item. Exactly one alignment
                                   for each axis must be given.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        insert(self, index, item, translation=plask)
        insert(self, index, item, c0, c1)
        
        object insert(tuple args, dict kwds)
        
            insert(index, item, **alignments)
            
            Insert new object to the container at specified position with provided alignment.
            
            Args:
                index (int): Item index after insertion.
                item (geometry object): Item to insert.
                translation (:class:`plask.vec`): Two-dimensional vector specifying
                                                  the position of the item origin.
                c0 (float): Horizontal component of the vector specifying the position
                            of the item origin.
                c1 (float): Vertical component of the vector specifying the position
                            of the item origin.
                alignments (dict): Alignment specifications. The keys in this dictionary
                                   can be ``left``, ``right``, ``top``, ``bottom``,
                                   ``#center``, and `#`` where `#` is an axis name.
                                   The corresponding values are positions of a given
                                   edge/center/origin of the item. Exactly one alignment
                                   for each axis must be given.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            move_item(path, **alignments)
            
            Move item existing in the container, setting its position according to the new
            aligners.
            
            Args:
                path (Path): Path returned by :meth:`~plask.geometry.Align2D.append`
                             specifying the object to move.
                alignments (dict): Alignment specifications. The keys in this dictionary
                                   are can be ``left``, ``right``, ``top``, ``bottom``,
                                   ``#center``, and `#`` where `#` is an axis name.
                                   The corresponding values are positions of a given
                                   edge/center/origin of the item. Exactly one alignment
                                   for each axis must be given.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class GeometryObject3D(GeometryObject):
    """
    Base class for 3D geometry objects.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Container3D(GeometryObject3D):
    """
    Base class for all 3D containers.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Align3D(Container3D):
    """
    Align3D()
    
    Container with its items located according to specified alignment.
    
    Container in which every item is located according to its alignment
    specification. Items in this container can overlap with each other so, although
    their order matches, you can cretate any arrangement you wish.
    
    Example:
        To create a hollow cylinder, you can issue the following commands:
    
        >>> hollow = plask.geometry.Align3D()
        >>> hollow.append(plask.geometry.Cylinder(10, 2, 'GaAs'), 0, 0, 0)
        >>> hollow.append(plask.geometry.Cylinder(8, 2, 'air'), 0, 0, 0)
    
        The small cylinder (hole) now overlaps a part of the large one.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        append(self, item, translation=plask)
        append(self, item, c0, c1, c2)
        
        object append(tuple args, dict kwds)
        
            append(item, **alignments)
            
            Add new object to the container with provided alignment.
            
            Args:
                item (geometry object): Item to add.
                translation (:class:`plask.vec`): Three-dimensional vector specifying
                                                  the position of the item origin.
                c0 (float): Longitudinal component of the vector specifying the position
                            of the item origin.
                c1 (float): Transverse component of the vector specifying the position
                            of the item origin.
                c2 (float): Vertical component of the vector specifying the position
                            of the item origin.
                alignments (dict): Alignment specifications. The keys in this dictionary
                                   can be ``left``, ``right``, ``top``, ``bottom``,
                                   ``front``, ``back``, ``#center``, and `#`` where `#`
                                   is an axis name. The corresponding values are positions
                                   of a given edge/center/origin of the item. Exactly one
                                   alignment for each axis must be given.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        insert(self, index, item, translation=plask)
        insert(self, index, item, c0, c1, c2)
        
        object insert(tuple args, dict kwds)
        
            insert(index, item, **alignments)
            
            Insert new object to the container at specified position with provided alignment.
            
            Args:
                index (int): Item index after insertion.
                item (geometry object): Item to insert.
                translation (:class:`plask.vec`): Two-dimensional vector specifying
                                                  the position of the item origin.
                c0 (float): Longitudinal component of the vector specifying the position
                            of the item origin.
                c1 (float): Transverse component of the vector specifying the position
                            of the item origin.
                c2 (float): Vertical component of the vector specifying the position
                            of the item origin.
                alignments (dict): Alignment specifications. The keys in this dictionary
                                   can be ``left``, ``right``, ``top``, ``bottom``,
                                   ``front``, ``back``, ``#center``, and `#`` where `#`
                                   is an axis name. The corresponding values are positions
                                   of a given edge/center/origin of the item. Exactly one
                                   alignment for each axis must be given.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            Move item in container
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



AlignContainer2D = Align2D # class alias


AlignContainer3D = Align3D # class alias


class Transform2D(GeometryObject2D):
    """
    Base class for all 2D geometry transforms.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Arange2D(Transform2D):
    """
    Arange2D(item, step, count)
    Container that repeats its item, shifting each repetition by the specified step.
    
    Args:
        item (GeometryObject2D): Object to repeat.
        step (vec): 2D vector, by which each repetition is shifted from the previous
                    one.
        count (int): Number of item repetitions.
        warning (bool): Boolean value indicating is overlapping warnings
                        are displayed.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    count = None
    """
    Number of item repetitions.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    step = None
    """
    Vector, by which each repetition is shifted from the previous one.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    warning = None
    """
    Boolean value indicating is overlapping warnings are displayed.
    """



class Transform3D(GeometryObject3D):
    """
    Base class for all 3D geometry transforms.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Arange3D(Transform3D):
    """
    Arange3D(item, step, count)
    Container that repeats its item, shifting each repetition by the specified step.
    
    Args:
        item (GeometryObject3D): Object to repeat.
        step (vec): 3D vector, by which each repetition is shifted from the previous
                    one.
        count (int): Number of item repetitions.
        warning (bool): Boolean value indicating is overlapping warnings
                        are displayed.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    count = None
    """
    Number of item repetitions.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    step = None
    """
    Vector, by which each repetition is shifted from the previous one.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    warning = None
    """
    Boolean value indicating is overlapping warnings are displayed.
    """



class GeometryObjectLeaf2D(GeometryObject2D):
    """
    Base class for all 2D leaves
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Rectangle(GeometryObjectLeaf2D):
    """
    Rectangle(width, height, material)
    Rectangle(dims, material)
    
    Rectangular block (2D geometry object).
    
    Sides of the rectangle are always parallel to the axes and its origin is located
    in the lower left corner.
    
    Args:
        width (float): Rectangle width.
        height (float): Rectangle height.
        material (Material): Rectangle material.
        dims (plask.vec): 2D vector representing dimensions of the rectangle.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Dimensions of the rectangle.
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    height = None
    """
    Height of the rectangle.
    """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    width = None
    """
    Width of the rectangle.
    """



Block2D = Rectangle # class alias


class GeometryObjectLeaf3D(GeometryObject3D):
    """
    Base class for all 3D leaves
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Cuboid(GeometryObjectLeaf3D):
    """
    Cuboid(depth, width, height, material)
    Cuboid(dims, material)
    
    Cuboidal block (3D geometry object).
    
    Sides of the cuboid are always parallel to the axes and its origin is located
    in the lower left back corner.
    
    Args:
        depth (float): Cuboid depth.
        width (float): Cuboid width.
        height (float): Cuboid height.
        material (Material): Cuboid material.
        dims (plask.vec): 3D vector representing dimensions of the cuboid.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    depth = None
    """
    Depth of the cuboid.
    """

    dims = None
    """
    Dimensions of the cuboid.
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    height = None
    """
    Height of the cuboid.
    """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    width = None
    """
    Width of the cuboid.
    """



Block3D = Cuboid # class alias


class Box2D(object):
    """
    Box2D()
    Box2D(lower, upper)
    Box2D(left, bottom, right, top)
    
    Rectangular two-dimensional box.
    
    This class holds a rectangular box with its sides along the axes. It provides
    some basic geometric operations and is used mainly to represent 2D geometry
    bounding boxes.
    
    Args:
        lower (plask.vec): Lower left corner of the box.
        upper (plask.ver): Upper right corner of the box.
        left (float): Left edge of the box.
        bottom (float): Bottom edge of the box.
        right (float): Right edge of the box.
        top (float): Top edge of the box.
    """
    bottom = None
    """
    Bottom edge of the box.
    """

    center = None
    """
    Center of the box.
    """

    def contains(self, point):
        """
        contains(self, point)
        
            Check if the point is inside the box.
            
            Args:
                point (plask.vec): Point to test.
        """

    def extension(self, other):
        """
        extension(self, other)
        
            Get the minimal box which include both this and other box.
            
            Args:
                other (plask.geometry.Box2D): Box.
        """

    height = None
    """
    Height of the box.
    """

    def intersection(self, other):
        """
        intersection(self, other)
        
            Get the biggest box which is included in both this and the other box.
            
            Args:
                other (plask.geometry.Box2D): Box to make intersection with.
        """

    def intersects(self, other):
        """
        intersects(self, other)
        
            Check if this and the other box have common points.
            
            Args:
                other (plask.geometry.Box2D): Box to check common points with.
        """

    left = None
    """
    Left edge of the box.
    """

    lower = None
    """
    Lower left corner of the box.
    """

    right = None
    """
    Right edge of the box.
    """

    size = None
    """
    Size of the box.
    """

    top = None
    """
    Top edge of the box.
    """

    def translated(self, trans):
        """
        translated(self, trans)
        
            Get translated copy of this box.
            
            Args:
               trans (plask.vec): Translation vector.
        """

    upper = None
    """
    Upper right corner of the box.
    """

    width = None
    """
    Width of the box.
    """



class Box3D(object):
    """
    Box3D()
    Box3D(lower, upper)
    Box3D(back, left, bottom, front, right, top)
    
    Cuboidal three-dimensional box.
    
    This class holds a cuboidal box with its sides along the axes. It provides
    some basic geometric operations and is used mainly to represent 3D geometry
    bounding boxes.
    
    Args:
        lower (plask.vec): Back lower left corner of the box.
        upper (plask.ver): Front upper right corner of the box.
        back (float): Back edge of the box.
        left (float): Left edge of the box.
        bottom (float): Bottom edge of the box.
        front (float): Front edge of the box.
        right (float): Right edge of the box.
        top (float): Top edge of the box.
    """
    back = None
    """
    Back edge of the box.
    """

    bottom = None
    """
    Bottom edge of the box.
    """

    center = None
    """
    Center of the box.
    """

    def contains(self, point):
        """
        contains(self, point)
        
            Check if the point is inside the box.
            
            Args:
                point (plask.vec): Point to test.
        """

    depth = None
    """
    Depth of the box.
    """

    def extension(self, other):
        """
        extension(self, other)
        
            Get the minimal box which include both this and other box.
            
            Args:
                other (plask.geometry.Box3D): Box.
        """

    front = None
    """
    Front edge of the box.
    """

    height = None
    """
    Height of the box.
    """

    def intersection(self, other):
        """
        intersection(self, other)
        
            Get the biggest box which is included in both this and the other box.
            
            Args:
                other (plask.geometry.Box3D): Box to make intersection with.
        """

    def intersects(self, arg2):
        """
        intersects(self, arg2)
        
            Check if this and the other box have common points.Args:
                other (plask.geometry.Box3D): Box to check common points with.
        """

    left = None
    """
    Left edge of the box.
    """

    lower = None
    """
    Closer lower left corner of the box.
    """

    right = None
    """
    Right edge of the box.
    """

    size = None
    """
    Size of the box.
    """

    top = None
    """
    Top edge of the box.
    """

    def translated(self, trans):
        """
        translated(self, trans)
        
            Get translated copy of this box.
            
            Args:
               trans (plask.vec): Translation vector.
        """

    upper = None
    """
    Farther upper right corner of the box.
    """

    width = None
    """
    Width of the box.
    """



class Geometry(GeometryObject):
    """
    Base class for all geometries
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axes = None
    """
    Names of axes for this geometry.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material_field(*args, **kwargs):
        """
            Distribution of materials for a given geometry on a mesh.
        
            This class creates a ‘field’ of :py:class:`material.Material` objects and
            provides getters to easily obtain its properties as :py:class:`Data` object.
        
            Args:
                geometry: Geometry for which the materials a retrieved
                mesh: Mesh at which the parameters are retrieved
        
            Example:
                >>> material_field = this_geometry.get_material_field(your_mesh)
                >>> plot_field(material_field.thermk(300.), comp=0)
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Cartesian2D(Geometry):
    """
    Geometry in 2D Cartesian space.
    
    Cartesian2D(root, length=infty, **edges)
    
    Create a space around a two-dimensional geometry object with a given length.
    
    Args:
        root (GeometryObject2D Extrusion): Root object of the geometry.
            If this parameters is an extrusion, the `length` should be skipped,
            as it is read directly from extrusion.
        length (float): Length of the geometry.
            This information is required by some solvers. Furthermore it is
            necessary if you want to use :mod:`plask.filters` to translate the
            data between this geometry and the :class:`Cartesian3D` geometry.
    
        edges (dict): Optional edges specification.
            Edges are given as additional constructor keyword arguments. Available
            keys are *left*, *right*, *top*, and *bottom* and their values must be
            strings specifying the edge (either a material name or *mirror*,
            *periodic*, or *extend*).
    
    Example:
        >>> block = geometry.Block2D(4, 2, 'GaAs')
        >>> geometry.Cartesian2D(block, length=10, left='mirror', bottom='AlAs')
        <plask.geometry.Cartesian2D object at (0x3dd6c70)>
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axes = None
    """
    Names of axes for this geometry.
    """

    back_material = None
    """
    Material at the negative side of the axis along the extrusion.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object.
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    default_material = None
    """
    Material of the *empty* regions of the geometry.
    
    This material is returned by :meth:`~plask.geometry.Cartesian2D.get_material`
    for the points that do not belong to any object in the geometry tree.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    edges = None
    """
    Dictionary specifying the geometry edges.
    """

    extrusion = None
    """
    :class:`~plask.geometry.Extrusion` object at the very root of the tree.
    """

    front_material = None
    """
    Material at the positive side of the axis along the extrusion.
    """

    def get_grid(self):
        """
        get_grid(self)
        
            Get rectangular grid for space.
            
            Return rectangular mesh that has lines along the edges of all the geometry
            objects. In some objects are non-rectangular or non-uniform, they are divided
            according to their settings.
        """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian2D.get_leafs`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian2D.get_leafs`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian2D.get_leafs`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian2D.get_leafs`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns :attr:`~plask.geometry.Cartesian2D.default_material`.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                Material at the specified point.
        """

    def get_material_field(*args, **kwargs):
        """
            Distribution of materials for a given geometry on a mesh.
        
            This class creates a ‘field’ of :py:class:`material.Material` objects and
            provides getters to easily obtain its properties as :py:class:`Data` object.
        
            Args:
                geometry: Geometry for which the materials a retrieved
                mesh: Mesh at which the parameters are retrieved
        
            Example:
                >>> material_field = this_geometry.get_material_field(your_mesh)
                >>> plot_field(material_field.thermk(300.), comp=0)
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cartesian2D.get_object_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cartesian2D.get_object_bboxes`,
            :meth:`~plask.geometry.Cartesian2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            .. rubric:: Warning!
            
            This method will return the very object with the role specified and not its items,
            which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    :class:`~plask.geometry.GeometryObject2D` at the root of the geometry tree.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Cartesian3D(Geometry):
    """
    Geometry in 3D space.
    
    Cartesian3D(geometry, **edges)
        Create a space around a two-dimensional geometry object.
    
    Args:
        root (GeometryObject3D): Root object of the geometry.
        edges (dict): Optional edges specification.
            Edges are given as additional constructor keyword arguments. Available
            keys are *back*, *front*, *left*, *right*, *top*, and *bottom* and their
            values must be strings specifying the edge (either a material name or
            *mirror*, *periodic*, or *extend*).
    
    Example:
        >>> block = geometry.Block3D(4, 2, 1, 'GaAs')
        >>> geometry.Cartesian3D(block, left='mirror', bottom='GaAs',
        ...                      front='periodic', back='periodic')
        <plask.geometry.Cartesian3D object at (0x3dd6c70)>
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axes = None
    """
    Names of axes for this geometry.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object.
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    default_material = None
    """
    Material of the *empty* regions of the geometry.
    
    This material is returned by :meth:`~plask.geometry.Cartesian3D.get_material`
    for the points that do not belong to any object in the geometry tree.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    edges = None
    """
    Dictionary specifying the geometry edges.
    """

    def get_grid(self):
        """
        get_grid(self)
        
            Get rectangular grid for space.
            
            Return rectangular mesh that has lines along the edges of all the geometry
            objects. In some objects are non-rectangular or non-uniform, they are divided
            according to their settings.
        """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian3D.get_leafs`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian3D.get_leafs`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian3D.get_leafs`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cartesian3D.get_leafs`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_positions`,
            :meth:`~plask.geometry.Cartesian3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns :attr:`~plask.geometry.Cartesian3D.default_material`.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal coordinate of the tested point.
                c1 (float): Transverse coordinate of the tested point.
                c2 (float): Vertical coordinate of the tested point.
            Returns:
                Material at the specified point.
        """

    def get_material_field(*args, **kwargs):
        """
            Distribution of materials for a given geometry on a mesh.
        
            This class creates a ‘field’ of :py:class:`material.Material` objects and
            provides getters to easily obtain its properties as :py:class:`Data` object.
        
            Args:
                geometry: Geometry for which the materials a retrieved
                mesh: Mesh at which the parameters are retrieved
        
            Example:
                >>> material_field = this_geometry.get_material_field(your_mesh)
                >>> plot_field(material_field.thermk(300.), comp=0)
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cartesian3D.get_object_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cartesian3D.get_object_bboxes`,
            :meth:`~plask.geometry.Cartesian3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal coordinate of the tested point.
                c1 (float): Transverse coordinate of the tested point.
                c2 (float): Vertical coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            .. rubric:: Warning!
            
            This method will return the very object with the role specified and not its items,
            which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal coordinate of the tested point.
                c1 (float): Transverse coordinate of the tested point.
                c2 (float): Vertical coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal coordinate of the tested point.
                c1 (float): Transverse coordinate of the tested point.
                c2 (float): Vertical coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the point has the role *role*.
                      If a mesh is tested, the return value is an array of bools.
        """

    item = None
    """
    :class:`~plask.geometry.GeometryObject3D` at the root of the geometry tree.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal coordinate of the tested point.
                c1 (float): Transverse coordinate of the tested point.
                c2 (float): Vertical coordinate of the tested point.
            Returns:
                bool: True if the specified geometry object contains the given point.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Circle(GeometryObjectLeaf2D):
    """
    Circle(radius, material)
    
    Circle (2D geometry object).
    
    Args:
        radius (float): Circle radius.
        material (Material): Circle material.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    radius = None
    """
    Radius of the circle.
    """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Clip2D(Transform2D):
    """
    Clip2D(item, box)
    Clip2D(item, left, bottom, right, top)
    
    Transform that clips the held geometry object to the specified clip-box
    (2D version).
    
    This transform is used to limit the size of any complicated geometry object to
    the specified rectangular box. This way, you can easily change e.g. a circle
    to a half- or quarter-circle. In order to use this transform, you must
    explicitly specify the coordinates of the clip-box in the local coordinates of
    the clipped object. However, the original object is never expanded, co you can
    freely make the box very large, or even infinite (which means no clipping at
    this side).
    
    Args:
        item (GeometryObject2D): Object to clip.
        left (float): Left side of the clipping box. *inf* by default.
        bottom (float): Bottom side of the clipping box. *inf* by default.
        right (float): Right side of the clipping box. *inf* by default.
        top (float): Top side of the clipping box. *inf* by default.
        box (Box2D): Clipping box.
    
    Example:
        To make a half-circle with the flat bottom:
    
        >>> circle = plask.geometry.Circle(2, 'GaAs')
        >>> half_circle = plask.geometry.Clip2D(circle, bottom=0)
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    clipbox = None
    """
    Clipping box.
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Clip3D(Transform3D):
    """
    Clip3D(item, box)
    Clip3D(item, back, left, bottom, front, right, top)
    
    Transform that clips the held geometry object to the specified clip-box
    (3D version).
    
    This transform is used to limit the size of any complicated geometry object to
    the specified rectangular box. This way, you can easily change e.g. a cylinder
    to a half- or quarter-cilinder. In order to use this transform, you must
    explicitly specify the coordinates of the clip-box in the local coordinates of
    the clipped object. However, the original object is never expanded, co you can
    freely make the box very large, or even infinite (which means no clipping at
    this side).
    
    Args:
        item (GeometryObject3D): Object to clip.
        back (float): Back side of the clipping box. *inf* by default.
        left (float): Left side of the clipping box. *inf* by default.
        bottom (float): Bottom side of the clipping box. *inf* by default.
        front (float): Front side of the clipping box. *inf* by default.
        right (float): Right side of the clipping box. *inf* by default.
        top (float): Top side of the clipping box. *inf* by default.
        box (Box3D): Clipping box.
    
    Example:
        To make a half-cylinder with the flat front side:
    
        >>> cylinder = plask.geometry.Cylinder(2, 1, 'GaAs')
        >>> half_cylinder = plask.geometry.Clip3D(cylinder, front=0)
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    clipbox = None
    """
    Clipping box.
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Cylinder(GeometryObjectLeaf3D):
    """
    Cylinder(radius, height, material)
    
    Vertical cylinder (3D geometry object).
    
    The cylinder base always lies in the horizontal (longitudinal-transverse)
    plane and it height spans in the vertical
    direction.
    
    Args:
        radius (float): Cylinder radius.
        height (float): Cylinder height.
        material (Material): Cylinder material.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    height = None
    """
    Height of the cylinder.
    """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    radius = None
    """
    Radius of the cylinder.
    """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Cylindrical2D(Geometry):
    """
    Geometry in 2D cylindrical space.
    
    Cylindrical2D(root, **edges)
    Create a cylindrical space around a two-dimensional geometry object.
    
    Args:
        root (GeometryObject2D or Revolution): Root object of the geometry.
        edges (dict): Optional edges specification.
            Edges are given as additional constructor keyword arguments. Available
            keys are *inner*, *outer*, *top*, and *bottom* and their values must be
            strings specifying the edge (either a material name or *mirror*,
            *periodic*, or *extend*).
    
    Example:
        >>> block = geometry.Block2D(4, 2, 'GaAs')
        >>> geometry.Cylindrical2D(block, bottom='AlAs', outer='extend')
        <plask.geometry.Cylindrical2D object at (0x3dd6c70)>
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axes = None
    """
    Names of axes for this geometry.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object.
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    default_material = None
    """
    This material is returned by :meth:`~plask.geometry.Cylindrical2D.get_material`
    for the points that do not belong to any object in the geometry tree.
    any object in the geometry tree.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    edges = None
    """
    Dictionary specifying the geometry edges.
    """

    def get_grid(self):
        """
        get_grid(self)
        
            Get rectangular grid for space.
            
            Return rectangular mesh that has lines along the edges of all the geometry
            objects. In some objects are non-rectangular or non-uniform, they are divided
            according to their settings.
        """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cylindrical2D.get_leafs`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cylindrical2D.get_leafs`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cylindrical2D.get_leafs`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.Cylindrical2D.get_leafs`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_positions`,
            :meth:`~plask.geometry.Cylindrical2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns :attr:`~plask.geometry.Cylindrical2D.default_material`.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                Material at the specified point.
        """

    def get_material_field(*args, **kwargs):
        """
            Distribution of materials for a given geometry on a mesh.
        
            This class creates a ‘field’ of :py:class:`material.Material` objects and
            provides getters to easily obtain its properties as :py:class:`Data` object.
        
            Args:
                geometry: Geometry for which the materials a retrieved
                mesh: Mesh at which the parameters are retrieved
        
            Example:
                >>> material_field = this_geometry.get_material_field(your_mesh)
                >>> plot_field(material_field.thermk(300.), comp=0)
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cylindrical2D.get_object_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.Cylindrical2D.get_object_bboxes`,
            :meth:`~plask.geometry.Cylindrical2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            .. rubric:: Warning!
            
            This method will return the very object with the role specified and not its items,
            which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    :class:`~plask.geometry.GeometryObject2D` at the root of the geometry tree.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal coordinate of the tested point.
                c1 (float): Vertical coordinate of the tested point.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    revolution = None
    """
    :class:`~plask.geometry.Revolution` object at the very root of the tree.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class GeometryObjectTransform2Dto3D(GeometryObject3D):
    """
    Base class for all transformations which change 2D space to 3D.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed 2D object.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Extrusion(GeometryObjectTransform2Dto3D):
    """
    Extrusion(item, length=infinity)
    
    Extrusion in the longitudinal direction of the 2D object into a 3D one.
    
    Objects of this type can be supplied to 2D Cartesian solvers or they can be used
    as a part of the 3D geometry tree.
    
    Args:
        item (2D geometry object): Two-dimensional geometry object to extrude.
        length (float): Extrusion length in the longitudinal direction.
    
    Example:
        Instead of using :class:`~plask.geometry.Cuboid` object, you can extrude
        a rectangle in the following way:
    
        >>> rect = plask.geometry.Rectangle(2, 3, 'GaAs')
        >>> cuboid = plask.geometry.Extrusion(rect, 1)
    
        The created cuboid will have dimensions 1µm, 2µm, and 3µm along logitudinal,
        transverse, and vertical axes, respectively.
    
        **Note:** In the real-life situations, you can extrude any complicated 2D
        object (e.g. a stack of a shelf).
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed 2D object.
    """

    length = None
    """
    Length of the extrusion in the longitudinal direction.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Flip2D(Transform2D):
    """
    Transfer that flips the geometry object along a specified axis
    (2D version).
    
    Args:
       axis (float or str): Flip axis number or name.
       item (GeometryObject): Geometry object to flip.
    
    The effect of this transform is a mirror reflection of a specified geometry
    object. Its local coordinate system is negated along the specified axis.
    
    The difference between the flip and a mirror is that the flip replaces the
    original object with its flipped version.
    
    See also:
       :class:`plask.geometry.Mirror`
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axis = None
    """
    Flip axis.
    """

    axis_nr = None
    """
    Number of the flip axis.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Flip3D(Transform3D):
    """
    Transfer that flips the geometry object along a specified axis
    (3D version).
    
    Args:
       axis (float or str): Flip axis number or name.
       item (GeometryObject): Geometry object to flip.
    
    The effect of this transform is a mirror reflection of a specified geometry
    object. Its local coordinate system is negated along the specified axis.
    
    The difference between the flip and a mirror is that the flip replaces the
    original object with its flipped version.
    
    See also:
       :class:`plask.geometry.Mirror`
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axis = None
    """
    Flip axis.
    """

    axis_nr = None
    """
    Number of the flip axis.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Intersection2D(Transform2D):
    """
    Intersection2D(item, shape)
    
    Transform that clips the held geometry object to the specified envelope
    (2D version).
    
    This transform is a more advanced version of :class:`~plask.geometry.Clip2D`.
    Instead of a simple box, you can specify any geometry object as a clipping
    envelope. The material of the evelope is ignored.
    
    Args:
        item (GeometryObject2D): Object to clip.
        shape (GeometryObject2D): Object to serve as a clipping envelope.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    envelope = None
    """
    Clipping envelope.
    
    This is a geometry object that serves as a clipping envelope. The main item
    of this transform is clipped to the shape of the envelope.
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Intersection3D(Transform3D):
    """
    Intersection3D(item, shape)
    
    Transform that clips the held geometry object to the specified envelope
    (3D version).
    
    This transform is a more advanced version of :class:`~plask.geometry.Clip3D`.
    Instead of a simple box, you can specify any geometry object as a clipping
    envelope. The material of the evelope is ignored.
    
    Args:
        item (GeometryObject3D): Object to clip.
        shape (GeometryObject3D): Object to serve as a clipping envelope.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    envelope = None
    """
    Clipping envelope.
    
    This is a geometry object that serves as a clipping envelope. The main item
    of this transform is clipped to the shape of the envelope.
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Lattice(Transform3D):
    """
    Lattice container that arranges its children in two-dimensional lattice.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    segments = None
    """
    List of polygons limiting lattice segments.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    vec0 = None
    """
    First lattice vector.
    """

    vec1 = None
    """
    Second lattice vector.
    """



class Mirror2D(Transform2D):
    """
    Transfer that mirrors the geometry object along the specified  axis
    (2D version).
    
    Args:
       axis (float or str): Flip axis number or name.
       item (GeometryObject): Geometry object to flip.
    
    The effect of this transform is an original object with an added mirror
    reflection. The mirroring is done with respect to the axis, so the whole
    object should be bouned within one half-plane of its local coordinate
    system.
    
    The difference between the mirror and a flip is that the flip replaces the
    original object with its flipped version.
    
    See also:
       :class:`plask.geometry.Flip`
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axis = None
    """
    Mirror axis.
    """

    axis_nr = None
    """
    Number of the mirror axis.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Mirror3D(Transform3D):
    """
    Transfer that mirrors the geometry object along the specified  axis
    (3D version).
    
    Args:
       axis (float or str): Flip axis number or name.
       item (GeometryObject): Geometry object to flip.
    
    The effect of this transform is an original object with an added mirror
    reflection. The mirroring is done with respect to the axis, so the whole
    object should be bouned within one half-plane of its local coordinate
    system.
    
    The difference between the mirror and a flip is that the flip replaces the
    original object with its flipped version.
    
    See also:
       :class:`plask.geometry.Flip`
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    axis = None
    """
    Mirror axis.
    """

    axis_nr = None
    """
    Number of the mirror axis.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Shelf2D(Container2D):
    """
    Shelf2D(shift=0)
    
    2D container that organizes its items one next to another.
    
    The objects are placed in this container like books on a bookshelf.
    The left side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed to the right of
    the previous one. All the items are vertically aligned according to its bottom
    edge.
    
    Args:
        shift (float): Position in the local coordinates of the left side of the
                       shelf.
    
    See also:
       Function :func:`plask.geometry.Shelf`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(self, item):
        """
        append(self, item)
        
            Append a new object to the shelf.
            
            This method adds a new item to the shelf and places it at its right.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
        """

    def append_gap(self, size):
        """
        append_gap(self, size)
        
            Add a gap to the end of the shelf.
            
            This method adds a gap to the end of the shelf. All consecutive items will be
            separated by the specified width from the previous ones.
            
            Args:
                size (float): Size of the gap [µm].
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    flat = None
    """
    True if all items has the same height (the shelf top edge is flat).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(self, item, pos):
        """
        insert(self, item, pos)
        
            Insert a new object to the shelf.
            
            This method adds a new item to the shelf and places it at the position
            specified by `index`.
            
            Args:
                item (GeometryObject2D): Object to insert to the shelf.
                index (int): Index of the inserted item in the stack.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(self, item):
        """
        prepend(self, item)
        
            Prepend a new object to the shelf.
            
            This method adds a new item to the shelf and places it at its left.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_before(self, index):
        """
        set_zero_before(self, index)
        
            Set zero to the left of the item with the given index.
            
            This method shifts the local coordinates of the shelf horizontally.
            The horizontal coordinate of the shelf origin is placed at the left edge
            of the item with the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class MultiShelf2D(Shelf2D):
    """
    MultiShelf2D(repeat=1, shift=0)
    
    Shelf container that repeats its contents.
    
    The objects are placed in this container like books on a bookshelf.
    The left side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed to the right
    of the previous one. Then the whole shelf is repeated *repeat* times. All theitems
     are vertically aligned according to its bottom edge.
    
    Args:
        repeat (int): Number of the shelf contents repetitions.
        shift (float): Position in the local coordinates of the left side of the
                       shelf.
    
    See also:
       Function :func:`plask.geometry.Shelf`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(self, item):
        """
        append(self, item)
        
            Append a new object to the shelf.
            
            This method adds a new item to the shelf and places it at its right.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
        """

    def append_gap(self, size):
        """
        append_gap(self, size)
        
            Add a gap to the end of the shelf.
            
            This method adds a gap to the end of the shelf. All consecutive items will be
            separated by the specified width from the previous ones.
            
            Args:
                size (float): Size of the gap [µm].
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    flat = None
    """
    True if all items has the same height (the shelf top edge is flat).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(self, item, pos):
        """
        insert(self, item, pos)
        
            Insert a new object to the shelf.
            
            This method adds a new item to the shelf and places it at the position
            specified by `index`.
            
            Args:
                item (GeometryObject2D): Object to insert to the shelf.
                index (int): Index of the inserted item in the stack.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(self, item):
        """
        prepend(self, item)
        
            Prepend a new object to the shelf.
            
            This method adds a new item to the shelf and places it at its left.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
        """

    repeat = None
    """
    Number of repeats of the shelf contents.
    """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_before(self, index):
        """
        set_zero_before(self, index)
        
            Set zero to the left of the item with the given index.
            
            This method shifts the local coordinates of the shelf horizontally.
            The horizontal coordinate of the shelf origin is placed at the left edge
            of the item with the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class SingleStack2D(Container2D):
    """
    SingleStack2D(shift=0, **alignment)
    
    Container that organizes its items in a vertical stack (2D version).
    
    The bottom side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed on the top of
    the previous one.
    
    Args:
        shift (float): Position in the local coordinates of the bottom of the stack.
        alignment (dict): Horizontal alignment specifications. This dictionary can
                          contain only one item. Its key can be ``left``, ``right``,
                          ``#center``, and ``#`` where `#` is the horizontal axis
                          name. The corresponding value is the position of the given
                          edge/center/origin of the item. This alignment can be
                          overriden while adding the objects to the stack.
                          By default the alignment is ``{'left': 0}``.
    See also:
        Function :func:`plask.geometry.Stack2D`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        object append(tuple args, dict kwds) :
            append(item, **alignment)
            
            Append a new object to the stack.
            
            This method adds a new item to the stack and places it at its top.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    default_aligner = None
    """
    Default alignment for new stack items.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        object insert(tuple args, dict kwds) :
            insert(index, item, **alignment)
            
            Insert a new object to the stack.
            
            This method adds a new item to the stack and places it at the position
            specified by `index`.
            
            Args:
                index (int): Index of the inserted item in the stack.
                item (GeometryObject2D): Object to insert to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            move_item(path, **alignment)
            
            Move horizontally item existing in the stack, setting its position according
            to the new aligner.
            
            Args:
                path (Path): Path returned by :meth:`~plask.geometry.Align2D.append`
                             specifying the object to move.
                alignment (dict): Alignment specifications. The only key in this dictionary
                                  are can be ``left``, ``right``, ``#center``, and `#``
                                  where `#` is an axis name. The corresponding values is
                                  the positions of a given edge/center/origin of the item.
                                  Exactly one alignment for horizontal axis must be given.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(*args, **kwargs):
        """
        object prepend(tuple args, dict kwds) :
            prepend(item, **alignment)
            
            Prepend a new object to the stack.
            
            This method adds a new item to the stack and places it at its bottom.
            
            Args:
                item (GeometryObject2D): Object to prepend to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_below(self, index):
        """
        set_zero_below(self, index)
        
            Set zero below the item with the given index.
            
            This method shifts the local coordinates of the stack vertically. The vertical
            coordinate of the stack origin is placed at the bootom edge of the item with
            the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class MultiStack2D(SingleStack2D):
    """
    MultiStack2D(repeat=1, shift=0, **alignment)
    
    Stack container that repeats it contents (2D version).
    
    The bottom side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed on the top of
    the previous one. Then the whole stack is repeated *repeat* times.
    
    Args:
        repeat (int): Number of the stack contents repetitions.
        shift (float): Position in the local coordinates of the bottom of the stack.
        alignment (dict): Horizontal alignment specifications. This dictionary can
                          contain only one item. Its key can be ``left``, ``right``,
                          ``#center``, and ``#`` where `#` is the horizontal axis
                          name. The corresponding value is the position of the given
                          edge/center/origin of the item. This alignment can be
                          overriden while adding the objects to the stack.
                          By default the alignment is ``{'left': 0}``.
    See also:
       Function :func:`plask.geometry.Stack2D`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        object append(tuple args, dict kwds) :
            append(item, **alignment)
            
            Append a new object to the stack.
            
            This method adds a new item to the stack and places it at its top.
            
            Args:
                item (GeometryObject2D): Object to append to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    default_aligner = None
    """
    Default alignment for new stack items.
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        object insert(tuple args, dict kwds) :
            insert(index, item, **alignment)
            
            Insert a new object to the stack.
            
            This method adds a new item to the stack and places it at the position
            specified by `index`.
            
            Args:
                index (int): Index of the inserted item in the stack.
                item (GeometryObject2D): Object to insert to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            move_item(path, **alignment)
            
            Move horizontally item existing in the stack, setting its position according
            to the new aligner.
            
            Args:
                path (Path): Path returned by :meth:`~plask.geometry.Align2D.append`
                             specifying the object to move.
                alignment (dict): Alignment specifications. The only key in this dictionary
                                  are can be ``left``, ``right``, ``#center``, and `#``
                                  where `#` is an axis name. The corresponding values is
                                  the positions of a given edge/center/origin of the item.
                                  Exactly one alignment for horizontal axis must be given.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(*args, **kwargs):
        """
        object prepend(tuple args, dict kwds) :
            prepend(item, **alignment)
            
            Prepend a new object to the stack.
            
            This method adds a new item to the stack and places it at its bottom.
            
            Args:
                item (GeometryObject2D): Object to prepend to the stack.
                alignment (dict): Horizontal alignment specifications. This dictionary can
                                  contain only one item. Its key can be ``left``, ``right``,
                                  ``#center``, and ``#`` where `#` is the horizontal axis
                                  name. By default the object is aligned according to the
                                  specification in the stack constructor.
        """

    repeat = None
    """
    Number of repeats of the stack contents.
    """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_below(self, index):
        """
        set_zero_below(self, index)
        
            Set zero below the item with the given index.
            
            This method shifts the local coordinates of the stack vertically. The vertical
            coordinate of the stack origin is placed at the bootom edge of the item with
            the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class SingleStack3D(Container3D):
    """
    SingleStack3D(shift=0, **alignments)
    
    Container that organizes its items in a vertical stack (3D version).
    
    The bottom side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed on the top of
    the previous one.
    
    Args:
        shift (float): Position in the local coordinates of the bottom of the stack.
        alignments (dict): Horizontal alignments specifications. Keys in this dict
                           can be ``left``, ``right``, ``back``, ``front``,
                           ``#center``, and ``#`` where `#` are the horizontal axis
                           names. The corresponding value is the position of the
                           given edge/center/origin of the item. This alignment can
                           be overriden while adding the objects to the stack.
                           By default the alignment is ``{'left': 0, 'back': 0}``.
    See also:
        Function :func:`plask.geometry.Stack3D`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        object append(tuple args, dict kwds) :
            append(item, **alignments)
            
            Append a new object to the stack.
            
            This method adds a new item to the stack and places it at its top.
            
            Args:
                item (GeometryObject3D): Object to append to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    default_aligner = None
    """
    Default alignment for new stack items
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        object insert(tuple args, dict kwds) :
            insert(index, item, **alignments)
            
            Insert a new object to the stack.
            
            This method adds a new item to the stack and places it at the position
            specified by `index`.
            
            Args:
                index (int): Index of the inserted item in the stack.
                item (GeometryObject3D): Object to insert to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            move_item(path, **alignments)
            
            Move horizontally item existing in the stack, setting its position according
            to the new aligner.
            
            Args:
                path (Path): Path returned by :meth:`~plask.geometry.Align2D.append`
                             specifying the object to move.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. Exactly one
                                   alignment for each horizontal axis must be given.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(*args, **kwargs):
        """
        object prepend(tuple args, dict kwds) :
            prepend(item, **alignments)
            
            Prepend a new object to the stack.
            
            This method adds a new item to the stack and places it at its bottom.
            
            Args:
                item (GeometryObject3D): Object to prepend to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_below(self, index):
        """
        set_zero_below(self, index)
        
            Set zero below the item with the given index.
            
            This method shifts the local coordinates of the stack vertically. The vertical
            coordinate of the stack origin is placed at the bootom edge of the item with
            the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class MultiStack3D(SingleStack3D):
    """
    MultiStack3D(repeat=1, shift=0, **alignments)
    
    Stack container that repeats it contents (3D version).
    
    The bottom side of the first object is located at the `shift` position in
    container local coordinates. Each consecutive object is placed on the top of
    the previous one. Then the whole stack is repeated *repeat* times.
    
    Args:
        repeat (int): Number of the stack contents repetitions.
        shift (float): Position in the local coordinates of the bottom of the stack.
        alignments (dict): Horizontal alignments specifications. Keys in this dict
                           can be ``left``, ``right``, ``back``, ``front``,
                           ``#center``, and ``#`` where `#` are the horizontal axis
                           names. The corresponding value is the position of the
                           given edge/center/origin of the item. This alignment can
                           be overriden while adding the objects to the stack.
                           By default the alignment is ``{'left': 0, 'back': 0}``.
    See also:
       Function :func:`plask.geometry.Stack3D`.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    def append(*args, **kwargs):
        """
        object append(tuple args, dict kwds) :
            append(item, **alignments)
            
            Append a new object to the stack.
            
            This method adds a new item to the stack and places it at its top.
            
            Args:
                item (GeometryObject3D): Object to append to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    default_aligner = None
    """
    Default alignment for new stack items
    """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    def insert(*args, **kwargs):
        """
        object insert(tuple args, dict kwds) :
            insert(index, item, **alignments)
            
            Insert a new object to the stack.
            
            This method adds a new item to the stack and places it at the position
            specified by `index`.
            
            Args:
                index (int): Index of the inserted item in the stack.
                item (GeometryObject3D): Object to insert to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    def move_item(*args, **kwargs):
        """
        object move_item(tuple args, dict kwds) :
            move_item(path, **alignments)
            
            Move horizontally item existing in the stack, setting its position according
            to the new aligner.
            
            Args:
                path (Path): Path returned by :meth:`~plask.geometry.Align2D.append`
                             specifying the object to move.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. Exactly one
                                   alignment for each horizontal axis must be given.
        """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    def prepend(*args, **kwargs):
        """
        object prepend(tuple args, dict kwds) :
            prepend(item, **alignments)
            
            Prepend a new object to the stack.
            
            This method adds a new item to the stack and places it at its bottom.
            
            Args:
                item (GeometryObject3D): Object to prepend to the stack.
                alignments (dict): Horizontal alignments specifications. Keys in this dict
                                   can be ``left``, ``right``, ``back``, ``front``,
                                   ``#center``, and ``#`` where `#` are the horizontal axis
                                   names. The corresponding value is the position of the
                                   given edge/center/origin of the item. By default the
                                   object is aligned according to the specification in the
                                   stack constructor.
        """

    repeat = None
    """
    Number of repeats of the stack contents.
    """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    def set_zero_below(self, index):
        """
        set_zero_below(self, index)
        
            Set zero below the item with the given index.
            
            This method shifts the local coordinates of the stack vertically. The vertical
            coordinate of the stack origin is placed at the bootom edge of the item with
            the specified index.
            
            Args:
                index (int): Index of the item to align the zero with.
        """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Path(object):
    """
    Sequence of objects in the geometry tree, used for resolving ambiguities.
    
    Path is used to specify unique instance of every object in the geometry,
    even if this object is inserted to the geometry tree in more than one place.
    """
    def append(*args, **kwargs):
        """
        append(self, object, hints=None)
        append(self, hint, hints=None)
        append(self, subtree, hints=None)
        append(self, path, hints=None)
        
            Append an object/hint/subtree/path list to this path.
            
            Args:
            object (GeometryObject): Geometry object to append to the path. It must be
                                     an item of a container already present in it.
            hint (PathHint): Hint returned by a addition of an object to the container
                             already present in the path.
            subtree (Subtree): Subtree to add to the path. It must somehow be connected
                               with it.path (Path): Another path to join with the exising one. There must be some
                         connection between the two paths.hints (PathHint, optional): Optional hints used for resolving ambiguities.
        """



class PathHint(object):
    """
    PathHint stores weak references to container and its child with translation.
    
    It may only be used as an intermediate object to either add it to Path,
    PathHints, or to retrieve the container, child, or translation objects.
    """


class PathHints(object):
    """
    Hint used for resolving ambiguities in a geometry tree.
    
    PathHints is used to resolve ambiguities if any object is present in thegeometry
     tree more than once. It contains a set of PathHint objects holding
    weak references to containers and their items.
    """
    def add(self, hint):
        """
        add(self, hint)
        
            Append hint to the path.
            
            Args:
                hint (PathHint): Hint to add.
        """

    def cleanup(self):
        """
        cleanup(self)
        
            Remove all hints which refer to deleted objects.
        """



class Prism(GeometryObjectLeaf3D):
    """
    Prism(a0, a1, b0, b1, height, material)
    Prism(a, b, height, material)
    Prism (3D geometry object).
    
    Three triangle vertices are located at points (0, 0, 0), (*a*, 0), and (*b*, 0).
    
    Args:
        plask.vec a: Local coordinates of the first triangle vertex.
        plask.vec b: Local coordinates of the second triangle vertex.
        a0 (float): Longitudinal component of the local coordinates of the first
                    triangle vertex.
        a1 (float): Transverse component of the local coordinates of the first
                    triangle vertex.
        b0 (float): Longitudinal component of the local coordinates of the second
                    triangle vertex.
        b1 (float): Transverse component of the local coordinates of the second
                    triangle vertex.
        height (float): Prism height
        material (Material): Prism material.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    a = None
    """
    Horizontal coordinates of the first base vertex.
    """

    a0 = None
    """
    Horizontal coordinate of the first base vertex.
    
    Instead of 0 you can use longitudinal axis name.
    """

    a1 = None
    """
    Vertical coordinate of the first base vertex.
    
    Instead of 1 you can use transverse axis name.
    """

    b = None
    """
    Horizontal coordinates of the second base vertex.
    """

    b0 = None
    """
    Horizontal coordinate of the second base vertex.
    
    Instead of 0 you can use longitudinal axis name.
    """

    b1 = None
    """
    Vertical coordinate of the second base vertex.
    
    Instead of 1 you can use transverse axis name.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    height = None
    """
    Prism height.
    """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class Revolution(GeometryObjectTransform2Dto3D):
    """
    Revolution(item)
    
    Revolution around the vertical axis of the 2D object into a 3D one.
    
    Objects of this type can be supplied to 2D cylindrical solvers or they can be
    used as a part of the 3D geometry tree.
    
    Args:
        item (2D geometry object): Two-dimensional geometry object to revolve.
        auto_clip (bool): If True, item will be implicitly clipped to non-negative tran. coordinates. False by default.
    
    Example:
        Instead of using :class:`~plask.geometry.Cylinder` object, you can revolve
        a rectangle in the following way:
    
        >>> rect = plask.geometry.Rectangle(1, 2, 'GaAs')
        >>> cylinder = plask.geometry.Revolution(rect)
    
        The created cylinder will have base radius of 1µm and the height 2µm.
    
        **Note:** In the real-life situations, you can revolve any complicated 2D
        object (e.g. a stack of a shelf).
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed 2D object.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """


def Shelf(*args, **kwargs):
    """
        Create a 2D shelf container that organizes its items one next to another
        (like books on a bookshelf).
    
        The left side of the first object is located at the `shift` position in
        container local coordinates. Each consecutive object is placed to the right of
        the previous one. All the items are vertically aligned according to its bottom
        edge.
    
        Args:
            repeat (int): Number of the shelf contents repetitions. If None, this
                          function creates Shelf2D and MultiShelf2D otherwise.
            shift (float): Position in the local coordinates of the left side of the
                           shelf.Classes
    
        See also:
            :class:`plask.geometry.Shelf2D`, :class:`plask.geometry.MultiShelf2D`.
    """


class Sphere(GeometryObjectLeaf3D):
    """
    Sphere(radius, material)
    
    Sphere (3D geometry object).
    
    Args:
        radius (float): Sphere radius.
        material (Material): Sphere material.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    radius = None
    """
    Radius of the circle.
    """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """


def Stack2D(*args, **kwargs):
    """
        Create a 2D container that organizes its items in a vertical stack.
    
        The bottom side of the first object is located at the `shift` position in
        container local coordinates. Each consecutive object is placed on the top of
        the previous one.
    
        Args:
            repeat (int): Number of the stack contents repetitions. If None, this
                          function creates SingleStack2D and MultiStack2D otherwise.
            shift (float): Position in the local coordinates of the bottom of the stack.
            alignment (dict): Horizontal alignment specifications. This dictionary can
                              contain only one item. Its key can be ``left``, ``right``,
                              ``#center``, and ``#`` where `#` is the horizontal axis
                              name. The corresponding value is the position of the given
                              edge/center/origin of the item. This alignment can be
                              overriden while adding the objects to the stack.
                              By default the alignment is ``{'left': 0}``.
    
        See also:
            :class:`plask.geometry.SingleStack2D`, :class:`plask.geometry.MultiStack2D`.
    """

def Stack3D(*args, **kwargs):
    """
        Create a 3D container that organizes its items in a vertical stack.
    
        The bottom side of the first object is located at the `shift` position in
        container local coordinates. Each consecutive object is placed on the top of
        the previous one. Then the whole stack is repeated *repeat* times.
    
        Args:
            repeat (int): Number of the stack contents repetitions. If None, this
                          function creates SingleStack3D and MultiStack3D otherwise.
            shift (float): Position in the local coordinates of the bottom of the stack.
            alignments (dict): Horizontal alignments specifications. Keys in this dict
                               can be ``left``, ``right``, ``back``, ``front``,
                               ``#center``, and ``#`` where `#` are the horizontal axis
                               names. The corresponding value is the position of the
                               given edge/center/origin of the item. This alignment can
                               be overriden while adding the objects to the stack.
                               By default the alignment is ``{'left': 0, 'back': 0}``.
    
        See also:
            :class:`plask.geometry.SingleStack3D`, :class:`plask.geometry.MultiStack3D`.
    """


class Subtree(object):
    """
    A selected part of a geometry tree.
    """
    brached = None
    """
    Bool indicating whether the subtree has more than one branch.
    """

    last_path = None
    """
    Last (topmost) branch of the subtree.
    """



class Translation2D(Transform2D):
    """
    Transform that holds a translated geometry object together with its translation
    vector (2D version).
    
    Args:
    item (GeomeryObject): Item to translate.
    vec (plask.vec): Translation vector.
    cx (float): Component of the translation vector along the *x* axis.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    vec = None
    """
    Translation vector.
    """



class Translation3D(Transform3D):
    """
    Transform that holds a translated geometry object together with its translation
    vector (3D version).
    
    Args:
    item (GeomeryObject): Item to translate.
    vec (plask.vec): Translation vector.
    cx (float): Component of the translation vector along the *x* axis.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box3D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1, c2)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject3D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject3D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1, c2)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject3D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject3D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, c2, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1, c2)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1, c2)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    item = None
    """
    Transformed item.
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1, c2)
        object_contains(self, object, c0, c1, c2)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Longitudinal local coordinate of the tested point.
                c1 (float): Transverse local coordinate of the tested point.
                c2 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """

    vec = None
    """
    Translation vector.
    """



class Triangle(GeometryObjectLeaf2D):
    """
    Triangle(a0, a1, b0, b1, material)
    Triangle(a, b, material)
    Triangle (2D geometry object).
    
    Three triangle vertices are located at points (0, 0), *a*, and *b*.
    
    Args:
        plask.vec a: Local coordinates of the first triangle vertex.
        plask.vec b: Local coordinates of the second triangle vertex.
        a0 (double): Horizontal component of the local coordinates of the first
                     triangle vertex.
        a1 (double): Vertical component of the local coordinates of the first
                     triangle vertex.
        b0 (double): Horizontal component of the local coordinates of the second
                     triangle vertex.
        b1 (double): Vertical component of the local coordinates of the second
                     triangle vertex.
        material (Material): Triangle material.
    """
    class _Iterator(object):
        """
        Items iterator.
        """

    class _Steps(object):
        dist = None
        """
        Minimum step size.
        """

        num = None
        """
        Maximum number of the mesh steps in each direction the object is divided into.
        """


    a = None
    """
    Coordinates of the first vertex.
    """

    a0 = None
    """
    Horizontal coordinate of the first vertex.
    
    Instead of 0 you can use transverse axis name.
    """

    a1 = None
    """
    Vertical coordinate of the first vertex.
    
    Instead of 1 you can use vertical axis name.
    """

    b = None
    """
    Coordinates of the second vertex.
    """

    b0 = None
    """
    Horizontal coordinate of the second vertex.
    
    Instead of 0 you can use transverse axis name.
    """

    b1 = None
    """
    Vertical coordinate of the second vertex.
    
    Instead of 1 you can use vertical axis name.
    """

    bbox = None
    """
    Minimal rectangle which contains all points of the geometry object
    (in local coordinates).
    
    See also:
        :class:`plask.geometry.Box2D`
    """

    def contains(*args, **kwargs):
        """
        contains(self, point)
        contains(self, c0, c1)
        
            Test if the geometry object contains a point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the geometry object contains the given point.
        """

    dims = None
    """
    Number of object's dimensions (int, 2 or 3).
    """

    def get_leafs(self, path=None):
        """
        get_leafs(self, path=None)
        
            Get list of the geometry tree leafs.
            
            This method returns all the geometry tree leafs located under this geometry
            object. By *leaf* we understand a proper geometry object, in contrast to any
            container or transformation.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_bboxes(self, path=None):
        """
        get_leafs_bboxes(self, path=None)
        
            Calculate bounding boxes of all the geometry tree leafs.
            
            This method computes the bounding boxes of all the geometry tree leafs located
            under this geometry object. By *leaf* we understand a proper geometry object,
            in contrast to any container or transformation.
            
            The bounding boxes are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_positions(self, path=None):
        """
        get_leafs_positions(self, path=None)
        
            Calculate positions of all the geometry tree leafs.
            
            This method computes position of all the geometry tree leafs located under this
            geometry object. By *leaf* we understand a proper geometry object, in contrast
            to any container or transformation.
            
            The position are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of vectors containing the position of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_leafs_translations(self, path=None):
        """
        get_leafs_translations(self, path=None)
        
            Get list of :class:`Translation` objects holding all the geometry tree leafs.
            
            This method computes the :class:`Translation` objects of all the geometry tree
            leafs located under this geometry object. By *leaf* we understand a proper
            geometry object, in contrast to any container or transformation.
            
            The translations are computed in the local coordinates of this object.
            
            Args:
                path: Path that can be used to select only some leafs.
            Returns:
                sequence: List of translations of the leafs.
            
            All these methods are guaranteed to return their sequences in the same order:
            :meth:`~plask.geometry.GeometryObject2D.get_leafs`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_positions`,
            :meth:`~plask.geometry.GeometryObject2D.get_leafs_translations`.
        """

    def get_matching_objects(self, cond):
        """
        get_matching_objects(self, cond)
        
            Get list of the geometry tree objects matching condition.
            
            This method returns all the objects in the geometry tree that match the specified
            condition.
            
            Args:
                cond: Python callable that accepts a geometry object and returns Boolean
                      indicating whether the object should be returned by this method or not.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_material(*args, **kwargs):
        """
        get_material(self, point)
        get_material(self, c0, c1)
        
            Get material at the given point.
            
            This method returns a material object with the material at the given point if
            this point is located within the geometry object *self*. Otherwise the method
            returns None.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                Material at the specified point or None.
        """

    def get_object_bboxes(self, object, path=None):
        """
        get_object_bboxes(self, object, path=None)
        
            Calculate bounding boxes of all instances of specified object.
            
            The bounding boxes are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of bounding boxes of the instances of the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_object_positions(self, object, path=None):
        """
        get_object_positions(self, object, path=None)
        
            Calculate positions of all instances of the specified object.
            
            The position are computed in the local coordinates of *self*.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
            Returns:
                sequence: List of vectors containing the position of the instances of
                the object.
            
            All these methods are guaranteed to return their sequences in the same order,
            provided they are called with the same arguments:
            :meth:`~plask.geometry.GeometryObject2D.get_object_bboxes`,
            :meth:`~plask.geometry.GeometryObject2D.get_object_positions`
        """

    def get_paths(*args, **kwargs):
        """
        get_paths(self, point, all=False)
        get_paths(self, c0, c1, all=False)
        
            Get subtree containing paths to all leafs covering the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                all (bool): If *True* then all the leafs intersecting the point are
                          considered. Otherwise, only the path to the topmost (i.e. visible)
                          object is returned.
            Returns:
                Subtree with the path to the specified point.
            
            See also:
                :class:`plask.geometry.Subtree`
        """

    def get_role_objects(self, role):
        """
        get_role_objects(self, role)
        
            Get list of the geometry tree objects that have the specified role.
            
            This method returns all the objects in the geometry tree that have the specified
            role.
            
            Warning:
            
                This method will return the very object with the role specified and not its
                items, which is against the normal behavior of the roles.
            
            Args:
                role (str): Role to search objects with.
            Returns:
                sequence: List of objects matching your condition.
        """

    def get_roles(*args, **kwargs):
        """
        get_roles(self, point)
        get_roles(self, c0, c1)
        
            Get roles of objects at specified point.
            
            This method returns a set of all the roles given to the every object
            intersecting the specified point.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                set: Set of the roles at given point.
        """

    def has_role(*args, **kwargs):
        """
        has_role(self, role, point)
        has_role(self, role, c0, c1)
        
            Test if the specified point has a given role.
            
            This method checks if any object intersecting the specified point has the role
            *role*.
            
            Args:
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
            Returns:
                bool: True if the point has the role *role*.
        """

    material = None
    """
    material of the geometry object (or None if there is no single material for the object)
    """

    def object_contains(*args, **kwargs):
        """
        object_contains(self, object, path, point)
        object_contains(self, object, point)
        object_contains(self, object, path, c0, c1)
        object_contains(self, object, c0, c1)
        object_contains(self, object, path, mesh)
        object_contains(self, object, mesh)
        
            Test if the specified geometry object contains a point.
            
            The given geometry object must be located somewhere within the *self*
            geometry tree.
            
            Args:
                object: Object to test.
                path: Path specifying a particular object instance.
                point (plask.vector): Vector with local coordinates of the tested point.
                c0 (float): Horizontal local coordinate of the tested point.
                c1 (float): Vertical local coordinate of the tested point.
                mesh (plask.mesh.Mesh): Mech, which points are tested.
            Returns:
                bool: True if the specified geometry object contains the given point.
                      If a mesh is tested, the return value is an array of bools.
        """

    representative_material = None

    role = None
    """
    Role of the object. Valid only if the object has only one role.
    """

    roles = None
    """
    List of all the roles of the object.
    """

    steps = None
    """
    Step info for mesh generation for non-uniform objects.
    
    This parameter is considered only for the non-uniform leafs in the geometry
    tree. It has two attributes that can be changed:
    
    .. autosummary::
       ~plask.geometry.GeometryObject._Steps.num
       ~plask.geometry.GeometryObject._Steps.dist
    
    The exact meaning of these attributes depend on the mesh generator, however in
    general they indicate how densely should the non-uniform object be subdivided.
    
    It is possible to assign simply an integer number to this parameter, in which
    case it changes its ``num`` attribute.
    """

    def validate(self):
        """
        validate(self)
        
            Check if the object is complete and ready for calculations.
            
            This method is specific for a particular object. It raises an exception if
            the object definition is somehow incomplete.
        """



class _EdgesProxy(object):
    def items(self):
        """
        items(self)
        """

    def keys(self):
        """
        keys(self)
        """



class map_indexing_suite__EdgesProxy_entry(object):
    def data(self):
        """
        data(self)
        """

    def key(self):
        """
        key(self)
        """


