Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-14 08:28:39

0001 // Created on: 1993-07-21
0002 // Created by: Remi LEQUETTE
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 _BRepPrimAPI_MakeCylinder_HeaderFile
0018 #define _BRepPrimAPI_MakeCylinder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepPrim_Cylinder.hxx>
0025 #include <BRepPrimAPI_MakeOneAxis.hxx>
0026 class gp_Ax2;
0027 
0028 //! Describes functions to build cylinders or portions of  cylinders.
0029 //! A MakeCylinder object provides a framework for:
0030 //! -   defining the construction of a cylinder,
0031 //! -   implementing the construction algorithm, and
0032 //! -   consulting the result.
0033 class BRepPrimAPI_MakeCylinder : public BRepPrimAPI_MakeOneAxis
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Make a cylinder.
0039   //! @param[in] R  cylinder radius
0040   //! @param[in] H  cylinder height
0041   Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H);
0042 
0043   //! Make a cylinder (part cylinder).
0044   //! @param[in] R      cylinder radius
0045   //! @param[in] H      cylinder height
0046   //! @param[in] Angle  defines the missing portion of the cylinder
0047   Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R,
0048                                            const Standard_Real H,
0049                                            const Standard_Real Angle);
0050 
0051   //! Make a cylinder of radius R and length H.
0052   //! @param[in] Axes  coordinate system for the construction of the cylinder
0053   //! @param[in] R     cylinder radius
0054   //! @param[in] H     cylinder height
0055   Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2&       Axes,
0056                                            const Standard_Real R,
0057                                            const Standard_Real H);
0058 
0059   //! Make a cylinder   of  radius R  and  length H with
0060   //! angle  H.
0061   //! Constructs
0062   //! -   a cylinder of radius R and height H, or
0063   //! -   a portion of cylinder of radius R and height H, and of
0064   //! the angle Angle defining the missing portion of the cylinder.
0065   //! The cylinder is constructed about the "Z Axis" of either:
0066   //! -   the global coordinate system, or
0067   //! -   the local coordinate system Axes.
0068   //! It is limited in this coordinate system as follows:
0069   //! -   in the v parametric direction (the Z axis), by the two
0070   //! parameter values 0 and H,
0071   //! -   and in the u parametric direction (the rotation angle
0072   //! around the Z Axis), in the case of a portion of a
0073   //! cylinder, by the two parameter values 0 and Angle.
0074   //! Angle is given in radians.
0075   //! The resulting shape is composed of:
0076   //! -   a lateral cylindrical face,
0077   //! -   two planar faces in the planes z = 0 and z = H
0078   //! (in the case of a complete cylinder, these faces are circles), and
0079   //! -   in case of a portion of a cylinder, two additional
0080   //! planar faces to close the shape.(two rectangles in the
0081   //! planes u = 0 and u = Angle).
0082   //! Exceptions Standard_DomainError if:
0083   //! -   R is less than or equal to Precision::Confusion(), or
0084   //! -   H is less than or equal to Precision::Confusion().
0085   Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2&       Axes,
0086                                            const Standard_Real R,
0087                                            const Standard_Real H,
0088                                            const Standard_Real Angle);
0089 
0090   //! Returns the algorithm.
0091   Standard_EXPORT Standard_Address OneAxis();
0092 
0093   //! Returns the algorithm.
0094   Standard_EXPORT BRepPrim_Cylinder& Cylinder();
0095 
0096 protected:
0097 private:
0098   BRepPrim_Cylinder myCylinder;
0099 };
0100 
0101 #endif // _BRepPrimAPI_MakeCylinder_HeaderFile