1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
-- File: ExtElCS.cdl
-- Created: Wed Jul 22 10:23:51 1992
-- Author: Laurent PAINNOT
-- <lpa@phylox>
---Copyright: Matra Datavision 1992
class ExtElCS from Extrema
---Purpose: It calculates all the distances between a curve and
-- a surface.
-- These distances can be maximum or minimum.
uses POnCurv from Extrema,
POnSurf from Extrema,
HArray1OfPOnCurv from Extrema,
HArray1OfPOnSurf from Extrema,
Circ from gp,
Cone from gp,
Cylinder from gp,
Lin from gp,
Hypr from gp,
Pln from gp,
Sphere from gp,
Torus from gp,
HArray1OfReal from TColStd
raises InfiniteSolutions from StdFail,
NotDone from StdFail,
OutOfRange from Standard
is
Create returns ExtElCS;
Create (C: Lin; S: Pln) returns ExtElCS;
---Purpose: Calculates the distances between a line and a
-- plane. The line can be on the plane or on a parallel
-- plane.
Perform(me: in out; C: Lin; S: Pln)
is static ;
Create (C: Lin; S: Cylinder) returns ExtElCS;
---Purpose: Calculates the distances between a line and a
-- cylinder.
Perform(me: in out; C: Lin; S: Cylinder)
is static ;
Create (C: Lin; S: Cone) returns ExtElCS;
---Purpose: Calculates the distances between a line and a cone.
Perform(me: in out; C: Lin; S: Cone)
is static ;
Create (C: Lin; S: Sphere) returns ExtElCS;
---Purpose: Calculates the distances between a line and a
-- sphere.
Perform(me: in out; C: Lin; S: Sphere)
is static ;
Create (C: Lin; S: Torus) returns ExtElCS;
---Purpose: Calculates the distances between a line and a
-- torus.
Perform(me: in out; C: Lin; S: Torus)
is static ;
Create (C: Circ; S: Pln) returns ExtElCS;
---Purpose: Calculates the distances between a circle and a
-- plane.
Perform(me: in out; C: Circ; S: Pln)
is static ;
Create (C: Circ; S: Cylinder) returns ExtElCS;
---Purpose: Calculates the distances between a circle and a
-- cylinder.
Perform(me: in out; C: Circ; S: Cylinder)
is static ;
Create (C: Circ; S: Cone) returns ExtElCS;
---Purpose: Calculates the distances between a circle and a
-- cone.
Perform(me: in out; C: Circ; S: Cone)
is static ;
Create (C: Circ; S: Sphere) returns ExtElCS;
---Purpose: Calculates the distances between a circle and a
-- sphere.
Perform(me: in out; C: Circ; S: Sphere)
is static ;
Create (C: Circ; S: Torus) returns ExtElCS;
---Purpose: Calculates the distances between a circle and a
-- torus.
Perform(me: in out; C: Circ; S: Torus)
is static ;
Create (C: Hypr; S: Pln) returns ExtElCS;
---Purpose: Calculates the distances between a hyperbola and a
-- plane.
Perform(me: in out; C: Hypr; S: Pln)
is static ;
IsDone (me) returns Boolean
---Purpose: Returns True if the distances are found.
is static;
IsParallel (me) returns Boolean
---Purpose: Returns True if the curve is on a parallel surface.
raises NotDone from StdFail
-- if IsDone(me)=False.
is static;
NbExt (me) returns Integer
---Purpose: Returns the number of extremum distances.
raises NotDone from StdFail,
-- if IsDone(me)=False.
InfiniteSolutions from StdFail
-- if IsParallel(me)=True.
is static;
SquareDistance (me; N: Integer =1) returns Real
---Purpose: Returns the value of the Nth extremum square distance.
raises OutOfRange from Standard,
-- if N < 1 or N > NbPoints(me).
NotDone from StdFail,
-- if IsDone(me)=False.
InfiniteSolutions from StdFail
-- if IsParallel(me)=True and N<>1.
is static;
Points (me; N: Integer; P1: out POnCurv; P2: out POnSurf)
---Purpose: Returns the points of the Nth extremum distance.
-- P1 is on the curve, P2 on the surface.
raises OutOfRange from Standard,
-- if N < 1 or N > NbPoints(me).
NotDone from StdFail,
-- if IsDone(me)=False.
InfiniteSolutions from StdFail
-- if IsParallel(me)=True and N<>1.
is static;
fields
myDone : Boolean;
myNbExt : Integer;
myIsPar : Boolean;
mySqDist: HArray1OfReal from TColStd;
myPoint1: HArray1OfPOnCurv from Extrema;
myPoint2: HArray1OfPOnSurf from Extrema;
end ExtElCS;
|