Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:52

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 <TColStd_Array1OfReal.hxx>
0039 
0040 class Adaptor3d_HSurfaceTool 
0041 {
0042 public:
0043 
0044   DEFINE_STANDARD_ALLOC
0045 
0046   static Standard_Real FirstUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstUParameter(); }
0047 
0048   static Standard_Real FirstVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstVParameter(); }
0049 
0050   static Standard_Real LastUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastUParameter(); }
0051 
0052   static Standard_Real LastVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastVParameter(); }
0053 
0054   static Standard_Integer NbUIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbUIntervals (theSh); }
0055 
0056   static Standard_Integer NbVIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbVIntervals (theSh); }
0057 
0058   static void UIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->UIntervals (theTab, theSh); }
0059 
0060   static void VIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->VIntervals (theTab, theSh); }
0061 
0062   //! If <First> >= <Last>
0063   static Handle(Adaptor3d_Surface) UTrim (const Handle(Adaptor3d_Surface)& theSurf,
0064                                            const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol)
0065   {
0066     return theSurf->UTrim (theFirst, theLast, theTol);
0067   }
0068 
0069   //! If <First> >= <Last>
0070   static Handle(Adaptor3d_Surface) VTrim (const Handle(Adaptor3d_Surface)& theSurf,
0071                                            const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol)
0072   {
0073     return theSurf->VTrim (theFirst, theLast, theTol);
0074   }
0075   
0076   static Standard_Boolean IsUClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUClosed(); }
0077 
0078   static Standard_Boolean IsVClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVClosed(); }
0079   
0080   static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUPeriodic(); }
0081 
0082   static Standard_Real UPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->UPeriod(); }
0083 
0084   static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVPeriodic(); }
0085   
0086   static Standard_Real VPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->VPeriod(); }
0087 
0088   static gp_Pnt Value (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theU, const Standard_Real theV) { return theSurf->Value (theU, theV); }
0089 
0090   static void D0 (const Handle(Adaptor3d_Surface)& theSurf,
0091                   const Standard_Real theU, const Standard_Real theV,
0092                   gp_Pnt& thePnt)
0093   {
0094     theSurf->D0 (theU, theV, thePnt);
0095   }
0096 
0097   static void D1 (const Handle(Adaptor3d_Surface)& theSurf,
0098                   const Standard_Real theU, const Standard_Real theV,
0099                   gp_Pnt& thePnt,
0100                   gp_Vec& theD1U, gp_Vec& theD1V)
0101   {
0102     theSurf->D1 (theU, theV, thePnt, theD1U, theD1V);
0103   }
0104 
0105   static void D2 (const Handle(Adaptor3d_Surface)& theSurf,
0106                   const Standard_Real theU, const Standard_Real theV,
0107                   gp_Pnt& thePnt,
0108                   gp_Vec& theD1U, gp_Vec& theD1V,
0109                   gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV)
0110   {
0111     theSurf->D2 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV);
0112   }
0113 
0114   static void D3 (const Handle(Adaptor3d_Surface)& theSurf,
0115                   const Standard_Real theU, const Standard_Real theV,
0116                   gp_Pnt& thePnt,
0117                   gp_Vec& theD1U, gp_Vec& theD1V,
0118                   gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV,
0119                   gp_Vec& theD3U, gp_Vec& theD3V, gp_Vec& theD3UUV, gp_Vec& theD3UVV)
0120   {
0121     theSurf->D3 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV, theD3U, theD3V, theD3UUV, theD3UVV);
0122   }
0123 
0124   static gp_Vec DN (const Handle(Adaptor3d_Surface)& theSurf,
0125                     const Standard_Real theU, const Standard_Real theV,
0126                     const Standard_Integer theNU, const Standard_Integer theNV)
0127   {
0128     return theSurf->DN (theU, theV, theNU, theNV);
0129   }
0130 
0131   static Standard_Real UResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d)
0132   {
0133     return theSurf->UResolution (theR3d);
0134   }
0135 
0136   static Standard_Real VResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d)
0137   {
0138     return theSurf->VResolution (theR3d);
0139   }
0140 
0141   static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->GetType(); }
0142 
0143   static gp_Pln Plane (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Plane(); }
0144 
0145   static gp_Cylinder Cylinder (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cylinder(); }
0146 
0147   static gp_Cone Cone (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cone(); }
0148 
0149   static gp_Torus Torus (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Torus(); }
0150 
0151   static gp_Sphere Sphere (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Sphere(); }
0152 
0153   static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Bezier(); }
0154 
0155   static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BSpline(); }
0156 
0157   static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->AxeOfRevolution(); }
0158 
0159   static gp_Dir Direction (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Direction(); }
0160 
0161   static Handle(Adaptor3d_Curve) BasisCurve (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisCurve(); }
0162 
0163   static Handle(Adaptor3d_Surface) BasisSurface (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisSurface(); }
0164 
0165   static Standard_Real OffsetValue (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->OffsetValue(); }
0166 
0167   Standard_EXPORT static Standard_Boolean IsSurfG1 (const Handle(Adaptor3d_Surface)& theSurf,
0168                                                     const Standard_Boolean theAlongU,
0169                                                     const Standard_Real theAngTol = Precision::Angular());
0170 
0171   Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S);
0172 
0173   Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S);
0174 
0175   Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2);
0176 
0177   Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& , const Standard_Real v1, const Standard_Real v2);
0178 
0179 };
0180 
0181 #endif // _Adaptor3d_HSurfaceTool_HeaderFile