b311480e |
1 | -- Created on: 1996-03-05 |
2 | -- Created by: Joelle CHAUVET |
3 | -- Copyright (c) 1996-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 | |
7fd59977 |
21 | -- Modified: Wed Jan 15 09:45:42 1997 |
22 | -- by: Joelle CHAUVET |
23 | -- G1135 : Approximation with criterion |
24 | -- class Criterion and enumeration CriterionType |
25 | -- G1134 : Approximation with regular cuttings |
26 | -- enumeration CriterionRepartition |
7fd59977 |
27 | |
28 | |
29 | |
30 | package AdvApp2Var |
31 | |
32 | ---Purpose: This package provides algorithms to approximate a |
33 | -- function of 2 variables that can be multidimensional; |
34 | -- the result is a BSpline function with the required continuity |
35 | -- Warning: only one 3D BSpline for the moment |
36 | -- |
37 | |
38 | |
39 | |
40 | uses |
41 | gp, |
42 | Geom, |
43 | GeomAbs, |
44 | TColStd, |
45 | TColgp, |
46 | TColGeom, |
47 | TCollection, |
48 | AdvApprox, |
49 | Standard |
50 | |
51 | is |
52 | |
53 | enumeration CriterionType is |
54 | ---Purpose: influency of the criterion on cutting process |
55 | Absolute, |
56 | ---Purpose: cutting when criterion is not satisfied |
57 | -- desactivation of the compute of the error max |
58 | Relative |
59 | ---Purpose: cutting when error max is not good or if error |
60 | -- max is good and criterion is not satisfied |
61 | |
62 | end CriterionType; |
63 | |
64 | |
65 | enumeration CriterionRepartition is |
66 | ---Purpose: way of cutting process |
67 | Regular, |
68 | ---Purpose: all new cutting points at each step of cutting |
69 | -- process : (a+i(b-a)/N)i at step N, |
70 | -- (a+i(b-a)/(N+1))i at step N+1,... |
71 | -- where (a,b) is the global interval |
72 | Incremental |
73 | ---Purpose: add one new cutting point at each step |
74 | -- of cutting process |
75 | |
76 | end CriterionRepartition; |
77 | -- |
78 | -- |
79 | -- public classes |
80 | -- |
81 | -- |
82 | |
83 | class ApproxAFunc2Var from AdvApp2Var ; |
84 | ---Purpose: |
85 | -- this class approximates a given function of 2 variables |
86 | |
87 | imported EvaluatorFunc2Var ; |
88 | ---Purpose: |
89 | -- typedef void (*EvaluatorFunc2Var) ( |
90 | -- Standard_Integer * -- dimension |
91 | -- Standard_Real * -- first and last parameters in U |
92 | -- Standard_Real * -- first and last parameters in V |
93 | -- Standard_Integer * -- choice of constante, 1 for U, 2 for V |
94 | -- Standard_Real * -- value of constant parameter |
95 | -- Standard_Integer * -- number of parameters |
96 | -- Standard_Real * -- values of parameters |
97 | -- Standard_Integer * -- order of derivation in U |
98 | -- Standard_Integer * -- order of derivation in V |
99 | -- Standard_Real * -- evaluation |
100 | -- Standard_Integer * -- error code |
101 | -- ) ; |
102 | |
103 | deferred class Criterion from AdvApp2Var ; |
104 | ---Purpose: |
105 | -- this class contains a given criterion to be satisfied |
106 | |
107 | |
108 | -- |
109 | -- |
110 | -- private classes for Data |
111 | -- |
112 | -- |
113 | -- Basic Data |
114 | |
115 | class Context from AdvApp2Var; |
116 | ---Purpose : |
117 | -- contains all the parameters for approximation |
118 | -- ( tolerancy, computing option, ...) |
119 | -- |
120 | |
121 | class Node from AdvApp2Var; |
122 | ---Purpose : |
123 | -- used to store constraints on a (Ui,Vj) point |
124 | -- |
125 | |
126 | class Iso from AdvApp2Var; |
127 | ---Purpose : |
128 | -- used to store constraints on a line U = Ui or V = Vj |
129 | -- |
130 | |
131 | class Patch from AdvApp2Var; |
132 | ---Purpose : |
133 | -- used to store results on a domain [Ui,Ui+1]x[Vj,Vj+1] |
134 | -- |
135 | |
136 | class Strip from AdvApp2Var instantiates |
137 | Sequence from TCollection (Iso from AdvApp2Var); |
138 | ---Purpose : |
139 | -- set of constraints along a same type of Iso on the same level |
140 | |
141 | -- |
142 | -- |
143 | -- Structured Data |
144 | |
145 | class SequenceOfNode from AdvApp2Var instantiates |
146 | Sequence from TCollection (Node from AdvApp2Var); |
147 | class SequenceOfPatch from AdvApp2Var instantiates |
148 | Sequence from TCollection (Patch from AdvApp2Var); |
149 | class SequenceOfStrip from AdvApp2Var instantiates |
150 | Sequence from TCollection (Strip from AdvApp2Var); |
151 | |
152 | -- |
153 | -- |
154 | -- Final Data |
155 | |
156 | class Network from AdvApp2Var; |
157 | -- contains all the result patches and the associated parameters U and V |
158 | -- |
159 | |
160 | class Framework from AdvApp2Var; |
161 | -- contains all the constraints (Nodes and Isos) |
162 | -- |
163 | |
164 | |
165 | end AdvApp2Var; |
166 | |
167 | |
168 | |
169 | |
170 | |
171 | |
172 | |
173 | |
174 | |
175 | |
176 | |
177 | |
178 | |
179 | |
180 | |
181 | |
182 | |
183 | |
184 | |
185 | |
186 | |
187 | |
188 | |
189 | |
190 | |
191 | |
192 | |
193 | |
194 | |
195 | |
196 | |
197 | |
198 | |
199 | |
200 | |
201 | |
202 | |
203 | |
204 | |
205 | |
206 | |
207 | |
208 | |
209 | |
210 | |
211 | |
212 | |
213 | |
214 | |
215 | |
216 | |
217 | |
218 | |
219 | |
220 | |
221 | |
222 | |
223 | |
224 | |
225 | |
226 | |