# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.2.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

"""
GccEnt module, see official documentation at
https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gccent.html
"""

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _GccEnt
else:
    import _GccEnt

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _GccEnt.delete_SwigPyIterator

    def value(self):
        return _GccEnt.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _GccEnt.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _GccEnt.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _GccEnt.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _GccEnt.SwigPyIterator_equal(self, x)

    def copy(self):
        return _GccEnt.SwigPyIterator_copy(self)

    def next(self):
        return _GccEnt.SwigPyIterator_next(self)

    def __next__(self):
        return _GccEnt.SwigPyIterator___next__(self)

    def previous(self):
        return _GccEnt.SwigPyIterator_previous(self)

    def advance(self, n):
        return _GccEnt.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _GccEnt.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _GccEnt.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _GccEnt.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _GccEnt.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _GccEnt.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _GccEnt.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _GccEnt:
_GccEnt.SwigPyIterator_swigregister(SwigPyIterator)

def _dumps_object(klass):
    """ Overwrite default string output for any wrapped object.
    By default, __repr__ method returns something like:
    <OCC.Core.TopoDS.TopoDS_Shape; proxy of <Swig Object of type 'TopoDS_Shape *' at 0x02BB0758> >
    This is too much verbose.
    We prefer :
    <class 'gp_Pnt'>
    or
    <class 'TopoDS_Shape'>
    """
    klass_name = str(klass.__class__).split(".")[3].split("'")[0]
    repr_string = "<class '" + klass_name + "'"
# for TopoDS_Shape, we also look for the base type
    if klass_name == "TopoDS_Shape":
        if klass.IsNull():
            repr_string += ": Null>"
            return repr_string
        st = klass.ShapeType()
        types = {OCC.Core.TopAbs.TopAbs_VERTEX: "Vertex",
                 OCC.Core.TopAbs.TopAbs_SOLID: "Solid",
                 OCC.Core.TopAbs.TopAbs_EDGE: "Edge",
                 OCC.Core.TopAbs.TopAbs_FACE: "Face",
                 OCC.Core.TopAbs.TopAbs_SHELL: "Shell",
                 OCC.Core.TopAbs.TopAbs_WIRE: "Wire",
                 OCC.Core.TopAbs.TopAbs_COMPOUND: "Compound",
                 OCC.Core.TopAbs.TopAbs_COMPSOLID: "Compsolid"}
        repr_string += "; Type:%s" % types[st]        
    elif hasattr(klass, "IsNull"):
        if klass.IsNull():
            repr_string += "; Null"
    repr_string += ">"
    return repr_string


def process_exception(error, method_name, class_name):
    return _GccEnt.process_exception(error, method_name, class_name)

from six import with_metaclass
import warnings
from OCC.Wrapper.wrapper_utils import Proxy, deprecated

import OCC.Core.Standard
import OCC.Core.NCollection
import OCC.Core.gp
import OCC.Core.TColStd
import OCC.Core.TCollection

from enum import IntEnum
from OCC.Core.Exception import *

GccEnt_unqualified = _GccEnt.GccEnt_unqualified
GccEnt_enclosing = _GccEnt.GccEnt_enclosing
GccEnt_enclosed = _GccEnt.GccEnt_enclosed
GccEnt_outside = _GccEnt.GccEnt_outside
GccEnt_noqualifier = _GccEnt.GccEnt_noqualifier


class GccEnt_Position(IntEnum):
	GccEnt_unqualified = 0
	GccEnt_enclosing = 1
	GccEnt_enclosed = 2
	GccEnt_outside = 3
	GccEnt_noqualifier = 4
GccEnt_unqualified = GccEnt_Position.GccEnt_unqualified
GccEnt_enclosing = GccEnt_Position.GccEnt_enclosing
GccEnt_enclosed = GccEnt_Position.GccEnt_enclosed
GccEnt_outside = GccEnt_Position.GccEnt_outside
GccEnt_noqualifier = GccEnt_Position.GccEnt_noqualifier

class GccEnt_Array1OfPosition(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def begin(self):
        return _GccEnt.GccEnt_Array1OfPosition_begin(self)

    def end(self):
        return _GccEnt.GccEnt_Array1OfPosition_end(self)

    def cbegin(self):
        return _GccEnt.GccEnt_Array1OfPosition_cbegin(self)

    def cend(self):
        return _GccEnt.GccEnt_Array1OfPosition_cend(self)

    def __init__(self, *args):
        _GccEnt.GccEnt_Array1OfPosition_swiginit(self, _GccEnt.new_GccEnt_Array1OfPosition(*args))

    def Init(self, theValue):
        return _GccEnt.GccEnt_Array1OfPosition_Init(self, theValue)

    def Size(self):
        return _GccEnt.GccEnt_Array1OfPosition_Size(self)

    def Length(self):
        return _GccEnt.GccEnt_Array1OfPosition_Length(self)

    def IsEmpty(self):
        return _GccEnt.GccEnt_Array1OfPosition_IsEmpty(self)

    def Lower(self):
        return _GccEnt.GccEnt_Array1OfPosition_Lower(self)

    def Upper(self):
        return _GccEnt.GccEnt_Array1OfPosition_Upper(self)

    def IsDeletable(self):
        return _GccEnt.GccEnt_Array1OfPosition_IsDeletable(self)

    def IsAllocated(self):
        return _GccEnt.GccEnt_Array1OfPosition_IsAllocated(self)

    def Assign(self, theOther):
        return _GccEnt.GccEnt_Array1OfPosition_Assign(self, theOther)

    def Move(self, theOther):
        return _GccEnt.GccEnt_Array1OfPosition_Move(self, theOther)

    def Set(self, *args):
        return _GccEnt.GccEnt_Array1OfPosition_Set(self, *args)

    def First(self):
        return _GccEnt.GccEnt_Array1OfPosition_First(self)

    def ChangeFirst(self):
        return _GccEnt.GccEnt_Array1OfPosition_ChangeFirst(self)

    def Last(self):
        return _GccEnt.GccEnt_Array1OfPosition_Last(self)

    def ChangeLast(self):
        return _GccEnt.GccEnt_Array1OfPosition_ChangeLast(self)

    def Value(self, theIndex):
        return _GccEnt.GccEnt_Array1OfPosition_Value(self, theIndex)

    def ChangeValue(self, theIndex):
        return _GccEnt.GccEnt_Array1OfPosition_ChangeValue(self, theIndex)

    def __call__(self, *args):
        return _GccEnt.GccEnt_Array1OfPosition___call__(self, *args)

    def SetValue(self, theIndex, theItem):
        return _GccEnt.GccEnt_Array1OfPosition_SetValue(self, theIndex, theItem)

    def Resize(self, theLower, theUpper, theToCopyData):
        return _GccEnt.GccEnt_Array1OfPosition_Resize(self, theLower, theUpper, theToCopyData)
    __swig_destroy__ = _GccEnt.delete_GccEnt_Array1OfPosition

    def __getitem__(self, index):
        if index + self.Lower() > self.Upper():
            raise IndexError("index out of range")
        else:
            return self.Value(index + self.Lower())

    def __setitem__(self, index, value):
        if index + self.Lower() > self.Upper():
            raise IndexError("index out of range")
        else:
            self.SetValue(index + self.Lower(), value)

    def __len__(self):
        return self.Length()

    def __iter__(self):
        self.low = self.Lower()
        self.up = self.Upper()
        self.current = self.Lower() - 1
        return self

    def next(self):
        if self.current >= self.Upper():
            raise StopIteration
        else:
            self.current += 1
        return self.Value(self.current)

    __next__ = next


# Register GccEnt_Array1OfPosition in _GccEnt:
_GccEnt.GccEnt_Array1OfPosition_swigregister(GccEnt_Array1OfPosition)
class gccent(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def Enclosed(*args):
        r"""

        Parameters
        ----------
        Obj: gp_Lin2d

        Return
        -------
        GccEnt_QualifiedLin

        Description
        -----------
        Constructs a qualified line, so that the solution computed by a construction algorithm using the qualified circle or line is enclosed by the circle or line.

        Parameters
        ----------
        Obj: gp_Circ2d

        Return
        -------
        GccEnt_QualifiedCirc

        Description
        -----------
        Constructs a qualified circle so that the solution computed by a construction algorithm using the qualified circle or line is enclosed by the circle or line.

        """
        return _GccEnt.gccent_Enclosed(*args)

    @staticmethod
    def Enclosing(*args):
        r"""

        Parameters
        ----------
        Obj: gp_Circ2d

        Return
        -------
        GccEnt_QualifiedCirc

        Description
        -----------
        Constructs such a qualified circle that the solution computed by a construction algorithm using the qualified circle encloses the circle.

        """
        return _GccEnt.gccent_Enclosing(*args)

    @staticmethod
    def Outside(*args):
        r"""

        Parameters
        ----------
        Obj: gp_Lin2d

        Return
        -------
        GccEnt_QualifiedLin

        Description
        -----------
        Constructs a qualified line, so that the solution computed by a construction algorithm using the qualified circle or line and the circle or line are external to one another.

        Parameters
        ----------
        Obj: gp_Circ2d

        Return
        -------
        GccEnt_QualifiedCirc

        Description
        -----------
        Constructs a qualified circle so that the solution computed by a construction algorithm using the qualified circle or line and the circle or line are external to one another.

        """
        return _GccEnt.gccent_Outside(*args)

    @staticmethod
    def PositionFromString(*args):
        r"""

        Parameters
        ----------
        thePositionString: str

        Return
        -------
        GccEnt_Position

        Description
        -----------
        Returns the position from the given string identifier (using case-insensitive comparison). @param thepositionstring string identifier return position or gccent_unqualified if string identifier is invalid.

        Parameters
        ----------
        thePositionString: str

        Return
        -------
        thePosition: GccEnt_Position

        Description
        -----------
        Determines the position from the given string identifier (using case-insensitive comparison). @param thepositionstring string identifier @param theposition detected shape type return true if string identifier is known.

        """
        return _GccEnt.gccent_PositionFromString(*args)

    @staticmethod
    def PositionToString(*args):
        r"""

        Parameters
        ----------
        thePosition: GccEnt_Position

        Return
        -------
        str

        Description
        -----------
        Returns the string name for a given position. @param theposition position type return string identifier from the list unqualified enclosing enclosed outside noqualifier.

        """
        return _GccEnt.gccent_PositionToString(*args)

    @staticmethod
    def Unqualified(*args):
        r"""

        Parameters
        ----------
        Obj: gp_Lin2d

        Return
        -------
        GccEnt_QualifiedLin

        Description
        -----------
        Constructs a qualified line, so that the relative position to the circle or line of the solution computed by a construction algorithm using the qualified circle or line is not qualified, i.e. all solutions apply.

        Parameters
        ----------
        Obj: gp_Circ2d

        Return
        -------
        GccEnt_QualifiedCirc

        Description
        -----------
        Constructs a qualified circle so that the relative position to the circle or line of the solution computed by a construction algorithm using the qualified circle or line is not qualified, i.e. all solutions apply.

        """
        return _GccEnt.gccent_Unqualified(*args)

    __repr__ = _dumps_object


    def __init__(self):
        _GccEnt.gccent_swiginit(self, _GccEnt.new_gccent())
    __swig_destroy__ = _GccEnt.delete_gccent

# Register gccent in _GccEnt:
_GccEnt.gccent_swigregister(gccent)
class GccEnt_QualifiedCirc(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""

        Parameters
        ----------
        Qualified: gp_Circ2d
        Qualifier: GccEnt_Position

        Return
        -------
        None

        Description
        -----------
        Constructs a qualified circle by assigning the qualifier qualifier to the circle qualified. qualifier may be: - gccent_enclosing if the solution computed by a construction algorithm using the qualified circle encloses the circle, or - gccent_enclosed if the solution is enclosed by the circle, or - gccent_outside if both the solution and the circle are external to one another, or - gccent_unqualified if all solutions apply.

        """
        _GccEnt.GccEnt_QualifiedCirc_swiginit(self, _GccEnt.new_GccEnt_QualifiedCirc(*args))

    def IsEnclosed(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the solution computed by a construction algorithm using this qualified circle is enclosed by the circle.

        """
        return _GccEnt.GccEnt_QualifiedCirc_IsEnclosed(self, *args)

    def IsEnclosing(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the solution computed by a construction algorithm using this qualified circle encloses the circle.

        """
        return _GccEnt.GccEnt_QualifiedCirc_IsEnclosing(self, *args)

    def IsOutside(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if both the solution computed by a construction algorithm using this qualified circle and the circle are external to one another.

        """
        return _GccEnt.GccEnt_QualifiedCirc_IsOutside(self, *args)

    def IsUnqualified(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the circ2d is unqualified and false in the other cases.

        """
        return _GccEnt.GccEnt_QualifiedCirc_IsUnqualified(self, *args)

    def Qualified(self, *args):
        r"""
        Return
        -------
        gp_Circ2d

        Description
        -----------
        Returns a 2d circle to which the qualifier is assigned.

        """
        return _GccEnt.GccEnt_QualifiedCirc_Qualified(self, *args)

    def Qualifier(self, *args):
        r"""
        Return
        -------
        GccEnt_Position

        Description
        -----------
        Returns - the qualifier of this qualified circle, if it is enclosing, enclosed or outside, or - gccent_noqualifier if it is unqualified.

        """
        return _GccEnt.GccEnt_QualifiedCirc_Qualifier(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _GccEnt.delete_GccEnt_QualifiedCirc

# Register GccEnt_QualifiedCirc in _GccEnt:
_GccEnt.GccEnt_QualifiedCirc_swigregister(GccEnt_QualifiedCirc)
class GccEnt_QualifiedLin(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""

        Parameters
        ----------
        Qualified: gp_Lin2d
        Qualifier: GccEnt_Position

        Return
        -------
        None

        Description
        -----------
        Constructs a qualified line by assigning the qualifier qualifier to the line qualified. qualifier may be: - gccent_enclosed if the solution is enclosed by the line, or - gccent_outside if both the solution and the line are external to one another, or - gccent_unqualified if all solutions apply. note: the interior of a line is defined as the left-hand side of the line in relation to its orientation.

        """
        _GccEnt.GccEnt_QualifiedLin_swiginit(self, _GccEnt.new_GccEnt_QualifiedLin(*args))

    def IsEnclosed(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the solution is enclosed in the lin2d and false in the other cases.

        """
        return _GccEnt.GccEnt_QualifiedLin_IsEnclosed(self, *args)

    def IsOutside(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the solution is outside the lin2d and false in the other cases.

        """
        return _GccEnt.GccEnt_QualifiedLin_IsOutside(self, *args)

    def IsUnqualified(self, *args):
        r"""
        Return
        -------
        bool

        Description
        -----------
        Returns true if the solution is unqualified and false in the other cases.

        """
        return _GccEnt.GccEnt_QualifiedLin_IsUnqualified(self, *args)

    def Qualified(self, *args):
        r"""
        Return
        -------
        gp_Lin2d

        Description
        -----------
        Returns a 2d line to which the qualifier is assigned.

        """
        return _GccEnt.GccEnt_QualifiedLin_Qualified(self, *args)

    def Qualifier(self, *args):
        r"""
        Return
        -------
        GccEnt_Position

        Description
        -----------
        Returns the qualifier of this qualified line, if it is 'enclosed' or 'outside', or - gccent_noqualifier if it is unqualified.

        """
        return _GccEnt.GccEnt_QualifiedLin_Qualifier(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _GccEnt.delete_GccEnt_QualifiedLin

# Register GccEnt_QualifiedLin in _GccEnt:
_GccEnt.GccEnt_QualifiedLin_swigregister(GccEnt_QualifiedLin)



@deprecated
def gccent_Enclosed(*args):
	return gccent.Enclosed(*args)

@deprecated
def gccent_Enclosed(*args):
	return gccent.Enclosed(*args)

@deprecated
def gccent_Enclosing(*args):
	return gccent.Enclosing(*args)

@deprecated
def gccent_Outside(*args):
	return gccent.Outside(*args)

@deprecated
def gccent_Outside(*args):
	return gccent.Outside(*args)

@deprecated
def gccent_PositionFromString(*args):
	return gccent.PositionFromString(*args)

@deprecated
def gccent_PositionFromString(*args):
	return gccent.PositionFromString(*args)

@deprecated
def gccent_PositionToString(*args):
	return gccent.PositionToString(*args)

@deprecated
def gccent_Unqualified(*args):
	return gccent.Unqualified(*args)

@deprecated
def gccent_Unqualified(*args):
	return gccent.Unqualified(*args)



