0024893: CLang warnings -Wlogical-not-parentheses for gce_Done comparisons
[occt.git] / src / gce / gce_MakeCirc.cdl
CommitLineData
b311480e 1-- Created on: 1992-08-26
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
17class MakeCirc from gce inherits Root from gce
18
19 ---Purpose : This class implements the following algorithms used
20 -- to create Circ from gp.
21 --
22 -- * Create a Circ coaxial to another and passing
23 -- though a point.
24 -- * Create a Circ coaxial to another at the distance
25 -- Dist.
26 -- * Create a Circ passing through 3 points.
27 -- * Create a Circ with its center and the normal of its
28 -- plane and its radius.
29 -- * Create a Circ with its center and its plane and its
30 -- radius.
31 -- * Create a Circ with its axis and radius.
32 -- * Create a Circ with two points giving its axis and
33 -- its radius.
34 -- * Create a Circ with is Ax2 and its Radius.
35
36uses Pnt from gp,
37 Circ from gp,
38 Dir from gp,
39 Ax1 from gp,
40 Ax2 from gp,
41 Pln from gp,
42 Real from Standard
43
44raises NotDone from StdFail
45
46is
47
48Create (A2 : Ax2 from gp ;
49 Radius : Real from Standard) returns MakeCirc;
50 --- Purpose :
51 -- A2 locates the circle and gives its orientation in 3D space.
52 --- Warnings :
53 -- It is not forbidden to create a circle with Radius = 0.0
54 --- The status is "NegativeRadius" if Radius < 0.0
55
56Create(Circ : Circ from gp ;
57 Dist : Real from Standard) returns MakeCirc;
58 ---Purpose : Makes a Circ from gp <TheCirc> coaxial to another
59 -- Circ <Circ> at a distance <Dist>.
60 -- If Dist is greater than zero the result is encloses
61 -- the circle <Circ>, else the result is enclosed by the
62 -- circle <Circ>.
63
64Create(Circ : Circ from gp;
65 Point : Pnt from gp) returns MakeCirc;
66 ---Purpose : Makes a Circ from gp <TheCirc> coaxial to another
67 -- Circ <Circ> and passing through a Pnt2d <Point>.
68
69Create(P1,P2,P3 : Pnt from gp) returns MakeCirc;
70 ---Purpose : Makes a Circ from gp <TheCirc> passing through 3
71 -- Pnt2d <P1>,<P2>,<P3>.
72
73Create(Center : Pnt from gp ;
74 Norm : Dir from gp ;
75 Radius : Real from Standard) returns MakeCirc;
76 ---Purpose : Makes a Circ from gp <TheCirc> with its center
77 -- <Center> and the normal of its plane <Norm> and
78 -- its radius <Radius>.
79
80Create(Center : Pnt from gp ;
81 Plane : Pln from gp ;
82 Radius : Real from Standard) returns MakeCirc;
83 ---Purpose : Makes a Circ from gp <TheCirc> with its center
84 -- <Center> and the normal of its plane <Plane> and
85 -- its radius <Radius>.
86
87Create(Center : Pnt from gp ;
88 Ptaxis : Pnt from gp ;
89 Radius : Real from Standard) returns MakeCirc;
90 ---Purpose : Makes a Circ from gp <TheCirc> with its center
91 -- <Center> and a point <Ptaxis> giving the normal
92 -- of its plane <Plane> and its radius <Radius>.
93
94Create(Axis : Ax1 from gp ;
95 Radius : Real from Standard) returns MakeCirc;
96 ---Purpose : Makes a Circ from gp <TheCirc> with its center
97 -- <Center> and its radius <Radius>.
98 -- Warning
99 -- The MakeCirc class does not prevent the
100 -- construction of a circle with a null radius.
101 -- If an error occurs (that is, when IsDone returns
102 -- false), the Status function returns:
103 -- - gce_Negative Radius if:
104 -- - Radius is less than 0.0, or
105 -- - Dist is less than 0.0 and the absolute value of
106 -- Dist is greater than the radius of Circ;
107 -- - gce_IntersectionError if the points P1, P2 and
108 -- P3 are collinear, and the three are not coincident;
109 -- - gce_ConfusedPoints if two of the three points
110 -- P1, P2 and P3 are coincident; or
111 -- - gce_NullAxis if Center and Ptaxis are coincident.
112
113Value(me) returns Circ from gp
114 raises NotDone
115 is static;
116 ---C++: return const&
117 ---Purpose: Returns the constructed circle.
118 -- Exceptions StdFail_NotDone if no circle is constructed.
119
120Operator(me) returns Circ from gp
121 is static;
122 ---C++: return const&
123 ---C++: alias "Standard_EXPORT operator gp_Circ() const;"
124
125fields
126
127 TheCirc : Circ from gp;
128 --The solution from gp.
129
130end MakeCirc;