0023995: GeomAPI_ExtremaCurveSurface : wrong result between a curve and a plane
[occt.git] / src / Extrema / Extrema_ExtCS.cdl
CommitLineData
b311480e 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
5--
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.
10--
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.
13--
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.
20
7fd59977 21
22
23class ExtCS from Extrema
24
25 ---Purpose: It calculates all the extremum distances
26 -- between a curve and a surface.
27 -- These distances can be minimum or maximum.
28
29uses POnSurf from Extrema,
30 POnCurv from Extrema,
31 ExtElCS from Extrema,
32 Pnt from gp,
33 SurfaceType from GeomAbs,
34 CurveType from GeomAbs,
35 SequenceOfPOnSurf from Extrema,
36 SequenceOfPOnCurv from Extrema,
37 SequenceOfReal from TColStd,
38 Curve from Adaptor3d,
39 Surface from Adaptor3d,
40 SurfacePtr from Adaptor3d
41
42
43
44raises NotDone from StdFail,
45 OutOfRange from Standard,
46 TypeMismatch from Standard
47
48
49is
50
51 Create returns ExtCS;
52
53 Create (C: Curve from Adaptor3d;
54 S: Surface from Adaptor3d;
55 TolC, TolS: Real)
56 returns ExtCS;
57 ---Purpose: It calculates all the distances between C and S.
58
59
60 Create (C: Curve from Adaptor3d;
61 S: Surface from Adaptor3d;
62 UCinf, UCsup: Real;
63 Uinf, Usup, Vinf, Vsup: Real;
64 TolC, TolS: Real)
65 returns ExtCS;
66 ---Purpose: It calculates all the distances between C and S.
67 -- UCinf and UCmax are the start and end parameters
68 -- of the curve.
69
70
71 Initialize(me: in out; S: Surface from Adaptor3d;
72 Uinf, Usup, Vinf, Vsup: Real;
73 TolC, TolS: Real)
74 ---Purpose: Initializes the fields of the algorithm.
75
76 is static;
77
78
79 Perform(me: in out; C: Curve from Adaptor3d; Uinf, Usup: Real)
80 ---Purpose: Computes the distances.
81 -- An exception is raised if the fieds have not been
82 -- initialized.
83
84 raises TypeMismatch from Standard
85 is static;
86
87
88 IsDone (me) returns Boolean
89 ---Purpose: Returns True if the distances are found.
90 is static;
91
92 IsParallel (me) returns Boolean
93 ---Purpose: Returns True if the curve is on a parallel surface.
94 raises NotDone from StdFail
95 -- if IsDone(me)=False.
96 is static;
97
98
99 NbExt (me) returns Integer
100 ---Purpose: Returns the number of extremum distances.
101 raises NotDone from StdFail
102 -- if IsDone(me)=False.
103 is static;
104
105 SquareDistance (me; N: Integer) returns Real
106 ---Purpose: Returns the value of the Nth resulting square distance.
107 raises NotDone from StdFail,
108 -- if IsDone(me)=False.
109 OutOfRange
110 -- if N < 1 or N > NbPoints(me).
111 is static;
112
113 Points (me; N: Integer; P1: out POnCurv; P2: out POnSurf)
114 ---Purpose: Returns the point of the Nth resulting distance.
115 raises NotDone from StdFail,
116 -- if IsDone(me)=False.
117 OutOfRange from Standard
118 -- if N < 1 or N > NbPoints(me).
119 is static;
120
38308958 121 AddSolution (me: in out;
122 Curve: Curve from Adaptor3d;
123 T,U,V: Real;
124 PointOnCurve, PointOnSurf: Pnt from gp;
125 SquareDist: Real)
126 returns Boolean
127 is static private;
128
7fd59977 129 Bidon(me) returns SurfacePtr from Adaptor3d
130 is static private;
131
132
133fields
134 myS : SurfacePtr from Adaptor3d;
135 myDone : Boolean from Standard;
136 myIsPar : Boolean from Standard;
137 myExtElCS: ExtElCS from Extrema;
138 myPOnS : SequenceOfPOnSurf from Extrema;
139 myPOnC : SequenceOfPOnCurv from Extrema;
140 myuinf : Real from Standard;
141 myusup : Real from Standard;
142 myvinf : Real from Standard;
143 myvsup : Real from Standard;
144 mytolC : Real from Standard;
145 mytolS : Real from Standard;
146 myucinf : Real from Standard;
147 myucsup : Real from Standard;
148 mySqDist : SequenceOfReal from TColStd;
149 myStype : SurfaceType from GeomAbs;
150
151end ExtCS;