1 // Created on: 1993-07-21
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepPrimAPI_MakeCylinder_HeaderFile
18 #define _BRepPrimAPI_MakeCylinder_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepPrim_Cylinder.hxx>
25 #include <BRepPrimAPI_MakeOneAxis.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Address.hxx>
28 class Standard_DomainError;
30 class BRepPrim_Cylinder;
33 //! Describes functions to build cylinders or portions of cylinders.
34 //! A MakeCylinder object provides a framework for:
35 //! - defining the construction of a cylinder,
36 //! - implementing the construction algorithm, and
37 //! - consulting the result.
38 class BRepPrimAPI_MakeCylinder : public BRepPrimAPI_MakeOneAxis
45 //! Make a cylinder of radius R and length H.
46 Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H);
48 //! Make a cylinder of radius R and length H with
50 Standard_EXPORT BRepPrimAPI_MakeCylinder(const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
52 //! Make a cylinder of radius R and length H.
53 Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H);
55 //! Make a cylinder of radius R and length H with
58 //! - a cylinder of radius R and height H, or
59 //! - a portion of cylinder of radius R and height H, and of
60 //! the angle Angle defining the missing portion of the cylinder.
61 //! The cylinder is constructed about the "Z Axis" of either:
62 //! - the global coordinate system, or
63 //! - the local coordinate system Axes.
64 //! It is limited in this coordinate system as follows:
65 //! - in the v parametric direction (the Z axis), by the two
66 //! parameter values 0 and H,
67 //! - and in the u parametric direction (the rotation angle
68 //! around the Z Axis), in the case of a portion of a
69 //! cylinder, by the two parameter values 0 and Angle.
70 //! Angle is given in radians.
71 //! The resulting shape is composed of:
72 //! - a lateral cylindrical face,
73 //! - two planar faces in the planes z = 0 and z = H
74 //! (in the case of a complete cylinder, these faces are circles), and
75 //! - in case of a portion of a cylinder, two additional
76 //! planar faces to close the shape.(two rectangles in the
77 //! planes u = 0 and u = Angle).
78 //! Exceptions Standard_DomainError if:
79 //! - R is less than or equal to Precision::Confusion(), or
80 //! - H is less than or equal to Precision::Confusion().
81 Standard_EXPORT BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, const Standard_Real R, const Standard_Real H, const Standard_Real Angle);
83 //! Returns the algorithm.
84 Standard_EXPORT Standard_Address OneAxis();
86 //! Returns the algorithm.
87 Standard_EXPORT BRepPrim_Cylinder& Cylinder();
102 BRepPrim_Cylinder myCylinder;
113 #endif // _BRepPrimAPI_MakeCylinder_HeaderFile