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
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_SequenceOfCommonPrts.hxx>
0030 #include <IntTools_Range.hxx>
0031 class IntTools_Context;
0032 class gp_Pnt;
0033 class IntTools_CommonPrt;
0034
0035
0036
0037
0038
0039
0040 class IntTools_EdgeFace
0041 {
0042 public:
0043
0044 DEFINE_STANDARD_ALLOC
0045
0046 public:
0047
0048
0049 Standard_EXPORT IntTools_EdgeFace();
0050
0051 public:
0052
0053
0054 void SetEdge(const TopoDS_Edge& theEdge)
0055 {
0056 myEdge = theEdge;
0057 }
0058
0059
0060 const TopoDS_Edge& Edge() const
0061 {
0062 return myEdge;
0063 }
0064
0065
0066 void SetFace(const TopoDS_Face& theFace)
0067 {
0068 myFace = theFace;
0069 }
0070
0071
0072 const TopoDS_Face& Face() const
0073 {
0074 return myFace;
0075 }
0076
0077
0078
0079 void SetRange(const IntTools_Range& theRange)
0080 {
0081 myRange = theRange;
0082 }
0083
0084
0085
0086 void SetRange(const Standard_Real theFirst, const Standard_Real theLast)
0087 {
0088 myRange.SetFirst(theFirst);
0089 myRange.SetLast(theLast);
0090 }
0091
0092
0093 const IntTools_Range& Range() const
0094 {
0095 return myRange;
0096 }
0097
0098
0099 void SetContext(const Handle(IntTools_Context)& theContext)
0100 {
0101 myContext = theContext;
0102 }
0103
0104
0105 const Handle(IntTools_Context)& Context() const
0106 {
0107 return myContext;
0108 }
0109
0110
0111 void SetFuzzyValue(const Standard_Real theFuzz)
0112 {
0113 myFuzzyValue = Max(theFuzz, Precision::Confusion());
0114 }
0115
0116
0117 Standard_Real FuzzyValue() const
0118 {
0119 return myFuzzyValue;
0120 }
0121
0122
0123
0124
0125
0126
0127 void UseQuickCoincidenceCheck(const Standard_Boolean theFlag)
0128 {
0129 myQuickCoincidenceCheck = theFlag;
0130 }
0131
0132
0133 Standard_Boolean IsCoincidenceCheckedQuickly()
0134 {
0135 return myQuickCoincidenceCheck;
0136 }
0137
0138
0139
0140 public:
0141
0142
0143 Standard_EXPORT void Perform();
0144
0145
0146 public:
0147
0148
0149
0150 Standard_Boolean IsDone() const
0151 {
0152 return myIsDone;
0153 }
0154
0155
0156
0157
0158
0159
0160 Standard_Integer ErrorStatus() const
0161 {
0162 return myErrorStatus;
0163 }
0164
0165
0166 public:
0167
0168
0169 const IntTools_SequenceOfCommonPrts& CommonParts() const
0170 {
0171 return mySeqOfCommonPrts;
0172 }
0173
0174
0175 Standard_Real MinimalDistance() const
0176 {
0177 return myMinDistance;
0178 }
0179
0180 protected:
0181
0182 Standard_EXPORT static Standard_Boolean IsEqDistance (const gp_Pnt& aP, const BRepAdaptor_Surface& aS, const Standard_Real aT, Standard_Real& aD);
0183 Standard_EXPORT void CheckData();
0184
0185 Standard_EXPORT Standard_Boolean IsProjectable (const Standard_Real t) const;
0186
0187 Standard_EXPORT Standard_Real DistanceFunction (const Standard_Real t);
0188
0189 Standard_EXPORT Standard_Integer MakeType (IntTools_CommonPrt& aCP);
0190
0191 Standard_EXPORT Standard_Boolean CheckTouch (const IntTools_CommonPrt& aCP, Standard_Real& aTX);
0192
0193 Standard_EXPORT Standard_Boolean CheckTouchVertex (const IntTools_CommonPrt& aCP, Standard_Real& aTX);
0194
0195
0196 Standard_EXPORT Standard_Boolean IsCoincident();
0197
0198 protected:
0199
0200 TopoDS_Edge myEdge;
0201 TopoDS_Face myFace;
0202 Standard_Real myFuzzyValue;
0203 BRepAdaptor_Curve myC;
0204 BRepAdaptor_Surface myS;
0205 Standard_Real myCriteria;
0206 Standard_Boolean myIsDone;
0207 Standard_Integer myErrorStatus;
0208 Handle(IntTools_Context) myContext;
0209 IntTools_SequenceOfCommonPrts mySeqOfCommonPrts;
0210 IntTools_Range myRange;
0211 Standard_Boolean myQuickCoincidenceCheck;
0212 Standard_Real myMinDistance;
0213 };
0214
0215 #endif