0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / IGESGeom / IGESGeom_ConicArc.cdl
1 -- Created on: 1993-01-09
2 -- Created by: CKY / Contract Toubro-Larsen (Kiran)
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 ConicArc from IGESGeom  inherits IGESEntity
18
19         ---Purpose: defines IGESConicArc, Type <104> Form <0-3>  in package IGESGeom
20         --          A conic arc is a bounded connected portion of a parent
21         --          conic curve which consists of more than one point. The
22         --          parent conic curve is either an ellipse, a parabola, or
23         --          a hyperbola. The definition space coordinate system is
24         --          always chosen so that the conic arc lies in a plane either
25         --          coincident with or parallel to XT, YT plane. Within such
26         --          a plane a conic is defined by the six coefficients in the
27         --          following equation.
28         --          A*XT^2 + B*XT*YT + C*YT^2 + D*XT + E*YT + F = 0
29
30 uses
31
32         Pnt         from gp,
33         Pnt2d       from gp,
34         Dir         from gp,
35         XY          from gp
36
37 is
38
39         Create returns ConicArc;
40
41         -- Specific Methods pertaining to the class
42
43         Init (me                   : mutable;
44               A, B, C, D, E, F, ZT : Real;
45               aStart, anEnd        : XY);
46         ---Purpose : This method is used to set the fields of the class
47         --           ConicalArc
48         --       - A, B, C, D, E, F : Coefficients of the equation
49         --                            defining conic arc
50         --       - ZT               : Parallel ZT displacement of the arc
51         --                            from XT, YT plane.
52         --       - aStart           : Starting point of the conic arc
53         --       - anEnd            : End point of the conic arc
54
55         OwnCorrect (me : mutable) returns Boolean;
56         ---Purpose : sets the Form Number equal to ComputedFormNumber,
57         --           returns True if changed
58
59         ComputedFormNumber (me) returns Integer;
60         ---Purpose : Computes the Form Number according to the equation
61         --           1 for Ellipse, 2 for Hyperbola, 3 for Parabola
62
63         Equation (me; A, B, C, D, E, F : out Real);
64         -- returns the basic equation defining the arc
65         -- A, B, C, D, E, F are the coefficients of the equation
66
67         ZPlane (me) returns Real;
68         ---Purpose : returns the Z displacement of the arc from XT, YT plane
69
70         StartPoint (me) returns Pnt2d;
71         ---Purpose : returns the starting point of the arc
72
73         TransformedStartPoint (me) returns Pnt;
74         ---Purpose : returns the starting point of the arc after applying
75         -- Transf. Matrix
76
77         EndPoint (me) returns Pnt2d;
78         ---Purpose : returns the end point of the arc
79
80         TransformedEndPoint (me) returns Pnt;
81         ---Purpose : returns the end point of the arc after applying
82         -- Transf. Matrix
83
84         IsFromEllipse (me) returns Boolean;
85         ---Purpose : returns True if parent conic curve is an ellipse
86
87         IsFromParabola (me) returns Boolean;
88         ---Purpose : returns True if parent conic curve is a parabola
89
90         IsFromHyperbola (me) returns Boolean;
91         ---Purpose : returns True if parent conic curve is a hyperbola
92
93         IsClosed (me) returns Boolean;
94         ---Purpose : returns True if StartPoint = EndPoint
95
96
97         Axis(me) returns Dir;
98         ---Purpose : Z-Axis of conic (i.e. [0,0,1])
99
100         TransformedAxis (me) returns Dir;
101         ---Purpose : Z-Axis after applying Trans. Matrix
102
103         Definition (me; Center : out Pnt; MainAxis : out Dir;
104                         rmin, rmax : out Real);
105         ---Purpose : Returns a Definition computed from equation, easier to use
106         --           <Center> : the center of the the conic (meaningless for
107         --                      a parabola) (defined with Z displacement)
108         --           <MainAxis> : the Main Axis of the conic (for a Circle,
109         --                        arbitrary the X Axis)
110         --           <Rmin,Rmax> : Minor and Major Radii of the conic
111         --                         For a Circle, Rmin = Rmax,
112         --                         For a Parabola, Rmin = Rmax = the Focal
113         --  Warning : the basic definition (by equation) is not very stable,
114         --           limit cases may be approximative
115
116         TransformedDefinition (me; Center : out Pnt; MainAxis : out Dir;
117                                    rmin, rmax : out Real);
118         ---Purpose : Same as Definition, but the Location is applied on the
119         --           Center and the MainAxis
120
121         ComputedDefinition (me; Xcen,Ycen, Xax, Yax, Rmin,Rmax : out Real);
122         ---Purpose : Computes and returns the coordinates of the definition of
123         --           a comic from its equation. Used by Definition &
124         --           TransformedDefinition, or may be called directly if needed
125
126 fields
127
128 --
129 -- Class    : IGESGeom_ConicArc
130 --
131 -- Purpose  : Declaration of variables specific to the definition
132 --            of the Class ConicArc.
133 --
134 -- Reminder : A ConicArc instance is defined by :
135 --            The six coefficients in the following equation.
136 --            A*XT^2 + B*XT*YT + C*YT^2 + D*XT + E*YT + F = 0
137 --            The parent curve could be a parabola or a hyperbola
138 --            or an ellipse. The arc has one start and one end point.
139
140             theA     : Real;
141             theB     : Real;
142             theC     : Real;
143             theD     : Real;
144             theE     : Real;
145             theF     : Real;
146                 --  Conic coefficients
147
148             theZT    : Real;
149             theStart : XY;
150             theEnd   : XY;
151
152 end ConicArc;