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