File indexing completed on 2026-09-27 09:17:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _HLRBRep_Surface_HeaderFile
0018 #define _HLRBRep_Surface_HeaderFile
0019
0020 #include <HLRBRep_Curve.hxx>
0021
0022 #include <Standard.hxx>
0023 #include <Standard_DefineAlloc.hxx>
0024
0025 #include <BRepAdaptor_Surface.hxx>
0026 #include <GeomAbs_SurfaceType.hxx>
0027 #include <gp_Pnt.hxx>
0028 #include <NCollection_Array2.hxx>
0029 #include <GeomAbs_Shape.hxx>
0030 #include <gp_Vec.hxx>
0031 #include <gp_Cylinder.hxx>
0032 #include <gp_Cone.hxx>
0033 #include <gp_Sphere.hxx>
0034 #include <gp_Torus.hxx>
0035 #include <gp_Ax1.hxx>
0036 class TopoDS_Face;
0037 class gp_Pnt;
0038 class gp_Vec;
0039 class gp_Pln;
0040
0041 class HLRBRep_Surface
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047 Standard_EXPORT HLRBRep_Surface();
0048
0049 void Projector(const HLRAlgo_Projector* Proj) { myProj = Proj; }
0050
0051
0052 BRepAdaptor_Surface& Surface();
0053
0054
0055 const BRepAdaptor_Surface& Surface() const;
0056
0057
0058 Standard_EXPORT void Surface(const TopoDS_Face& F);
0059
0060
0061 Standard_EXPORT bool IsSide(const double tolf, const double toler) const;
0062
0063 Standard_EXPORT bool IsAbove(const bool back, const HLRBRep_Curve* A, const double tolC) const;
0064
0065 double FirstUParameter() const;
0066
0067 double LastUParameter() const;
0068
0069 double FirstVParameter() const;
0070
0071 double LastVParameter() const;
0072
0073 GeomAbs_Shape UContinuity() const;
0074
0075 GeomAbs_Shape VContinuity() const;
0076
0077
0078
0079
0080 int NbUIntervals(const GeomAbs_Shape S) const;
0081
0082
0083
0084
0085 int NbVIntervals(const GeomAbs_Shape S) const;
0086
0087 GeomAbs_Shape UIntervalContinuity() const;
0088
0089 GeomAbs_Shape VIntervalContinuity() const;
0090
0091 bool IsUClosed() const;
0092
0093 bool IsVClosed() const;
0094
0095 bool IsUPeriodic() const;
0096
0097 double UPeriod() const;
0098
0099 bool IsVPeriodic() const;
0100
0101 double VPeriod() const;
0102
0103
0104 Standard_EXPORT gp_Pnt Value(const double U, const double V) const;
0105
0106
0107 void D0(const double U, const double V, gp_Pnt& P) const;
0108
0109
0110
0111
0112
0113 void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
0114
0115
0116
0117
0118
0119 void D2(const double U,
0120 const double V,
0121 gp_Pnt& P,
0122 gp_Vec& D1U,
0123 gp_Vec& D1V,
0124 gp_Vec& D2U,
0125 gp_Vec& D2V,
0126 gp_Vec& D2UV) const;
0127
0128
0129
0130
0131
0132 void D3(const double U,
0133 const double V,
0134 gp_Pnt& P,
0135 gp_Vec& D1U,
0136 gp_Vec& D1V,
0137 gp_Vec& D2U,
0138 gp_Vec& D2V,
0139 gp_Vec& D2UV,
0140 gp_Vec& D3U,
0141 gp_Vec& D3V,
0142 gp_Vec& D3UUV,
0143 gp_Vec& D3UVV) const;
0144
0145
0146
0147
0148
0149
0150
0151 gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const;
0152
0153
0154
0155
0156
0157 GeomAbs_SurfaceType GetType() const;
0158
0159 Standard_EXPORT gp_Pln Plane() const;
0160
0161 gp_Cylinder Cylinder() const;
0162
0163 gp_Cone Cone() const;
0164
0165 gp_Sphere Sphere() const;
0166
0167 gp_Torus Torus() const;
0168
0169 int UDegree() const;
0170
0171 int NbUPoles() const;
0172
0173 int VDegree() const;
0174
0175 int NbVPoles() const;
0176
0177 int NbUKnots() const;
0178
0179 int NbVKnots() const;
0180
0181 gp_Ax1 Axis() const;
0182
0183 private:
0184
0185 Standard_EXPORT bool SideRowsOfPoles(const double tol,
0186 const int nbuPoles,
0187 const int nbvPoles,
0188 NCollection_Array2<gp_Pnt>& Pnt) const;
0189
0190 BRepAdaptor_Surface mySurf;
0191 GeomAbs_SurfaceType myType;
0192 const HLRAlgo_Projector* myProj;
0193 };
0194
0195 #include <HLRBRep_Surface.lxx>
0196
0197 #endif