Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:37

0001 // Created on: 1993-04-21
0002 // Created by: Bruno DUMORTIER
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 _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile
0018 #define _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile
0019 
0020 #include <GeomAdaptor_Surface.hxx>
0021 
0022 class gp_Pln;
0023 class gp_Cylinder;
0024 class gp_Cone;
0025 class gp_Sphere;
0026 class gp_Torus;
0027 class Geom_BezierSurface;
0028 class Geom_BSplineSurface;
0029 class gp_Ax1;
0030 
0031 DEFINE_STANDARD_HANDLE(GeomAdaptor_SurfaceOfLinearExtrusion, GeomAdaptor_Surface)
0032 
0033 //! Generalised cylinder. This surface is obtained  by sweeping a  curve in  a given
0034 //! direction. The parametrization range  for the parameter U is defined
0035 //! with referenced the curve.
0036 //! The parametrization range for the parameter V is ]-infinite,+infinite[
0037 //! The  position of  the   curve gives  the origin for    the
0038 //! parameter V.
0039 //! The continuity of the surface is CN in the V direction.
0040 class GeomAdaptor_SurfaceOfLinearExtrusion  : public GeomAdaptor_Surface
0041 {
0042   DEFINE_STANDARD_RTTIEXT(GeomAdaptor_SurfaceOfLinearExtrusion, GeomAdaptor_Surface)
0043 public:
0044 
0045   Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion();
0046   
0047   //! The Curve is loaded.
0048   Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_Curve)& C);
0049   
0050   //! Thew Curve and the Direction are loaded.
0051   Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_Curve)& C, const gp_Dir& V);
0052   
0053   //! Shallow copy of adaptor
0054   Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE;
0055 
0056   //! Changes the Curve
0057   Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C);
0058   
0059   //! Changes the Direction
0060   Standard_EXPORT void Load (const gp_Dir& V);
0061   
0062   Standard_EXPORT Standard_Real FirstUParameter() const Standard_OVERRIDE;
0063   
0064   Standard_EXPORT Standard_Real LastUParameter() const Standard_OVERRIDE;
0065   
0066   Standard_EXPORT Standard_Real FirstVParameter() const Standard_OVERRIDE;
0067   
0068   Standard_EXPORT Standard_Real LastVParameter() const Standard_OVERRIDE;
0069   
0070   Standard_EXPORT GeomAbs_Shape UContinuity() const Standard_OVERRIDE;
0071   
0072   //! Return CN.
0073   Standard_EXPORT GeomAbs_Shape VContinuity() const Standard_OVERRIDE;
0074   
0075   //! Returns the number of U intervals for  continuity
0076   //! <S>. May be one if UContinuity(me) >= <S>
0077   Standard_EXPORT Standard_Integer NbUIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0078   
0079   //! Returns the number of V intervals for  continuity
0080   //! <S>. May be one if VContinuity(me) >= <S>
0081   Standard_EXPORT Standard_Integer NbVIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0082   
0083   //! Returns the  intervals with the requested continuity
0084   //! in the U direction.
0085   Standard_EXPORT void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0086   
0087   //! Returns the  intervals with the requested continuity
0088   //! in the V direction.
0089   Standard_EXPORT void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0090   
0091   //! Returns    a  surface trimmed in the U direction
0092   //! equivalent   of  <me>  between
0093   //! parameters <First>  and <Last>. <Tol>  is used  to
0094   //! test for 3d points confusion.
0095   //! If <First> >= <Last>
0096   Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
0097   
0098   //! Returns    a  surface trimmed in the V direction  between
0099   //! parameters <First>  and <Last>. <Tol>  is used  to
0100   //! test for 3d points confusion.
0101   //! If <First> >= <Last>
0102   Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
0103   
0104   Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE;
0105   
0106   Standard_EXPORT Standard_Boolean IsVClosed() const Standard_OVERRIDE;
0107   
0108   Standard_EXPORT Standard_Boolean IsUPeriodic() const Standard_OVERRIDE;
0109   
0110   Standard_EXPORT Standard_Real UPeriod() const Standard_OVERRIDE;
0111   
0112   Standard_EXPORT Standard_Boolean IsVPeriodic() const Standard_OVERRIDE;
0113   
0114   Standard_EXPORT Standard_Real VPeriod() const Standard_OVERRIDE;
0115 
0116   //! Returns the parametric U  resolution corresponding
0117   //! to the real space resolution <R3d>.
0118   Standard_EXPORT Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE;
0119   
0120   //! Returns the parametric V  resolution corresponding
0121   //! to the real space resolution <R3d>.
0122   Standard_EXPORT Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE;
0123   
0124   //! Returns the type of the surface : Plane, Cylinder,
0125   //! Cone,      Sphere,        Torus,    BezierSurface,
0126   //! BSplineSurface,               SurfaceOfRevolution,
0127   //! SurfaceOfExtrusion, OtherSurface
0128   Standard_EXPORT GeomAbs_SurfaceType GetType() const Standard_OVERRIDE;
0129   
0130   Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE;
0131   
0132   Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE;
0133   
0134   Standard_EXPORT gp_Cone Cone() const Standard_OVERRIDE;
0135   
0136   Standard_EXPORT gp_Sphere Sphere() const Standard_OVERRIDE;
0137   
0138   Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE;
0139   
0140   Standard_EXPORT Standard_Integer UDegree() const Standard_OVERRIDE;
0141   
0142   Standard_EXPORT Standard_Integer NbUPoles() const Standard_OVERRIDE;
0143 
0144   Standard_EXPORT Standard_Boolean IsURational() const Standard_OVERRIDE;
0145   
0146   Standard_EXPORT Standard_Boolean IsVRational() const Standard_OVERRIDE;
0147   
0148   Standard_EXPORT Handle(Geom_BezierSurface) Bezier() const Standard_OVERRIDE;
0149   
0150   Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE;
0151   
0152   Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE;
0153   
0154   Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE;
0155   
0156   Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE;
0157 
0158 private:
0159   Handle(Adaptor3d_Curve) myBasisCurve; ///< extruded curve
0160   gp_Dir                   myDirection;  ///< direction of extrusion
0161   Standard_Boolean         myHaveDir;    ///< whether the direction of extrusion is initialized
0162 };
0163 
0164 #endif // _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile