0024157: Parallelization of assembly part of BO
[occt.git] / src / gce / gce_MakeElips2d.cdl
CommitLineData
b311480e 1-- Created on: 1992-08-26
2-- Created by: Remi GILET
3-- Copyright (c) 1992-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
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.
10--
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.
13--
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.
20
7fd59977 21
22class MakeElips2d from gce inherits Root from gce
23
24 ---Purpose :This class implements the following algorithms used to
25 -- create Elips2d from gp.
26 --
27 -- * Create an ellipse from its center, and two points:
28 -- one on the ciconference giving the major radius, the
29 -- other giving the value of the small radius.
30 -- * Create an ellipse from its major axis and its major
31 -- radius and its minor radius.
32
33uses Pnt2d from gp,
34 Ax2d from gp,
35 Ax22d from gp,
36 Elips2d from gp
37
38raises NotDone from StdFail
39
40is
41
42Create (MajorAxis : Ax2d from gp ;
43 MajorRadius, MinorRadius : Real from Standard ;
44 Sense : Boolean from Standard = Standard_True)
45 returns MakeElips2d;
46 --- Purpose :
47 -- Creates an ellipse with the major axis, the major and the
48 -- minor radius. The location of the MajorAxis is the center
49 -- of the ellipse.
50 -- The sense of parametrization is given by Sense.
51 -- It is possible to create an ellipse with MajorRadius = MinorRadius.
52 -- the status is "InvertRadius" if MajorRadius < MinorRadius or
53 -- "NegativeRadius" if MinorRadius < 0.0
54
55Create (A : Ax22d from gp ;
56 MajorRadius, MinorRadius : Real from Standard )
57 returns MakeElips2d;
58 --- Purpose :
59 -- Axis defines the Xaxis and Yaxis of the ellipse which defines
60 -- the origin and the sense of parametrization.
61 -- Creates an ellipse with the AxisPlacement the major and the
62 -- minor radius. The location of Axis is the center
63 -- of the ellipse.
64 -- It is possible to create an ellipse with MajorRadius = MinorRadius.
65 -- the status is "InvertRadius" if MajorRadius < MinorRadius or
66 -- "NegativeRadius" if MinorRadius < 0.0
67
68Create(S1,S2 : Pnt2d from gp;
69 Center : Pnt2d from gp) returns MakeElips2d;
70 ---Purpose: Makes an Elips2d with its center and two points.
71 -- The sense of parametrization is given by S1, S2,
72 -- and Center.
73 -- Depending on the constructor, the implicit orientation of the ellipse is:
74 -- - the sense defined by A,
75 -- - the sense defined by points Center, S1 and S2,
76 -- - the trigonometric sense if Sense is not given or is true, or
77 -- - the opposite if Sense is false.
78 -- It is possible to construct an ellipse where the major
79 -- and minor radii are equal.
80 -- Warning
81 -- If an error occurs (that is, when IsDone returns
82 -- false), the Status function returns:
83 -- - gce_InvertRadius if MajorRadius is less than MinorRadius,
84 -- - gce_NegativeRadius if MajorRadius or
85 -- MinorRadius is less than 0.0,
86 -- - gce_NullAxis if points S1, S2 and Center are collinear, or
87 -- - gce_InvertAxis if the major radius computed with
88 -- Center and S1 is less than the minor radius
89 -- computed with Center, S1 and S2.
90
91Value(me) returns Elips2d from gp
92 raises NotDone
93 is static;
94 ---C++: return const&
95 ---Purpose: Returns the constructed ellipse.
96 -- Exceptions StdFail_NotDone if no ellipse is constructed.
97
98Operator(me) returns Elips2d from gp
99 is static;
100 ---C++: return const&
101 ---C++: alias "Standard_EXPORT operator gp_Elips2d() const;"
102
103fields
104
105 TheElips2d : Elips2d from gp;
106 --The solution from gp.
107
108end MakeElips2d;
109
110
111
112