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

"""
ShapeCustom module, see official documentation at
https://dev.opencascade.org/doc/occt-7.9.0/refman/html/package_shapecustom.html
"""

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _ShapeCustom
else:
    import _ShapeCustom

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__ = _ShapeCustom.delete_SwigPyIterator

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# Register SwigPyIterator in _ShapeCustom:
_ShapeCustom.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 _ShapeCustom.process_exception(error, method_name, class_name)

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

class ios_base(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
    erase_event = _ShapeCustom.ios_base_erase_event
    imbue_event = _ShapeCustom.ios_base_imbue_event
    copyfmt_event = _ShapeCustom.ios_base_copyfmt_event

    def register_callback(self, __fn, __index):
        return _ShapeCustom.ios_base_register_callback(self, __fn, __index)

    def flags(self, *args):
        return _ShapeCustom.ios_base_flags(self, *args)

    def setf(self, *args):
        return _ShapeCustom.ios_base_setf(self, *args)

    def unsetf(self, __mask):
        return _ShapeCustom.ios_base_unsetf(self, __mask)

    def precision(self, *args):
        return _ShapeCustom.ios_base_precision(self, *args)

    def width(self, *args):
        return _ShapeCustom.ios_base_width(self, *args)

    @staticmethod
    def sync_with_stdio(__sync=True):
        return _ShapeCustom.ios_base_sync_with_stdio(__sync)

    def imbue(self, __loc):
        return _ShapeCustom.ios_base_imbue(self, __loc)

    def getloc(self):
        return _ShapeCustom.ios_base_getloc(self)

    @staticmethod
    def xalloc():
        return _ShapeCustom.ios_base_xalloc()

    def iword(self, __ix):
        return _ShapeCustom.ios_base_iword(self, __ix)

    def pword(self, __ix):
        return _ShapeCustom.ios_base_pword(self, __ix)
    __swig_destroy__ = _ShapeCustom.delete_ios_base

# Register ios_base in _ShapeCustom:
_ShapeCustom.ios_base_swigregister(ios_base)
cvar = _ShapeCustom.cvar
ios_base.boolalpha = _ShapeCustom.cvar.ios_base_boolalpha
ios_base.dec = _ShapeCustom.cvar.ios_base_dec
ios_base.fixed = _ShapeCustom.cvar.ios_base_fixed
ios_base.hex = _ShapeCustom.cvar.ios_base_hex
ios_base.internal = _ShapeCustom.cvar.ios_base_internal
ios_base.left = _ShapeCustom.cvar.ios_base_left
ios_base.oct = _ShapeCustom.cvar.ios_base_oct
ios_base.right = _ShapeCustom.cvar.ios_base_right
ios_base.scientific = _ShapeCustom.cvar.ios_base_scientific
ios_base.showbase = _ShapeCustom.cvar.ios_base_showbase
ios_base.showpoint = _ShapeCustom.cvar.ios_base_showpoint
ios_base.showpos = _ShapeCustom.cvar.ios_base_showpos
ios_base.skipws = _ShapeCustom.cvar.ios_base_skipws
ios_base.unitbuf = _ShapeCustom.cvar.ios_base_unitbuf
ios_base.uppercase = _ShapeCustom.cvar.ios_base_uppercase
ios_base.adjustfield = _ShapeCustom.cvar.ios_base_adjustfield
ios_base.basefield = _ShapeCustom.cvar.ios_base_basefield
ios_base.floatfield = _ShapeCustom.cvar.ios_base_floatfield
ios_base.badbit = _ShapeCustom.cvar.ios_base_badbit
ios_base.eofbit = _ShapeCustom.cvar.ios_base_eofbit
ios_base.failbit = _ShapeCustom.cvar.ios_base_failbit
ios_base.goodbit = _ShapeCustom.cvar.ios_base_goodbit
ios_base.app = _ShapeCustom.cvar.ios_base_app
ios_base.ate = _ShapeCustom.cvar.ios_base_ate
ios_base.binary = _ShapeCustom.cvar.ios_base_binary
ios_base.ios_base_in = _ShapeCustom.cvar.ios_base_ios_base_in
ios_base.out = _ShapeCustom.cvar.ios_base_out
ios_base.trunc = _ShapeCustom.cvar.ios_base_trunc
ios_base.beg = _ShapeCustom.cvar.ios_base_beg
ios_base.cur = _ShapeCustom.cvar.ios_base_cur
ios_base.end = _ShapeCustom.cvar.ios_base_end

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

    def rdstate(self):
        return _ShapeCustom.ios_rdstate(self)

    def clear(self, *args):
        return _ShapeCustom.ios_clear(self, *args)

    def setstate(self, __state):
        return _ShapeCustom.ios_setstate(self, __state)

    def good(self):
        return _ShapeCustom.ios_good(self)

    def eof(self):
        return _ShapeCustom.ios_eof(self)

    def fail(self):
        return _ShapeCustom.ios_fail(self)

    def bad(self):
        return _ShapeCustom.ios_bad(self)

    def exceptions(self, *args):
        return _ShapeCustom.ios_exceptions(self, *args)

    def __init__(self, __sb):
        _ShapeCustom.ios_swiginit(self, _ShapeCustom.new_ios(__sb))
    __swig_destroy__ = _ShapeCustom.delete_ios

    def tie(self, *args):
        return _ShapeCustom.ios_tie(self, *args)

    def rdbuf(self, *args):
        return _ShapeCustom.ios_rdbuf(self, *args)

    def copyfmt(self, __rhs):
        return _ShapeCustom.ios_copyfmt(self, __rhs)

    def fill(self, *args):
        return _ShapeCustom.ios_fill(self, *args)

    def imbue(self, __loc):
        return _ShapeCustom.ios_imbue(self, __loc)

    def narrow(self, __c, __dfault):
        return _ShapeCustom.ios_narrow(self, __c, __dfault)

    def widen(self, __c):
        return _ShapeCustom.ios_widen(self, __c)

# Register ios in _ShapeCustom:
_ShapeCustom.ios_swigregister(ios)
class ostream(ios):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, __sb):
        _ShapeCustom.ostream_swiginit(self, _ShapeCustom.new_ostream(__sb))
    __swig_destroy__ = _ShapeCustom.delete_ostream

    def __lshift__(self, *args):
        return _ShapeCustom.ostream___lshift__(self, *args)

    def put(self, __c):
        return _ShapeCustom.ostream_put(self, __c)

    def write(self, __s, __n):
        return _ShapeCustom.ostream_write(self, __s, __n)

    def flush(self):
        return _ShapeCustom.ostream_flush(self)

    def tellp(self):
        return _ShapeCustom.ostream_tellp(self)

    def seekp(self, *args):
        return _ShapeCustom.ostream_seekp(self, *args)

# Register ostream in _ShapeCustom:
_ShapeCustom.ostream_swigregister(ostream)
class istream(ios):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, __sb):
        _ShapeCustom.istream_swiginit(self, _ShapeCustom.new_istream(__sb))
    __swig_destroy__ = _ShapeCustom.delete_istream

    def __rshift__(self, *args):
        return _ShapeCustom.istream___rshift__(self, *args)

    def gcount(self):
        return _ShapeCustom.istream_gcount(self)

    def get(self, *args):
        return _ShapeCustom.istream_get(self, *args)

    def getline(self, *args):
        return _ShapeCustom.istream_getline(self, *args)

    def ignore(self, *args):
        return _ShapeCustom.istream_ignore(self, *args)

    def peek(self):
        return _ShapeCustom.istream_peek(self)

    def read(self, __s, __n):
        return _ShapeCustom.istream_read(self, __s, __n)

    def readsome(self, __s, __n):
        return _ShapeCustom.istream_readsome(self, __s, __n)

    def putback(self, __c):
        return _ShapeCustom.istream_putback(self, __c)

    def unget(self):
        return _ShapeCustom.istream_unget(self)

    def sync(self):
        return _ShapeCustom.istream_sync(self)

    def tellg(self):
        return _ShapeCustom.istream_tellg(self)

    def seekg(self, *args):
        return _ShapeCustom.istream_seekg(self, *args)

# Register istream in _ShapeCustom:
_ShapeCustom.istream_swigregister(istream)
class iostream(istream, ostream):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, __sb):
        _ShapeCustom.iostream_swiginit(self, _ShapeCustom.new_iostream(__sb))
    __swig_destroy__ = _ShapeCustom.delete_iostream

# Register iostream in _ShapeCustom:
_ShapeCustom.iostream_swigregister(iostream)
cin = cvar.cin
cout = cvar.cout
cerr = cvar.cerr
clog = cvar.clog

endl_cb_ptr = _ShapeCustom.endl_cb_ptr
endl = _ShapeCustom.endl
ends_cb_ptr = _ShapeCustom.ends_cb_ptr
ends = _ShapeCustom.ends
flush_cb_ptr = _ShapeCustom.flush_cb_ptr
flush = _ShapeCustom.flush
import OCC.Core.Standard
import OCC.Core.NCollection
import OCC.Core.TopoDS
import OCC.Core.Message
import OCC.Core.TCollection
import OCC.Core.OSD
import OCC.Core.TColStd
import OCC.Core.TopAbs
import OCC.Core.TopLoc
import OCC.Core.gp
import OCC.Core.GeomAbs
import OCC.Core.Geom
import OCC.Core.TColgp
import OCC.Core.Geom2d
import OCC.Core.BRepTools
import OCC.Core.Bnd
import OCC.Core.BVH
import OCC.Core.TopTools
import OCC.Core.BRep
import OCC.Core.Poly
import OCC.Core.TShort
import OCC.Core.ShapeExtend
import OCC.Core.TColGeom

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




def Handle_ShapeCustom_Modification_Create():
    return _ShapeCustom.Handle_ShapeCustom_Modification_Create()

def Handle_ShapeCustom_Modification_DownCast(t):
    return _ShapeCustom.Handle_ShapeCustom_Modification_DownCast(t)

def Handle_ShapeCustom_Modification_IsNull(t):
    return _ShapeCustom.Handle_ShapeCustom_Modification_IsNull(t)

def Handle_ShapeCustom_RestrictionParameters_Create():
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_Create()

def Handle_ShapeCustom_RestrictionParameters_DownCast(t):
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_DownCast(t)

def Handle_ShapeCustom_RestrictionParameters_IsNull(t):
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_IsNull(t)

def Handle_ShapeCustom_TrsfModification_Create():
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_Create()

def Handle_ShapeCustom_TrsfModification_DownCast(t):
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_DownCast(t)

def Handle_ShapeCustom_TrsfModification_IsNull(t):
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_IsNull(t)

def Handle_ShapeCustom_ConvertToBSpline_Create():
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_Create()

def Handle_ShapeCustom_ConvertToBSpline_DownCast(t):
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_DownCast(t)

def Handle_ShapeCustom_ConvertToBSpline_IsNull(t):
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_IsNull(t)

def Handle_ShapeCustom_DirectModification_Create():
    return _ShapeCustom.Handle_ShapeCustom_DirectModification_Create()

def Handle_ShapeCustom_DirectModification_DownCast(t):
    return _ShapeCustom.Handle_ShapeCustom_DirectModification_DownCast(t)

def Handle_ShapeCustom_DirectModification_IsNull(t):
    return _ShapeCustom.Handle_ShapeCustom_DirectModification_IsNull(t)
class shapecustom(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

        Parameters
        ----------
        S: TopoDS_Shape
        Tol3d: float
        Tol2d: float
        MaxDegree: int
        MaxNbSegment: int
        Continuity3d: GeomAbs_Shape
        Continuity2d: GeomAbs_Shape
        Degree: bool
        Rational: bool
        aParameters: ShapeCustom_RestrictionParameters

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape with all surfaces, curves and pcurves which type is BSpline/Bezier or based on them converted having Degree less than <MaxDegree> or number of spans less than <NbMaxSegment> in dependence on parameter priority <Degree>. <GmaxDegree> and <GMaxSegments> are maximum possible degree and number of spans correspondingly. These values will be used in those cases when approximation with specified parameters is impossible and one of GmaxDegree or GMaxSegments is selected in dependence on priority. Note that even if approximation is impossible with <GMaxDegree> then number of spans can exceed specified <GMaxSegment> <Rational> specifies if to convert Rational BSpline/Bezier into polynomial B-Spline. If flags ConvOffSurf,ConvOffCurve3d,ConvOffCurve2d are Standard_True there are means that Offset surfaces , Offset curves 3d and Offset curves 2d are converted to BSPline correspondingly.

        """
        return _ShapeCustom.shapecustom_BSplineRestriction(*args)

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

        Parameters
        ----------
        S: TopoDS_Shape
        extrMode: bool
        revolMode: bool
        offsetMode: bool
        planeMode: bool (optional, default to Standard_False)

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape with all surfaces of linear extrusion, revolution, offset, and planar surfaces converted according to flags to Geom_BSplineSurface (with same parameterisation).

        """
        return _ShapeCustom.shapecustom_ConvertToBSpline(*args)

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

        Parameters
        ----------
        S: TopoDS_Shape

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape with all elementary periodic surfaces converted to Geom_SurfaceOfRevolution.

        """
        return _ShapeCustom.shapecustom_ConvertToRevolution(*args)

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

        Parameters
        ----------
        S: TopoDS_Shape

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape without indirect surfaces.

        """
        return _ShapeCustom.shapecustom_DirectFaces(*args)

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

        Parameters
        ----------
        S: TopoDS_Shape
        scale: float

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape which is scaled original.

        """
        return _ShapeCustom.shapecustom_ScaleShape(*args)

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

        Parameters
        ----------
        S: TopoDS_Shape

        Return
        -------
        TopoDS_Shape

        Description
        -----------
        Returns a new shape with all surfaces of revolution and linear extrusion convert to elementary periodic surfaces.

        """
        return _ShapeCustom.shapecustom_SweptToElementary(*args)

    __repr__ = _dumps_object

    @methodnotwrapped
    def ApplyModifier(self):
    	pass


    def __init__(self):
        _ShapeCustom.shapecustom_swiginit(self, _ShapeCustom.new_shapecustom())
    __swig_destroy__ = _ShapeCustom.delete_shapecustom

# Register shapecustom in _ShapeCustom:
_ShapeCustom.shapecustom_swigregister(shapecustom)
class ShapeCustom_Curve(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"""
        Return
        -------
        None

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        C: Geom_Curve

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        _ShapeCustom.ShapeCustom_Curve_swiginit(self, _ShapeCustom.new_ShapeCustom_Curve(*args))

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

        Parameters
        ----------
        substitute: bool
        preci: float (optional, default to -1)

        Return
        -------
        opencascade::handle<Geom_Curve>

        Description
        -----------
        Tries to convert the Curve to the Periodic form Returns the resulting curve Works only if the Curve is BSpline and is closed with Precision::Confusion() Else, or in case of failure, returns a Null Handle.

        """
        return _ShapeCustom.ShapeCustom_Curve_ConvertToPeriodic(self, *args)

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

        Parameters
        ----------
        C: Geom_Curve

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        return _ShapeCustom.ShapeCustom_Curve_Init(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_Curve

# Register ShapeCustom_Curve in _ShapeCustom:
_ShapeCustom.ShapeCustom_Curve_swigregister(ShapeCustom_Curve)
class ShapeCustom_Curve2d(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

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

        Parameters
        ----------
        theCurve: Geom2d_Curve
        theFirstIn: float
        theLastIn: float
        theTolerance: float

        Return
        -------
        theNewFirst: float
        theNewLast: float
        theDeviation: float

        Description
        -----------
        Try to convert BSpline2d or Bezier2d to line 2d only if it is linear. Recalculate first and last parameters. Returns line2d or null curve2d.

        """
        return _ShapeCustom.ShapeCustom_Curve2d_ConvertToLine2d(*args)

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

        Parameters
        ----------
        thePoles: TColgp_Array1OfPnt2d
        theTolerance: float

        Return
        -------
        theDeviation: float

        Description
        -----------
        Check if poleses is in the plane with given precision Returns false if no.

        """
        return _ShapeCustom.ShapeCustom_Curve2d_IsLinear(*args)

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

        Parameters
        ----------
        theBSpline2d: Geom2d_BSplineCurve
        theTolerance: float

        Return
        -------
        bool

        Description
        -----------
        Try to remove knots from bspline where local derivatives are the same. Remove knots with given precision. Returns false if Bsplien was not modified.

        """
        return _ShapeCustom.ShapeCustom_Curve2d_SimplifyBSpline2d(*args)

    __repr__ = _dumps_object


    def __init__(self):
        _ShapeCustom.ShapeCustom_Curve2d_swiginit(self, _ShapeCustom.new_ShapeCustom_Curve2d())
    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_Curve2d

# Register ShapeCustom_Curve2d in _ShapeCustom:
_ShapeCustom.ShapeCustom_Curve2d_swigregister(ShapeCustom_Curve2d)
class ShapeCustom_Modification(OCC.Core.BRepTools.BRepTools_Modification):
    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

    def MsgRegistrator(self, *args):
        r"""
        Return
        -------
        opencascade::handle<ShapeExtend_BasicMsgRegistrator>

        Description
        -----------
        Returns message registrator.

        """
        return _ShapeCustom.ShapeCustom_Modification_MsgRegistrator(self, *args)

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

        Parameters
        ----------
        shape: TopoDS_Shape
        message: Message_Msg
        gravity: Message_Gravity (optional, default to Message_Info)

        Return
        -------
        None

        Description
        -----------
        Sends a message to be attached to the shape. Calls corresponding message of message registrator.

        """
        return _ShapeCustom.ShapeCustom_Modification_SendMsg(self, *args)

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

        Parameters
        ----------
        msgreg: ShapeExtend_BasicMsgRegistrator

        Return
        -------
        None

        Description
        -----------
        Sets message registrator.

        """
        return _ShapeCustom.ShapeCustom_Modification_SetMsgRegistrator(self, *args)


    @staticmethod
    def DownCast(t):
      return Handle_ShapeCustom_Modification_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_Modification

# Register ShapeCustom_Modification in _ShapeCustom:
_ShapeCustom.ShapeCustom_Modification_swigregister(ShapeCustom_Modification)
class ShapeCustom_RestrictionParameters(OCC.Core.Standard.Standard_Transient):
    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"""
        Return
        -------
        None

        Description
        -----------
        Sets default parameters.

        """
        _ShapeCustom.ShapeCustom_RestrictionParameters_swiginit(self, _ShapeCustom.new_ShapeCustom_RestrictionParameters(*args))

    def GetConvertBezierSurf(self):
        r"""GetConvertBezierSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertBezierSurf(self)

    def SetConvertBezierSurf(self, value):
        r"""SetConvertBezierSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertBezierSurf(self, value)

    def GetConvertConicalSurf(self):
        r"""GetConvertConicalSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertConicalSurf(self)

    def SetConvertConicalSurf(self, value):
        r"""SetConvertConicalSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertConicalSurf(self, value)

    def GetConvertCurve2d(self):
        r"""GetConvertCurve2d(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertCurve2d(self)

    def SetConvertCurve2d(self, value):
        r"""SetConvertCurve2d(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertCurve2d(self, value)

    def GetConvertCurve3d(self):
        r"""GetConvertCurve3d(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertCurve3d(self)

    def SetConvertCurve3d(self, value):
        r"""SetConvertCurve3d(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertCurve3d(self, value)

    def GetConvertCylindricalSurf(self):
        r"""GetConvertCylindricalSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertCylindricalSurf(self)

    def SetConvertCylindricalSurf(self, value):
        r"""SetConvertCylindricalSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertCylindricalSurf(self, value)

    def GetConvertExtrusionSurf(self):
        r"""GetConvertExtrusionSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertExtrusionSurf(self)

    def SetConvertExtrusionSurf(self, value):
        r"""SetConvertExtrusionSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertExtrusionSurf(self, value)

    def GetConvertOffsetCurv2d(self):
        r"""GetConvertOffsetCurv2d(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertOffsetCurv2d(self)

    def SetConvertOffsetCurv2d(self, value):
        r"""SetConvertOffsetCurv2d(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertOffsetCurv2d(self, value)

    def GetConvertOffsetCurv3d(self):
        r"""GetConvertOffsetCurv3d(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertOffsetCurv3d(self)

    def SetConvertOffsetCurv3d(self, value):
        r"""SetConvertOffsetCurv3d(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertOffsetCurv3d(self, value)

    def GetConvertOffsetSurf(self):
        r"""GetConvertOffsetSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertOffsetSurf(self)

    def SetConvertOffsetSurf(self, value):
        r"""SetConvertOffsetSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertOffsetSurf(self, value)

    def GetConvertPlane(self):
        r"""GetConvertPlane(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertPlane(self)

    def SetConvertPlane(self, value):
        r"""SetConvertPlane(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertPlane(self, value)

    def GetConvertRevolutionSurf(self):
        r"""GetConvertRevolutionSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertRevolutionSurf(self)

    def SetConvertRevolutionSurf(self, value):
        r"""SetConvertRevolutionSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertRevolutionSurf(self, value)

    def GetConvertSphericalSurf(self):
        r"""GetConvertSphericalSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertSphericalSurf(self)

    def SetConvertSphericalSurf(self, value):
        r"""SetConvertSphericalSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertSphericalSurf(self, value)

    def GetConvertToroidalSurf(self):
        r"""GetConvertToroidalSurf(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetConvertToroidalSurf(self)

    def SetConvertToroidalSurf(self, value):
        r"""SetConvertToroidalSurf(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetConvertToroidalSurf(self, value)

    def GetGMaxDegree(self):
        r"""GetGMaxDegree(ShapeCustom_RestrictionParameters self) -> Standard_Integer"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetGMaxDegree(self)

    def SetGMaxDegree(self, value):
        r"""SetGMaxDegree(ShapeCustom_RestrictionParameters self, Standard_Integer value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetGMaxDegree(self, value)

    def GetGMaxSeg(self):
        r"""GetGMaxSeg(ShapeCustom_RestrictionParameters self) -> Standard_Integer"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetGMaxSeg(self)

    def SetGMaxSeg(self, value):
        r"""SetGMaxSeg(ShapeCustom_RestrictionParameters self, Standard_Integer value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetGMaxSeg(self, value)

    def GetSegmentSurfaceMode(self):
        r"""GetSegmentSurfaceMode(ShapeCustom_RestrictionParameters self) -> Standard_Boolean"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_GetSegmentSurfaceMode(self)

    def SetSegmentSurfaceMode(self, value):
        r"""SetSegmentSurfaceMode(ShapeCustom_RestrictionParameters self, Standard_Boolean value)"""
        return _ShapeCustom.ShapeCustom_RestrictionParameters_SetSegmentSurfaceMode(self, value)


    @staticmethod
    def DownCast(t):
      return Handle_ShapeCustom_RestrictionParameters_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_RestrictionParameters

# Register ShapeCustom_RestrictionParameters in _ShapeCustom:
_ShapeCustom.ShapeCustom_RestrictionParameters_swigregister(ShapeCustom_RestrictionParameters)
class ShapeCustom_Surface(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"""
        Return
        -------
        None

        Description
        -----------
        No available documentation.

        Parameters
        ----------
        S: Geom_Surface

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        _ShapeCustom.ShapeCustom_Surface_swiginit(self, _ShapeCustom.new_ShapeCustom_Surface(*args))

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

        Parameters
        ----------
        tol: float
        substitute: bool

        Return
        -------
        opencascade::handle<Geom_Surface>

        Description
        -----------
        Tries to convert the Surface to an Analytic form Returns the result Works only if the Surface is BSpline or Bezier. Else, or in case of failure, returns a Null Handle //! If <substitute> is True, the new surface replaces the actual one in <self> //! It works by analysing the case which can apply, creating the corresponding analytic surface, then checking coincidence Warning: Parameter laws are not kept, hence PCurves should be redone.

        """
        return _ShapeCustom.ShapeCustom_Surface_ConvertToAnalytical(self, *args)

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

        Parameters
        ----------
        substitute: bool
        preci: float (optional, default to -1)

        Return
        -------
        opencascade::handle<Geom_Surface>

        Description
        -----------
        Tries to convert the Surface to the Periodic form Returns the resulting surface Works only if the Surface is BSpline and is closed with Precision::Confusion() Else, or in case of failure, returns a Null Handle.

        """
        return _ShapeCustom.ShapeCustom_Surface_ConvertToPeriodic(self, *args)

    def Gap(self, *args):
        r"""
        Return
        -------
        float

        Description
        -----------
        Returns maximal deviation of converted surface from the original one computed by last call to ConvertToAnalytical.

        """
        return _ShapeCustom.ShapeCustom_Surface_Gap(self, *args)

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

        Parameters
        ----------
        S: Geom_Surface

        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        return _ShapeCustom.ShapeCustom_Surface_Init(self, *args)

    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_Surface

# Register ShapeCustom_Surface in _ShapeCustom:
_ShapeCustom.ShapeCustom_Surface_swigregister(ShapeCustom_Surface)
class ShapeCustom_TrsfModification(OCC.Core.BRepTools.BRepTools_TrsfModification):
    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
        ----------
        T: gp_Trsf

        Return
        -------
        None

        Description
        -----------
        Empty constructor.

        """
        _ShapeCustom.ShapeCustom_TrsfModification_swiginit(self, _ShapeCustom.new_ShapeCustom_TrsfModification(*args))


    @staticmethod
    def DownCast(t):
      return Handle_ShapeCustom_TrsfModification_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_TrsfModification

# Register ShapeCustom_TrsfModification in _ShapeCustom:
_ShapeCustom.ShapeCustom_TrsfModification_swigregister(ShapeCustom_TrsfModification)
class ShapeCustom_ConvertToBSpline(ShapeCustom_Modification):
    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"""
        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        _ShapeCustom.ShapeCustom_ConvertToBSpline_swiginit(self, _ShapeCustom.new_ShapeCustom_ConvertToBSpline(*args))

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

        Parameters
        ----------
        extrMode: bool

        Return
        -------
        None

        Description
        -----------
        Sets mode for conversion of Surfaces of Linear extrusion.

        """
        return _ShapeCustom.ShapeCustom_ConvertToBSpline_SetExtrusionMode(self, *args)

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

        Parameters
        ----------
        offsetMode: bool

        Return
        -------
        None

        Description
        -----------
        Sets mode for conversion of Offset surfaces.

        """
        return _ShapeCustom.ShapeCustom_ConvertToBSpline_SetOffsetMode(self, *args)

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

        Parameters
        ----------
        planeMode: bool

        Return
        -------
        None

        Description
        -----------
        Sets mode for conversion of Plane surfaces.

        """
        return _ShapeCustom.ShapeCustom_ConvertToBSpline_SetPlaneMode(self, *args)

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

        Parameters
        ----------
        revolMode: bool

        Return
        -------
        None

        Description
        -----------
        Sets mode for conversion of Surfaces of Revolution.

        """
        return _ShapeCustom.ShapeCustom_ConvertToBSpline_SetRevolutionMode(self, *args)


    @staticmethod
    def DownCast(t):
      return Handle_ShapeCustom_ConvertToBSpline_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_ConvertToBSpline

# Register ShapeCustom_ConvertToBSpline in _ShapeCustom:
_ShapeCustom.ShapeCustom_ConvertToBSpline_swigregister(ShapeCustom_ConvertToBSpline)
class ShapeCustom_DirectModification(ShapeCustom_Modification):
    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"""
        Return
        -------
        None

        Description
        -----------
        No available documentation.

        """
        _ShapeCustom.ShapeCustom_DirectModification_swiginit(self, _ShapeCustom.new_ShapeCustom_DirectModification(*args))


    @staticmethod
    def DownCast(t):
      return Handle_ShapeCustom_DirectModification_DownCast(t)


    __repr__ = _dumps_object

    __swig_destroy__ = _ShapeCustom.delete_ShapeCustom_DirectModification

# Register ShapeCustom_DirectModification in _ShapeCustom:
_ShapeCustom.ShapeCustom_DirectModification_swigregister(ShapeCustom_DirectModification)

@classnotwrapped
class ShapeCustom_BSplineRestriction:
	pass

@classnotwrapped
class ShapeCustom_SweptToElementary:
	pass

@classnotwrapped
class ShapeCustom_ConvertToRevolution:
	pass





@deprecated
def shapecustom_BSplineRestriction(*args):
	return shapecustom.BSplineRestriction(*args)

@deprecated
def shapecustom_ConvertToBSpline(*args):
	return shapecustom.ConvertToBSpline(*args)

@deprecated
def shapecustom_ConvertToRevolution(*args):
	return shapecustom.ConvertToRevolution(*args)

@deprecated
def shapecustom_DirectFaces(*args):
	return shapecustom.DirectFaces(*args)

@deprecated
def shapecustom_ScaleShape(*args):
	return shapecustom.ScaleShape(*args)

@deprecated
def shapecustom_SweptToElementary(*args):
	return shapecustom.SweptToElementary(*args)

@deprecated
def ShapeCustom_Curve2d_ConvertToLine2d(*args):
	return ShapeCustom_Curve2d.ConvertToLine2d(*args)

@deprecated
def ShapeCustom_Curve2d_IsLinear(*args):
	return ShapeCustom_Curve2d.IsLinear(*args)

@deprecated
def ShapeCustom_Curve2d_SimplifyBSpline2d(*args):
	return ShapeCustom_Curve2d.SimplifyBSpline2d(*args)



