Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:56:51

0001 // Created on: 1993-07-02
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1993-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 _Adaptor3d_HSurfaceTool_HeaderFile
0018 #define _Adaptor3d_HSurfaceTool_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <Adaptor3d_Curve.hxx>
0022 #include <Geom_BezierSurface.hxx>
0023 #include <Geom_BSplineSurface.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <GeomAbs_SurfaceType.hxx>
0026 #include <gp_Ax1.hxx>
0027 #include <gp_Dir.hxx>
0028 #include <gp_Cylinder.hxx>
0029 #include <gp_Cone.hxx>
0030 #include <gp_Pln.hxx>
0031 #include <gp_Pnt.hxx>
0032 #include <gp_Sphere.hxx>
0033 #include <gp_Torus.hxx>
0034 #include <gp_Vec.hxx>
0035 #include <Standard.hxx>
0036 #include <Standard_DefineAlloc.hxx>
0037 #include <Standard_Handle.hxx>
0038 #include <NCollection_Array1.hxx>
0039 
0040 class Adaptor3d_HSurfaceTool
0041 {
0042 public:
0043   DEFINE_STANDARD_ALLOC
0044 
0045   static double FirstUParameter(const occ::handle<Adaptor3d_Surface>& theSurf)
0046   {
0047     return theSurf->FirstUParameter();
0048   }
0049 
0050   static double FirstVParameter(const occ::handle<Adaptor3d_Surface>& theSurf)
0051   {
0052     return theSurf->FirstVParameter();
0053   }
0054 
0055   static double LastUParameter(const occ::handle<Adaptor3d_Surface>& theSurf)
0056   {
0057     return theSurf->LastUParameter();
0058   }
0059 
0060   static double LastVParameter(const occ::handle<Adaptor3d_Surface>& theSurf)
0061   {
0062     return theSurf->LastVParameter();
0063   }
0064 
0065   static int NbUIntervals(const occ::handle<Adaptor3d_Surface>& theSurf, const GeomAbs_Shape theSh)
0066   {
0067     return theSurf->NbUIntervals(theSh);
0068   }
0069 
0070   static int NbVIntervals(const occ::handle<Adaptor3d_Surface>& theSurf, const GeomAbs_Shape theSh)
0071   {
0072     return theSurf->NbVIntervals(theSh);
0073   }
0074 
0075   static void UIntervals(const occ::handle<Adaptor3d_Surface>& theSurf,
0076                          NCollection_Array1<double>&           theTab,
0077                          const GeomAbs_Shape                   theSh)
0078   {
0079     theSurf->UIntervals(theTab, theSh);
0080   }
0081 
0082   static void VIntervals(const occ::handle<Adaptor3d_Surface>& theSurf,
0083                          NCollection_Array1<double>&           theTab,
0084                          const GeomAbs_Shape                   theSh)
0085   {
0086     theSurf->VIntervals(theTab, theSh);
0087   }
0088 
0089   //! If <First> >= <Last>
0090   static occ::handle<Adaptor3d_Surface> UTrim(const occ::handle<Adaptor3d_Surface>& theSurf,
0091                                               const double                          theFirst,
0092                                               const double                          theLast,
0093                                               const double                          theTol)
0094   {
0095     return theSurf->UTrim(theFirst, theLast, theTol);
0096   }
0097 
0098   //! If <First> >= <Last>
0099   static occ::handle<Adaptor3d_Surface> VTrim(const occ::handle<Adaptor3d_Surface>& theSurf,
0100                                               const double                          theFirst,
0101                                               const double                          theLast,
0102                                               const double                          theTol)
0103   {
0104     return theSurf->VTrim(theFirst, theLast, theTol);
0105   }
0106 
0107   static bool IsUClosed(const occ::handle<Adaptor3d_Surface>& theSurf)
0108   {
0109     return theSurf->IsUClosed();
0110   }
0111 
0112   static bool IsVClosed(const occ::handle<Adaptor3d_Surface>& theSurf)
0113   {
0114     return theSurf->IsVClosed();
0115   }
0116 
0117   static bool IsUPeriodic(const occ::handle<Adaptor3d_Surface>& theSurf)
0118   {
0119     return theSurf->IsUPeriodic();
0120   }
0121 
0122   static double UPeriod(const occ::handle<Adaptor3d_Surface>& theSurf)
0123   {
0124     return theSurf->UPeriod();
0125   }
0126 
0127   static bool IsVPeriodic(const occ::handle<Adaptor3d_Surface>& theSurf)
0128   {
0129     return theSurf->IsVPeriodic();
0130   }
0131 
0132   static double VPeriod(const occ::handle<Adaptor3d_Surface>& theSurf)
0133   {
0134     return theSurf->VPeriod();
0135   }
0136 
0137   static gp_Pnt Value(const occ::handle<Adaptor3d_Surface>& theSurf,
0138                       const double                          theU,
0139                       const double                          theV)
0140   {
0141     return theSurf->Value(theU, theV);
0142   }
0143 
0144   static void D0(const occ::handle<Adaptor3d_Surface>& theSurf,
0145                  const double                          theU,
0146                  const double                          theV,
0147                  gp_Pnt&                               thePnt)
0148   {
0149     theSurf->D0(theU, theV, thePnt);
0150   }
0151 
0152   static void D1(const occ::handle<Adaptor3d_Surface>& theSurf,
0153                  const double                          theU,
0154                  const double                          theV,
0155                  gp_Pnt&                               thePnt,
0156                  gp_Vec&                               theD1U,
0157                  gp_Vec&                               theD1V)
0158   {
0159     theSurf->D1(theU, theV, thePnt, theD1U, theD1V);
0160   }
0161 
0162   static void D2(const occ::handle<Adaptor3d_Surface>& theSurf,
0163                  const double                          theU,
0164                  const double                          theV,
0165                  gp_Pnt&                               thePnt,
0166                  gp_Vec&                               theD1U,
0167                  gp_Vec&                               theD1V,
0168                  gp_Vec&                               theD2U,
0169                  gp_Vec&                               theD2V,
0170                  gp_Vec&                               theD2UV)
0171   {
0172     theSurf->D2(theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV);
0173   }
0174 
0175   static void D3(const occ::handle<Adaptor3d_Surface>& theSurf,
0176                  const double                          theU,
0177                  const double                          theV,
0178                  gp_Pnt&                               thePnt,
0179                  gp_Vec&                               theD1U,
0180                  gp_Vec&                               theD1V,
0181                  gp_Vec&                               theD2U,
0182                  gp_Vec&                               theD2V,
0183                  gp_Vec&                               theD2UV,
0184                  gp_Vec&                               theD3U,
0185                  gp_Vec&                               theD3V,
0186                  gp_Vec&                               theD3UUV,
0187                  gp_Vec&                               theD3UVV)
0188   {
0189     theSurf->D3(theU,
0190                 theV,
0191                 thePnt,
0192                 theD1U,
0193                 theD1V,
0194                 theD2U,
0195                 theD2V,
0196                 theD2UV,
0197                 theD3U,
0198                 theD3V,
0199                 theD3UUV,
0200                 theD3UVV);
0201   }
0202 
0203   static gp_Vec DN(const occ::handle<Adaptor3d_Surface>& theSurf,
0204                    const double                          theU,
0205                    const double                          theV,
0206                    const int                             theNU,
0207                    const int                             theNV)
0208   {
0209     return theSurf->DN(theU, theV, theNU, theNV);
0210   }
0211 
0212   static double UResolution(const occ::handle<Adaptor3d_Surface>& theSurf, const double theR3d)
0213   {
0214     return theSurf->UResolution(theR3d);
0215   }
0216 
0217   static double VResolution(const occ::handle<Adaptor3d_Surface>& theSurf, const double theR3d)
0218   {
0219     return theSurf->VResolution(theR3d);
0220   }
0221 
0222   static GeomAbs_SurfaceType GetType(const occ::handle<Adaptor3d_Surface>& theSurf)
0223   {
0224     return theSurf->GetType();
0225   }
0226 
0227   static gp_Pln Plane(const occ::handle<Adaptor3d_Surface>& theSurf) { return theSurf->Plane(); }
0228 
0229   static gp_Cylinder Cylinder(const occ::handle<Adaptor3d_Surface>& theSurf)
0230   {
0231     return theSurf->Cylinder();
0232   }
0233 
0234   static gp_Cone Cone(const occ::handle<Adaptor3d_Surface>& theSurf) { return theSurf->Cone(); }
0235 
0236   static gp_Torus Torus(const occ::handle<Adaptor3d_Surface>& theSurf) { return theSurf->Torus(); }
0237 
0238   static gp_Sphere Sphere(const occ::handle<Adaptor3d_Surface>& theSurf)
0239   {
0240     return theSurf->Sphere();
0241   }
0242 
0243   static occ::handle<Geom_BezierSurface> Bezier(const occ::handle<Adaptor3d_Surface>& theSurf)
0244   {
0245     return theSurf->Bezier();
0246   }
0247 
0248   static occ::handle<Geom_BSplineSurface> BSpline(const occ::handle<Adaptor3d_Surface>& theSurf)
0249   {
0250     return theSurf->BSpline();
0251   }
0252 
0253   static gp_Ax1 AxeOfRevolution(const occ::handle<Adaptor3d_Surface>& theSurf)
0254   {
0255     return theSurf->AxeOfRevolution();
0256   }
0257 
0258   static gp_Dir Direction(const occ::handle<Adaptor3d_Surface>& theSurf)
0259   {
0260     return theSurf->Direction();
0261   }
0262 
0263   static occ::handle<Adaptor3d_Curve> BasisCurve(const occ::handle<Adaptor3d_Surface>& theSurf)
0264   {
0265     return theSurf->BasisCurve();
0266   }
0267 
0268   static occ::handle<Adaptor3d_Surface> BasisSurface(const occ::handle<Adaptor3d_Surface>& theSurf)
0269   {
0270     return theSurf->BasisSurface();
0271   }
0272 
0273   static double OffsetValue(const occ::handle<Adaptor3d_Surface>& theSurf)
0274   {
0275     return theSurf->OffsetValue();
0276   }
0277 
0278   Standard_EXPORT static bool IsSurfG1(const occ::handle<Adaptor3d_Surface>& theSurf,
0279                                        const bool                            theAlongU,
0280                                        const double theAngTol = Precision::Angular());
0281 
0282   Standard_EXPORT static int NbSamplesU(const occ::handle<Adaptor3d_Surface>& S);
0283 
0284   Standard_EXPORT static int NbSamplesV(const occ::handle<Adaptor3d_Surface>& S);
0285 
0286   Standard_EXPORT static int NbSamplesU(const occ::handle<Adaptor3d_Surface>& S,
0287                                         const double                          u1,
0288                                         const double                          u2);
0289 
0290   Standard_EXPORT static int NbSamplesV(const occ::handle<Adaptor3d_Surface>&,
0291                                         const double v1,
0292                                         const double v2);
0293 };
0294 
0295 #endif // _Adaptor3d_HSurfaceTool_HeaderFile