Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/GeomAdaptor_SurfaceOfLinearExtrusion.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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