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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
---Copyright: Matra Datavision 1991
class Pnt from gp inherits Storable
--- Purpose : Defines a 3D cartesian point.
uses Ax1 from gp,
Ax2 from gp,
Trsf from gp,
Vec from gp,
XYZ from gp
raises OutOfRange from Standard
is
Create returns Pnt;
---C++: inline
---Purpose : Creates a point with zero coordinates.
Create (Coord : XYZ) returns Pnt;
---C++: inline
--- Purpose : Creates a point from a XYZ object.
Create (Xp, Yp, Zp : Real) returns Pnt;
---C++:inline
--- Purpose :
-- Creates a point with its 3 cartesian's coordinates : Xp, Yp, Zp.
SetCoord (me : in out; Index : Integer; Xi : Real)
---C++:inline
--- Purpose :
-- Changes the coordinate of range Index :
-- Index = 1 => X is modified
-- Index = 2 => Y is modified
-- Index = 3 => Z is modified
raises OutOfRange
--- Purpose : Raised if Index != {1, 2, 3}.
is static;
SetCoord (me : in out; Xp, Yp, Zp : Real)
---C++: inline
---Purpose: For this point, assigns the values Xp, Yp and Zp to its three coordinates.
is static;
SetX (me : in out; X : Real)
---C++: inline
---Purpose: Assigns the given value to the X coordinate of this point.
is static;
SetY (me : in out; Y : Real)
---C++: inline
---Purpose: Assigns the given value to the Y coordinate of this point.
is static;
SetZ (me : in out; Z : Real)
---C++: inline
---Purpose: Assigns the given value to the Z coordinate of this point.
is static;
SetXYZ (me : in out; Coord : XYZ)
---C++: inline
---Purpose: Assigns the three coordinates of Coord to this point.
is static;
Coord (me; Index : Integer) returns Real
--- Purpose :
-- Returns the coordinate of corresponding to the value of Index :
-- Index = 1 => X is returned
-- Index = 2 => Y is returned
-- Index = 3 => Z is returned
-- Raises OutOfRange if Index != {1, 2, 3}.
raises OutOfRange
---C++: inline
--- Purpose : Raised if Index != {1, 2, 3}.
is static;
Coord (me; Xp, Yp, Zp : out Real)
---C++: inline
---Purpose: For this point gives its three coordinates Xp, Yp and Zp.
is static;
X (me) returns Real
---C++: inline
---Purpose: For this point, returns its X coordinate.
is static;
Y (me) returns Real
---C++: inline
---Purpose: For this point, returns its Y coordinate.
is static;
Z (me) returns Real
---C++: inline
---Purpose: For this point, returns its Z coordinate.
is static;
XYZ (me) returns XYZ is static;
---C++: inline
---C++: return const &
---Purpose: For this point, returns its three coordinates as a XYZ object.
Coord (me) returns XYZ is static;
---C++: inline
---C++: return const &
---Purpose: For this point, returns its three coordinates as a XYZ object.
ChangeCoord (me : in out) returns XYZ is static;
---C++: inline
---C++: return &
--- Purpose:
-- Returns the coordinates of this point.
-- Note: This syntax allows direct modification of the returned value.
BaryCenter(me : in out; Alpha : Real; P : Pnt from gp; Beta : Real);
---C++: inline
---Purpose: Assigns the result of the following expression to this point
-- (Alpha*this + Beta*P) / (Alpha + Beta)
IsEqual (me; Other : Pnt; LinearTolerance : Real) returns Boolean
is static;
---C++: inline
--- Purpose : Comparison
-- Returns True if the distance between the two points is
-- lower or equal to LinearTolerance.
Distance (me; Other : Pnt) returns Real is static;
---C++: inline
--- Purpose : Computes the distance between two points.
SquareDistance (me; Other : Pnt) returns Real is static;
---C++: inline
--- Purpose : Computes the square distance between two points.
Mirror (me : in out; P : Pnt) is static;
--- Purpose :
-- Performs the symmetrical transformation of a point
-- with respect to the point P which is the center of
-- the symmetry.
Mirrored (me; P : Pnt) returns Pnt is static;
--- Purpose :
-- Performs the symmetrical transformation of a point
-- with respect to an axis placement which is the axis
-- of the symmetry.
Mirror (me : in out; A1 : Ax1) is static;
Mirrored (me; A1 : Ax1) returns Pnt is static;
--- Purpose :
-- Performs the symmetrical transformation of a point
-- with respect to a plane. The axis placement A2 locates
-- the plane of the symmetry : (Location, XDirection, YDirection).
Mirror (me : in out; A2 : Ax2) is static;
Mirrored (me; A2 : Ax2) returns Pnt is static;
--- Purpose :
-- Rotates a point. A1 is the axis of the rotation.
-- Ang is the angular value of the rotation in radians.
Rotate (me : in out; A1 : Ax1; Ang : Real) is static;
---C++: inline
Rotated (me; A1 : Ax1; Ang : Real) returns Pnt is static;
---C++: inline
--- Purpose : Scales a point. S is the scaling value.
Scale (me : in out; P : Pnt; S : Real) is static;
---C++: inline
Scaled (me; P : Pnt; S : Real) returns Pnt is static;
---C++: inline
--- Purpose : Transforms a point with the transformation T.
Transform (me : in out; T : Trsf) is static;
Transformed (me; T : Trsf) returns Pnt is static;
---C++: inline
--- Purpose :
-- Translates a point in the direction of the vector V.
-- The magnitude of the translation is the vector's magnitude.
Translate (me : in out; V : Vec) is static;
---C++: inline
Translated (me; V : Vec) returns Pnt is static;
---C++: inline
--- Purpose :
-- Translates a point from the point P1 to the point P2.
Translate (me : in out; P1, P2 : Pnt) is static;
---C++: inline
Translated (me; P1, P2 : Pnt) returns Pnt is static;
---C++: inline
fields
coord : XYZ;
end;
|