# -*- coding: utf-8 -*-
"""@package Methods.Machine.Slot.check
Check that the Slot is correct
@date Created on Wed Feb 04 12:47:19 2015
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
"""

from pyleecan.Methods import ParentMissingError


def is_outwards(self):
    """Return if the slot is outwards (on an external lamination) or inwards
    (on an internal lamination)

    Parameters
    ----------
    self : Slot
        A Slot object

    Returns
    -------
    is_outwards: bool
        True if the Lamination is not internal and false if not
    """
    if self.parent is not None:
        return self.parent.is_outwards()
    else:
        raise ParentMissingError(
            "Error: The slot is not inside a Lamination or a Notch"
        )

{'avg_line_length': 23.96875, 'max_line_length': 76, 'alphanum_fraction': 0.6466753585397653, 'licenses': ['Apache-2.0'], 'repository_name': 'Superomeg4/Pyleecan', 'path': 'Methods/Slot/Slot/is_outwards.py', 'size': 767, 'lang': 'Python'}