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_MakeCone_HeaderFile
0018 #define _BRepPrimAPI_MakeCone_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepPrim_Cone.hxx>
0025 #include <BRepPrimAPI_MakeOneAxis.hxx>
0026 class gp_Ax2;
0027 
0028 
0029 //! Describes functions to build cones or portions of cones.
0030 //! A MakeCone object provides a framework for:
0031 //! -   defining the construction of a cone,
0032 //! -   implementing the construction algorithm, and
0033 //! -   consulting the result.
0034 class BRepPrimAPI_MakeCone  : public BRepPrimAPI_MakeOneAxis
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040 
0041   //! Make a cone.
0042   //! @param R1 [in] cone bottom radius, may be null (z = 0)
0043   //! @param R2 [in] cone top radius, may be null (z = H)
0044   //! @param H  [in] cone height
0045   Standard_EXPORT BRepPrimAPI_MakeCone(const Standard_Real R1, const Standard_Real R2, const Standard_Real H);
0046 
0047   //! Make a cone.
0048   //! @param R1    [in] cone bottom radius, may be null (z = 0)
0049   //! @param R2    [in] cone top radius, may be null (z = H)
0050   //! @param H     [in] cone height
0051   //! @param angle [in] angle to create a part cone
0052   Standard_EXPORT BRepPrimAPI_MakeCone(const Standard_Real R1, const Standard_Real R2, const Standard_Real H, const Standard_Real angle);
0053 
0054   //! Make a cone.
0055   //! @param axes [in] coordinate system for the construction of the cone
0056   //! @param R1   [in] cone bottom radius, may be null (z = 0)
0057   //! @param R2   [in] cone top radius, may be null (z = H)
0058   //! @param H    [in] cone height
0059   Standard_EXPORT BRepPrimAPI_MakeCone(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real H);
0060   
0061   //! Make a cone of height H radius R1 in the plane z =
0062   //! 0, R2 in the plane Z = H. R1 and R2 may be null.
0063   //! Take a section of <angle>
0064   //! Constructs a cone, or a portion of a cone, of height H,
0065   //! and radius R1 in the plane z = 0 and R2 in the plane
0066   //! z = H. The result is a sharp cone if R1 or R2 is equal to 0.
0067   //! The cone is constructed about the "Z Axis" of either:
0068   //! -   the global coordinate system, or
0069   //! -   the local coordinate system Axes.
0070   //! It is limited in these coordinate systems as follows:
0071   //! -   in the v parametric direction (the Z coordinate), by
0072   //! the two parameter values 0 and H,
0073   //! -   and in the u parametric direction (defined by the
0074   //! angle of rotation around the Z axis), in the case of a
0075   //! portion of a cone, by the two parameter values 0 and
0076   //! angle. Angle is given in radians.
0077   //! The resulting shape is composed of:
0078   //! -   a lateral conical face
0079   //! -   two planar faces in the planes z = 0 and z = H,
0080   //! or only one planar face in one of these two planes if a
0081   //! radius value is null (in the case of a complete cone,
0082   //! these faces are circles), and
0083   //! -   and in the case of a portion of a cone, two planar
0084   //! faces to close the shape. (either two parallelograms or
0085   //! two triangles, in the planes u = 0 and u = angle).
0086   //! Exceptions
0087   //! Standard_DomainError if:
0088   //! -   H is less than or equal to Precision::Confusion(), or
0089   //! -   the half-angle at the apex of the cone, defined by
0090   //! R1, R2 and H, is less than Precision::Confusion()/H, or greater than
0091   //! (Pi/2)-Precision::Confusion()/H.f
0092   Standard_EXPORT BRepPrimAPI_MakeCone(const gp_Ax2& Axes, const Standard_Real R1, const Standard_Real R2, const Standard_Real H, const Standard_Real angle);
0093   
0094   //! Returns the algorithm.
0095   Standard_EXPORT Standard_Address OneAxis();
0096   
0097   //! Returns the algorithm.
0098   Standard_EXPORT BRepPrim_Cone& Cone();
0099 
0100 
0101 
0102 
0103 protected:
0104 
0105 
0106 
0107 
0108 
0109 private:
0110 
0111 
0112 
0113   BRepPrim_Cone myCone;
0114 
0115 
0116 };
0117 
0118 
0119 
0120 
0121 
0122 
0123 
0124 #endif // _BRepPrimAPI_MakeCone_HeaderFile