0024761: Convertation of the generic classes to the non-generic. Part 5
[occt.git] / src / GccGeo / GccGeo_CurvePGTool.cdl
1 -- Created on: 1992-06-04
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1992-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 generic class CurvePGTool from GccGeo (
18     TheCurve        as any;
19     TheCurveTool    as any; -- as CurveTool(TheCurve) from GccInt
20     TheParGenCurve  as any) -- as ParGenCurve(TheCurve) from GccGeo
21         ---Purpose: 
22
23 uses Pnt2d        from gp,
24      Vec2d        from gp,
25      Lin2d        from gp,
26      Circ2d       from gp,
27      Elips2d      from gp,
28      Parab2d      from gp,
29      Hypr2d       from gp,
30      CurveType    from GeomAbs,
31      Shape        from GeomAbs
32
33 is
34
35     TheType(myclass; C: TheParGenCurve ) 
36         returns CurveType from GeomAbs;
37
38     Line(myclass; C: TheParGenCurve)
39         ---Purpose: Returns the Lin2d from gp corresponding to the curve C.
40         --          This method is called only when TheType returns
41         --          IntCurve_Lin.
42         returns Lin2d from gp;
43
44     Circle(myclass; C: TheParGenCurve)
45         ---Purpose: Returns the Circ2d from gp corresponding to the curve C.
46         --          This method is called only when TheType returns
47         --          IntCurve_Cir.
48         returns Circ2d from gp;
49
50     Ellipse(myclass; C: TheParGenCurve)
51         ---Purpose: Returns the Elips2d from gp corresponding to the curve C.
52         --          This method is called only when TheType returns
53         --          IntCurve_Eli.
54         returns Elips2d from gp;
55
56     Parabola(myclass; C: TheParGenCurve)
57         ---Purpose: Returns the Parab2d from gp corresponding to the curve C.
58         --          This method is called only when TheType returns
59         --          IntCurve_Prb.
60         returns Parab2d from gp;
61
62     Hyperbola(myclass; C: TheParGenCurve)
63         ---Purpose: Returns the Hypr2d from gp corresponding to the curve C.
64         --          This method is called only when TheType returns
65         --          IntCurve_Hpr.
66         returns Hypr2d from gp;
67
68 -- The following method are used only when TheType returns  IntCurve_Other.
69
70     FirstParameter(myclass;C: TheParGenCurve)
71         returns Real;
72
73     LastParameter(myclass;C: TheParGenCurve)
74         returns Real;
75
76     EpsX (myclass                     ; 
77           C       : TheParGenCurve    ;
78           Tol     : Real from Standard)
79         returns Real;
80
81     NbSamples(myclass                 ;
82               C       : TheParGenCurve)
83         returns Integer;
84
85     Value (myclass                 ;
86            C       : TheParGenCurve;
87            X       : Real          )
88         returns Pnt2d from gp;
89
90     D1 (myclass; C :     TheParGenCurve ;
91                  U :     Real           ;  
92                  P : out Pnt2d          ;
93                  T : out Vec2d          );
94
95     D2 (myclass; C   :     TheParGenCurve ;
96                  U   :     Real           ; 
97                  P   : out Pnt2d          ;
98                  T,N : out Vec2d          );
99
100     IsComposite(myclass; C:TheParGenCurve)
101    
102         returns Boolean from Standard;
103
104 -- The following methods are used only when IsComposite returns True.
105
106         
107     GetIntervals(myclass ; C:TheParGenCurve) returns Integer from Standard;
108         ---Purpose : Outputs the number of interval of continuity C1 of 
109         --           the curve
110         --           used if Type == Composite.
111
112     GetInterval (myclass; C      :     TheParGenCurve
113                        ; Index  :     Integer  from Standard
114                        ; U1, U2 : out Real     from Standard);
115         ---Purpose : Outputs the bounds of interval of index <Index>
116         --           used if Type == Composite.
117
118     SetCurrentInterval (myclass; C: in out TheParGenCurve
119                               ; Index : Integer from Standard);
120         ---Purpose : Set the current valid interval of index <Index>
121         --           inside which the computations will be done
122         --           (used if Type == Composite).
123
124 end CurvePGTool;
125
126
127
128