Integration of OCCT 6.5.0 from SVN
[occt.git] / src / ProjLib / ProjLib_CompProjectedCurve.cdl
1 -- File:        ProjLib_CompProjectedCurve.cdl
2 -- Created:     Mon Sep 22 12:46:50 1997
3 -- Author:      Roman BORISOV
4 --              <rbv@pronox.nnov.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1997
6
7 class CompProjectedCurve from ProjLib inherits Curve2d  from   Adaptor2d
8     
9 uses
10     HSurface from Adaptor3d, 
11     HCurve   from Adaptor3d,  
12     HCurve2d   from Adaptor2d,
13     Pnt2d  from  gp, 
14     Vec2d  from  gp, 
15     Pnt  from  gp,
16     Array1OfReal   from  TColStd,  
17     HSequenceOfHSequenceOfPnt  from  ProjLib,
18     Shape  from  GeomAbs, 
19     HArray1OfBoolean  from  TColStd, 
20     HArray1OfReal  from  TColStd,
21     CurveType  from  GeomAbs
22
23 raises
24     
25     OutOfRange          from Standard,
26     NoSuchObject        from Standard,
27     DomainError         from Standard,
28     NotImplemented      from Standard
29     
30 is
31  
32     Create  returns  CompProjectedCurve; 
33      
34      
35     Create(S   : HSurface from Adaptor3d; 
36            C   : HCurve   from Adaptor3d; 
37            TolU,  TolV:  Real  from  Standard) 
38     returns CompProjectedCurve; 
39     ---Purpose: try to find all solutions 
40
41     Create(S   : HSurface from Adaptor3d; 
42            C   : HCurve   from Adaptor3d; 
43            TolU,  TolV,  MaxDist:  Real  from  Standard) 
44     returns CompProjectedCurve;  
45     ---Purpose: this constructor tries to optimize the search using the 
46     -- assamption that maximum distance between surface and curve less or 
47     -- equal then MaxDist. 
48     -- if MaxDist < 0 then algorithm works as above.
49         
50     Init(me:  in  out) 
51     ---Purpose : computes a set of projected point and determine the 
52     -- continuous parts of the projected  curves. The  points  
53     -- corresponding to a projection on the bounds of the surface are  
54     -- included  in this set of points.    
55     is  static; 
56     
57     Load(me : in out;S : HSurface from Adaptor3d)
58         ---Purpose: Changes the surface.
59     is static;
60     
61     Load(me : in out; C : HCurve from Adaptor3d)
62         ---Purpose: Changes the  curve.
63     is static; 
64
65     GetSurface(me) returns HSurface from Adaptor3d
66         ---C++: return const &
67     is static;
68
69     GetCurve(me) returns  HCurve from Adaptor3d 
70         ---C++: return const &
71     is static;
72    
73     GetTolerance(me;  TolU,  TolV:  in  out  Real) 
74     is  static;
75      --
76     --     Global methods - Apply to the whole curve.
77     --     
78     NbCurves (me) returns Integer  from  Standard
79     ---Purpose: returns the number of continuous part of the projected curve
80     is static;
81
82     Bounds(me; Index : in Integer from  Standard; 
83              Udeb,Ufin : out Real  from  Standard) 
84     --- Purpose : returns the bounds of the continuous part corresponding to Index
85     raises  NoSuchObject
86     is static; 
87     
88     IsSinglePnt(me; Index:  Integer;  P :  out  Pnt2d from gp )  returns  Boolean  from  Standard 
89     --- Purpose : returns  True  if  part  of  projection with  number  Index is  a  single  point  and  writes  its  coordinats in  P 
90     raises  NoSuchObject
91     is  static;
92  
93     IsUIso(me; Index:  Integer;  U :  out  Real from Standard)  returns  Boolean  from  Standard 
94     --- Purpose : returns  True  if  part  of  projection with  number  Index is  an  u-isoparametric curve  of  input  surface     
95     raises  NoSuchObject
96     is  static;
97  
98     IsVIso(me; Index:  Integer;  V :  out  Real from Standard)  returns  Boolean  from  Standard 
99     --- Purpose : returns  True  if  part  of  projection with  number  Index is  an  v-isoparametric curve  of  input  surface 
100     raises  NoSuchObject
101     is  static;
102
103
104     Value(me; U : Real from  Standard) returns Pnt2d  from gp
105     --- Purpose : Computes the point of parameter U on the curve.
106     is  redefined  static;
107     
108     D0 (me; U : Real from  Standard; P : out Pnt2d from gp)
109          --- Purpose : Computes the point of parameter U on the curve. 
110     raises  DomainError 
111     is  redefined  static;
112     
113     D1 (me; U : Real from  Standard; P : out Pnt2d from gp ; V : out Vec2d from gp)
114          --- Purpose : Computes the point of parameter U on the curve with its
115          --  first derivative.
116      raises 
117         DomainError from Standard
118         --- Purpose : Raised if the continuity of the current interval
119         --  is not C1.
120
121     is  redefined   static; 
122      
123     D2 (me; U : Real from  Standard; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
124         --- Purpose :
125         --  Returns the point P of parameter U, the first and second
126         --  derivatives V1 and V2.
127      raises 
128         DomainError from Standard
129         --- Purpose : Raised if the continuity of the current interval
130         --  is not C2.
131      is  redefined static; 
132       
133     DN (me; U : Real; N : Integer)   returns Vec2d from gp
134         --- Purpose :
135         --  The returned vector gives the value of the derivative for the 
136         --  order of derivation N.
137      raises  
138         OutOfRange from Standard,
139         --- Purpose : Raised if N < 1. 
140         NotImplemented  from  Standard  
141         --- Purpose : Raised if N > 2.
142
143     is redefined  static; 
144  
145     FirstParameter(me)  returns  Real 
146         ---Purpose: Returns  the  first  parameter of  the  curve  C 
147         --  which  has  a  projection  on  S. 
148     is  redefined  static; 
149      
150     LastParameter(me)  returns  Real 
151         ---Purpose: Returns  the  last  parameter of  the  curve  C 
152         --  which  has  a  projection  on  S. 
153     is redefined  static; 
154
155     NbIntervals(me; S : Shape from GeomAbs) returns Integer
156         ---Purpose: Returns  the number  of  intervals which  define   
157         --  an  S  continuous  part  of  the  projected  curve
158    is  redefined  static;
159  
160     Trim(me;FirstParam,LastParam,Tol  :  Real)  returns HCurve2d  from  Adaptor2d
161         ---Purpose: Returns    a  curve equivalent   of  <me>  between
162         --          parameters <First>  and <Last>. <Tol>  is used  to
163         --          test for 2d points confusion.
164       raises
165         OutOfRange from Standard
166         ---Purpose: If <First> >= <Last> 
167      is redefined static;
168
169         
170     Intervals(me; T : in out Array1OfReal from TColStd; 
171                   S : Shape from GeomAbs)
172         ---Purpose: Returns  the  parameters  corresponding  to
173         --          S  discontinuities.
174         --          
175         --          The array must provide  enough room to  accomodate
176         --          for the parameters. i.e. T.Length() > NbIntervals()
177    raises
178         OutOfRange from Standard 
179    is   redefined  static;
180  
181     BuildIntervals(me;  S : Shape from GeomAbs)
182     raises
183         OutOfRange from Standard 
184     is private;
185  
186     MaxDistance(me;  Index:  Integer)   
187         ---Purpose:  returns  the  maximum  distance  between   
188         --  curve  to  project  and  surface
189     returns  Real 
190     raises  NoSuchObject;
191     
192 --  Methods  for  debugging 
193     GetSequence(me) returns  HSequenceOfHSequenceOfPnt  from  ProjLib 
194      ---C++: return const &
195     is static; 
196      
197     GetType(me) returns CurveType from GeomAbs
198         ---Purpose: Returns  the  type of the   curve  in the  current
199         --          interval :   Line,   Circle,   Ellipse, Hyperbola,
200         --          Parabola, BezierCurve, BSplineCurve, OtherCurve.
201     is redefined  static;
202       
203 fields
204
205   mySurface     :  HSurface                  from  Adaptor3d; 
206   myCurve       :  HCurve                    from  Adaptor3d; 
207   myNbCurves    :  Integer                   from  Standard; 
208   mySequence    :  HSequenceOfHSequenceOfPnt from  ProjLib; 
209   myTolU        :  Real                      from  Standard;
210   myTolV        :  Real                      from  Standard; 
211   myMaxDist     :  Real                      from  Standard;  
212   myUIso        :  HArray1OfBoolean          from  TColStd;
213   myVIso        :  HArray1OfBoolean          from  TColStd;
214   mySnglPnts    :  HArray1OfBoolean          from  TColStd;    
215   myMaxDistance :  HArray1OfReal             from  TColStd; 
216         
217 end CompProjectedCurve;