7fd59977 |
1 | -- File: Extrema_FuncExtCS.cdl |
2 | -- Created: Mon Jan 22 17:06:01 1996 |
3 | -- Author: Laurent PAINNOT |
4 | -- <lpa@nonox> |
5 | ---Copyright: Matra Datavision 1996 |
6 | |
7 | |
8 | private class FuncExtCS from Extrema |
9 | |
10 | inherits FunctionSetWithDerivatives from math |
11 | ---Purpose: Fonction permettant de rechercher les extrema de la |
12 | -- distance entre une courbe et une surface. |
13 | |
14 | uses POnSurf from Extrema, |
15 | POnCurv from Extrema, |
16 | SequenceOfPOnSurf from Extrema, |
17 | SequenceOfPOnCurv from Extrema, |
18 | SequenceOfReal from TColStd, |
19 | Pnt from gp, |
20 | Vector from math, |
21 | Matrix from math, |
22 | Curve from Adaptor3d, |
23 | CurvePtr from Adaptor3d, |
24 | Surface from Adaptor3d, |
25 | SurfacePtr from Adaptor3d |
26 | |
27 | raises OutOfRange from Standard |
28 | |
29 | is |
30 | Create returns FuncExtCS; |
31 | |
32 | Create (C: Curve from Adaptor3d; S: Surface from Adaptor3d) returns FuncExtCS; |
33 | ---Purpose: |
34 | |
35 | Initialize(me: in out; C: Curve from Adaptor3d; S: Surface from Adaptor3d) |
36 | ---Purpose: sets the field mysurf of the function. |
37 | is static; |
38 | |
39 | ------------------------------------------------------------ |
40 | -- In all next methods, an exception is raised if the fields |
41 | -- were not initialized. |
42 | |
43 | NbVariables (me) returns Integer; |
44 | |
45 | NbEquations (me) returns Integer; |
46 | |
47 | Value (me: in out; UV: Vector; F: out Vector) returns Boolean; |
48 | ---Purpose: Calcul de Fi(U,V). |
49 | |
50 | Derivatives (me: in out; UV: Vector; DF: out Matrix) |
51 | returns Boolean; |
52 | ---Purpose: Calcul de Fi'(U,V). |
53 | |
54 | Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix) |
55 | returns Boolean; |
56 | ---Purpose: Calcul de Fi(U,V) et Fi'(U,V). |
57 | |
58 | GetStateNumber (me: in out) returns Integer |
59 | ---Purpose: Memorise l'extremum trouve. |
60 | is redefined; |
61 | |
62 | NbExt (me) returns Integer; |
63 | ---Purpose: Renvoie le nombre d'extrema trouves. |
64 | |
65 | SquareDistance (me; N: Integer) returns Real |
66 | ---Purpose: Renvoie la valeur de la Nieme distance. |
67 | raises OutOfRange; |
68 | -- si N < 1 ou N > NbExt(me). |
69 | |
70 | PointOnCurve (me; N: Integer) returns POnCurv |
71 | ---Purpose: Renvoie le Nieme extremum sur C. |
72 | ---C++: return const& |
73 | raises OutOfRange; |
74 | -- si N < 1 ou N > NbExt(me). |
75 | |
76 | PointOnSurface (me; N: Integer) returns POnSurf |
77 | ---Purpose: Renvoie le Nieme extremum sur S. |
78 | ---C++: return const& |
79 | raises OutOfRange; |
80 | -- si N < 1 ou N > NbExt(me). |
81 | |
82 | Bidon1(me) returns SurfacePtr from Adaptor3d |
83 | is static private; |
84 | |
85 | Bidon2(me) returns CurvePtr from Adaptor3d |
86 | is static private; |
87 | |
88 | |
89 | fields |
90 | myC : CurvePtr from Adaptor3d; |
91 | myS : SurfacePtr from Adaptor3d; |
92 | |
93 | myP1 : Pnt from gp; |
94 | myP2 : Pnt from gp; |
95 | |
96 | myt : Real; -- valeur courante de U sur C |
97 | myU : Real; -- valeur courante de U sur S |
98 | myV : Real; -- valeur courante de V sur S |
99 | |
100 | mySqDist: SequenceOfReal from TColStd; |
101 | myPoint1: SequenceOfPOnCurv from Extrema; |
102 | myPoint2: SequenceOfPOnSurf from Extrema; |
103 | |
104 | myCinit: Boolean; |
105 | mySinit: Boolean; |
106 | |
107 | end FuncExtCS; |