2 -- Created: Thu Feb 21 18:51:53 1991
3 -- Author: Isabelle GRIGNON
5 ---Copyright: Matra Datavision 1991
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.
13 uses POnSurf from Extrema,
16 SurfaceType from GeomAbs,
17 SequenceOfPOnSurf from Extrema,
18 SequenceOfReal from TColStd,
19 Surface from Adaptor3d,
20 SurfacePtr from Adaptor3d
23 raises NotDone from StdFail,
24 OutOfRange from Standard,
25 TypeMismatch from Standard
32 Create (S1, S2: Surface from Adaptor3d; TolS1, TolS2: Real)
34 ---Purpose: It calculates all the distances between S1 and S2.
37 Create (S1, S2: Surface from Adaptor3d;
38 Uinf1, Usup1, Vinf1, Vsup1: Real;
39 Uinf2, Usup2, Vinf2, Vsup2: Real;
42 ---Purpose: It calculates all the distances between S1 and S2.
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.
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
57 raises TypeMismatch from Standard
61 IsDone (me) returns Boolean
62 ---Purpose: Returns True if the distances are found.
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.
72 NbExt (me) returns Integer
73 ---Purpose: Returns the number of extremum distances.
74 raises NotDone from StdFail
75 -- if IsDone(me)=False.
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.
83 -- if N < 1 or N > NbPoints(me).
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).
94 Bidon(me) returns SurfacePtr from Adaptor3d
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;