File indexing completed on 2025-01-18 10:03:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Extrema_ExtCC_HeaderFile
0018 #define _Extrema_ExtCC_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022
0023 #include <Extrema_ECC.hxx>
0024 #include <Extrema_SequenceOfPOnCurv.hxx>
0025 #include <TColStd_SequenceOfReal.hxx>
0026 #include <gp_Pnt.hxx>
0027
0028 class Adaptor3d_Curve;
0029 class Extrema_POnCurv;
0030 class Extrema_ExtElC;
0031
0032
0033
0034
0035 class Extrema_ExtCC
0036 {
0037 public:
0038
0039 DEFINE_STANDARD_ALLOC
0040
0041
0042 Standard_EXPORT Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10,
0043 const Standard_Real TolC2 = 1.0e-10);
0044
0045
0046 Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1,
0047 const Adaptor3d_Curve& C2,
0048 const Standard_Real TolC1 = 1.0e-10,
0049 const Standard_Real TolC2 = 1.0e-10);
0050
0051
0052 Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1,
0053 const Adaptor3d_Curve& C2,
0054 const Standard_Real U1,
0055 const Standard_Real U2,
0056 const Standard_Real V1,
0057 const Standard_Real V2,
0058 const Standard_Real TolC1 = 1.0e-10,
0059 const Standard_Real TolC2 = 1.0e-10);
0060
0061
0062 Standard_EXPORT void Initialize (const Adaptor3d_Curve& C1,
0063 const Adaptor3d_Curve& C2,
0064 const Standard_Real TolC1 = 1.0e-10,
0065 const Standard_Real TolC2 = 1.0e-10);
0066
0067
0068 Standard_EXPORT void Initialize (const Adaptor3d_Curve& C1,
0069 const Adaptor3d_Curve& C2,
0070 const Standard_Real U1,
0071 const Standard_Real U2,
0072 const Standard_Real V1,
0073 const Standard_Real V2,
0074 const Standard_Real TolC1 = 1.0e-10,
0075 const Standard_Real TolC2 = 1.0e-10);
0076
0077 Standard_EXPORT void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve& C);
0078
0079 Standard_EXPORT void SetCurve (const Standard_Integer theRank,
0080 const Adaptor3d_Curve& C,
0081 const Standard_Real Uinf,
0082 const Standard_Real Usup);
0083
0084 Standard_EXPORT void SetRange (const Standard_Integer theRank,
0085 const Standard_Real Uinf,
0086 const Standard_Real Usup);
0087
0088 Standard_EXPORT void SetTolerance (const Standard_Integer theRank, const Standard_Real Tol);
0089
0090 Standard_EXPORT void Perform();
0091
0092
0093 Standard_EXPORT Standard_Boolean IsDone() const;
0094
0095
0096 Standard_EXPORT Standard_Integer NbExt() const;
0097
0098
0099 Standard_EXPORT Standard_Boolean IsParallel() const;
0100
0101
0102 Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N = 1) const;
0103
0104
0105
0106 Standard_EXPORT void Points (const Standard_Integer N,
0107 Extrema_POnCurv& P1,
0108 Extrema_POnCurv& P2) const;
0109
0110
0111
0112
0113
0114 Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist11,
0115 Standard_Real& distP12,
0116 Standard_Real& distP21,
0117 Standard_Real& distP22,
0118 gp_Pnt& P11,
0119 gp_Pnt& P12,
0120 gp_Pnt& P21,
0121 gp_Pnt& P22) const;
0122
0123
0124 Standard_EXPORT void SetSingleSolutionFlag (const Standard_Boolean theSingleSolutionFlag);
0125
0126
0127 Standard_EXPORT Standard_Boolean GetSingleSolutionFlag () const;
0128
0129 protected:
0130
0131
0132 Standard_EXPORT void PrepareResults (const Extrema_ExtElC& AlgExt,
0133 const Standard_Boolean theIsInverse,
0134 const Standard_Real Ut11,
0135 const Standard_Real Ut12,
0136 const Standard_Real Ut21,
0137 const Standard_Real Ut22);
0138
0139
0140 Standard_EXPORT void PrepareResults (const Extrema_ECC& AlgExt,
0141 const Standard_Real Ut11,
0142 const Standard_Real Ut12,
0143 const Standard_Real Ut21,
0144 const Standard_Real Ut22);
0145
0146
0147 Standard_EXPORT void PrepareParallelResult(const Standard_Real theUt11,
0148 const Standard_Real theUt12,
0149 const Standard_Real theUt21,
0150 const Standard_Real theUt22,
0151 const Standard_Real theSqDist);
0152
0153
0154
0155 void ClearSolutions()
0156 {
0157 mySqDist.Clear();
0158 mypoints.Clear();
0159 }
0160
0161 private:
0162
0163
0164 Extrema_ExtCC (Extrema_ExtCC& ) Standard_DELETE;
0165 Extrema_ExtCC& operator= (Extrema_ExtCC& ) Standard_DELETE;
0166
0167 private:
0168
0169 Standard_Boolean myIsFindSingleSolution;
0170 Extrema_ECC myECC;
0171 Standard_Boolean myDone;
0172 Standard_Boolean myIsParallel;
0173 Extrema_SequenceOfPOnCurv mypoints;
0174 TColStd_SequenceOfReal mySqDist;
0175 const Adaptor3d_Curve* myC[2];
0176 Standard_Real myInf[2];
0177 Standard_Real mySup[2];
0178 Standard_Real myTol[2];
0179 gp_Pnt myP1f;
0180 gp_Pnt myP1l;
0181 gp_Pnt myP2f;
0182 gp_Pnt myP2l;
0183 Standard_Real mydist11;
0184 Standard_Real mydist12;
0185 Standard_Real mydist21;
0186 Standard_Real mydist22;
0187
0188 };
0189
0190 #endif