File indexing completed on 2026-09-16 09:17:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _IntTools_EdgeFace_HeaderFile
0017 #define _IntTools_EdgeFace_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022
0023 #include <TopoDS_Edge.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <BRepAdaptor_Curve.hxx>
0027 #include <BRepAdaptor_Surface.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <IntTools_CommonPrt.hxx>
0030 #include <NCollection_Sequence.hxx>
0031 #include <IntTools_Range.hxx>
0032 class IntTools_Context;
0033 class gp_Pnt;
0034 class IntTools_CommonPrt;
0035
0036
0037
0038
0039
0040
0041 class IntTools_EdgeFace
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046 public:
0047
0048 Standard_EXPORT IntTools_EdgeFace();
0049
0050 public:
0051
0052 void SetEdge(const TopoDS_Edge& theEdge) { myEdge = theEdge; }
0053
0054
0055 const TopoDS_Edge& Edge() const { return myEdge; }
0056
0057
0058 void SetFace(const TopoDS_Face& theFace) { myFace = theFace; }
0059
0060
0061 const TopoDS_Face& Face() const { return myFace; }
0062
0063
0064
0065 void SetRange(const IntTools_Range& theRange) { myRange = theRange; }
0066
0067
0068
0069 void SetRange(const double theFirst, const double theLast)
0070 {
0071 myRange.SetFirst(theFirst);
0072 myRange.SetLast(theLast);
0073 }
0074
0075
0076 const IntTools_Range& Range() const { return myRange; }
0077
0078
0079 void SetContext(const occ::handle<IntTools_Context>& theContext) { myContext = theContext; }
0080
0081
0082 const occ::handle<IntTools_Context>& Context() const { return myContext; }
0083
0084
0085 void SetFuzzyValue(const double theFuzz)
0086 {
0087 myFuzzyValue = (std::max)(theFuzz, Precision::Confusion());
0088 }
0089
0090
0091 double FuzzyValue() const { return myFuzzyValue; }
0092
0093
0094
0095
0096
0097
0098 void UseQuickCoincidenceCheck(const bool theFlag) { myQuickCoincidenceCheck = theFlag; }
0099
0100
0101 bool IsCoincidenceCheckedQuickly() { return myQuickCoincidenceCheck; }
0102
0103 public:
0104
0105 Standard_EXPORT void Perform();
0106
0107 public:
0108
0109
0110 bool IsDone() const { return myIsDone; }
0111
0112
0113
0114
0115
0116
0117 int ErrorStatus() const { return myErrorStatus; }
0118
0119 public:
0120
0121 const NCollection_Sequence<IntTools_CommonPrt>& CommonParts() const { return mySeqOfCommonPrts; }
0122
0123
0124 double MinimalDistance() const { return myMinDistance; }
0125
0126 protected:
0127 Standard_EXPORT static bool IsEqDistance(const gp_Pnt& aP,
0128 const BRepAdaptor_Surface& aS,
0129 const double aT,
0130 double& aD);
0131 Standard_EXPORT void CheckData();
0132
0133 Standard_EXPORT bool IsProjectable(const double t) const;
0134
0135 Standard_EXPORT double DistanceFunction(const double t);
0136
0137 Standard_EXPORT int MakeType(IntTools_CommonPrt& aCP);
0138
0139 Standard_EXPORT bool CheckTouch(const IntTools_CommonPrt& aCP, double& aTX);
0140
0141 Standard_EXPORT bool CheckTouchVertex(const IntTools_CommonPrt& aCP, double& aTX);
0142
0143
0144 Standard_EXPORT bool IsCoincident();
0145
0146 protected:
0147 TopoDS_Edge myEdge;
0148 TopoDS_Face myFace;
0149 double myFuzzyValue;
0150 BRepAdaptor_Curve myC;
0151 BRepAdaptor_Surface myS;
0152 double myCriteria;
0153 bool myIsDone;
0154 int myErrorStatus;
0155 occ::handle<IntTools_Context> myContext;
0156 NCollection_Sequence<IntTools_CommonPrt> mySeqOfCommonPrts;
0157 IntTools_Range myRange;
0158 bool myQuickCoincidenceCheck;
0159 double myMinDistance;
0160 };
0161
0162 #endif