Back to home page

EIC code displayed by LXR

 
 

    


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

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