0022769: Optimization of sewing algorithm
[occt.git] / src / Geom2dAdaptor / Geom2dAdaptor_Curve.cdl
1 -- File:        Geom2dAdaptor_Curve.cdl
2 -- Created:     Thu Jun  3 18:51:05 1993
3 -- Author:      Bruno DUMORTIER
4 --              <dub@topsn3>
5 ---Copyright:    Matra Datavision 1993
6
7 class Curve from Geom2dAdaptor inherits Curve2d from Adaptor2d
8
9         ---Purpose: An interface between the services provided by any
10         -- curve from the package Geom2d and those required
11         -- of the curve by algorithms which use it.
12         
13 uses Vec2d                  from gp,
14      Pnt2d                  from gp,
15      Circ2d                 from gp,
16      Elips2d                from gp,
17      Hypr2d                 from gp,
18      Parab2d                from gp,
19      Lin2d                  from gp,
20      Array1OfReal           from TColStd,
21      Curve                  from Geom2d,
22      BezierCurve            from Geom2d,
23      BSplineCurve           from Geom2d,
24      CurveType              from GeomAbs,
25      Shape                  from GeomAbs,
26      HCurve2d               from Adaptor2d
27      
28      
29 raises NoSuchObject from Standard,
30        ConstructionError from Standard,
31        OutOfRange  from Standard,
32        DomainError from Standard
33
34
35 is
36
37     Create returns Curve from Geom2dAdaptor;
38
39     Create(C : Curve from Geom2d) returns Curve from Geom2dAdaptor;
40
41     Create(C : Curve from Geom2d; UFirst,ULast : Real)
42     returns Curve from Geom2dAdaptor
43     raises 
44         ConstructionError from Standard;
45         ---Purpose: ConstructionError is raised if Ufirst>Ulast
46    
47     Load(me : in out; C : Curve from Geom2d);
48         ---C++: inline
49    
50     Load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
51     raises 
52         ConstructionError from Standard;
53         ---C++: inline
54         ---Purpose: ConstructionError is raised if Ufirst>Ulast
55
56     Curve(me) returns Curve from Geom2d
57         ---C++: return const& 
58         ---C++: inline
59     is static;
60
61
62
63     FirstParameter(me) returns Real
64         ---C++: inline
65     is redefined static;
66
67     LastParameter(me) returns Real
68         ---C++: inline
69     is redefined static;     
70
71     Continuity(me) returns Shape from GeomAbs
72     is redefined static;
73
74     NbIntervals(me; S : Shape from GeomAbs) returns Integer
75         ---Purpose: If necessary,  breaks the  curve in  intervals  of
76         --          continuity  <S>.    And  returns   the number   of
77         --          intervals.
78     is redefined static;
79
80     Intervals(me; T : in out Array1OfReal from TColStd; 
81                   S : Shape from GeomAbs)
82         ---Purpose: Stores in <T> the  parameters bounding the intervals
83         --          of continuity <S>.
84         --          
85         --          The array must provide  enough room to  accomodate
86         --          for the parameters. i.e. T.Length() > NbIntervals()
87     raises
88         OutOfRange from Standard 
89     is redefined static;
90     
91     Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
92         ---Purpose: Returns    a  curve equivalent   of  <me>  between
93         --          parameters <First>  and <Last>. <Tol>  is used  to
94         --          test for 3d points confusion.
95     raises
96         OutOfRange from Standard
97         ---Purpose: If <First> >= <Last> 
98     is redefined static;
99     
100     IsClosed(me) returns Boolean
101     is redefined static;
102     
103     IsPeriodic(me) returns Boolean
104     is redefined static;
105
106     Period(me) returns Real
107     raises
108         DomainError from Standard -- if the curve is not periodic
109     is redefined static;
110
111     
112     Value(me; U : Real) returns Pnt2d from gp
113         --- Purpose : Computes the point of parameter U on the curve 
114     is redefined static;
115
116     D0 (me; U : Real; P : out Pnt2d from gp)
117         --- Purpose : Computes the point of parameter U.
118     is redefined static;
119
120     D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
121         --- Purpose : Computes the point of parameter U on the curve with its
122         --  first derivative.
123
124     raises 
125        DomainError from Standard
126         --- Purpose : Raised if the continuity of the current interval
127         --  is not C1.
128     is redefined static;
129     
130     D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
131         --- Purpose :
132         --  Returns the point P of parameter U, the first and second
133         --  derivatives V1 and V2.
134     raises 
135        DomainError from Standard
136         --- Purpose : Raised if the continuity of the current interval
137         --  is not C2.
138     is redefined static;
139
140     D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
141         --- Purpose :
142         --  Returns the point P of parameter U, the first, the second 
143         --  and the third derivative.
144     raises 
145         DomainError from Standard
146         --- Purpose : Raised if the continuity of the current interval
147         --  is not C3.
148     is redefined static;
149         
150     DN (me; U : Real; N : Integer)   returns Vec2d from gp
151         --- Purpose :
152         --  The returned vector gives the value of the derivative for the 
153         --  order of derivation N.
154     raises  
155         DomainError from Standard,
156         --- Purpose : Raised if the continuity of the current interval
157         --  is not CN.
158         OutOfRange from Standard
159         --- Purpose : Raised if N < 1.            
160     is redefined static;
161
162
163     Resolution(me; Ruv :Real) returns Real
164         ---Purpose : returns the parametric resolution
165     is redefined static;   
166    
167
168     GetType(me) returns CurveType from GeomAbs
169         ---C++: inline
170     is redefined static;
171
172     Line(me) returns Lin2d from gp
173     raises 
174         NoSuchObject from Standard
175     is redefined static;
176    
177     Circle(me) returns Circ2d from gp
178     raises 
179         NoSuchObject from Standard
180     is redefined static;
181
182     Ellipse(me) returns Elips2d from gp
183     raises 
184         NoSuchObject from Standard
185     is redefined static;
186
187     Hyperbola(me) returns  Hypr2d from gp
188     raises 
189         NoSuchObject from Standard
190     is redefined static;
191
192     Parabola(me) returns Parab2d from gp
193     raises 
194         NoSuchObject from Standard
195     is redefined static;
196
197      
198      Degree(me) returns Integer
199      raises 
200         NoSuchObject from Standard
201      is redefined static;
202      
203      IsRational(me) returns Boolean
204      raises 
205         NoSuchObject from Standard
206      is redefined static;
207      
208      NbPoles(me) returns Integer
209      raises 
210         NoSuchObject from Standard
211      is redefined static;
212
213   
214      NbKnots(me) returns Integer
215      raises 
216         NoSuchObject from Standard
217      is redefined static;     
218           
219
220
221     Bezier(me) returns BezierCurve from Geom2d
222     raises 
223         NoSuchObject from Standard
224     is redefined static;
225     
226     BSpline(me) returns BSplineCurve from Geom2d
227     raises 
228         NoSuchObject from Standard
229     is redefined static;
230     
231     LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs 
232     is static private;
233
234     load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
235     is private;
236    
237 fields 
238
239   myCurve             : Curve            from Geom2d ;
240   myTypeCurve         : CurveType        from GeomAbs ;
241   myFirst             : Real             from Standard ;
242   myLast              : Real             from Standard;
243   
244 end Curve;
245