# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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.4.0/refman/html/package_shapecustom.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 _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 == "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__ = _ShapeCustom.delete_SwigPyIterator

    def value(self) -> "PyObject *":
        return _ShapeCustom.SwigPyIterator_value(self)

    def incr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
        return _ShapeCustom.SwigPyIterator_incr(self, n)

    def decr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
        return _ShapeCustom.SwigPyIterator_decr(self, n)

    def distance(self, x: "SwigPyIterator") -> "ptrdiff_t":
        return _ShapeCustom.SwigPyIterator_distance(self, x)

    def equal(self, x: "SwigPyIterator") -> "bool":
        return _ShapeCustom.SwigPyIterator_equal(self, x)

    def copy(self) -> "swig::SwigPyIterator *":
        return _ShapeCustom.SwigPyIterator_copy(self)

    def next(self) -> "PyObject *":
        return _ShapeCustom.SwigPyIterator_next(self)

    def __next__(self) -> "PyObject *":
        return _ShapeCustom.SwigPyIterator___next__(self)

    def previous(self) -> "PyObject *":
        return _ShapeCustom.SwigPyIterator_previous(self)

    def advance(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
        return _ShapeCustom.SwigPyIterator_advance(self, n)

    def __eq__(self, x: "SwigPyIterator") -> "bool":
        return _ShapeCustom.SwigPyIterator___eq__(self, x)

    def __ne__(self, x: "SwigPyIterator") -> "bool":
        return _ShapeCustom.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
        return _ShapeCustom.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
        return _ShapeCustom.SwigPyIterator___isub__(self, n)

    def __add__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
        return _ShapeCustom.SwigPyIterator___add__(self, n)

    def __sub__(self, *args) -> "ptrdiff_t":
        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: "Standard_Failure", method_name: "std::string", class_name: "std::string") -> "void":
    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() -> "opencascade::handle< ShapeCustom_Modification >":
    return _ShapeCustom.Handle_ShapeCustom_Modification_Create()

def Handle_ShapeCustom_Modification_DownCast(t: "opencascade::handle< Standard_Transient > const &") -> "opencascade::handle< ShapeCustom_Modification >":
    return _ShapeCustom.Handle_ShapeCustom_Modification_DownCast(t)

def Handle_ShapeCustom_Modification_IsNull(t: "opencascade::handle< ShapeCustom_Modification > const &") -> "bool":
    return _ShapeCustom.Handle_ShapeCustom_Modification_IsNull(t)

def Handle_ShapeCustom_RestrictionParameters_Create() -> "opencascade::handle< ShapeCustom_RestrictionParameters >":
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_Create()

def Handle_ShapeCustom_RestrictionParameters_DownCast(t: "opencascade::handle< Standard_Transient > const &") -> "opencascade::handle< ShapeCustom_RestrictionParameters >":
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_DownCast(t)

def Handle_ShapeCustom_RestrictionParameters_IsNull(t: "opencascade::handle< ShapeCustom_RestrictionParameters > const &") -> "bool":
    return _ShapeCustom.Handle_ShapeCustom_RestrictionParameters_IsNull(t)

def Handle_ShapeCustom_TrsfModification_Create() -> "opencascade::handle< ShapeCustom_TrsfModification >":
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_Create()

def Handle_ShapeCustom_TrsfModification_DownCast(t: "opencascade::handle< Standard_Transient > const &") -> "opencascade::handle< ShapeCustom_TrsfModification >":
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_DownCast(t)

def Handle_ShapeCustom_TrsfModification_IsNull(t: "opencascade::handle< ShapeCustom_TrsfModification > const &") -> "bool":
    return _ShapeCustom.Handle_ShapeCustom_TrsfModification_IsNull(t)

def Handle_ShapeCustom_ConvertToBSpline_Create() -> "opencascade::handle< ShapeCustom_ConvertToBSpline >":
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_Create()

def Handle_ShapeCustom_ConvertToBSpline_DownCast(t: "opencascade::handle< Standard_Transient > const &") -> "opencascade::handle< ShapeCustom_ConvertToBSpline >":
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_DownCast(t)

def Handle_ShapeCustom_ConvertToBSpline_IsNull(t: "opencascade::handle< ShapeCustom_ConvertToBSpline > const &") -> "bool":
    return _ShapeCustom.Handle_ShapeCustom_ConvertToBSpline_IsNull(t)

def Handle_ShapeCustom_DirectModification_Create() -> "opencascade::handle< ShapeCustom_DirectModification >":
    return _ShapeCustom.Handle_ShapeCustom_DirectModification_Create()

def Handle_ShapeCustom_DirectModification_DownCast(t: "opencascade::handle< Standard_Transient > const &") -> "opencascade::handle< ShapeCustom_DirectModification >":
    return _ShapeCustom.Handle_ShapeCustom_DirectModification_DownCast(t)

def Handle_ShapeCustom_DirectModification_IsNull(t: "opencascade::handle< ShapeCustom_DirectModification > const &") -> "bool":
    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) -> "TopoDS_Shape":
        r"""
        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.

        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

        Returns
        -------
        TopoDS_Shape

        """
        return _ShapeCustom.shapecustom_BSplineRestriction(*args)

    @staticmethod
    def ConvertToBSpline(*args) -> "TopoDS_Shape":
        r"""
        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).

        Parameters
        ----------
        S: TopoDS_Shape
        extrMode: bool
        revolMode: bool
        offsetMode: bool
        planeMode: bool,optional
        	default value is Standard_False

        Returns
        -------
        TopoDS_Shape

        """
        return _ShapeCustom.shapecustom_ConvertToBSpline(*args)

    @staticmethod
    def ConvertToRevolution(*args) -> "TopoDS_Shape":
        r"""
        Returns a new shape with all elementary periodic surfaces converted to geom_surfaceofrevolution.

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

        Returns
        -------
        TopoDS_Shape

        """
        return _ShapeCustom.shapecustom_ConvertToRevolution(*args)

    @staticmethod
    def DirectFaces(*args) -> "TopoDS_Shape":
        r"""
        Returns a new shape without indirect surfaces.

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

        Returns
        -------
        TopoDS_Shape

        """
        return _ShapeCustom.shapecustom_DirectFaces(*args)

    @staticmethod
    def ScaleShape(*args) -> "TopoDS_Shape":
        r"""
        Returns a new shape which is scaled original.

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

        Returns
        -------
        TopoDS_Shape

        """
        return _ShapeCustom.shapecustom_ScaleShape(*args)

    @staticmethod
    def SweptToElementary(*args) -> "TopoDS_Shape":
        r"""
        Returns a new shape with all surfaces of revolution and linear extrusion convert to elementary periodic surfaces.

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

        Returns
        -------
        TopoDS_Shape

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

def shapecustom_BSplineRestriction(*args) -> "TopoDS_Shape":
    r"""
    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.

    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

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_BSplineRestriction(*args)

def shapecustom_ConvertToBSpline(*args) -> "TopoDS_Shape":
    r"""
    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).

    Parameters
    ----------
    S: TopoDS_Shape
    extrMode: bool
    revolMode: bool
    offsetMode: bool
    planeMode: bool,optional
    	default value is Standard_False

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_ConvertToBSpline(*args)

def shapecustom_ConvertToRevolution(*args) -> "TopoDS_Shape":
    r"""
    Returns a new shape with all elementary periodic surfaces converted to geom_surfaceofrevolution.

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

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_ConvertToRevolution(*args)

def shapecustom_DirectFaces(*args) -> "TopoDS_Shape":
    r"""
    Returns a new shape without indirect surfaces.

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

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_DirectFaces(*args)

def shapecustom_ScaleShape(*args) -> "TopoDS_Shape":
    r"""
    Returns a new shape which is scaled original.

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

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_ScaleShape(*args)

def shapecustom_SweptToElementary(*args) -> "TopoDS_Shape":
    r"""
    Returns a new shape with all surfaces of revolution and linear extrusion convert to elementary periodic surfaces.

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

    Returns
    -------
    TopoDS_Shape

    """
    return _ShapeCustom.shapecustom_SweptToElementary(*args)

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"""
        No available documentation.

        Returns
        -------
        None
        No available documentation.

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

        Returns
        -------
        None

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

    def ConvertToPeriodic(self, *args) -> "opencascade::handle< Geom_Curve >":
        r"""
        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.

        Parameters
        ----------
        substitute: bool
        preci: float,optional
        	default value is -1

        Returns
        -------
        opencascade::handle<Geom_Curve>

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

    def Init(self, *args) -> "void":
        r"""
        No available documentation.

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

        Returns
        -------
        None

        """
        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) -> "Standard_Real &, Standard_Real &, Standard_Real &":
        r"""
        Try to convert bspline2d or bezier2d to line 2d only if it is linear. recalculate first and last parameters. returns line2d or null curve2d.

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

        Returns
        -------
        theNewFirst: float
        theNewLast: float
        theDeviation: float

        """
        return _ShapeCustom.ShapeCustom_Curve2d_ConvertToLine2d(*args)

    @staticmethod
    def IsLinear(*args) -> "Standard_Real &":
        r"""
        Check if poleses is in the plane with given precision returns false if no.

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

        Returns
        -------
        theDeviation: float

        """
        return _ShapeCustom.ShapeCustom_Curve2d_IsLinear(*args)

    @staticmethod
    def SimplifyBSpline2d(*args) -> "Standard_Boolean":
        r"""
        Try to remove knots from bspline where local derivatives are the same. remove knots with given precision. returns false if bsplien was not modified.

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

        Returns
        -------
        bool

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

def ShapeCustom_Curve2d_ConvertToLine2d(*args) -> "Standard_Real &, Standard_Real &, Standard_Real &":
    r"""
    Try to convert bspline2d or bezier2d to line 2d only if it is linear. recalculate first and last parameters. returns line2d or null curve2d.

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

    Returns
    -------
    theNewFirst: float
    theNewLast: float
    theDeviation: float

    """
    return _ShapeCustom.ShapeCustom_Curve2d_ConvertToLine2d(*args)

def ShapeCustom_Curve2d_IsLinear(*args) -> "Standard_Real &":
    r"""
    Check if poleses is in the plane with given precision returns false if no.

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

    Returns
    -------
    theDeviation: float

    """
    return _ShapeCustom.ShapeCustom_Curve2d_IsLinear(*args)

def ShapeCustom_Curve2d_SimplifyBSpline2d(*args) -> "Standard_Boolean":
    r"""
    Try to remove knots from bspline where local derivatives are the same. remove knots with given precision. returns false if bsplien was not modified.

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

    Returns
    -------
    bool

    """
    return _ShapeCustom.ShapeCustom_Curve2d_SimplifyBSpline2d(*args)

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) -> "opencascade::handle< ShapeExtend_BasicMsgRegistrator >":
        r"""
        Returns message registrator.

        Returns
        -------
        opencascade::handle<ShapeExtend_BasicMsgRegistrator>

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

    def SendMsg(self, *args) -> "void":
        r"""
        Sends a message to be attached to the shape. calls corresponding message of message registrator.

        Parameters
        ----------
        shape: TopoDS_Shape
        message: Message_Msg
        gravity: Message_Gravity,optional
        	default value is Message_Info

        Returns
        -------
        None

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

    def SetMsgRegistrator(self, *args) -> "void":
        r"""
        Sets message registrator.

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

        Returns
        -------
        None

        """
        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"""
        Sets default parameters.

        Returns
        -------
        None

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    def SetSegmentSurfaceMode(self, value: "Standard_Boolean") -> "void":
        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"""
        No available documentation.

        Returns
        -------
        None
        No available documentation.

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

        Returns
        -------
        None

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

    def ConvertToAnalytical(self, *args) -> "opencascade::handle< Geom_Surface >":
        r"""
        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.

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

        Returns
        -------
        opencascade::handle<Geom_Surface>

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

    def ConvertToPeriodic(self, *args) -> "opencascade::handle< Geom_Surface >":
        r"""
        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.

        Parameters
        ----------
        substitute: bool
        preci: float,optional
        	default value is -1

        Returns
        -------
        opencascade::handle<Geom_Surface>

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

    def Gap(self, *args) -> "Standard_Real":
        r"""
        Returns maximal deviation of converted surface from the original one computed by last call to converttoanalytical.

        Returns
        -------
        float

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

    def Init(self, *args) -> "void":
        r"""
        No available documentation.

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

        Returns
        -------
        None

        """
        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"""
        Empty constructor.

        Parameters
        ----------
        T: gp_Trsf

        Returns
        -------
        None

        """
        _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"""
        No available documentation.

        Returns
        -------
        None

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

    def SetExtrusionMode(self, *args) -> "void":
        r"""
        Sets mode for convertion of surfaces of linear extrusion.

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

        Returns
        -------
        None

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

    def SetOffsetMode(self, *args) -> "void":
        r"""
        Sets mode for convertion of offset surfaces.

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

        Returns
        -------
        None

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

    def SetPlaneMode(self, *args) -> "void":
        r"""
        Sets mode for convertion of plane surfaces.

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

        Returns
        -------
        None

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

    def SetRevolutionMode(self, *args) -> "void":
        r"""
        Sets mode for convertion of surfaces of revolution.

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

        Returns
        -------
        None

        """
        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"""
        No available documentation.

        Returns
        -------
        None

        """
        _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






