File indexing completed on 2026-09-28 09:19:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _BRepExtrema_DistanceSS_HeaderFile
0015 #define _BRepExtrema_DistanceSS_HeaderFile
0016
0017 #include <NCollection_Sequence.hxx>
0018 #include <BRepExtrema_SolutionElem.hxx>
0019 #include <Extrema_ExtFlag.hxx>
0020 #include <Extrema_ExtAlgo.hxx>
0021 #include <Precision.hxx>
0022 #include <Standard_DefineAlloc.hxx>
0023
0024 class TopoDS_Shape;
0025 class Bnd_Box;
0026 class TopoDS_Vertex;
0027 class TopoDS_Edge;
0028 class TopoDS_Face;
0029
0030
0031
0032 class BRepExtrema_DistanceSS
0033 {
0034 public:
0035 DEFINE_STANDARD_ALLOC
0036
0037 public:
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 BRepExtrema_DistanceSS(const TopoDS_Shape& theS1,
0051 const TopoDS_Shape& theS2,
0052 const Bnd_Box& theBox1,
0053 const Bnd_Box& theBox2,
0054 const double theDstRef,
0055 const double theDeflection = Precision::Confusion(),
0056 const Extrema_ExtFlag theExtFlag = Extrema_ExtFlag_MINMAX,
0057 const Extrema_ExtAlgo theExtAlgo = Extrema_ExtAlgo_Grad)
0058 : myDstRef(theDstRef),
0059 myModif(false),
0060 myEps(theDeflection),
0061 myFlag(theExtFlag),
0062 myAlgo(theExtAlgo)
0063 {
0064 Perform(theS1, theS2, theBox1, theBox2);
0065 }
0066
0067 public:
0068
0069 bool IsDone() const { return myModif; }
0070
0071
0072 double DistValue() const { return myDstRef; }
0073
0074
0075 const NCollection_Sequence<BRepExtrema_SolutionElem>& Seq1Value() const { return mySeqSolShape1; }
0076
0077
0078 const NCollection_Sequence<BRepExtrema_SolutionElem>& Seq2Value() const { return mySeqSolShape2; }
0079
0080 private:
0081
0082
0083 Standard_EXPORT void Perform(const TopoDS_Shape& theS1,
0084 const TopoDS_Shape& theS2,
0085 const Bnd_Box& theBox1,
0086 const Bnd_Box& theBox2);
0087
0088
0089 void Perform(const TopoDS_Vertex& S1,
0090 const TopoDS_Vertex& S2,
0091 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0092 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0093
0094
0095 void Perform(const TopoDS_Vertex& theS1,
0096 const TopoDS_Edge& theS2,
0097 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0098 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0099
0100
0101 void Perform(const TopoDS_Vertex& theS1,
0102 const TopoDS_Face& theS2,
0103 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0104 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0105
0106
0107 void Perform(const TopoDS_Edge& theS1,
0108 const TopoDS_Edge& theS2,
0109 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0110 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0111
0112
0113 void Perform(const TopoDS_Edge& theS1,
0114 const TopoDS_Face& theS2,
0115 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0116 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0117
0118
0119 void Perform(const TopoDS_Face& theS1,
0120 const TopoDS_Face& theS2,
0121 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape1,
0122 NCollection_Sequence<BRepExtrema_SolutionElem>& theSeqSolShape2);
0123
0124 private:
0125 NCollection_Sequence<BRepExtrema_SolutionElem> mySeqSolShape1;
0126 NCollection_Sequence<BRepExtrema_SolutionElem> mySeqSolShape2;
0127 double myDstRef;
0128 bool myModif;
0129 double myEps;
0130 Extrema_ExtFlag myFlag;
0131 Extrema_ExtAlgo myAlgo;
0132 };
0133
0134 #endif