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_SurfToAnaSurf_HeaderFile
0018 #define _GeomConvert_SurfToAnaSurf_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <GeomConvert_ConvType.hxx>
0027 #include <GeomAbs_SurfaceType.hxx>
0028 #include <TColgp_HArray1OfXYZ.hxx>
0029 class Geom_Surface;
0030 class Geom_SurfaceOfRevolution;
0031 class Geom_Circle;
0032
0033
0034
0035
0036
0037 class GeomConvert_SurfToAnaSurf
0038 {
0039 public:
0040
0041 DEFINE_STANDARD_ALLOC
0042
0043 Standard_EXPORT GeomConvert_SurfToAnaSurf();
0044
0045 Standard_EXPORT GeomConvert_SurfToAnaSurf(const Handle(Geom_Surface)& S);
0046
0047 Standard_EXPORT void Init (const Handle(Geom_Surface)& S);
0048
0049 void SetConvType(const GeomConvert_ConvType theConvType = GeomConvert_Simplest)
0050 {
0051 myConvType = theConvType;
0052 }
0053 void SetTarget(const GeomAbs_SurfaceType theSurfType = GeomAbs_Plane)
0054 {
0055 myTarget = theSurfType;
0056 }
0057
0058
0059
0060 Standard_Real Gap() const
0061 {
0062 return myGap;
0063 }
0064
0065
0066
0067
0068
0069 Standard_EXPORT Handle(Geom_Surface) ConvertToAnalytical (const Standard_Real InitialToler);
0070 Standard_EXPORT Handle(Geom_Surface) ConvertToAnalytical (const Standard_Real InitialToler,
0071 const Standard_Real Umin, const Standard_Real Umax,
0072 const Standard_Real Vmin, const Standard_Real Vmax);
0073
0074
0075 Standard_EXPORT static Standard_Boolean IsSame (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real tol);
0076
0077
0078 Standard_EXPORT static Standard_Boolean IsCanonical (const Handle(Geom_Surface)& S);
0079
0080 private:
0081
0082
0083 static void CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSurf,
0084 Standard_Real& V1, Standard_Real& V2);
0085
0086
0087 static Handle(Geom_Surface) TryCylinerCone(const Handle(Geom_Surface)& theSurf, const Standard_Boolean theVCase,
0088 const Handle(Geom_Curve)& theUmidiso, const Handle(Geom_Curve)& theVmidiso,
0089 const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
0090 const Standard_Real theToler);
0091
0092
0093 static Standard_Boolean GetCylByLS(const Handle(TColgp_HArray1OfXYZ)& thePoints,
0094 const Standard_Real theTol,
0095 gp_Ax3& thePos, Standard_Real& theR,
0096 Standard_Real& theGap);
0097
0098
0099 static Handle(Geom_Surface) TryCylinderByGaussField(const Handle(Geom_Surface)& theSurf,
0100 const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
0101 const Standard_Real theToler, const Standard_Integer theNbU = 20, const Standard_Integer theNbV = 20,
0102 const Standard_Boolean theLeastSquare = Standard_False);
0103
0104
0105
0106 static Handle(Geom_Surface) TryTorusSphere(const Handle(Geom_Surface)& theSurf,
0107 const Handle(Geom_Circle)& circle,
0108 const Handle(Geom_Circle)& otherCircle,
0109 const Standard_Real Param1,
0110 const Standard_Real Param2,
0111 const Standard_Real aParam1ToCrv,
0112 const Standard_Real aParam2ToCrv,
0113 const Standard_Real toler,
0114 const Standard_Boolean isTryUMajor);
0115
0116 static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf,
0117 const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2,
0118 const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol = RealLast());
0119
0120
0121
0122
0123 protected:
0124
0125 private:
0126
0127 Handle(Geom_Surface) mySurf;
0128 Standard_Real myGap;
0129 GeomConvert_ConvType myConvType;
0130 GeomAbs_SurfaceType myTarget;
0131
0132 };
0133
0134
0135 #endif