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
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 class MakeCylinder from gce inherits Root from gce
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
23 -- * Create a Cylinder coaxial to another at a distance
25 -- * Create a Cylinder with 3 points.
26 -- * Create a Cylinder by its axis and radius.
27 -- * Create a cylinder by its circular base.
36 raises NotDone from StdFail
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
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>.
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>
58 Create(P1 : Pnt from gp;
60 P3 : Pnt from gp) returns MakeCylinder;
61 ---Purpose : Makes a Cylinder from gp <TheCylinder> with 3 points
63 -- Its axis is <P1P2> and its radius is the distance
64 -- between <P3> and <P1P2>
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>.
70 Create(Circ : Circ from gp) returns MakeCylinder;
71 ---Purpose: Makes a Cylinder by its circular base.
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.
81 Value(me) returns Cylinder from gp
85 ---Purpose: Returns the constructed cylinder.
86 -- Exceptions StdFail_NotDone if no cylinder is constructed.
88 Operator(me) returns Cylinder from gp
91 ---C++: alias "Standard_EXPORT operator gp_Cylinder() const;"
95 TheCylinder : Cylinder from gp;
96 --The solution from gp.