File indexing completed on 2025-01-18 10:03:32
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _GCPnts_TangentialDeflection_HeaderFile
0018 #define _GCPnts_TangentialDeflection_HeaderFile
0019
0020 #include <TColgp_SequenceOfPnt.hxx>
0021 #include <TColStd_SequenceOfReal.hxx>
0022 #include <gp_Pnt.hxx>
0023 #include <math_Function.hxx>
0024 #include <math_MultipleVarFunction.hxx>
0025 #include <Adaptor3d_Curve.hxx>
0026 #include <Adaptor2d_Curve2d.hxx>
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062 class GCPnts_TangentialDeflection
0063 {
0064 public:
0065
0066 DEFINE_STANDARD_ALLOC
0067
0068
0069
0070 Standard_EXPORT GCPnts_TangentialDeflection();
0071
0072
0073
0074
0075
0076
0077
0078
0079 Standard_EXPORT GCPnts_TangentialDeflection (const Adaptor3d_Curve& theC,
0080 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0081 const Standard_Integer theMinimumOfPoints = 2,
0082 const Standard_Real theUTol = 1.0e-9,
0083 const Standard_Real theMinLen = 1.0e-7);
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094 Standard_EXPORT GCPnts_TangentialDeflection (const Adaptor3d_Curve& theC,
0095 const Standard_Real theFirstParameter, const Standard_Real theLastParameter,
0096 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0097 const Standard_Integer theMinimumOfPoints = 2,
0098 const Standard_Real theUTol = 1.0e-9,
0099 const Standard_Real theMinLen = 1.0e-7);
0100
0101
0102
0103
0104
0105
0106
0107
0108 Standard_EXPORT GCPnts_TangentialDeflection (const Adaptor2d_Curve2d& theC,
0109 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0110 const Standard_Integer theMinimumOfPoints = 2,
0111 const Standard_Real theUTol = 1.0e-9,
0112 const Standard_Real theMinLen = 1.0e-7);
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123 Standard_EXPORT GCPnts_TangentialDeflection (const Adaptor2d_Curve2d& theC,
0124 const Standard_Real theFirstParameter, const Standard_Real theLastParameter,
0125 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0126 const Standard_Integer theMinimumOfPoints = 2,
0127 const Standard_Real theUTol = 1.0e-9,
0128 const Standard_Real theMinLen = 1.0e-7);
0129
0130
0131
0132
0133
0134
0135
0136
0137 Standard_EXPORT void Initialize (const Adaptor3d_Curve& theC,
0138 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0139 const Standard_Integer theMinimumOfPoints = 2,
0140 const Standard_Real theUTol = 1.0e-9,
0141 const Standard_Real theMinLen = 1.0e-7);
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152 Standard_EXPORT void Initialize (const Adaptor3d_Curve& theC,
0153 const Standard_Real theFirstParameter, const Standard_Real theLastParameter,
0154 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0155 const Standard_Integer theMinimumOfPoints = 2,
0156 const Standard_Real theUTol = 1.0e-9,
0157 const Standard_Real theMinLen = 1.0e-7);
0158
0159
0160
0161
0162
0163
0164
0165
0166 Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& theC,
0167 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0168 const Standard_Integer theMinimumOfPoints = 2,
0169 const Standard_Real theUTol = 1.0e-9,
0170 const Standard_Real theMinLen = 1.0e-7);
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181 Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& theC,
0182 const Standard_Real theFirstParameter, const Standard_Real theLastParameter,
0183 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0184 const Standard_Integer theMinimumOfPoints = 2,
0185 const Standard_Real theUTol = 1.0e-9,
0186 const Standard_Real theMinLen = 1.0e-7);
0187
0188
0189
0190
0191 Standard_EXPORT Standard_Integer AddPoint (const gp_Pnt& thePnt,
0192 const Standard_Real theParam,
0193 const Standard_Boolean theIsReplace = Standard_True);
0194
0195 Standard_Integer NbPoints () const
0196 {
0197 return myParameters.Length ();
0198 }
0199
0200 Standard_Real Parameter (const Standard_Integer I) const
0201 {
0202 return myParameters.Value (I);
0203 }
0204
0205 gp_Pnt Value (const Standard_Integer I) const
0206 {
0207 return myPoints.Value (I);
0208 }
0209
0210
0211 Standard_EXPORT static Standard_Real ArcAngularStep (const Standard_Real theRadius,
0212 const Standard_Real theLinearDeflection,
0213 const Standard_Real theAngularDeflection,
0214 const Standard_Real theMinLength);
0215
0216 private:
0217
0218 template<class TheCurve>
0219 void initialize (const TheCurve& theC,
0220 const Standard_Real theFirstParameter, const Standard_Real theLastParameter,
0221 const Standard_Real theAngularDeflection, const Standard_Real theCurvatureDeflection,
0222 const Standard_Integer theMinimumOfPoints,
0223 const Standard_Real theUTol,
0224 const Standard_Real theMinLen);
0225
0226 template<class TheCurve>
0227 void PerformLinear (const TheCurve& theC);
0228
0229 template<class TheCurve>
0230 void PerformCircular (const TheCurve& theC);
0231
0232
0233
0234 template<class TheCurve>
0235 void PerformCurve (const TheCurve& theC);
0236
0237 template<class TheCurve>
0238 void EvaluateDu (const TheCurve& theC,
0239 const Standard_Real theU,
0240 gp_Pnt& theP,
0241 Standard_Real& theDu,
0242 Standard_Boolean& theNotDone) const;
0243
0244
0245 template<class TheCurve>
0246 void EstimDefl (const TheCurve& theC,
0247 const Standard_Real theU1, const Standard_Real theU2,
0248 Standard_Real& theMaxDefl, Standard_Real& theUMax);
0249
0250 private:
0251 Standard_Real myAngularDeflection;
0252 Standard_Real myCurvatureDeflection;
0253 Standard_Real myUTol;
0254 Standard_Integer myMinNbPnts;
0255 Standard_Real myMinLen;
0256 Standard_Real myLastU;
0257 Standard_Real myFirstu;
0258 TColgp_SequenceOfPnt myPoints;
0259 TColStd_SequenceOfReal myParameters;
0260 };
0261
0262 #endif