b311480e |
1 | -- Created on: 1993-06-03 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1993-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 | |
22 | |
23 | deferred generic class IWFunction from IntWalk |
24 | (ThePSurface as any) |
25 | |
26 | inherits FunctionSetWithDerivatives from math |
27 | |
28 | |
29 | ---Purpose: Template class for a function on a parametric surface. |
30 | -- the form of the function is F(u,v) = 0 where u and v are |
31 | -- the parameteric coordinates of a point on the surface. |
32 | |
33 | uses Vector from math, |
34 | Matrix from math, |
35 | Pnt from gp, |
36 | Vec from gp, |
37 | Dir2d from gp |
38 | |
39 | |
40 | raises UndefinedDerivative from StdFail |
41 | |
42 | is |
43 | |
44 | Set(me: in out; PS: ThePSurface) |
45 | |
46 | is static; |
47 | |
48 | |
49 | NbVariables(me) |
50 | |
51 | ---Purpose: This method has to return 2. |
52 | returns Integer from Standard; |
53 | |
54 | |
55 | NbEquations(me) |
56 | |
57 | ---Purpose: This method has to return 1. |
58 | returns Integer from Standard; |
59 | |
60 | |
61 | Value(me : in out; X : Vector from math; |
62 | F : out Vector from math) |
63 | |
64 | ---Purpose: The dimension of F is 1. |
65 | |
66 | returns Boolean from Standard; |
67 | |
68 | |
69 | Derivatives(me : in out; X : Vector from math; |
70 | D : out Matrix from math) |
71 | |
72 | ---Purpose: The dimension of D is (1,2). |
73 | |
74 | returns Boolean from Standard; |
75 | |
76 | |
77 | Values(me : in out; X : Vector from math; |
78 | F : out Vector from math; |
79 | D : out Matrix from math) |
80 | |
81 | returns Boolean from Standard; |
82 | |
83 | |
84 | Root(me) |
85 | |
86 | ---Purpose: Root is the value of the function at the solution. |
87 | -- It is a vector of dimension 1, i-e a real. |
88 | |
89 | returns Real from Standard |
90 | is static; |
91 | |
92 | |
93 | Tolerance(me) |
94 | |
95 | ---Purpose: Returns the value Tol so that if Abs(Func.Root())<Tol |
96 | -- the function is considered null. |
97 | |
98 | returns Real from Standard |
99 | is static; |
100 | |
101 | |
102 | Point(me) |
103 | |
104 | ---Purpose: Returns the value of the solution point on the surface. |
105 | |
106 | returns Pnt from gp |
107 | is static; |
108 | |
109 | |
110 | IsTangent(me : in out) |
111 | |
112 | returns Boolean from Standard |
113 | is static; |
114 | |
115 | |
116 | Direction3d(me: in out) |
117 | |
118 | returns Vec from gp |
119 | raises UndefinedDerivative from StdFail |
120 | is static; |
121 | |
122 | |
123 | Direction2d(me: in out) |
124 | |
125 | returns Dir2d from gp |
126 | raises UndefinedDerivative from StdFail |
127 | is static; |
128 | |
129 | |
130 | end IWFunction; |