File indexing completed on 2025-01-18 10:04:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ProjLib_CompProjectedCurve_HeaderFile
0018 #define _ProjLib_CompProjectedCurve_HeaderFile
0019
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <Adaptor3d_Surface.hxx>
0022 #include <ProjLib_HSequenceOfHSequenceOfPnt.hxx>
0023 #include <ProjLib_Projector.hxx>
0024 #include <TColGeom_HArray1OfCurve.hxx>
0025 #include <TColGeom2d_HArray1OfCurve.hxx>
0026 #include <TColgp_HArray1OfPnt.hxx>
0027 #include <TColgp_HArray1OfPnt2d.hxx>
0028 #include <TColStd_HArray1OfBoolean.hxx>
0029 #include <TColStd_HArray1OfReal.hxx>
0030 #include <Geom_Curve.hxx>
0031 #include <Geom2d_Curve.hxx>
0032 #include <GeomAbs_Shape.hxx>
0033 #include <TColStd_Array1OfReal.hxx>
0034 #include <GeomAbs_CurveType.hxx>
0035
0036 class gp_Pnt2d;
0037 class gp_Vec2d;
0038
0039 class ProjLib_CompProjectedCurve : public Adaptor2d_Curve2d
0040 {
0041 DEFINE_STANDARD_RTTIEXT(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d)
0042 public:
0043
0044 Standard_EXPORT ProjLib_CompProjectedCurve();
0045
0046
0047 Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV);
0048
0049
0050
0051
0052
0053 Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV, const Standard_Real MaxDist);
0054
0055
0056
0057
0058
0059
0060 Standard_EXPORT ProjLib_CompProjectedCurve(const Standard_Real Tol3d, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real MaxDist = -1.0);
0061
0062
0063 Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE;
0064
0065
0066
0067
0068
0069 Standard_EXPORT void Init();
0070
0071
0072
0073
0074
0075 Standard_EXPORT void Perform();
0076
0077
0078 Standard_EXPORT void SetTol3d(const Standard_Real theTol3d);
0079
0080
0081
0082 Standard_EXPORT void SetContinuity(const GeomAbs_Shape theContinuity);
0083
0084
0085
0086
0087 Standard_EXPORT void SetMaxDegree(const Standard_Integer theMaxDegree);
0088
0089
0090
0091
0092 Standard_EXPORT void SetMaxSeg(const Standard_Integer theMaxSeg);
0093
0094
0095 Standard_EXPORT void SetProj2d(const Standard_Boolean theProj2d);
0096
0097
0098 Standard_EXPORT void SetProj3d(const Standard_Boolean theProj3d);
0099
0100
0101 Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S);
0102
0103
0104 Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C);
0105
0106 Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const;
0107
0108 Standard_EXPORT const Handle(Adaptor3d_Curve)& GetCurve() const;
0109
0110 Standard_EXPORT void GetTolerance (Standard_Real& TolU, Standard_Real& TolV) const;
0111
0112
0113 Standard_EXPORT Standard_Integer NbCurves() const;
0114
0115
0116 Standard_EXPORT void Bounds (const Standard_Integer Index, Standard_Real& Udeb, Standard_Real& Ufin) const;
0117
0118
0119 Standard_EXPORT Standard_Boolean IsSinglePnt (const Standard_Integer Index, gp_Pnt2d& P) const;
0120
0121
0122 Standard_EXPORT Standard_Boolean IsUIso (const Standard_Integer Index, Standard_Real& U) const;
0123
0124
0125 Standard_EXPORT Standard_Boolean IsVIso (const Standard_Integer Index, Standard_Real& V) const;
0126
0127
0128 Standard_EXPORT gp_Pnt2d Value (const Standard_Real U) const Standard_OVERRIDE;
0129
0130
0131 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt2d& P) const Standard_OVERRIDE;
0132
0133
0134
0135
0136
0137 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE;
0138
0139
0140
0141
0142
0143
0144 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE;
0145
0146
0147
0148
0149
0150
0151 Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
0152
0153
0154
0155 Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
0156
0157
0158
0159 Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
0160
0161
0162 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
0163
0164
0165
0166 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0167
0168
0169
0170
0171
0172 Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real FirstParam, const Standard_Real LastParam, const Standard_Real Tol) const Standard_OVERRIDE;
0173
0174
0175
0176
0177
0178
0179 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0180
0181
0182
0183 Standard_EXPORT Standard_Real MaxDistance (const Standard_Integer Index) const;
0184
0185 Standard_EXPORT const Handle(ProjLib_HSequenceOfHSequenceOfPnt)& GetSequence() const;
0186
0187
0188
0189
0190 Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
0191
0192
0193
0194 Standard_EXPORT Standard_Boolean ResultIsPoint(const Standard_Integer theIndex) const;
0195
0196
0197
0198 Standard_EXPORT Standard_Real GetResult2dUApproxError(const Standard_Integer theIndex) const;
0199
0200
0201
0202 Standard_EXPORT Standard_Real GetResult2dVApproxError(const Standard_Integer theIndex) const;
0203
0204
0205
0206 Standard_EXPORT Standard_Real GetResult3dApproxError(const Standard_Integer theIndex) const;
0207
0208
0209
0210 Standard_EXPORT Handle(Geom2d_Curve) GetResult2dC(const Standard_Integer theIndex) const;
0211
0212
0213
0214 Standard_EXPORT Handle(Geom_Curve) GetResult3dC(const Standard_Integer theIndex) const;
0215
0216
0217
0218 Standard_EXPORT gp_Pnt2d GetResult2dP(const Standard_Integer theIndex) const;
0219
0220
0221
0222 Standard_EXPORT gp_Pnt GetResult3dP(const Standard_Integer theIndex) const;
0223
0224
0225 Standard_Boolean GetProj2d() const { return myProj2d; }
0226
0227
0228 Standard_Boolean GetProj3d() const { return myProj3d; }
0229
0230 private:
0231
0232
0233
0234 Standard_EXPORT void UpdateTripleByTrapCriteria(gp_Pnt &thePoint) const;
0235
0236 Standard_EXPORT void BuildIntervals (const GeomAbs_Shape S) const;
0237
0238 private:
0239
0240 Handle(Adaptor3d_Surface) mySurface;
0241 Handle(Adaptor3d_Curve) myCurve;
0242 Standard_Integer myNbCurves;
0243 Handle(ProjLib_HSequenceOfHSequenceOfPnt) mySequence;
0244 Handle(TColStd_HArray1OfBoolean) myUIso;
0245 Handle(TColStd_HArray1OfBoolean) myVIso;
0246 Handle(TColStd_HArray1OfBoolean) mySnglPnts;
0247 Handle(TColStd_HArray1OfReal) myMaxDistance;
0248 Handle(TColStd_HArray1OfReal) myTabInt;
0249 Standard_Real myTol3d;
0250 GeomAbs_Shape myContinuity;
0251 Standard_Integer myMaxDegree;
0252 Standard_Integer myMaxSeg;
0253 Standard_Boolean myProj2d;
0254 Standard_Boolean myProj3d;
0255 Standard_Real myMaxDist;
0256 Standard_Real myTolU;
0257 Standard_Real myTolV;
0258
0259 Handle(TColStd_HArray1OfBoolean) myResultIsPoint;
0260 Handle(TColStd_HArray1OfReal) myResult2dUApproxError;
0261 Handle(TColStd_HArray1OfReal) myResult2dVApproxError;
0262 Handle(TColStd_HArray1OfReal) myResult3dApproxError;
0263 Handle(TColgp_HArray1OfPnt) myResult3dPoint;
0264 Handle(TColgp_HArray1OfPnt2d) myResult2dPoint;
0265 Handle(TColGeom_HArray1OfCurve) myResult3dCurve;
0266 Handle(TColGeom2d_HArray1OfCurve) myResult2dCurve;
0267 };
0268
0269 DEFINE_STANDARD_HANDLE(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d)
0270
0271 #endif