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_ProjectOnPlane_HeaderFile
0018 #define _ProjLib_ProjectOnPlane_HeaderFile
0019
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <gp_Ax3.hxx>
0022 #include <gp_Dir.hxx>
0023 #include <GeomAbs_CurveType.hxx>
0024 #include <GeomAdaptor_Curve.hxx>
0025 #include <Adaptor3d_Curve.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 #include <TColStd_Array1OfReal.hxx>
0028
0029 class gp_Pnt;
0030 class gp_Vec;
0031 class gp_Lin;
0032 class gp_Circ;
0033 class gp_Elips;
0034 class gp_Hypr;
0035 class gp_Parab;
0036 class Geom_BezierCurve;
0037 class Geom_BSplineCurve;
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 class ProjLib_ProjectOnPlane : public Adaptor3d_Curve
0048 {
0049 public:
0050
0051 DEFINE_STANDARD_ALLOC
0052
0053
0054
0055 Standard_EXPORT ProjLib_ProjectOnPlane();
0056
0057
0058
0059 Standard_EXPORT ProjLib_ProjectOnPlane(const gp_Ax3& Pl);
0060
0061
0062
0063
0064
0065 Standard_EXPORT ProjLib_ProjectOnPlane(const gp_Ax3& Pl, const gp_Dir& D);
0066
0067
0068 Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE;
0069
0070
0071
0072
0073
0074
0075
0076 Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance, const Standard_Boolean KeepParametrization = Standard_True);
0077
0078 Standard_EXPORT const gp_Ax3& GetPlane() const;
0079
0080 Standard_EXPORT const gp_Dir& GetDirection() const;
0081
0082 Standard_EXPORT const Handle(Adaptor3d_Curve)& GetCurve() const;
0083
0084 Standard_EXPORT const Handle(GeomAdaptor_Curve)& GetResult() const;
0085
0086 Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
0087
0088 Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
0089
0090 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
0091
0092
0093
0094
0095 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0096
0097
0098
0099
0100
0101 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0102
0103
0104
0105
0106
0107 Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
0108
0109 Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
0110
0111 Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
0112
0113 Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
0114
0115
0116 Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
0117
0118
0119 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
0120
0121
0122
0123
0124
0125 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
0126
0127
0128
0129
0130
0131
0132 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
0133
0134
0135
0136
0137
0138
0139 Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
0140
0141
0142
0143
0144
0145
0146
0147 Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
0148
0149
0150
0151 Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
0152
0153
0154
0155
0156 Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
0157
0158 Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
0159
0160 Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
0161
0162 Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
0163
0164 Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
0165
0166 Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
0167
0168 Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
0169
0170 Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
0171
0172 Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
0173
0174 Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
0175
0176
0177
0178
0179
0180
0181 Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
0182
0183
0184
0185
0186
0187
0188 Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
0189
0190
0191
0192
0193 protected:
0194
0195 void GetTrimmedResult(const Handle(Geom_Curve)& theProjCurve);
0196
0197 Standard_Boolean BuildParabolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr);
0198 Standard_Boolean BuildHyperbolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr);
0199
0200 void BuildByApprox(const Standard_Real theLimitParameter);
0201
0202 private:
0203
0204
0205
0206 Handle(Adaptor3d_Curve) myCurve;
0207 gp_Ax3 myPlane;
0208 gp_Dir myDirection;
0209 Standard_Boolean myKeepParam;
0210 Standard_Real myFirstPar;
0211 Standard_Real myLastPar;
0212 Standard_Real myTolerance;
0213 GeomAbs_CurveType myType;
0214 Handle(GeomAdaptor_Curve) myResult;
0215 Standard_Boolean myIsApprox;
0216
0217
0218 };
0219
0220
0221
0222
0223
0224
0225
0226 #endif