File indexing completed on 2025-01-18 10:04:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _IntTools_EdgeEdge_HeaderFile
0016 #define _IntTools_EdgeEdge_HeaderFile
0017
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021
0022 #include <BRepAdaptor_Curve.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <IntTools_SequenceOfCommonPrts.hxx>
0025 #include <IntTools_SequenceOfRanges.hxx>
0026 #include <TopAbs_ShapeEnum.hxx>
0027 class Geom_Curve;
0028 class Bnd_Box;
0029
0030
0031
0032
0033
0034 class IntTools_EdgeEdge
0035 {
0036 public:
0037
0038 DEFINE_STANDARD_ALLOC
0039
0040
0041
0042
0043 IntTools_EdgeEdge();
0044
0045
0046 ~IntTools_EdgeEdge();
0047
0048
0049 IntTools_EdgeEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2);
0050
0051
0052
0053 IntTools_EdgeEdge(const TopoDS_Edge& theEdge1, const Standard_Real aT11,
0054 const Standard_Real aT12, const TopoDS_Edge& theEdge2,
0055 const Standard_Real aT21, const Standard_Real aT22);
0056
0057
0058
0059 void SetEdge1(const TopoDS_Edge& theEdge);
0060
0061
0062
0063 void SetEdge1(const TopoDS_Edge& theEdge, const Standard_Real aT1, const Standard_Real aT2);
0064
0065
0066
0067 void SetRange1(const IntTools_Range& theRange1);
0068
0069
0070
0071 void SetRange1(const Standard_Real aT1, const Standard_Real aT2);
0072
0073
0074
0075 void SetEdge2(const TopoDS_Edge& theEdge);
0076
0077
0078
0079 void SetEdge2(const TopoDS_Edge& theEdge, const Standard_Real aT1, const Standard_Real aT2);
0080
0081
0082
0083 void SetRange2(const IntTools_Range& theRange);
0084
0085
0086
0087 void SetRange2(const Standard_Real aT1, const Standard_Real aT2);
0088
0089
0090
0091 void SetFuzzyValue (const Standard_Real theFuzz);
0092
0093
0094
0095 Standard_EXPORT void Perform();
0096
0097
0098
0099 Standard_Boolean IsDone() const;
0100
0101
0102
0103 Standard_Real FuzzyValue() const;
0104
0105
0106
0107 const IntTools_SequenceOfCommonPrts& CommonParts() const;
0108
0109
0110
0111 void UseQuickCoincidenceCheck (const Standard_Boolean bFlag) {
0112 myQuickCoincidenceCheck=bFlag;
0113 }
0114
0115
0116 Standard_Boolean IsCoincidenceCheckedQuickly () {
0117 return myQuickCoincidenceCheck;
0118 }
0119
0120 protected:
0121
0122
0123
0124
0125 void CheckData();
0126
0127
0128
0129 Standard_EXPORT void Prepare();
0130
0131
0132
0133 Standard_EXPORT void ComputeLineLine();
0134
0135
0136
0137 Standard_EXPORT void FindSolutions (IntTools_SequenceOfRanges& theRanges1,
0138 IntTools_SequenceOfRanges& theRanges2, Standard_Boolean& bSplit2);
0139
0140
0141
0142 Standard_EXPORT void FindSolutions (
0143 const IntTools_Range& theR1, const Bnd_Box& theBox1,
0144 const IntTools_Range& theR2, const Bnd_Box& theBox2,
0145 IntTools_SequenceOfRanges& theRanges1, IntTools_SequenceOfRanges& theRanges2);
0146
0147
0148
0149 Standard_EXPORT void MergeSolutions (const IntTools_SequenceOfRanges& theRanges1,
0150 const IntTools_SequenceOfRanges& theRanges2, const Standard_Boolean bSplit2);
0151
0152
0153
0154 Standard_EXPORT static Standard_Boolean FindParameters(const BRepAdaptor_Curve& theBAC,
0155 const Standard_Real aT1, const Standard_Real aT2, const Standard_Real theTol,
0156 const Standard_Real theRes, const Standard_Real thePTol,
0157 const Standard_Real theResCoeff, const Bnd_Box& theCBox,
0158 Standard_Real& aTB1, Standard_Real& aTB2);
0159
0160
0161
0162 Standard_EXPORT Standard_Integer CheckCoincidence (const Standard_Real aT11,
0163 const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22,
0164 const Standard_Real theCriteria, const Standard_Real theCurveRes1);
0165
0166
0167
0168 Standard_EXPORT void AddSolution (const Standard_Real aT11, const Standard_Real aT12,
0169 const Standard_Real aT21, const Standard_Real aT22, const TopAbs_ShapeEnum theType);
0170
0171
0172
0173 Standard_EXPORT void FindBestSolution (const Standard_Real aT11, const Standard_Real aT12,
0174 const Standard_Real aT21, const Standard_Real aT22,
0175 Standard_Real& aT1, Standard_Real& aT2);
0176
0177
0178
0179
0180 Standard_EXPORT Standard_Boolean IsIntersection (const Standard_Real aT11,
0181 const Standard_Real aT12, const Standard_Real aT21, const Standard_Real aT22);
0182
0183
0184 Standard_EXPORT Standard_Boolean IsCoincident();
0185
0186 TopoDS_Edge myEdge1;
0187 TopoDS_Edge myEdge2;
0188 Handle(Geom_Curve) myGeom1;
0189 Handle(Geom_Curve) myGeom2;
0190 BRepAdaptor_Curve myCurve1;
0191 BRepAdaptor_Curve myCurve2;
0192 Standard_Real myTol1;
0193 Standard_Real myTol2;
0194 Standard_Real myTol;
0195 Standard_Real myFuzzyValue;
0196 Standard_Real myRes1;
0197 Standard_Real myRes2;
0198 Standard_Real myResCoeff1;
0199 Standard_Real myResCoeff2;
0200 Standard_Real myPTol1;
0201 Standard_Real myPTol2;
0202 IntTools_Range myRange1;
0203 IntTools_Range myRange2;
0204 Standard_Boolean mySwap;
0205 Standard_Integer myErrorStatus;
0206 IntTools_SequenceOfCommonPrts myCommonParts;
0207
0208
0209
0210
0211
0212
0213
0214 Standard_Boolean myQuickCoincidenceCheck;
0215
0216 private:
0217
0218 };
0219
0220 #include <IntTools_EdgeEdge.lxx>
0221
0222 #endif