1 -- Created on: 1992-09-28
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class MakeCircle from GC inherits Root from GC
24 ---Purpose : This class implements the following algorithms used
25 -- to create Cirlec from Geom.
27 -- * Create a Circle parallel to another and passing
29 -- * Create a Circle parallel to another at the distance
31 -- * Create a Circle passing through 3 points.
32 -- * Create a Circle with its center and the normal of its
33 -- plane and its radius.
34 -- * Create a Circle with its axis and radius.
35 -- The circle's parameter is the angle (Radian).
36 -- The parametrization range is [0,2*PI].
37 -- The circle is a closed and periodic curve.
38 -- The center of the circle is the Location point of its axis
39 -- placement. The XDirection of the axis placement defines the
40 -- origin of the parametrization.
50 raises NotDone from StdFail
54 Create (C : Circ from gp) returns MakeCircle;
55 --- Purpose : creates a circle from a non persistent circle C by its conversion.
57 Create (A2 : Ax2 from gp ;
58 Radius : Real from Standard) returns MakeCircle;
60 -- A2 is the local coordinates system of the circle.
61 -- It is not forbidden to create a circle with Radius = 0.0
62 -- Status is "NegativeRadius" if Radius < 0.
64 Create(Circ : Circ from gp ;
65 Dist : Real from Standard) returns MakeCircle;
66 ---Purpose : Make a Circle from Geom <TheCirc> parallel to another
67 -- Circ <Circ> with a distance <Dist>.
68 -- If Dist is greater than zero the result is enclosing
69 -- the circle <Circ>, else the result is enclosed by the
72 Create(Circ : Circ from gp;
73 Point : Pnt from gp) returns MakeCircle;
74 ---Purpose : Make a Circle from Geom <TheCirc> parallel to another
75 -- Circ <Circ> and passing through a Pnt <Point>.
77 Create(P1,P2,P3 : Pnt from gp) returns MakeCircle;
78 ---Purpose : Make a Circ from gp <TheCirc> passing through 3
79 -- Pnt2d <P1>,<P2>,<P3>.
81 Create(Center : Pnt from gp ;
83 Radius : Real from Standard) returns MakeCircle;
84 ---Purpose : Make a Circle from Geom <TheCirc> with its center
85 -- <Center> and the normal of its plane <Norm> and
86 -- its radius <Radius>.
88 Create(Center : Pnt from gp ;
89 PtAxis : Pnt from gp ;
90 Radius : Real from Standard) returns MakeCircle;
91 ---Purpose : Make a Circle from Geom <TheCirc> with its center
92 -- <Center> and the normal of its plane defined by the
93 -- two points <Center> and <PtAxis> and its radius <Radius>.
95 Create(Axis : Ax1 from gp ;
96 Radius : Real from Standard) returns MakeCircle;
97 ---Purpose : Make a Circle from Geom <TheCirc> with its center
98 -- <Center> and its radius <Radius>.
100 Value(me) returns Circle from Geom
104 -- Returns the constructed circle.
106 -- StdFail_NotDone if no circle is constructed.
107 ---C++: return const&
109 Operator(me) returns Circle from Geom
111 ---C++: return const&
112 ---C++: alias "Standard_EXPORT operator Handle_Geom_Circle() const;"
116 TheCircle : Circle from Geom;
117 --The solution from Geom.