b311480e |
1 | -- Created on: 1993-06-03 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
e2065c2f |
17 | class SurfFunction from Contap inherits FunctionSetWithDerivatives from math |
7fd59977 |
18 | |
19 | ---Purpose: This class describes the function on a parametric surface. |
20 | -- the form of the function is F(u,v) = 0 where u and v are |
21 | -- the parameteric coordinates of a point on the surface, |
22 | -- to compute the contours of the surface. |
23 | |
e2065c2f |
24 | uses Vector from math, |
25 | Matrix from math, |
26 | Pnt from gp, |
27 | Vec from gp, |
28 | Dir from gp, |
29 | Dir2d from gp, |
30 | TFunction from Contap, |
31 | HSurface from Adaptor3d, |
32 | HSurfaceTool from Adaptor3d, |
33 | HContTool from Contap |
7fd59977 |
34 | |
35 | |
36 | raises UndefinedDerivative from StdFail |
37 | |
38 | is |
39 | |
40 | Create |
41 | |
42 | returns SurfFunction from Contap; |
43 | |
44 | |
e2065c2f |
45 | Set(me: in out; S: HSurface from Adaptor3d) |
7fd59977 |
46 | |
47 | is static; |
48 | |
49 | |
50 | Set(me: in out; Eye: Pnt from gp) |
51 | |
52 | ---C++: inline |
53 | is static; |
54 | |
55 | |
56 | Set(me: in out; Dir: Dir from gp) |
57 | |
58 | ---C++: inline |
59 | is static; |
60 | |
61 | |
62 | Set(me: in out; Dir: Dir from gp; Angle: Real from Standard) |
63 | |
64 | ---C++: inline |
65 | is static; |
66 | |
67 | |
68 | Set(me: in out; Eye: Pnt from gp; Angle: Real from Standard) |
69 | |
70 | ---C++: inline |
71 | is static; |
72 | |
73 | |
74 | Set(me: in out; Tolerance: Real from Standard) |
75 | |
76 | ---C++: inline |
77 | is static; |
78 | |
79 | |
80 | NbVariables(me) |
81 | |
82 | ---Purpose: This method has to return 2. |
83 | returns Integer from Standard; |
84 | |
85 | |
86 | NbEquations(me) |
87 | |
88 | ---Purpose: This method has to return 1. |
89 | returns Integer from Standard; |
90 | |
91 | |
92 | Value(me : in out; X : Vector from math; |
93 | F : out Vector from math) |
94 | |
95 | ---Purpose: The dimension of F is 1. |
96 | |
97 | returns Boolean from Standard; |
98 | |
99 | |
100 | Derivatives(me : in out; X : Vector from math; |
101 | D : out Matrix from math) |
102 | |
103 | ---Purpose: The dimension of D is (1,2). |
104 | |
105 | returns Boolean from Standard; |
106 | |
107 | |
108 | Values(me : in out; X : Vector from math; |
109 | F : out Vector from math; |
110 | D : out Matrix from math) |
111 | |
112 | returns Boolean from Standard; |
113 | |
114 | |
115 | Root(me) |
116 | |
117 | ---Purpose: Root is the value of the function at the solution. |
118 | -- It is a vector of dimension 1, i-e a real. |
119 | |
120 | returns Real from Standard |
121 | ---C++: inline |
122 | is static; |
123 | |
124 | |
125 | Tolerance(me) |
126 | |
127 | ---Purpose: Returns the value Tol so that if Abs(Func.Root())<Tol |
128 | -- the function is considered null. |
129 | -- |
130 | ---C++: inline |
131 | |
132 | returns Real from Standard |
133 | is static; |
134 | |
135 | |
136 | Point(me) |
137 | |
138 | ---Purpose: Returns the value of the solution point on the surface. |
139 | |
140 | returns Pnt from gp |
141 | ---C++: return const& |
142 | ---C++: inline |
143 | is static; |
144 | |
145 | |
146 | IsTangent(me : in out) |
147 | |
148 | returns Boolean from Standard |
149 | is static; |
150 | |
151 | |
152 | Direction3d(me: in out) |
153 | |
154 | returns Vec from gp |
155 | ---C++: return const& |
156 | ---C++: inline |
157 | raises UndefinedDerivative from StdFail |
158 | is static; |
159 | |
160 | |
161 | Direction2d(me: in out) |
162 | |
163 | returns Dir2d from gp |
164 | ---C++: return const& |
165 | ---C++: inline |
166 | raises UndefinedDerivative from StdFail |
167 | is static; |
168 | |
169 | |
170 | FunctionType(me) |
171 | |
172 | returns TFunction from Contap |
173 | ---C++: inline |
174 | is static; |
175 | |
176 | |
177 | Eye(me) |
178 | |
179 | returns Pnt from gp |
180 | ---C++: return const& |
181 | ---C++: inline |
182 | is static; |
183 | |
184 | |
185 | Direction(me) |
186 | |
187 | returns Dir from gp |
188 | ---C++: return const& |
189 | ---C++: inline |
190 | is static; |
191 | |
192 | |
193 | Angle(me) |
194 | |
195 | returns Real from Standard |
196 | ---C++: inline |
197 | is static; |
198 | |
199 | |
200 | Surface(me) |
201 | |
e2065c2f |
202 | returns any HSurface from Adaptor3d |
7fd59977 |
203 | ---C++: return const& |
204 | ---C++: inline |
205 | is static; |
206 | |
207 | |
208 | |
209 | fields |
210 | |
e2065c2f |
211 | mySurf : HSurface from Adaptor3d; |
7fd59977 |
212 | myMean : Real from Standard; |
213 | myType : TFunction from Contap; |
214 | myDir : Dir from gp; |
215 | myEye : Pnt from gp; |
216 | myAng : Real from Standard; |
217 | myCosAng : Real from Standard; |
218 | tol : Real from Standard; |
219 | |
220 | solpt : Pnt from gp; |
221 | valf : Real from Standard; |
222 | Usol : Real from Standard; |
223 | Vsol : Real from Standard; |
224 | Fpu : Real from Standard; |
225 | Fpv : Real from Standard; |
226 | d2d : Dir2d from gp; |
227 | d3d : Vec from gp; |
228 | |
229 | tangent : Boolean from Standard; |
230 | computed : Boolean from Standard; |
231 | derived : Boolean from Standard; |
232 | |
233 | end SurfFunction; |