2036593a55a45c0b3c3070381354a698c002bfa9
[occt.git] / src / GeomFill / GeomFill_Frenet.cdl
1 -- Created on: 1997-12-19
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 class Frenet from GeomFill 
24     inherits TrihedronLaw  from  GeomFill 
25     
26         ---Purpose: Defined Frenet Trihedron  Law         
27
28 uses
29  HCurve from  Adaptor3d, 
30  Shape  from  GeomAbs, 
31  Array1OfReal   from TColStd,  
32  Pnt    from  gp,
33  Vec    from  gp,  
34  HArray1OfReal from TColStd, 
35  HArray1OfBoolean from TColStd
36 raises
37  OutOfRange,  ConstructionError
38 is  
39
40    Create  
41       returns Frenet from GeomFill 
42       raises  ConstructionError; 
43     
44    Copy(me)   
45    returns  TrihedronLaw  from  GeomFill          
46    is  redefined;
47  
48    Init(me: mutable)   
49    is  static; 
50
51    SetCurve(me : mutable;  C  :  HCurve  from  Adaptor3d) 
52    is  redefined;
53
54 -- 
55 -- 
56 --========== To compute Location and derivatives Location
57 --              
58    D0(me : mutable; 
59       Param: Real; 
60       Tangent    : out  Vec  from  gp; 
61       Normal     : out  Vec  from  gp; 
62       BiNormal   : out  Vec  from  gp)
63       ---Purpose: compute Triedrhon on curve at parameter <Param>         
64    returns Boolean  is  redefined;
65         
66    D1(me : mutable;
67       Param: Real;       
68       Tangent    : out  Vec  from  gp;  
69       DTangent   : out  Vec  from  gp; 
70       Normal     : out  Vec  from  gp; 
71       DNormal    : out  Vec  from  gp;                 
72       BiNormal   : out  Vec  from  gp; 
73       DBiNormal  : out  Vec  from  gp)
74       ---Purpose: compute Triedrhon and  derivative Trihedron  on curve
75       --          at parameter <Param>                
76       --  Warning : It used only for C1 or C2 aproximation
77    returns Boolean  
78    is  redefined; 
79    
80    D2(me : mutable;
81       Param: Real;       
82       Tangent    : out  Vec  from  gp;  
83       DTangent   : out  Vec  from  gp; 
84       D2Tangent  : out  Vec  from  gp; 
85       Normal     : out  Vec  from  gp; 
86       DNormal    : out  Vec  from  gp;                 
87       D2Normal   : out  Vec  from  gp; 
88       BiNormal   : out  Vec  from  gp; 
89       DBiNormal  : out  Vec  from  gp; 
90       D2BiNormal : out  Vec  from  gp)    
91       ---Purpose: compute  Trihedron on curve          
92       --          first and seconde  derivatives.
93       --  Warning : It used only for C2 aproximation
94    returns Boolean
95    is  redefined; 
96 --
97 --  =================== Management  of  continuity  ===================
98 --                 
99    NbIntervals(me; S : Shape from GeomAbs) 
100         ---Purpose: Returns  the number  of  intervals for  continuity
101         --          <S>. 
102         --          May be one if Continuity(me) >= <S>
103    returns Integer  is  redefined;
104
105    Intervals(me; T : in out Array1OfReal from TColStd; 
106                  S : Shape from GeomAbs)
107         ---Purpose: Stores in <T> the  parameters bounding the intervals
108         --          of continuity <S>.
109         --          
110         --          The array must provide  enough room to  accomodate
111         --          for the parameters. i.e. T.Length() > NbIntervals()
112     raises
113         OutOfRange from Standard 
114     is redefined;  
115      
116           
117 --  ===================  To help   computation of  Tolerance   ===============   
118     GetAverageLaw(me  :  mutable;
119       ATangent    : out  Vec  from  gp; 
120       ANormal     : out  Vec  from  gp; 
121       ABiNormal   : out  Vec  from  gp) 
122      ---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to 
123      --          make fast approximation of rational  surfaces.        
124   is  redefined;
125
126 --   =================== To help Particular case   ===============      
127    
128     IsConstant(me) 
129     ---Purpose: Say if the law is Constant.        
130     returns  Boolean   
131     is redefined;
132  
133    IsOnlyBy3dCurve(me) 
134      ---Purpose: Return True.        
135     returns  Boolean   
136     is redefined;  
137     
138    IsSingular(me; U: Real; Index: out Integer)     
139    returns  Boolean 
140    is  private; 
141
142    DoSingular(me: mutable; U: Real; Index: Integer;  
143               Tangent, BiNormal: out Vec from gp; 
144               n, k, TFlag, BNFlag: out Integer;
145               Delta: out Real)
146     returns Boolean
147     is private; 
148
149    SingularD0(me : mutable; 
150       Param: Real; Index:  Integer;
151       Tangent    : out  Vec  from  gp; 
152       Normal     : out  Vec  from  gp; 
153       BiNormal   : out  Vec  from  gp;
154       Delta      : out  Real)
155       ---Purpose: computes Triedrhon on curve at parameter <Param>         
156    returns Boolean   
157    is private;
158
159    SingularD1(me : mutable;
160       Param: Real; Index:  Integer;   
161       Tangent    : out  Vec  from  gp;  
162       DTangent   : out  Vec  from  gp; 
163       Normal     : out  Vec  from  gp; 
164       DNormal    : out  Vec  from  gp;                 
165       BiNormal   : out  Vec  from  gp; 
166       DBiNormal  : out  Vec  from  gp;
167       Delta      : out  Real)
168     ---Purpose: computes Triedrhon and  derivative Trihedron  on curve
169       --          at parameter <Param>                
170       --  Warning : It used only for C1 or C2 aproximation     
171    returns Boolean
172    is private;     
173
174    SingularD2(me : mutable;
175       Param: Real; Index:  Integer;       
176       Tangent    : out  Vec  from  gp;  
177       DTangent   : out  Vec  from  gp; 
178       D2Tangent  : out  Vec  from  gp; 
179       Normal     : out  Vec  from  gp; 
180       DNormal    : out  Vec  from  gp;                 
181       D2Normal   : out  Vec  from  gp; 
182       BiNormal   : out  Vec  from  gp; 
183       DBiNormal  : out  Vec  from  gp; 
184       D2BiNormal : out  Vec  from  gp;
185       Delta      : out  Real)
186       ---Purpose: computes  Trihedron on curve          
187       --          first and seconde  derivatives.
188       --  Warning : It used only for C2 aproximation
189    returns Boolean
190    is private; 
191
192 fields 
193    P         :  Pnt  from  gp;
194    mySngl    :  HArray1OfReal from TColStd;  
195    mySnglLen :  HArray1OfReal from TColStd;    
196    isSngl    :  Boolean  from  Standard;  -- True  if  there  is  some 
197                                           -- singular points
198 end Frenet;