from enum import IntEnum
from typing import overload, NewType, Optional, Tuple

from OCC.Core.Standard import *
from OCC.Core.NCollection import *
from OCC.Core.TopoDS import *
from OCC.Core.Extrema import *
from OCC.Core.gp import *
from OCC.Core.Bnd import *
from OCC.Core.BVH import *

#the following typedef cannot be wrapped as is
BRepExtrema_ShapeList = NewType('BRepExtrema_ShapeList', Any)

class BRepExtrema_SeqOfSolution:
    def __init__(self) -> None: ...
    def __len__(self) -> int: ...
    def Size(self) -> int: ...
    def Clear(self) -> None: ...
    def First(self) -> BRepExtrema_SolutionElem: ...
    def Last(self) -> BRepExtrema_SolutionElem: ...
    def Length(self) -> int: ...
    def Append(self, theItem: BRepExtrema_SolutionElem) -> BRepExtrema_SolutionElem: ...
    def Prepend(self, theItem: BRepExtrema_SolutionElem) -> BRepExtrema_SolutionElem: ...
    def RemoveFirst(self) -> None: ...
    def Reverse(self) -> None: ...
    def Value(self, theIndex: int) -> BRepExtrema_SolutionElem: ...
    def SetValue(self, theIndex: int, theValue: BRepExtrema_SolutionElem) -> None: ...

class BRepExtrema_SupportType(IntEnum):
	BRepExtrema_IsVertex: int = ...
	BRepExtrema_IsOnEdge: int = ...
	BRepExtrema_IsInFace: int = ...
BRepExtrema_IsVertex = BRepExtrema_SupportType.BRepExtrema_IsVertex
BRepExtrema_IsOnEdge = BRepExtrema_SupportType.BRepExtrema_IsOnEdge
BRepExtrema_IsInFace = BRepExtrema_SupportType.BRepExtrema_IsInFace

class BRepExtrema_DistShapeShape:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	@overload
	def __init__(self, Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, theDeflection: float, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	def InnerSolution(self) -> bool: ...
	def IsDone(self) -> bool: ...
	def LoadS1(self, Shape1: TopoDS_Shape) -> None: ...
	def LoadS2(self, Shape1: TopoDS_Shape) -> None: ...
	def NbSolution(self) -> int: ...
	def ParOnEdgeS1(self, N: int) -> float: ...
	def ParOnEdgeS2(self, N: int) -> float: ...
	def ParOnFaceS1(self, N: int) -> Tuple[float, float]: ...
	def ParOnFaceS2(self, N: int) -> Tuple[float, float]: ...
	def Perform(self) -> bool: ...
	def PointOnShape1(self, N: int) -> gp_Pnt: ...
	def PointOnShape2(self, N: int) -> gp_Pnt: ...
	def SetAlgo(self, A: Extrema_ExtAlgo) -> None: ...
	def SetDeflection(self, theDeflection: float) -> None: ...
	def SetFlag(self, F: Extrema_ExtFlag) -> None: ...
	def SupportOnShape1(self, N: int) -> TopoDS_Shape: ...
	def SupportOnShape2(self, N: int) -> TopoDS_Shape: ...
	def SupportTypeShape1(self, N: int) -> BRepExtrema_SupportType: ...
	def SupportTypeShape2(self, N: int) -> BRepExtrema_SupportType: ...
	def Value(self) -> float: ...

class BRepExtrema_DistanceSS:
	@overload
	def __init__(self, S1: TopoDS_Shape, S2: TopoDS_Shape, B1: Bnd_Box, B2: Bnd_Box, DstRef: float, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	@overload
	def __init__(self, S1: TopoDS_Shape, S2: TopoDS_Shape, B1: Bnd_Box, B2: Bnd_Box, DstRef: float, aDeflection: float, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	def DistValue(self) -> float: ...
	def IsDone(self) -> bool: ...
	def Seq1Value(self) -> BRepExtrema_SeqOfSolution: ...
	def Seq2Value(self) -> BRepExtrema_SeqOfSolution: ...
	def SetAlgo(self, A: Extrema_ExtAlgo) -> None: ...
	def SetFlag(self, F: Extrema_ExtFlag) -> None: ...

class BRepExtrema_ElementFilter:
	pass

class BRepExtrema_ExtCC:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, E1: TopoDS_Edge, E2: TopoDS_Edge) -> None: ...
	def Initialize(self, E2: TopoDS_Edge) -> None: ...
	def IsDone(self) -> bool: ...
	def IsParallel(self) -> bool: ...
	def NbExt(self) -> int: ...
	def ParameterOnE1(self, N: int) -> float: ...
	def ParameterOnE2(self, N: int) -> float: ...
	def Perform(self, E1: TopoDS_Edge) -> None: ...
	def PointOnE1(self, N: int) -> gp_Pnt: ...
	def PointOnE2(self, N: int) -> gp_Pnt: ...
	def SquareDistance(self, N: int) -> float: ...
	def TrimmedSquareDistances(self, P11: gp_Pnt, P12: gp_Pnt, P21: gp_Pnt, P22: gp_Pnt) -> Tuple[float, float, float, float]: ...

class BRepExtrema_ExtCF:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, E: TopoDS_Edge, F: TopoDS_Face) -> None: ...
	def Initialize(self, E: TopoDS_Edge, F: TopoDS_Face) -> None: ...
	def IsDone(self) -> bool: ...
	def IsParallel(self) -> bool: ...
	def NbExt(self) -> int: ...
	def ParameterOnEdge(self, N: int) -> float: ...
	def ParameterOnFace(self, N: int) -> Tuple[float, float]: ...
	def Perform(self, E: TopoDS_Edge, F: TopoDS_Face) -> None: ...
	def PointOnEdge(self, N: int) -> gp_Pnt: ...
	def PointOnFace(self, N: int) -> gp_Pnt: ...
	def SquareDistance(self, N: int) -> float: ...

class BRepExtrema_ExtFF:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, F1: TopoDS_Face, F2: TopoDS_Face) -> None: ...
	def Initialize(self, F2: TopoDS_Face) -> None: ...
	def IsDone(self) -> bool: ...
	def IsParallel(self) -> bool: ...
	def NbExt(self) -> int: ...
	def ParameterOnFace1(self, N: int) -> Tuple[float, float]: ...
	def ParameterOnFace2(self, N: int) -> Tuple[float, float]: ...
	def Perform(self, F1: TopoDS_Face, F2: TopoDS_Face) -> None: ...
	def PointOnFace1(self, N: int) -> gp_Pnt: ...
	def PointOnFace2(self, N: int) -> gp_Pnt: ...
	def SquareDistance(self, N: int) -> float: ...

class BRepExtrema_ExtPC:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, V: TopoDS_Vertex, E: TopoDS_Edge) -> None: ...
	def Initialize(self, E: TopoDS_Edge) -> None: ...
	def IsDone(self) -> bool: ...
	def IsMin(self, N: int) -> bool: ...
	def NbExt(self) -> int: ...
	def Parameter(self, N: int) -> float: ...
	def Perform(self, V: TopoDS_Vertex) -> None: ...
	def Point(self, N: int) -> gp_Pnt: ...
	def SquareDistance(self, N: int) -> float: ...
	def TrimmedSquareDistances(self, pnt1: gp_Pnt, pnt2: gp_Pnt) -> Tuple[float, float]: ...

class BRepExtrema_ExtPF:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, TheVertex: TopoDS_Vertex, TheFace: TopoDS_Face, TheFlag: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, TheAlgo: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	def Initialize(self, TheFace: TopoDS_Face, TheFlag: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, TheAlgo: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad) -> None: ...
	def IsDone(self) -> bool: ...
	def NbExt(self) -> int: ...
	def Parameter(self, N: int) -> Tuple[float, float]: ...
	def Perform(self, TheVertex: TopoDS_Vertex, TheFace: TopoDS_Face) -> None: ...
	def Point(self, N: int) -> gp_Pnt: ...
	def SetAlgo(self, A: Extrema_ExtAlgo) -> None: ...
	def SetFlag(self, F: Extrema_ExtFlag) -> None: ...
	def SquareDistance(self, N: int) -> float: ...

class BRepExtrema_Poly:
	@staticmethod
	def Distance(S1: TopoDS_Shape, S2: TopoDS_Shape, P1: gp_Pnt, P2: gp_Pnt) -> Tuple[bool, float]: ...

class BRepExtrema_ShapeProximity:
	@overload
	def __init__(self, theTolerance: Optional[float] = 0.0) -> None: ...
	@overload
	def __init__(self, theShape1: TopoDS_Shape, theShape2: TopoDS_Shape, theTolerance: Optional[float] = 0.0) -> None: ...
	def ElementSet1(self) -> BRepExtrema_TriangleSet: ...
	def ElementSet2(self) -> BRepExtrema_TriangleSet: ...
	def GetSubShape1(self, theID: int) -> TopoDS_Face: ...
	def GetSubShape2(self, theID: int) -> TopoDS_Face: ...
	def IsDone(self) -> bool: ...
	def LoadShape1(self, theShape1: TopoDS_Shape) -> bool: ...
	def LoadShape2(self, theShape2: TopoDS_Shape) -> bool: ...
	def OverlapSubShapes1(self) -> BRepExtrema_MapOfIntegerPackedMapOfInteger: ...
	def OverlapSubShapes2(self) -> BRepExtrema_MapOfIntegerPackedMapOfInteger: ...
	def Perform(self) -> None: ...
	def SetTolerance(self, theTolerance: float) -> None: ...
	def Tolerance(self) -> float: ...

class BRepExtrema_SolutionElem:
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, theDist: float, thePoint: gp_Pnt, theSolType: BRepExtrema_SupportType, theVertex: TopoDS_Vertex) -> None: ...
	@overload
	def __init__(self, theDist: float, thePoint: gp_Pnt, theSolType: BRepExtrema_SupportType, theEdge: TopoDS_Edge, theParam: float) -> None: ...
	@overload
	def __init__(self, theDist: float, thePoint: gp_Pnt, theSolType: BRepExtrema_SupportType, theFace: TopoDS_Face, theU: float, theV: float) -> None: ...
	def Dist(self) -> float: ...
	def Edge(self) -> TopoDS_Edge: ...
	def EdgeParameter(self) -> float: ...
	def Face(self) -> TopoDS_Face: ...
	def FaceParameter(self) -> Tuple[float, float]: ...
	def Point(self) -> gp_Pnt: ...
	def SupportKind(self) -> BRepExtrema_SupportType: ...
	def Vertex(self) -> TopoDS_Vertex: ...

class BRepExtrema_TriangleSet(BVH_PrimitiveSet3d):
	@overload
	def __init__(self) -> None: ...
	@overload
	def __init__(self, theFaces: BRepExtrema_ShapeList) -> None: ...
	def Box(self, theIndex: int) -> False: ...
	def Center(self, theIndex: int, theAxis: int) -> float: ...
	def Clear(self) -> None: ...
	def GetFaceID(self, theIndex: int) -> int: ...
	def GetVertices(self, theIndex: int, theVertex1: BVH_Vec3d, theVertex2: BVH_Vec3d, theVertex3: BVH_Vec3d) -> None: ...
	def Init(self, theFaces: BRepExtrema_ShapeList) -> bool: ...
	def Size(self) -> int: ...
	def Swap(self, theIndex1: int, theIndex2: int) -> None: ...

class BRepExtrema_SelfIntersection(BRepExtrema_ElementFilter):
	@overload
	def __init__(self, theTolerance: Optional[float] = 0.0) -> None: ...
	@overload
	def __init__(self, theShape: TopoDS_Shape, theTolerance: Optional[float] = 0.0) -> None: ...
	def ElementSet(self) -> BRepExtrema_TriangleSet: ...
	def GetSubShape(self, theID: int) -> TopoDS_Face: ...
	def IsDone(self) -> bool: ...
	def LoadShape(self, theShape: TopoDS_Shape) -> bool: ...
	def OverlapElements(self) -> BRepExtrema_MapOfIntegerPackedMapOfInteger: ...
	def Perform(self) -> None: ...
	def SetTolerance(self, theTolerance: float) -> None: ...
	def Tolerance(self) -> float: ...

#classnotwrapped
class BRepExtrema_OverlapTool: ...

# harray1 classes
# harray2 classes
# hsequence classes

BRepExtrema_Poly_Distance = BRepExtrema_Poly.Distance
