# 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.

"""
ShapeCustom module, see official documentation at
https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapecustom.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 _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)

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.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)



