Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-01 08:32:09

0001 // Created on: 1995-07-20
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
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   DEFINE_STANDARD_ALLOC
0041 
0042   static Standard_Real FirstUParameter(const BRepAdaptor_Surface& S);
0043 
0044   static Standard_Real FirstVParameter(const BRepAdaptor_Surface& S);
0045 
0046   static Standard_Real LastUParameter(const BRepAdaptor_Surface& S);
0047 
0048   static Standard_Real LastVParameter(const BRepAdaptor_Surface& S);
0049 
0050   static Standard_Integer NbUIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0051 
0052   static Standard_Integer NbVIntervals(const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
0053 
0054   static void UIntervals(const BRepAdaptor_Surface& S,
0055                          TColStd_Array1OfReal&      T,
0056                          const GeomAbs_Shape        Sh);
0057 
0058   static void VIntervals(const BRepAdaptor_Surface& S,
0059                          TColStd_Array1OfReal&      T,
0060                          const GeomAbs_Shape        Sh);
0061 
0062   //! If <First> >= <Last>
0063   static Handle(Adaptor3d_Surface) UTrim(const BRepAdaptor_Surface& S,
0064                                          const Standard_Real        First,
0065                                          const Standard_Real        Last,
0066                                          const Standard_Real        Tol);
0067 
0068   //! If <First> >= <Last>
0069   static Handle(Adaptor3d_Surface) VTrim(const BRepAdaptor_Surface& S,
0070                                          const Standard_Real        First,
0071                                          const Standard_Real        Last,
0072                                          const Standard_Real        Tol);
0073 
0074   static Standard_Boolean IsUClosed(const BRepAdaptor_Surface& S);
0075 
0076   static Standard_Boolean IsVClosed(const BRepAdaptor_Surface& S);
0077 
0078   static Standard_Boolean IsUPeriodic(const BRepAdaptor_Surface& S);
0079 
0080   static Standard_Real UPeriod(const BRepAdaptor_Surface& S);
0081 
0082   static Standard_Boolean IsVPeriodic(const BRepAdaptor_Surface& S);
0083 
0084   static Standard_Real VPeriod(const BRepAdaptor_Surface& S);
0085 
0086   static gp_Pnt Value(const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v);
0087 
0088   static void D0(const BRepAdaptor_Surface& S,
0089                  const Standard_Real        u,
0090                  const Standard_Real        v,
0091                  gp_Pnt&                    P);
0092 
0093   static void D1(const BRepAdaptor_Surface& S,
0094                  const Standard_Real        u,
0095                  const Standard_Real        v,
0096                  gp_Pnt&                    P,
0097                  gp_Vec&                    D1u,
0098                  gp_Vec&                    D1v);
0099 
0100   static void D2(const BRepAdaptor_Surface& S,
0101                  const Standard_Real        u,
0102                  const Standard_Real        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 Standard_Real        u,
0112                  const Standard_Real        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 Standard_Real        u,
0126                    const Standard_Real        v,
0127                    const Standard_Integer     Nu,
0128                    const Standard_Integer     Nv);
0129 
0130   static Standard_Real UResolution(const BRepAdaptor_Surface& S, const Standard_Real R3d);
0131 
0132   static Standard_Real VResolution(const BRepAdaptor_Surface& S, const Standard_Real R3d);
0133 
0134   static GeomAbs_SurfaceType GetType(const BRepAdaptor_Surface& S);
0135 
0136   static gp_Pln Plane(const BRepAdaptor_Surface& S);
0137 
0138   static gp_Cylinder Cylinder(const BRepAdaptor_Surface& S);
0139 
0140   static gp_Cone Cone(const BRepAdaptor_Surface& S);
0141 
0142   static gp_Torus Torus(const BRepAdaptor_Surface& S);
0143 
0144   static gp_Sphere Sphere(const BRepAdaptor_Surface& S);
0145 
0146   static Handle(Geom_BezierSurface) Bezier(const BRepAdaptor_Surface& S);
0147 
0148   static Handle(Geom_BSplineSurface) BSpline(const BRepAdaptor_Surface& S);
0149 
0150   static gp_Ax1 AxeOfRevolution(const BRepAdaptor_Surface& S);
0151 
0152   static gp_Dir Direction(const BRepAdaptor_Surface& S);
0153 
0154   static Handle(Adaptor3d_Curve) BasisCurve(const BRepAdaptor_Surface& S);
0155 
0156   Standard_EXPORT static Standard_Integer NbSamplesU(const BRepAdaptor_Surface& S);
0157 
0158   Standard_EXPORT static Standard_Integer NbSamplesV(const BRepAdaptor_Surface& S);
0159 
0160   Standard_EXPORT static Standard_Integer NbSamplesU(const BRepAdaptor_Surface& S,
0161                                                      const Standard_Real        u1,
0162                                                      const Standard_Real        u2);
0163 
0164   Standard_EXPORT static Standard_Integer NbSamplesV(const BRepAdaptor_Surface& S,
0165                                                      const Standard_Real        v1,
0166                                                      const Standard_Real        v2);
0167 
0168 protected:
0169 private:
0170 };
0171 
0172 #include <BRepApprox_SurfaceTool.lxx>
0173 
0174 #endif // _BRepApprox_SurfaceTool_HeaderFile