0025133: TKOpenGl - Crash on closing a view containing presentations with capping
[occt.git] / src / Bisector / Bisector_BisecPC.cdl
1 -- Created on: 1994-01-10
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1994-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 BisecPC from Bisector 
18
19 inherits
20
21     Curve from Bisector
22         ---Purpose: Provides the bisector between a point and a curve.
23         --          the curvature on the curve has to be monoton.
24         --          the point can't be on the curve exept at the extremitys.
25         --          
26
27 uses
28     Shape             from GeomAbs,
29     CurveType         from GeomAbs,
30     Curve             from Geom2d,
31     Geometry          from Geom2d, 
32     Pnt2d             from gp,
33     Vec2d             from gp,
34     SequenceOfReal    from TColStd,
35     Trsf2d            from gp
36
37         
38 raises DomainError    from Standard,
39        RangeError        from Standard
40 is
41     
42     Create returns BisecPC;
43
44     Create  (Cu      : Curve from Geom2d;
45              P       : Pnt2d from gp    ;
46              Side    : Real             ;
47              DistMax : Real = 500       )
48              
49         ---Purpose: Constructs the bisector between the point <P> and
50         --          the curve <Cu>.
51         --          <Side> = 1. if the bisector curve is on the Left of <Cu>
52         --          else <Side> = -1.
53         --          <DistMax> is used to trim the bisector.The distance
54         --          between the points of the bisector and <Cu> is smaller
55         --          than <DistMax>.
56         --          
57     returns BisecPC from Bisector;      
58     
59     Create  (Cu      : Curve from Geom2d;
60              P       : Pnt2d from gp    ;
61              Side    : Real             ;
62              UMin    : Real             ;       
63              UMax    : Real             )
64              
65         ---Purpose: Constructs the bisector between the point <P> and
66         --          the curve <Cu> Trimmed by <UMin> and <UMax>         
67         --          <Side> = 1. if the bisector curve is on the Left of <Cu>
68         --          else <Side> = -1.
69         --  Warning: the bisector is supposed all over defined between
70         --          <UMin> and <UMax>. 
71
72     returns BisecPC from Bisector;
73     
74     Perform (me      : mutable          ;
75              Cu      : Curve from Geom2d;
76              P       : Pnt2d from gp    ;
77              Side    : Real             ;
78              DistMax : Real = 500       )       
79              
80         ---Purpose: Construct the bisector between the point <P> and
81         --          the curve <Cu>.
82         --          <Side> = 1. if the bisector curve is on the Left of <Cu>
83         --          else <Side> = -1.  
84         --          <DistMax> is used to trim the bisector.The distance
85         --          between the points of the bisector and <Cu> is smaller
86         --          than <DistMax>.
87              
88     is static;       
89
90
91
92     IsExtendAtStart (me) returns Boolean from Standard
93         ---Purpose: Returns True if the bisector is extended at start.         
94     is static;
95     
96     IsExtendAtEnd   (me) returns Boolean from Standard
97         ---Purpose: Returns True if the bisector is extended at end.    
98     is static;
99     
100     Reverse (me : mutable)
101         --- Purpose :
102         --  Changes the direction of parametrization of <me>. 
103         --  The orientation  of the curve is modified. If the curve
104         --  is bounded the StartPoint of the initial curve becomes the
105         --  EndPoint of the reversed curve  and the EndPoint of the initial
106         --  curve becomes the StartPoint of the reversed curve.
107     is static;
108     
109     ReversedParameter(me; U : Real) returns Real        
110         ---Purpose: Returns the  parameter on the  reversed  curve for
111         --          the point of parameter U on <me>.
112     is static;
113     
114     Copy (me)  returns like me   
115     is static;
116     
117     Transform (me : mutable; T : Trsf2d) 
118         --- Purpose :
119         --  Transformation of a geometric object. This tansformation 
120         --  can be a translation, a rotation, a symmetry, a scaling
121         --  or a complex transformation obtained by combination of
122         --  the previous elementaries transformations.
123     is static;
124     
125     IsCN (me; N : Integer)  returns Boolean
126         --- Purpose : Returns the order of continuity of the curve. 
127      raises RangeError
128         --- Purpose : Raised if N < 0. 
129     is static;
130     
131     FirstParameter(me) returns Real
132         --- Purpose : Value of the first parameter.
133     is static;
134
135     LastParameter(me) returns Real
136         --- Purpose : Value of the last parameter.      
137     is static;     
138
139     Continuity(me) returns Shape from GeomAbs
140     is static;
141
142     NbIntervals(me ) returns Integer
143         ---Purpose: If necessary,  breaks the  curve in  intervals  of
144         --          continuity  <C1>.    And  returns   the number   of
145         --          intervals. 
146     is static;
147
148     IntervalFirst(me ; Index : Integer from Standard ) returns Real
149        ---Purpose: Returns  the  first  parameter    of  the  current
150        --          interval. 
151     is static;
152     
153     IntervalLast (me ; Index : Integer from Standard ) returns Real
154        ---Purpose: Returns  the  last  parameter    of  the  current
155        --          interval. 
156     is static;
157     
158     IntervalContinuity(me) returns Shape from GeomAbs
159     is static;
160     
161     IsClosed(me) returns Boolean
162     is static;
163     
164     IsPeriodic(me) returns Boolean
165     is static;
166
167     Values (me                  ; 
168             U   : Real          ; 
169             N   : Integer       ; 
170             P   : in out Pnt2d  ;
171             V1  : in out Vec2d  ;
172             V2  : in out Vec2d  ;           
173             V3  : in out Vec2d  )
174     is static private;              
175     
176     Distance (me; U : Real) returns Real
177         ---Purpose: Returns   the   distance   between  the  point  of
178         --          parameter U on <me> and my point or my curve.
179     is static;
180     
181     D0 (me; U : Real; P : out Pnt2d)
182     is static;
183     
184     D1 (me; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
185     is static ;
186     
187     D2 (me; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp) 
188     is static;
189
190     D3 (me; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp) 
191     is static;
192         
193     DN (me; U : Real; N : Integer)
194     returns Vec2d from gp
195     is static;
196     
197     Dump (me; Deep : Integer = 0; Offset : Integer = 0) is static;
198     
199     LinkBisCurve (me ; U : Real) returns Real from Standard
200         ---Purpose: Returns the parameter on the curve1 of the projection
201         --          of the point of parameter U on <me>.
202     is static;
203     
204     LinkCurveBis (me ; U : Real) returns Real from Standard
205         ---Purpose: Returns the reciproque of LinkBisCurve.
206     is static;
207     
208     Extension (me                  ; 
209                U   : Real          ; 
210                P   : in out Pnt2d  ;
211                V1  : in out Vec2d  ;
212                V2  : in out Vec2d  ;        
213                V3  : in out Vec2d  )
214     is static private;  
215
216     Parameter ( me ; P : Pnt2d from gp) returns Real
217         ---Purpose: Returns the parameter on <me> corresponding to <P>.
218     is static;
219     
220     IsEmpty (me) returns Boolean from Standard
221         ---Purpose: Returns <True> if the bisector is empty.
222     is static;
223
224     ComputeIntervals (me : mutable) 
225         ---Purpose: Computes the interval where the bisector is defined.
226     is static private;
227
228     CuspFilter (me : mutable)
229     is static private;
230
231     SearchBound( me ; U1,U2 : Real) returns Real
232     is static private;
233     
234     Init (me             : mutable;     
235           Curve          : Curve             from Geom2d;
236           Point          : Pnt2d             from gp;
237           Sign           : Real              from Standard;
238           StartIntervals : SequenceOfReal    from TColStd;
239           EndIntervals   : SequenceOfReal    from TColStd;
240           BisInterval    : Integer           from Standard;     
241           CurrentInterval: Integer           from Standard;
242           ShiftParameter : Real              from Standard;
243           DistMax        : Real              from Standard;
244           IsEmpty        : Boolean           from Standard;
245           IsConvex       : Boolean           from Standard;
246           ExtensionStart : Boolean           from Standard;
247           ExtensionEnd   : Boolean           from Standard;
248           PointStartBis  : Pnt2d             from gp;
249           PointEndBis    : Pnt2d             from gp)
250     is static private;
251     
252 fields
253
254     curve          : Curve             from Geom2d;
255     point          : Pnt2d             from gp;
256     sign           : Real              from Standard;
257     startIntervals : SequenceOfReal    from TColStd;
258     endIntervals   : SequenceOfReal    from TColStd;
259     bisInterval    : Integer           from Standard;   
260     currentInterval: Integer           from Standard;
261     shiftParameter : Real              from Standard;
262     distMax        : Real              from Standard;
263     isEmpty        : Boolean           from Standard;
264     isConvex       : Boolean           from Standard;
265     extensionStart : Boolean           from Standard;
266     extensionEnd   : Boolean           from Standard;
267     pointStartBis  : Pnt2d             from gp;
268     pointEndBis    : Pnt2d             from gp;
269     
270 end BisecPC;