b311480e |
1 | -- Created on: 1992-09-28 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-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 MakeCircle from GC inherits Root from GC |
18 | |
19 | ---Purpose : This class implements the following algorithms used |
20 | -- to create Cirlec from Geom. |
21 | -- |
22 | -- * Create a Circle parallel to another and passing |
23 | -- though a point. |
24 | -- * Create a Circle parallel to another at the distance |
25 | -- Dist. |
26 | -- * Create a Circle passing through 3 points. |
27 | -- * Create a Circle with its center and the normal of its |
28 | -- plane and its radius. |
29 | -- * Create a Circle with its axis and radius. |
30 | -- The circle's parameter is the angle (Radian). |
31 | -- The parametrization range is [0,2*PI]. |
32 | -- The circle is a closed and periodic curve. |
33 | -- The center of the circle is the Location point of its axis |
34 | -- placement. The XDirection of the axis placement defines the |
35 | -- origin of the parametrization. |
36 | |
37 | uses Pnt from gp, |
38 | Circ from gp, |
39 | Circle from Geom, |
40 | Dir from gp, |
41 | Ax1 from gp, |
42 | Ax2 from gp, |
43 | Real from Standard |
44 | |
45 | raises NotDone from StdFail |
46 | |
47 | is |
48 | |
49 | Create (C : Circ from gp) returns MakeCircle; |
50 | --- Purpose : creates a circle from a non persistent circle C by its conversion. |
51 | |
52 | Create (A2 : Ax2 from gp ; |
53 | Radius : Real from Standard) returns MakeCircle; |
54 | --- Purpose : |
55 | -- A2 is the local coordinates system of the circle. |
56 | -- It is not forbidden to create a circle with Radius = 0.0 |
57 | -- Status is "NegativeRadius" if Radius < 0. |
58 | |
59 | Create(Circ : Circ from gp ; |
60 | Dist : Real from Standard) returns MakeCircle; |
61 | ---Purpose : Make a Circle from Geom <TheCirc> parallel to another |
62 | -- Circ <Circ> with a distance <Dist>. |
63 | -- If Dist is greater than zero the result is enclosing |
64 | -- the circle <Circ>, else the result is enclosed by the |
65 | -- circle <Circ>. |
66 | |
67 | Create(Circ : Circ from gp; |
68 | Point : Pnt from gp) returns MakeCircle; |
69 | ---Purpose : Make a Circle from Geom <TheCirc> parallel to another |
70 | -- Circ <Circ> and passing through a Pnt <Point>. |
71 | |
72 | Create(P1,P2,P3 : Pnt from gp) returns MakeCircle; |
73 | ---Purpose : Make a Circ from gp <TheCirc> passing through 3 |
74 | -- Pnt2d <P1>,<P2>,<P3>. |
75 | |
76 | Create(Center : Pnt from gp ; |
77 | Norm : Dir from gp ; |
78 | Radius : Real from Standard) returns MakeCircle; |
79 | ---Purpose : Make a Circle from Geom <TheCirc> with its center |
80 | -- <Center> and the normal of its plane <Norm> and |
81 | -- its radius <Radius>. |
82 | |
83 | Create(Center : Pnt from gp ; |
84 | PtAxis : Pnt from gp ; |
85 | Radius : Real from Standard) returns MakeCircle; |
86 | ---Purpose : Make a Circle from Geom <TheCirc> with its center |
87 | -- <Center> and the normal of its plane defined by the |
88 | -- two points <Center> and <PtAxis> and its radius <Radius>. |
89 | |
90 | Create(Axis : Ax1 from gp ; |
91 | Radius : Real from Standard) returns MakeCircle; |
92 | ---Purpose : Make a Circle from Geom <TheCirc> with its center |
93 | -- <Center> and its radius <Radius>. |
94 | |
95 | Value(me) returns Circle from Geom |
96 | raises NotDone |
97 | is static; |
98 | --- Purpose: |
99 | -- Returns the constructed circle. |
100 | -- Exceptions |
101 | -- StdFail_NotDone if no circle is constructed. |
102 | ---C++: return const& |
103 | |
104 | Operator(me) returns Circle from Geom |
105 | is static; |
106 | ---C++: return const& |
107 | ---C++: alias "Standard_EXPORT operator Handle_Geom_Circle() const;" |
108 | |
109 | fields |
110 | |
111 | TheCircle : Circle from Geom; |
112 | --The solution from Geom. |
113 | |
114 | end MakeCircle; |
115 | |