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

"""
AdvApprox module, see official documentation at
https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_advapprox.html
"""

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _AdvApprox
else:
    import _AdvApprox

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _AdvApprox.SWIG_PyInstanceMethod_New
_swig_new_static_method = _AdvApprox.SWIG_PyStaticMethod_New

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 == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, 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__ = _AdvApprox.delete_SwigPyIterator
    value = _swig_new_instance_method(_AdvApprox.SwigPyIterator_value)
    incr = _swig_new_instance_method(_AdvApprox.SwigPyIterator_incr)
    decr = _swig_new_instance_method(_AdvApprox.SwigPyIterator_decr)
    distance = _swig_new_instance_method(_AdvApprox.SwigPyIterator_distance)
    equal = _swig_new_instance_method(_AdvApprox.SwigPyIterator_equal)
    copy = _swig_new_instance_method(_AdvApprox.SwigPyIterator_copy)
    next = _swig_new_instance_method(_AdvApprox.SwigPyIterator_next)
    __next__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___next__)
    previous = _swig_new_instance_method(_AdvApprox.SwigPyIterator_previous)
    advance = _swig_new_instance_method(_AdvApprox.SwigPyIterator_advance)
    __eq__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___eq__)
    __ne__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___ne__)
    __iadd__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___iadd__)
    __isub__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___isub__)
    __add__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___add__)
    __sub__ = _swig_new_instance_method(_AdvApprox.SwigPyIterator___sub__)
    def __iter__(self):
        return self

# Register SwigPyIterator in _AdvApprox:
_AdvApprox.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


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.TColStd
import OCC.Core.TCollection
import OCC.Core.GeomAbs
import OCC.Core.TColgp
import OCC.Core.PLib
import OCC.Core.math
import OCC.Core.Message
import OCC.Core.gp
class AdvApprox_ApproxAFunction(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"""
        * Constructs approximator tool. //! Warning: the Func should be valid reference to object of type inherited from class EvaluatorFunction from Approx with life time longer than that of the approximator tool; //! the result should be formatted in the following way : <--Num1DSS--> <--2 * Num2DSS--> <--3 * Num3DSS--> R[0] .... R[Num1DSS].....  R[Dimension-1] //! the order in which each Subspace appears should be consistent with the tolerances given in the create function and the results will be given in that order as well that is : Curve2d(n) will correspond to the nth entry described by Num2DSS, Curve(n) will correspond to the nth entry described by Num3DSS The same type of schema applies to the Poles1d, Poles2d and Poles.
        	:param Num1DSS:
        	:type Num1DSS: int
        	:param Num2DSS:
        	:type Num2DSS: int
        	:param Num3DSS:
        	:type Num3DSS: int
        	:param OneDTol:
        	:type OneDTol: TColStd_HArray1OfReal
        	:param TwoDTol:
        	:type TwoDTol: TColStd_HArray1OfReal
        	:param ThreeDTol:
        	:type ThreeDTol: TColStd_HArray1OfReal
        	:param First:
        	:type First: float
        	:param Last:
        	:type Last: float
        	:param Continuity:
        	:type Continuity: GeomAbs_Shape
        	:param MaxDeg:
        	:type MaxDeg: int
        	:param MaxSeg:
        	:type MaxSeg: int
        	:param Func:
        	:type Func: AdvApprox_EvaluatorFunction
        	:rtype: None* Approximation with user methode of cutting
        	:param Num1DSS:
        	:type Num1DSS: int
        	:param Num2DSS:
        	:type Num2DSS: int
        	:param Num3DSS:
        	:type Num3DSS: int
        	:param OneDTol:
        	:type OneDTol: TColStd_HArray1OfReal
        	:param TwoDTol:
        	:type TwoDTol: TColStd_HArray1OfReal
        	:param ThreeDTol:
        	:type ThreeDTol: TColStd_HArray1OfReal
        	:param First:
        	:type First: float
        	:param Last:
        	:type Last: float
        	:param Continuity:
        	:type Continuity: GeomAbs_Shape
        	:param MaxDeg:
        	:type MaxDeg: int
        	:param MaxSeg:
        	:type MaxSeg: int
        	:param Func:
        	:type Func: AdvApprox_EvaluatorFunction
        	:param CutTool:
        	:type CutTool: AdvApprox_Cutting
        	:rtype: None
        """
        _AdvApprox.AdvApprox_ApproxAFunction_swiginit(self, _AdvApprox.new_AdvApprox_ApproxAFunction(*args))
    Approximation = _swig_new_static_method(_AdvApprox.AdvApprox_ApproxAFunction_Approximation)
    AverageError = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_AverageError)
    Degree = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Degree)
    DumpToString = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_DumpToString)
    HasResult = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_HasResult)
    IsDone = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_IsDone)
    Knots = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Knots)
    MaxError = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_MaxError)
    Multiplicities = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Multiplicities)
    NbKnots = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_NbKnots)
    NbPoles = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_NbPoles)
    NumSubSpaces = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_NumSubSpaces)
    Poles = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Poles)
    Poles1d = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Poles1d)
    Poles2d = _swig_new_instance_method(_AdvApprox.AdvApprox_ApproxAFunction_Poles2d)

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_ApproxAFunction

# Register AdvApprox_ApproxAFunction in _AdvApprox:
_AdvApprox.AdvApprox_ApproxAFunction_swigregister(AdvApprox_ApproxAFunction)
AdvApprox_ApproxAFunction_Approximation = _AdvApprox.AdvApprox_ApproxAFunction_Approximation

class AdvApprox_Cutting(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")
    __repr__ = _swig_repr
    Value = _swig_new_instance_method(_AdvApprox.AdvApprox_Cutting_Value)

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_Cutting

# Register AdvApprox_Cutting in _AdvApprox:
_AdvApprox.AdvApprox_Cutting_swigregister(AdvApprox_Cutting)

class AdvApprox_SimpleApprox(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"""
        :param TotalDimension:
        	:type TotalDimension: int
        	:param TotalNumSS:
        	:type TotalNumSS: int
        	:param Continuity:
        	:type Continuity: GeomAbs_Shape
        	:param WorkDegree:
        	:type WorkDegree: int
        	:param NbGaussPoints:
        	:type NbGaussPoints: int
        	:param JacobiBase:
        	:type JacobiBase: PLib_JacobiPolynomial
        	:param Func:
        	:type Func: AdvApprox_EvaluatorFunction
        	:rtype: None
        """
        _AdvApprox.AdvApprox_SimpleApprox_swiginit(self, _AdvApprox.new_AdvApprox_SimpleApprox(*args))
    AverageError = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_AverageError)
    Coefficients = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_Coefficients)
    Degree = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_Degree)
    DifTab = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_DifTab)
    DumpToString = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_DumpToString)
    FirstConstr = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_FirstConstr)
    IsDone = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_IsDone)
    LastConstr = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_LastConstr)
    MaxError = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_MaxError)
    Perform = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_Perform)
    SomTab = _swig_new_instance_method(_AdvApprox.AdvApprox_SimpleApprox_SomTab)

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_SimpleApprox

# Register AdvApprox_SimpleApprox in _AdvApprox:
_AdvApprox.AdvApprox_SimpleApprox_swigregister(AdvApprox_SimpleApprox)

class AdvApprox_DichoCutting(AdvApprox_Cutting):
    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""":rtype: None"""
        _AdvApprox.AdvApprox_DichoCutting_swiginit(self, _AdvApprox.new_AdvApprox_DichoCutting(*args))

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_DichoCutting

# Register AdvApprox_DichoCutting in _AdvApprox:
_AdvApprox.AdvApprox_DichoCutting_swigregister(AdvApprox_DichoCutting)

class AdvApprox_PrefAndRec(AdvApprox_Cutting):
    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"""
        :param RecomendedCut:
        	:type RecomendedCut: TColStd_Array1OfReal
        	:param PrefferedCut:
        	:type PrefferedCut: TColStd_Array1OfReal
        	:param Weight: default value is 5
        	:type Weight: float
        	:rtype: None
        """
        _AdvApprox.AdvApprox_PrefAndRec_swiginit(self, _AdvApprox.new_AdvApprox_PrefAndRec(*args))

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_PrefAndRec

# Register AdvApprox_PrefAndRec in _AdvApprox:
_AdvApprox.AdvApprox_PrefAndRec_swigregister(AdvApprox_PrefAndRec)

class AdvApprox_PrefCutting(AdvApprox_Cutting):
    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"""
        :param CutPnts:
        	:type CutPnts: TColStd_Array1OfReal
        	:rtype: None
        """
        _AdvApprox.AdvApprox_PrefCutting_swiginit(self, _AdvApprox.new_AdvApprox_PrefCutting(*args))

    __repr__ = _dumps_object

    __swig_destroy__ = _AdvApprox.delete_AdvApprox_PrefCutting

# Register AdvApprox_PrefCutting in _AdvApprox:
_AdvApprox.AdvApprox_PrefCutting_swigregister(AdvApprox_PrefCutting)



