0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeSphere.cdl
1 -- Created on: 1993-07-22
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-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 MakeSphere from BRepPrimAPI  inherits MakeOneAxis from BRepPrimAPI 
18
19         ---Purpose: Describes functions to build spheres or portions of spheres.
20         -- A MakeSphere object provides a framework for:
21         -- -   defining the construction of a sphere,
22         -- -   implementing the construction algorithm, and
23         -- -   consulting the result.
24
25 uses
26     Pnt      from gp,
27     Ax2      from gp,
28     Sphere   from BRepPrim,
29     OneAxis  from BRepPrim
30
31 raises
32     DomainError from Standard
33
34 is
35     Create(R : Real)
36     returns MakeSphere from BRepPrimAPI
37         ---Purpose: Make a sphere of radius R.
38         ---Level: Public
39
40     raises
41         DomainError from Standard; -- if R  <= Precision::Confusion()
42
43     Create(R, angle : Real)
44     returns MakeSphere from BRepPrimAPI
45         ---Purpose: Make a sphere of radius R.
46         ---Level: Public
47     raises
48         DomainError from Standard; -- if R  <= Precision::Confusion()
49
50     Create(R, angle1, angle2 : Real)
51     returns MakeSphere from BRepPrimAPI
52         ---Purpose: Make a sphere of radius R.
53         ---Level: Public
54     raises
55         DomainError from Standard; -- if R  <= Precision::Confusion()
56
57     Create(R, angle1, angle2, angle3 : Real)
58     returns MakeSphere from BRepPrimAPI
59         ---Purpose: Make a sphere of radius R.
60         ---Level: Public
61     raises
62         DomainError from Standard; -- if R  <= Precision::Confusion()
63
64     Create(Center : Pnt from gp; R : Real)
65     returns MakeSphere from BRepPrimAPI
66         ---Purpose: Make a sphere of radius R.
67         ---Level: Public
68     raises
69         DomainError from Standard; -- if R  <= Precision::Confusion()
70
71     Create(Center : Pnt from gp; R, angle : Real)
72     returns MakeSphere from BRepPrimAPI
73         ---Purpose: Make a sphere of radius R.
74         ---Level: Public
75     raises
76         DomainError from Standard; -- if R  <= Precision::Confusion()
77
78     Create(Center : Pnt from gp; R, angle1, angle2 : Real)
79     returns MakeSphere from BRepPrimAPI
80         ---Purpose: Make a sphere of radius R.
81         ---Level: Public
82     raises
83         DomainError from Standard; -- if R  <= Precision::Confusion()
84
85     Create(Center : Pnt from gp; R, angle1, angle2, angle3 : Real)
86     returns MakeSphere from BRepPrimAPI
87         ---Purpose: Make a sphere of radius R.
88         ---Level: Public
89     raises
90         DomainError from Standard; -- if R  <= Precision::Confusion()
91
92     Create(Axis : Ax2 from gp; R : Real)
93     returns MakeSphere from BRepPrimAPI
94         ---Purpose: Make a sphere of radius R.
95         ---Level: Public
96     raises
97         DomainError from Standard; -- if R  <= Precision::Confusion()
98
99     Create(Axis : Ax2 from gp; R, angle : Real)
100     returns MakeSphere from BRepPrimAPI
101         ---Purpose: Make a sphere of radius R.
102         ---Level: Public
103     raises
104         DomainError from Standard; -- if R  <= Precision::Confusion()
105
106     Create(Axis : Ax2 from gp; R, angle1, angle2 : Real)
107     returns MakeSphere from BRepPrimAPI
108         ---Purpose: Make a sphere of radius R.
109         ---Level: Public
110     raises
111         DomainError from Standard; -- if R  <= Precision::Confusion()
112
113     Create(Axis : Ax2 from gp; R, angle1, angle2, angle3 : Real)
114     returns MakeSphere from BRepPrimAPI
115         ---Purpose: Make a sphere of radius R.
116         ---Level: Public
117     raises
118         DomainError from Standard; -- if R  <= Precision::Confusion()
119     
120         ---Purpose: For all algorithms The resulting shape is composed of
121         -- -   a lateral spherical face,
122         -- -   two planar faces parallel to the plane z = 0 if the
123         --   sphere is truncated in the v parametric direction, or
124         --   only one planar face if angle1 is equal to -p/2 or if
125         --     angle2 is equal to p/2 (these faces are circles in
126         --   case of a complete truncated sphere),
127         -- -   and in case of a portion of sphere, two planar faces
128         --   to shut the shape.(in the planes u = 0 and u = angle).   
129
130     OneAxis(me : in out) returns Address;
131         ---Purpose: Returns the algorithm.
132         ---Level: Advanced
133
134     Sphere(me : in out) returns Sphere from BRepPrim
135         ---Purpose: Returns the algorithm.
136         --          
137         ---C++: return &
138         ---Level: Public 
139     is static;
140
141 fields
142
143     mySphere : Sphere from BRepPrim;
144
145 end MakeSphere;