File indexing completed on 2025-01-18 10:03:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepApprox_SurfaceTool_HeaderFile
0018 #define _BRepApprox_SurfaceTool_HeaderFile
0019
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <GeomAbs_Shape.hxx>
0022 #include <TColStd_Array1OfReal.hxx>
0023 #include <gp_Pnt.hxx>
0024 #include <gp_Vec.hxx>
0025 #include <GeomAbs_SurfaceType.hxx>
0026 #include <gp_Pln.hxx>
0027 #include <gp_Cylinder.hxx>
0028 #include <gp_Cone.hxx>
0029 #include <gp_Torus.hxx>
0030 #include <gp_Sphere.hxx>
0031 #include <gp_Ax1.hxx>
0032 #include <gp_Dir.hxx>
0033
0034 class Geom_BezierSurface;
0035 class Geom_BSplineSurface;
0036
0037 class BRepApprox_SurfaceTool
0038 {
0039 public:
0040
0041 DEFINE_STANDARD_ALLOC
0042
0043
0044 static Standard_Real FirstUParameter (const BRepAdaptor_Surface& S);
0045
0046 static Standard_Real FirstVParameter (const BRepAdaptor_Surface& S);
0047
0048 static Standard_Real LastUParameter (const BRepAdaptor_Surface& S);
0049
0050 static Standard_Real LastVParameter (const BRepAdaptor_Surface& S);
0051
0052 static Standard_Integer NbUIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0053
0054 static Standard_Integer NbVIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0055
0056 static void UIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
0057
0058 static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
0059
0060
0061 static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
0062
0063
0064 static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
0065
0066 static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S);
0067
0068 static Standard_Boolean IsVClosed (const BRepAdaptor_Surface& S);
0069
0070 static Standard_Boolean IsUPeriodic (const BRepAdaptor_Surface& S);
0071
0072 static Standard_Real UPeriod (const BRepAdaptor_Surface& S);
0073
0074 static Standard_Boolean IsVPeriodic (const BRepAdaptor_Surface& S);
0075
0076 static Standard_Real VPeriod (const BRepAdaptor_Surface& S);
0077
0078 static gp_Pnt Value (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v);
0079
0080 static void D0 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P);
0081
0082 static void D1 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v);
0083
0084 static void D2 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV);
0085
0086 static void D3 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV);
0087
0088 static gp_Vec DN (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv);
0089
0090 static Standard_Real UResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d);
0091
0092 static Standard_Real VResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d);
0093
0094 static GeomAbs_SurfaceType GetType (const BRepAdaptor_Surface& S);
0095
0096 static gp_Pln Plane (const BRepAdaptor_Surface& S);
0097
0098 static gp_Cylinder Cylinder (const BRepAdaptor_Surface& S);
0099
0100 static gp_Cone Cone (const BRepAdaptor_Surface& S);
0101
0102 static gp_Torus Torus (const BRepAdaptor_Surface& S);
0103
0104 static gp_Sphere Sphere (const BRepAdaptor_Surface& S);
0105
0106 static Handle(Geom_BezierSurface) Bezier (const BRepAdaptor_Surface& S);
0107
0108 static Handle(Geom_BSplineSurface) BSpline (const BRepAdaptor_Surface& S);
0109
0110 static gp_Ax1 AxeOfRevolution (const BRepAdaptor_Surface& S);
0111
0112 static gp_Dir Direction (const BRepAdaptor_Surface& S);
0113
0114 static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S);
0115
0116 Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S);
0117
0118 Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S);
0119
0120 Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S, const Standard_Real u1, const Standard_Real u2);
0121
0122 Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S, const Standard_Real v1, const Standard_Real v2);
0123
0124
0125
0126
0127 protected:
0128
0129
0130
0131
0132
0133 private:
0134
0135
0136
0137
0138
0139 };
0140
0141
0142 #include <BRepApprox_SurfaceTool.lxx>
0143
0144
0145
0146
0147
0148 #endif