from __future__ import annotations
from . import EditSimulationCellModifier

# Implementation of the EditSimulationCellModifier.pbc property.
# Mirrors ovito.data.SimulationCell.pbc so that the same tuple notation works on the modifier and on the cell object.
def _get_EditSimulationCellModifier_pbc(self) -> tuple[bool, bool, bool]:
    """ A tuple of three Boolean flags specifying whether the modifier turns periodic boundary conditions on or off
        along the cell's three spatial directions.

        Directions you never assign a value to are inherited from the modifier's input cell at the time the modifier
        is inserted into the pipeline. Note that the third flag has no effect while :py:attr:`is2D` is turned on.

        :Default: the PBC flags of the input simulation cell
    """
    return (self.pbc_x, self.pbc_y, self.pbc_z)

def _set_EditSimulationCellModifier_pbc(self, flags):
    assert(len(flags) == 3) # Expected an array with three Boolean flags.
    self.pbc_x = flags[0]
    self.pbc_y = flags[1]
    self.pbc_z = flags[2]

EditSimulationCellModifier.pbc = property(_get_EditSimulationCellModifier_pbc, _set_EditSimulationCellModifier_pbc)
