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