File indexing completed on 2026-09-20 09:17:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _HLRBRep_BSurfaceTool_HeaderFile
0018 #define _HLRBRep_BSurfaceTool_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <GeomAbs_Shape.hxx>
0022 #include <NCollection_Array1.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 BRepAdaptor_Surface;
0035 class gp_Pnt;
0036 class gp_Vec;
0037 class Geom_BezierSurface;
0038 class Geom_BSplineSurface;
0039
0040 class HLRBRep_BSurfaceTool
0041 {
0042 public:
0043 DEFINE_STANDARD_ALLOC
0044
0045 static double FirstUParameter(const BRepAdaptor_Surface& S);
0046
0047 static double FirstVParameter(const BRepAdaptor_Surface& S);
0048
0049 static double LastUParameter(const BRepAdaptor_Surface& S);
0050
0051 static double LastVParameter(const BRepAdaptor_Surface& S);
0052
0053 static int NbUIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0054
0055 static int NbVIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0056
0057 static void UIntervals(const BRepAdaptor_Surface& S,
0058 NCollection_Array1<double>& T,
0059 const GeomAbs_Shape Sh);
0060
0061 static void VIntervals(const BRepAdaptor_Surface& S,
0062 NCollection_Array1<double>& T,
0063 const GeomAbs_Shape Sh);
0064
0065
0066 static occ::handle<Adaptor3d_Surface> UTrim(const BRepAdaptor_Surface& S,
0067 const double First,
0068 const double Last,
0069 const double Tol);
0070
0071
0072 static occ::handle<Adaptor3d_Surface> VTrim(const BRepAdaptor_Surface& S,
0073 const double First,
0074 const double Last,
0075 const double Tol);
0076
0077 static bool IsUClosed(const BRepAdaptor_Surface& S);
0078
0079 static bool IsVClosed(const BRepAdaptor_Surface& S);
0080
0081 static bool IsUPeriodic(const BRepAdaptor_Surface& S);
0082
0083 static double UPeriod(const BRepAdaptor_Surface& S);
0084
0085 static bool IsVPeriodic(const BRepAdaptor_Surface& S);
0086
0087 static double VPeriod(const BRepAdaptor_Surface& S);
0088
0089 static gp_Pnt Value(const BRepAdaptor_Surface& S, const double u, const double v);
0090
0091 static void D0(const BRepAdaptor_Surface& S, const double u, const double v, gp_Pnt& P);
0092
0093 static void D1(const BRepAdaptor_Surface& S,
0094 const double u,
0095 const double v,
0096 gp_Pnt& P,
0097 gp_Vec& D1u,
0098 gp_Vec& D1v);
0099
0100 static void D2(const BRepAdaptor_Surface& S,
0101 const double u,
0102 const double v,
0103 gp_Pnt& P,
0104 gp_Vec& D1U,
0105 gp_Vec& D1V,
0106 gp_Vec& D2U,
0107 gp_Vec& D2V,
0108 gp_Vec& D2UV);
0109
0110 static void D3(const BRepAdaptor_Surface& S,
0111 const double u,
0112 const double v,
0113 gp_Pnt& P,
0114 gp_Vec& D1U,
0115 gp_Vec& D1V,
0116 gp_Vec& D2U,
0117 gp_Vec& D2V,
0118 gp_Vec& D2UV,
0119 gp_Vec& D3U,
0120 gp_Vec& D3V,
0121 gp_Vec& D3UUV,
0122 gp_Vec& D3UVV);
0123
0124 static gp_Vec DN(const BRepAdaptor_Surface& S,
0125 const double u,
0126 const double v,
0127 const int Nu,
0128 const int Nv);
0129
0130 static GeomAbs_Shape UContinuity(const BRepAdaptor_Surface& S);
0131
0132 static GeomAbs_Shape VContinuity(const BRepAdaptor_Surface& S);
0133
0134 static int UDegree(const BRepAdaptor_Surface& S);
0135
0136 static int NbUPoles(const BRepAdaptor_Surface& S);
0137
0138 static int NbUKnots(const BRepAdaptor_Surface& S);
0139
0140 static bool IsURational(const BRepAdaptor_Surface& S);
0141
0142 static int VDegree(const BRepAdaptor_Surface& S);
0143
0144 static int NbVPoles(const BRepAdaptor_Surface& S);
0145
0146 static int NbVKnots(const BRepAdaptor_Surface& S);
0147
0148 static bool IsVRational(const BRepAdaptor_Surface& S);
0149
0150 static double UResolution(const BRepAdaptor_Surface& S, const double R3d);
0151
0152 static double VResolution(const BRepAdaptor_Surface& S, const double R3d);
0153
0154 static GeomAbs_SurfaceType GetType(const BRepAdaptor_Surface& S);
0155
0156 static gp_Pln Plane(const BRepAdaptor_Surface& S);
0157
0158 static gp_Cylinder Cylinder(const BRepAdaptor_Surface& S);
0159
0160 static gp_Cone Cone(const BRepAdaptor_Surface& S);
0161
0162 static gp_Torus Torus(const BRepAdaptor_Surface& S);
0163
0164 static gp_Sphere Sphere(const BRepAdaptor_Surface& S);
0165
0166 static occ::handle<Geom_BezierSurface> Bezier(const BRepAdaptor_Surface& S);
0167
0168 static occ::handle<Geom_BSplineSurface> BSpline(const BRepAdaptor_Surface& S);
0169
0170 static gp_Ax1 AxeOfRevolution(const BRepAdaptor_Surface& S);
0171
0172 static gp_Dir Direction(const BRepAdaptor_Surface& S);
0173
0174 static occ::handle<Adaptor3d_Curve> BasisCurve(const BRepAdaptor_Surface& S);
0175
0176 static gp_Ax1 Axis(const BRepAdaptor_Surface& S);
0177
0178 Standard_EXPORT static int NbSamplesU(const BRepAdaptor_Surface& S);
0179
0180 Standard_EXPORT static int NbSamplesV(const BRepAdaptor_Surface& S);
0181
0182 Standard_EXPORT static int NbSamplesU(const BRepAdaptor_Surface& S,
0183 const double u1,
0184 const double u2);
0185
0186 Standard_EXPORT static int NbSamplesV(const BRepAdaptor_Surface& S,
0187 const double v1,
0188 const double v2);
0189 };
0190
0191 #include <HLRBRep_BSurfaceTool.lxx>
0192
0193 #endif