7fd59977 |
1 | -- File: ExtSS.cdl |
2 | -- Created: Thu Feb 21 18:51:53 1991 |
3 | -- Author: Isabelle GRIGNON |
4 | -- <isg@topsn3> |
5 | ---Copyright: Matra Datavision 1991 |
6 | |
7 | |
8 | class ExtSS from Extrema |
9 | ---Purpose: It calculates all the extremum distances |
10 | -- between two surfaces. |
11 | -- These distances can be minimum or maximum. |
12 | |
13 | uses POnSurf from Extrema, |
14 | ExtElSS from Extrema, |
15 | Pnt from gp, |
16 | SurfaceType from GeomAbs, |
17 | SequenceOfPOnSurf from Extrema, |
18 | SequenceOfReal from TColStd, |
19 | Surface from Adaptor3d, |
20 | SurfacePtr from Adaptor3d |
21 | |
22 | |
23 | raises NotDone from StdFail, |
24 | OutOfRange from Standard, |
25 | TypeMismatch from Standard |
26 | |
27 | |
28 | is |
29 | Create returns ExtSS; |
30 | |
31 | |
32 | Create (S1, S2: Surface from Adaptor3d; TolS1, TolS2: Real) |
33 | returns ExtSS; |
34 | ---Purpose: It calculates all the distances between S1 and S2. |
35 | |
36 | |
37 | Create (S1, S2: Surface from Adaptor3d; |
38 | Uinf1, Usup1, Vinf1, Vsup1: Real; |
39 | Uinf2, Usup2, Vinf2, Vsup2: Real; |
40 | TolS1, TolS2: Real) |
41 | returns ExtSS; |
42 | ---Purpose: It calculates all the distances between S1 and S2. |
43 | |
44 | |
45 | Initialize(me: in out; S2: Surface from Adaptor3d; |
46 | Uinf2, Usup2, Vinf2, Vsup2: Real; TolS1: Real) |
47 | ---Purpose: Initializes the fields of the algorithm. |
48 | |
49 | is static; |
50 | |
51 | Perform(me: in out; S1: Surface from Adaptor3d; |
52 | Uinf1, Usup1, Vinf1, Vsup1: Real; TolS1: Real) |
53 | ---Purpose: Computes the distances. |
54 | -- An exception is raised if the fieds have not been |
55 | -- initialized. |
56 | |
57 | raises TypeMismatch from Standard |
58 | is static; |
59 | |
60 | |
61 | IsDone (me) returns Boolean |
62 | ---Purpose: Returns True if the distances are found. |
63 | is static; |
64 | |
65 | IsParallel (me) returns Boolean |
66 | ---Purpose: Returns True if the curve is on a parallel surface. |
67 | raises NotDone from StdFail |
68 | -- if IsDone(me)=False. |
69 | is static; |
70 | |
71 | |
72 | NbExt (me) returns Integer |
73 | ---Purpose: Returns the number of extremum distances. |
74 | raises NotDone from StdFail |
75 | -- if IsDone(me)=False. |
76 | is static; |
77 | |
78 | SquareDistance (me; N: Integer) returns Real |
79 | ---Purpose: Returns the value of the Nth resulting square distance. |
80 | raises NotDone from StdFail, |
81 | -- if IsDone(me)=False. |
82 | OutOfRange |
83 | -- if N < 1 or N > NbPoints(me). |
84 | is static; |
85 | |
86 | Points (me; N: Integer; P1: out POnSurf; P2: out POnSurf) |
87 | ---Purpose: Returns the point of the Nth resulting distance. |
88 | raises NotDone from StdFail, |
89 | -- if IsDone(me)=False. |
90 | OutOfRange from Standard |
91 | -- if N < 1 or N > NbPoints(me). |
92 | is static; |
93 | |
94 | Bidon(me) returns SurfacePtr from Adaptor3d |
95 | is static private; |
96 | |
97 | |
98 | fields |
99 | myS2 : SurfacePtr from Adaptor3d; |
100 | myDone : Boolean from Standard; |
101 | myIsPar : Boolean from Standard; |
102 | myExtElSS: ExtElSS from Extrema; |
103 | myPOnS1 : SequenceOfPOnSurf from Extrema; |
104 | myPOnS2 : SequenceOfPOnSurf from Extrema; |
105 | myuinf1 : Real from Standard; |
106 | myusup1 : Real from Standard; |
107 | myvinf1 : Real from Standard; |
108 | myvsup1 : Real from Standard; |
109 | myuinf2 : Real from Standard; |
110 | myusup2 : Real from Standard; |
111 | myvinf2 : Real from Standard; |
112 | myvsup2 : Real from Standard; |
113 | mytolS1 : Real from Standard; |
114 | mytolS2 : Real from Standard; |
115 | mySqDist : SequenceOfReal from TColStd; |
116 | myStype : SurfaceType from GeomAbs; |
117 | |
118 | end ExtSS; |