File indexing completed on 2025-01-18 10:03:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _GeomConvert_CurveToAnaCurve_HeaderFile
0018 #define _GeomConvert_CurveToAnaCurve_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 #include <Standard_Boolean.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <TColgp_Array1OfPnt.hxx>
0026 #include <GeomConvert_ConvType.hxx>
0027 #include <GeomAbs_CurveType.hxx>
0028
0029 class Geom_Curve;
0030 class Geom_Line;
0031 class gp_Lin;
0032 class gp_Pnt;
0033 class gp_Circ;
0034
0035
0036
0037 class GeomConvert_CurveToAnaCurve
0038 {
0039 public:
0040
0041 DEFINE_STANDARD_ALLOC
0042
0043 Standard_EXPORT GeomConvert_CurveToAnaCurve();
0044
0045 Standard_EXPORT GeomConvert_CurveToAnaCurve(const Handle(Geom_Curve)& C);
0046
0047 Standard_EXPORT void Init (const Handle(Geom_Curve)& C);
0048
0049
0050
0051
0052 Standard_EXPORT Standard_Boolean ConvertToAnalytical (const Standard_Real theTol, Handle(Geom_Curve)& theResultCurve, const Standard_Real F, const Standard_Real L, Standard_Real& newF, Standard_Real& newL);
0053
0054 Standard_EXPORT static Handle(Geom_Curve) ComputeCurve (const Handle(Geom_Curve)& curve, const Standard_Real tolerance,
0055 const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl,
0056 Standard_Real& theGap, const GeomConvert_ConvType theCurvType = GeomConvert_MinGap, const GeomAbs_CurveType theTarget = GeomAbs_Line);
0057
0058
0059
0060
0061 Standard_EXPORT static Handle(Geom_Curve) ComputeCircle (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation);
0062
0063
0064
0065
0066 Standard_EXPORT static Handle(Geom_Curve) ComputeEllipse (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation);
0067
0068
0069
0070
0071 Standard_EXPORT static Handle(Geom_Line) ComputeLine (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation);
0072
0073
0074
0075 Standard_EXPORT static Standard_Boolean IsLinear (const TColgp_Array1OfPnt& aPoints, const Standard_Real tolerance, Standard_Real& Deviation);
0076
0077
0078
0079 Standard_EXPORT static gp_Lin GetLine(const gp_Pnt& P1, const gp_Pnt& P2, Standard_Real& cf, Standard_Real& cl);
0080
0081
0082 Standard_EXPORT static Standard_Boolean GetCircle(gp_Circ& Circ, const gp_Pnt& P0, const gp_Pnt& P1, const gp_Pnt& P2);
0083
0084
0085
0086 Standard_Real Gap() const
0087 {
0088 return myGap;
0089 }
0090
0091
0092 GeomConvert_ConvType GetConvType() const
0093 {
0094 return myConvType;
0095 }
0096
0097
0098 void SetConvType(const GeomConvert_ConvType theConvType)
0099 {
0100 myConvType = theConvType;
0101 }
0102
0103
0104 GeomAbs_CurveType GetTarget() const
0105 {
0106 return myTarget;
0107 }
0108
0109
0110 void SetTarget(const GeomAbs_CurveType theTarget)
0111 {
0112 myTarget = theTarget;
0113 }
0114
0115
0116 protected:
0117
0118
0119
0120
0121
0122 private:
0123
0124 Handle(Geom_Curve) myCurve;
0125 Standard_Real myGap;
0126 GeomConvert_ConvType myConvType;
0127 GeomAbs_CurveType myTarget;
0128
0129 };
0130
0131
0132
0133 #endif