b311480e |
1 | -- Created on: 1993-07-21 |
2 | -- Created by: Remi LEQUETTE |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class MakeCylinder from BRepPrimAPI inherits MakeOneAxis from BRepPrimAPI |
18 | |
19 | ---Purpose: Describes functions to build cylinders or portions of cylinders. |
20 | -- A MakeCylinder object provides a framework for: |
21 | -- - defining the construction of a cylinder, |
22 | -- - implementing the construction algorithm, and |
23 | -- - consulting the result. |
24 | |
25 | uses |
26 | Ax2 from gp, |
27 | Cylinder from BRepPrim, |
28 | OneAxis from BRepPrim |
29 | |
30 | raises |
31 | DomainError from Standard |
32 | |
33 | is |
34 | |
35 | Create(R, H : Real) |
36 | returns MakeCylinder from BRepPrimAPI |
37 | ---Purpose: Make a cylinder of radius R and length H. |
38 | ---Level: Public |
39 | raises |
40 | DomainError from Standard; -- if R or H <= Precision::Confusion() |
41 | |
42 | Create(R, H, Angle : Real) |
43 | returns MakeCylinder from BRepPrimAPI |
44 | ---Purpose: Make a cylinder of radius R and length H with |
45 | -- angle H. |
46 | ---Level: Public |
47 | raises |
48 | DomainError from Standard; -- if R or H <= Precision::Confusion() |
49 | |
50 | Create(Axes : Ax2 from gp; R, H : Real) |
51 | returns MakeCylinder from BRepPrimAPI |
52 | ---Purpose: Make a cylinder of radius R and length H. |
53 | ---Level: Public |
54 | raises |
55 | DomainError from Standard; -- if R or H <= Precision::Confusion() |
56 | |
57 | Create(Axes : Ax2 from gp; R, H, Angle : Real) |
58 | returns MakeCylinder from BRepPrimAPI |
59 | ---Purpose: Make a cylinder of radius R and length H with |
60 | -- angle H. |
61 | ---Level: Public |
62 | raises |
63 | DomainError from Standard; -- if R or H <= Precision::Confusion() |
64 | |
65 | ---Purpose: Constructs |
66 | -- - a cylinder of radius R and height H, or |
67 | -- - a portion of cylinder of radius R and height H, and of |
68 | -- the angle Angle defining the missing portion of the cylinder. |
69 | -- The cylinder is constructed about the "Z Axis" of either: |
70 | -- - the global coordinate system, or |
71 | -- - the local coordinate system Axes. |
72 | -- It is limited in this coordinate system as follows: |
73 | -- - in the v parametric direction (the Z axis), by the two |
74 | -- parameter values 0 and H, |
75 | -- - and in the u parametric direction (the rotation angle |
76 | -- around the Z Axis), in the case of a portion of a |
77 | -- cylinder, by the two parameter values 0 and Angle. |
78 | -- Angle is given in radians. |
79 | -- The resulting shape is composed of: |
80 | -- - a lateral cylindrical face, |
81 | -- - two planar faces in the planes z = 0 and z = H |
82 | -- (in the case of a complete cylinder, these faces are circles), and |
83 | -- - in case of a portion of a cylinder, two additional |
84 | -- planar faces to close the shape.(two rectangles in the |
85 | -- planes u = 0 and u = Angle). |
86 | -- Exceptions Standard_DomainError if: |
87 | -- - R is less than or equal to Precision::Confusion(), or |
88 | -- - H is less than or equal to Precision::Confusion(). |
89 | |
90 | OneAxis(me : in out) returns Address; |
91 | ---Purpose: Returns the algorithm. |
92 | ---Level: Advanced |
93 | |
94 | Cylinder(me : in out) returns Cylinder from BRepPrim |
95 | ---Purpose: Returns the algorithm. |
96 | -- |
97 | ---C++: return & |
98 | ---Level: Public |
99 | is static; |
100 | |
101 | fields |
102 | |
103 | myCylinder : Cylinder from BRepPrim; |
104 | |
105 | end MakeCylinder; |