2 -- Created: Thu Feb 21 19:12:30 1991
3 -- Author: Isabelle GRIGNON
5 ---Copyright: Matra Datavision 1991
8 class ExtCS from Extrema
10 ---Purpose: It calculates all the extremum distances
11 -- between a curve and a surface.
12 -- These distances can be minimum or maximum.
14 uses POnSurf from Extrema,
18 SurfaceType from GeomAbs,
19 CurveType from GeomAbs,
20 SequenceOfPOnSurf from Extrema,
21 SequenceOfPOnCurv from Extrema,
22 SequenceOfReal from TColStd,
24 Surface from Adaptor3d,
25 SurfacePtr from Adaptor3d
29 raises NotDone from StdFail,
30 OutOfRange from Standard,
31 TypeMismatch from Standard
38 Create (C: Curve from Adaptor3d;
39 S: Surface from Adaptor3d;
42 ---Purpose: It calculates all the distances between C and S.
45 Create (C: Curve from Adaptor3d;
46 S: Surface from Adaptor3d;
48 Uinf, Usup, Vinf, Vsup: Real;
51 ---Purpose: It calculates all the distances between C and S.
52 -- UCinf and UCmax are the start and end parameters
56 Initialize(me: in out; S: Surface from Adaptor3d;
57 Uinf, Usup, Vinf, Vsup: Real;
59 ---Purpose: Initializes the fields of the algorithm.
64 Perform(me: in out; C: Curve from Adaptor3d; Uinf, Usup: Real)
65 ---Purpose: Computes the distances.
66 -- An exception is raised if the fieds have not been
69 raises TypeMismatch from Standard
73 IsDone (me) returns Boolean
74 ---Purpose: Returns True if the distances are found.
77 IsParallel (me) returns Boolean
78 ---Purpose: Returns True if the curve is on a parallel surface.
79 raises NotDone from StdFail
80 -- if IsDone(me)=False.
84 NbExt (me) returns Integer
85 ---Purpose: Returns the number of extremum distances.
86 raises NotDone from StdFail
87 -- if IsDone(me)=False.
90 SquareDistance (me; N: Integer) returns Real
91 ---Purpose: Returns the value of the Nth resulting square distance.
92 raises NotDone from StdFail,
93 -- if IsDone(me)=False.
95 -- if N < 1 or N > NbPoints(me).
98 Points (me; N: Integer; P1: out POnCurv; P2: out POnSurf)
99 ---Purpose: Returns the point of the Nth resulting distance.
100 raises NotDone from StdFail,
101 -- if IsDone(me)=False.
102 OutOfRange from Standard
103 -- if N < 1 or N > NbPoints(me).
107 Bidon(me) returns SurfacePtr from Adaptor3d
112 myS : SurfacePtr from Adaptor3d;
113 myDone : Boolean from Standard;
114 myIsPar : Boolean from Standard;
115 myExtElCS: ExtElCS from Extrema;
116 myPOnS : SequenceOfPOnSurf from Extrema;
117 myPOnC : SequenceOfPOnCurv from Extrema;
118 myuinf : Real from Standard;
119 myusup : Real from Standard;
120 myvinf : Real from Standard;
121 myvsup : Real from Standard;
122 mytolC : Real from Standard;
123 mytolS : Real from Standard;
124 myucinf : Real from Standard;
125 myucsup : Real from Standard;
126 mySqDist : SequenceOfReal from TColStd;
127 myStype : SurfaceType from GeomAbs;