0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / HLRBRep / HLRBRep_Curve.cdl
1 -- Created on: 1993-04-01
2 -- Created by: Modelistation
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 Curve from HLRBRep
18         
19         ---Purpose: Defines a 2d curve by projection of  a 3D curve on
20         --          a    plane     with  an     optional   perspective
21         --          transformation.
22
23 uses
24     Integer         from Standard,    
25     Boolean         from Standard,    
26     ShortReal       from Standard,    
27     Real            from Standard,    
28     Address         from Standard,    
29     Pnt             from gp,
30     Vec             from gp,
31     Pnt2d           from gp,
32     Vec2d           from gp,
33     Dir2d           from gp,
34     Circ2d          from gp,
35     Elips2d         from gp,
36     Hypr2d          from gp,
37     Parab2d         from gp,
38     Lin2d           from gp,
39     Shape           from GeomAbs,
40     CurveType       from GeomAbs,
41     Array1OfPnt2d   from TColgp,
42     Array1OfReal    from TColStd,
43     Array1OfInteger from TColStd,
44     Edge            from TopoDS,
45     Curve           from BRepAdaptor,
46     BSplineCurve    from Geom
47      
48 raises
49     NoSuchObject        from Standard,
50     DomainError         from Standard,
51     OutOfRange          from Standard,
52     UndefinedDerivative from StdFail
53
54      
55 is
56     Create returns Curve from HLRBRep;
57         ---Purpose: Creates an undefined Curve.
58     
59     Projector(me : in out; Proj : Address from Standard)
60         ---C++: inline
61     is static;
62
63     Curve(me : in out) returns Curve from BRepAdaptor
64         ---Purpose: Returns the 3D curve.
65         ---C++: return &
66         ---C++: inline
67     is static;
68     
69     Curve(me : in out; E : Edge from TopoDS)
70         ---Purpose: Sets the 3D curve to be projected.
71     is static;
72     
73     GetCurve(me) returns Curve from BRepAdaptor
74         ---Purpose: Returns the 3D curve.
75         ---C++: return const &
76         ---C++: inline
77     is static;
78     
79     Parameter2d(me; P3d : Real from Standard) returns Real from Standard
80         ---Purpose: Returns the parameter   on the 2d  curve  from the
81         --          parameter on the 3d curve.
82     is static;
83     
84     Parameter3d(me; P2d : Real from Standard) returns Real from Standard
85         ---Purpose: Returns the parameter   on the 3d  curve  from the
86         --          parameter on the 2d curve.
87     is static;
88     
89     Update(me : in out; TotMin : Address from Standard;
90                         TotMax : Address from Standard)
91     returns Real from Standard
92         ---Purpose: Update the minmax and the internal data
93     is static;
94
95     UpdateMinMax(me : in out; TotMin : Address from Standard;
96                               TotMax : Address from Standard)
97     returns Real from Standard
98         ---Purpose: Update the minmax returns tol for enlarge;
99     is static;
100
101     Z(me; U : Real from Standard) returns Real from Standard
102         --- Purpose :  Computes the Z    coordinate  of the  point  of
103         --  parameter U on the curve in the viewing coordinate system
104     is static;
105     
106     Value3D(me; U : Real from Standard) returns Pnt from gp
107         --- Purpose  :  Computes the 3D point   of parameter U  on the
108         --  curve.
109         --  
110         ---C++: inline
111     is static;
112
113     D0 (me; U :     Real from Standard;
114             P : out Pnt  from gp)
115         --- Purpose  :  Computes the 3D point   of parameter U  on the
116         --  curve.
117         --  
118         ---C++: inline
119     is static;
120
121     D1(me; U :     Real from Standard;
122            P : out Pnt  from gp ;
123            V : out Vec  from gp)
124         --- Purpose :  Computes the point of parameter  U on the curve
125         --  with its first derivative.
126         --  
127         ---C++: inline
128     is static;
129
130     Tangent(me; AtStart :     Boolean from Standard;
131                 P       : out Pnt2d   from gp;
132                 D       : out Dir2d   from gp)
133         --- Purpose : Depending on <AtStart> computes the 2D point and
134         --  tangent on the curve  at sart (or at  end).  If the  first
135         --  derivative is null look after  at start (or before at end)
136         --  with the second derivative.
137         --
138     raises
139         UndefinedDerivative from StdFail
140     is static;
141     
142     --
143     --     Global methods - Apply to the whole curve.
144     --     
145     
146     FirstParameter(me) returns Real from Standard
147         ---C++: inline
148     is static;
149
150     LastParameter(me) returns Real from Standard
151         ---C++: inline
152     is static;
153     
154     Continuity(me) returns Shape from GeomAbs
155         ---C++: inline
156     is static;
157     
158     NbIntervals(me: in out; S : Shape from GeomAbs)
159     returns Integer from Standard
160         ---Purpose: If necessary,  breaks the  curve in  intervals  of
161         --          continuity  <S>.    And  returns   the number   of
162         --          intervals.
163         ---C++: inline
164     is static;
165
166     Intervals(me: in out; T : in out Array1OfReal from TColStd; 
167                   S : Shape from GeomAbs)
168         ---Purpose: Stores in <T> the  parameters bounding the intervals
169         --          of continuity <S>.
170         --          
171         --          The array must provide  enough room to  accomodate
172         --          for the parameters. i.e. T.Length() > NbIntervals()
173     raises
174         OutOfRange from Standard
175     ---C++: inline
176     ;
177
178     IsClosed(me) returns Boolean from Standard
179         ---C++: inline
180     is static;
181     
182     IsPeriodic(me) returns Boolean from Standard
183         ---C++: inline
184     is static;
185     
186     Period(me) returns Real
187     raises
188         DomainError from Standard -- if the curve is not periodic
189         ---C++: inline
190     is static;
191      
192     Value(me; U : Real from Standard) returns Pnt2d from gp
193         --- Purpose : Computes the point of parameter U on the curve.
194         --  
195         ---C++: inline
196     is static;
197
198     D0 (me; U :     Real  from Standard;
199             P : out Pnt2d from gp)
200         --- Purpose : Computes the point of parameter U on the curve.
201     is static;
202
203     D1 (me; U :     Real  from Standard;
204             P : out Pnt2d from gp;
205             V : out Vec2d from gp)
206         --- Purpose : Computes the point  of  parameter U on the curve
207         --  with its first derivative.
208     raises 
209         DomainError from Standard
210         --- Purpose : Raised if the continuity of the current interval
211         --  is not C1.
212     is static;
213
214     D2 (me; U     :     Real  from Standard;
215             P     : out Pnt2d from gp ;
216             V1,V2 : out Vec2d from gp)
217     raises 
218         DomainError from Standard
219         --- Purpose : Raised if the continuity of the current interval
220         --  is not C2.
221     is static;
222     
223     D3 (me; U          :     Real  from Standard;
224             P          : out Pnt2d from gp;
225             V1, V2, V3 : out Vec2d from gp)
226         --- Purpose :
227         --  Returns the point P of parameter U, the first, the second 
228         --  and the third derivative.
229     raises 
230         DomainError from Standard
231         --- Purpose : Raised if the continuity of the current interval
232         --  is not C3.
233     is static;
234         
235     DN (me; U : Real    from Standard; 
236             N : Integer from Standard) returns Vec2d from gp
237         --- Purpose :
238         --  The returned vector gives the value of the derivative for the 
239         --  order of derivation N.
240     raises  
241         DomainError from Standard,
242         --- Purpose : Raised if the continuity of the current interval
243         --  is not CN.
244         OutOfRange from Standard
245         --- Purpose : Raised if N < 1.            
246     is static;
247
248     Resolution(me; R3d : Real) returns Real
249          ---Purpose :  Returns the parametric  resolution corresponding
250          --         to the real space resolution <R3d>.
251         ---C++: inline
252     is static;
253         
254     GetType(me) returns CurveType from GeomAbs
255         ---Purpose: Returns  the  type of the   curve  in the  current
256         --          interval :   Line,   Circle,   Ellipse, Hyperbola,
257         --          Parabola, BezierCurve, BSplineCurve, OtherCurve.
258         ---C++: inline
259     is static;
260
261     --
262     --     The following methods must  be called when GetType returned
263     --     the corresponding type.
264     --     
265
266     Line(me) returns Lin2d from gp
267     raises
268         NoSuchObject from Standard
269     is static;
270
271     Circle(me) returns Circ2d from gp
272     raises
273         NoSuchObject from Standard
274     is static;
275
276     Ellipse(me) returns Elips2d from gp
277     raises
278         NoSuchObject from Standard
279     is static;
280
281     Hyperbola(me) returns  Hypr2d from gp
282     raises
283         NoSuchObject from Standard
284     is static;
285
286     Parabola(me) returns Parab2d from gp
287     raises
288         NoSuchObject from Standard
289     is static;
290
291
292     IsRational(me) returns Boolean from Standard
293         ---C++:inline
294     is static;
295     
296     Degree(me) returns Integer from Standard
297         ---C++: inline
298     is static;
299
300     NbPoles(me) returns Integer from Standard
301         ---C++: inline
302     is static;
303
304     Poles(me; TP : in out Array1OfPnt2d from TColgp)
305     raises 
306         NoSuchObject from Standard, -- if rational
307         OutOfRange   from Standard  -- if TP has not length NbPoles
308     is static;
309     
310     Poles(me; aCurve : BSplineCurve from Geom;
311               TP : in out Array1OfPnt2d from TColgp)
312     raises 
313         NoSuchObject from Standard, -- if rational
314         OutOfRange   from Standard  -- if TP has not length NbPoles
315     is static;
316     
317     PolesAndWeights(me; TP : in out Array1OfPnt2d from TColgp;
318                         TW : in out Array1OfReal  from TColStd)
319     raises 
320         NoSuchObject from Standard, -- if not rational
321         OutOfRange   from Standard  -- if TW has not length NbPoles
322     is static;
323     
324     PolesAndWeights(me; aCurve : BSplineCurve from Geom;
325                         TP : in out Array1OfPnt2d from TColgp;
326                         TW : in out Array1OfReal  from TColStd)
327     raises 
328         NoSuchObject from Standard, -- if not rational
329         OutOfRange   from Standard  -- if TW has not length NbPoles
330     is static;
331     
332     NbKnots(me) returns Integer from Standard
333     raises 
334         NoSuchObject from Standard
335         ---C++: inline
336     is static;
337      
338     Knots(me; kn: out Array1OfReal from TColStd)
339     is static;
340     
341     Multiplicities(me; mu: out Array1OfInteger from TColStd)
342     is static;
343     
344
345 fields
346     myCurve : Curve     from BRepAdaptor;
347     myType  : CurveType from GeomAbs;
348     myProj  : Address   from Standard;
349     
350     -- description of the line in the plane containing the line and the eye
351
352     myOX    : Real from Standard;
353     myOZ    : Real from Standard;
354     myVX    : Real from Standard;
355     myVZ    : Real from Standard;
356     myOF    : Real from Standard;
357     
358 end Curve;