0024784: Move documentation in CDL files to proper location
[occt.git] / src / gce / gce_MakeCylinder.cdl
1 -- Created on: 1992-08-26
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class MakeCylinder from gce inherits Root from gce
18
19     ---Purpose : This class implements the following algorithms used 
20     --           to create a Cylinder from gp.
21     --           * Create a Cylinder coaxial to another and passing 
22     --             through a point.
23     --           * Create a Cylinder coaxial to another at a distance
24     --             <Dist>.
25     --           * Create a Cylinder with 3 points.
26     --           * Create a Cylinder by its axis and radius.
27     --           * Create a cylinder by its circular base.
28
29 uses Pnt       from gp,
30      Ax1       from gp,
31      Ax2       from gp,
32      Circ      from gp,
33      Cylinder  from gp,
34      Real      from Standard
35
36 raises NotDone from StdFail
37
38 is
39
40 Create (A2     : Ax2  from gp      ;
41         Radius : Real from Standard)  returns MakeCylinder;
42     --- Purpose :<A2> is the local cartesian coordinate system of <me>.
43     --           The status is "NegativeRadius" if R < 0.0
44
45 Create(Cyl   : Cylinder from gp;
46        Point : Pnt      from gp) returns MakeCylinder;
47     ---Purpose : Makes a Cylinder from gp <TheCylinder> coaxial to another 
48     --           Cylinder <Cylinder> and passing through a Pnt <Point>.
49
50 Create(Cyl  : Cylinder  from gp      ;
51        Dist : Real      from Standard) returns MakeCylinder;
52     ---Purpose : Makes a Cylinder from gp <TheCylinder> coaxial to another 
53     --           Cylinder <Cylinder> at the distance <Dist> which can 
54     --           be greater or lower than zero.
55     --           The radius of the result is the absolute value of the
56     --           radius of <Cyl> plus <Dist>
57
58 Create(P1     :     Pnt from gp;
59        P2     :     Pnt from gp;
60        P3     :     Pnt from gp) returns MakeCylinder;
61     ---Purpose : Makes a Cylinder from gp <TheCylinder> with 3 points
62     --           <P1>,<P2>,<P3>.
63     --           Its axis is <P1P2> and its radius is the distance 
64     --           between <P3> and <P1P2>
65
66 Create(Axis   : Ax1  from gp      ;
67        Radius : Real from Standard) returns MakeCylinder;
68     ---Purpose: Makes a Cylinder by its axis <Axis> and radius <Radius>.
69
70 Create(Circ   : Circ from gp) returns MakeCylinder;
71     ---Purpose: Makes a Cylinder by its circular base.
72     -- Warning
73     -- If an error occurs (that is, when IsDone returns
74     -- false), the Status function returns:
75     -- -   gce_NegativeRadius if:
76     --   -   Radius is less than 0.0, or
77     --   -   Dist is negative and has an absolute value
78     --    which is greater than the radius of Cyl; or
79     -- -   gce_ConfusedPoints if points P1 and P2 are coincident.
80         
81 Value(me) returns Cylinder from gp
82     raises NotDone
83     is static;
84     ---C++: return const&
85     ---Purpose: Returns the constructed cylinder.
86     -- Exceptions StdFail_NotDone if no cylinder is constructed.
87     
88 Operator(me) returns Cylinder from gp
89     is static;
90     ---C++: return const&
91     ---C++: alias "Standard_EXPORT operator gp_Cylinder() const;"
92
93 fields
94
95     TheCylinder : Cylinder from gp;
96     --The solution from gp.
97     
98 end MakeCylinder;