File indexing completed on 2025-01-18 10:03:10
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 <BRepExtrema_SeqOfSolution.hxx>
0018 #include <Extrema_ExtFlag.hxx>
0019 #include <Extrema_ExtAlgo.hxx>
0020 #include <Precision.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022
0023 class TopoDS_Shape;
0024 class Bnd_Box;
0025 class TopoDS_Vertex;
0026 class TopoDS_Edge;
0027 class TopoDS_Face;
0028
0029
0030
0031 class BRepExtrema_DistanceSS
0032 {
0033 public:
0034
0035 DEFINE_STANDARD_ALLOC
0036
0037 public:
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 BRepExtrema_DistanceSS(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2,
0052 const Bnd_Box& theBox1, const Bnd_Box& theBox2,
0053 const Standard_Real theDstRef,
0054 const Standard_Real theDeflection = Precision::Confusion(),
0055 const Extrema_ExtFlag theExtFlag = Extrema_ExtFlag_MINMAX,
0056 const Extrema_ExtAlgo theExtAlgo = Extrema_ExtAlgo_Grad)
0057 :
0058 myDstRef(theDstRef),
0059 myModif(Standard_False),
0060 myEps(theDeflection),
0061 myFlag(theExtFlag),
0062 myAlgo(theExtAlgo)
0063 {
0064 Perform(theS1, theS2, theBox1, theBox2);
0065 }
0066
0067 public:
0068
0069
0070 Standard_Boolean IsDone() const
0071 {
0072 return myModif;
0073 }
0074
0075
0076 Standard_Real DistValue() const
0077 {
0078 return myDstRef;
0079 }
0080
0081
0082 const BRepExtrema_SeqOfSolution& Seq1Value() const
0083 {
0084 return mySeqSolShape1;
0085 }
0086
0087
0088 const BRepExtrema_SeqOfSolution& Seq2Value() const
0089 {
0090 return mySeqSolShape2;
0091 }
0092
0093 private:
0094
0095
0096
0097 Standard_EXPORT void Perform(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2,
0098 const Bnd_Box& theBox1, const Bnd_Box& theBox2);
0099
0100
0101 void Perform(const TopoDS_Vertex& S1, const TopoDS_Vertex& S2,
0102 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0103 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0104
0105
0106 void Perform(const TopoDS_Vertex& theS1, const TopoDS_Edge& theS2,
0107 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0108 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0109
0110
0111 void Perform(const TopoDS_Vertex& theS1, const TopoDS_Face& theS2,
0112 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0113 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0114
0115
0116 void Perform(const TopoDS_Edge& theS1, const TopoDS_Edge& theS2,
0117 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0118 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0119
0120
0121 void Perform(const TopoDS_Edge& theS1, const TopoDS_Face& theS2,
0122 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0123 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0124
0125
0126 void Perform(const TopoDS_Face& theS1, const TopoDS_Face& theS2,
0127 BRepExtrema_SeqOfSolution& theSeqSolShape1,
0128 BRepExtrema_SeqOfSolution& theSeqSolShape2);
0129
0130 private:
0131
0132 BRepExtrema_SeqOfSolution mySeqSolShape1;
0133 BRepExtrema_SeqOfSolution mySeqSolShape2;
0134 Standard_Real myDstRef;
0135 Standard_Boolean myModif;
0136 Standard_Real myEps;
0137 Extrema_ExtFlag myFlag;
0138 Extrema_ExtAlgo myAlgo;
0139 };
0140
0141 #endif