1 -- Created on: 1991-02-21
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class ExtSS from Extrema
24 ---Purpose: It calculates all the extremum distances
25 -- between two surfaces.
26 -- These distances can be minimum or maximum.
28 uses POnSurf from Extrema,
31 SurfaceType from GeomAbs,
32 SequenceOfPOnSurf from Extrema,
33 SequenceOfReal from TColStd,
34 Surface from Adaptor3d,
35 SurfacePtr from Adaptor3d
38 raises NotDone from StdFail,
39 OutOfRange from Standard,
40 TypeMismatch from Standard
47 Create (S1, S2: Surface from Adaptor3d; TolS1, TolS2: Real)
49 ---Purpose: It calculates all the distances between S1 and S2.
52 Create (S1, S2: Surface from Adaptor3d;
53 Uinf1, Usup1, Vinf1, Vsup1: Real;
54 Uinf2, Usup2, Vinf2, Vsup2: Real;
57 ---Purpose: It calculates all the distances between S1 and S2.
60 Initialize(me: in out; S2: Surface from Adaptor3d;
61 Uinf2, Usup2, Vinf2, Vsup2: Real; TolS1: Real)
62 ---Purpose: Initializes the fields of the algorithm.
66 Perform(me: in out; S1: Surface from Adaptor3d;
67 Uinf1, Usup1, Vinf1, Vsup1: Real; TolS1: Real)
68 ---Purpose: Computes the distances.
69 -- An exception is raised if the fieds have not been
72 raises TypeMismatch from Standard
76 IsDone (me) returns Boolean
77 ---Purpose: Returns True if the distances are found.
80 IsParallel (me) returns Boolean
81 ---Purpose: Returns True if the curve is on a parallel surface.
82 raises NotDone from StdFail
83 -- if IsDone(me)=False.
87 NbExt (me) returns Integer
88 ---Purpose: Returns the number of extremum distances.
89 raises NotDone from StdFail
90 -- if IsDone(me)=False.
93 SquareDistance (me; N: Integer) returns Real
94 ---Purpose: Returns the value of the Nth resulting square distance.
95 raises NotDone from StdFail,
96 -- if IsDone(me)=False.
98 -- if N < 1 or N > NbPoints(me).
101 Points (me; N: Integer; P1: out POnSurf; P2: out POnSurf)
102 ---Purpose: Returns the point of the Nth resulting distance.
103 raises NotDone from StdFail,
104 -- if IsDone(me)=False.
105 OutOfRange from Standard
106 -- if N < 1 or N > NbPoints(me).
109 Bidon(me) returns SurfacePtr from Adaptor3d
114 myS2 : SurfacePtr from Adaptor3d;
115 myDone : Boolean from Standard;
116 myIsPar : Boolean from Standard;
117 myExtElSS: ExtElSS from Extrema;
118 myPOnS1 : SequenceOfPOnSurf from Extrema;
119 myPOnS2 : SequenceOfPOnSurf from Extrema;
120 myuinf1 : Real from Standard;
121 myusup1 : Real from Standard;
122 myvinf1 : Real from Standard;
123 myvsup1 : Real from Standard;
124 myuinf2 : Real from Standard;
125 myusup2 : Real from Standard;
126 myvinf2 : Real from Standard;
127 myvsup2 : Real from Standard;
128 mytolS1 : Real from Standard;
129 mytolS2 : Real from Standard;
130 mySqDist : SequenceOfReal from TColStd;
131 myStype : SurfaceType from GeomAbs;