0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / gp / gp_Ax2d.cdl
CommitLineData
b311480e 1-- Copyright (c) 1991-1999 Matra Datavision
2-- Copyright (c) 1999-2012 OPEN CASCADE SAS
3--
4-- The content of this file is subject to the Open CASCADE Technology Public
5-- License Version 6.5 (the "License"). You may not use the content of this file
6-- except in compliance with the License. Please obtain a copy of the License
7-- at http://www.opencascade.org and read it completely before using this file.
8--
9-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11--
12-- The Original Code and all software distributed under the License is
13-- distributed on an "AS IS" basis, without warranty of any kind, and the
14-- Initial Developer hereby disclaims all such warranties, including without
15-- limitation, any warranties of merchantability, fitness for a particular
16-- purpose or non-infringement. Please see the License for the specific terms
17-- and conditions governing the rights and limitations under the License.
18
7fd59977 19
20
21
22
23class Ax2d from gp inherits Storable
24
25 ---Purpose:
26 -- Describes an axis in the plane (2D space).
27 -- An axis is defined by:
28 -- - its origin (also referred to as its "Location point"), and
29 -- - its unit vector (referred to as its "Direction").
30 -- An axis implicitly defines a direct, right-handed
31 -- coordinate system in 2D space by:
32 -- - its origin,
33 -- - its "Direction" (giving the "X Direction" of the coordinate system), and
34 -- - the unit vector normal to "Direction" (positive angle
35 -- measured in the trigonometric sense).
36 -- An axis is used:
37 -- - to describe 2D geometric entities (for example, the
38 -- axis which defines angular coordinates on a circle).
39 -- It serves for the same purpose as the STEP function
40 -- "axis placement one axis", or
41 -- - to define geometric transformations (axis of
42 -- symmetry, axis of rotation, and so on).
43 -- Note: to define a left-handed 2D coordinate system, use gp_Ax22d.
44
45uses Dir2d, Pnt2d, Trsf2d, Vec2d
46
47is
48
49
50 Create returns Ax2d;
51 ---C++:inline
52 --- Purpose : Creates an axis object representing X axis of
53 -- the reference co-ordinate system.
54
55 Create (P : Pnt2d; V : Dir2d) returns Ax2d;
56 ---C++:inline
57 --- Purpose :
58 -- Creates an Ax2d. <P> is the "Location" point of
59 -- the axis placement and V is the "Direction" of
60 -- the axis placement.
61
62
63 SetLocation (me : out; Locat : Pnt2d) is static;
64 ---C++:inline
65 --- Purpose : Changes the "Location" point (origin) of <me>.
66
67 SetDirection (me : out; V : Dir2d) is static;
68 ---C++:inline
69 --- Purpose : Changes the direction of <me>.
70
71 Location (me) returns Pnt2d is static;
72 ---C++:inline
73 --- Purpose : Returns the origin of <me>.
74 ---C++: return const&
75
76 Direction (me) returns Dir2d is static;
77 ---C++:inline
78 --- Purpose : Returns the direction of <me>.
79 ---C++: return const&
80
81 IsCoaxial (me; Other : Ax2d; AngularTolerance, LinearTolerance : Real)
82 returns Boolean
83 is static;
84 --- Purpose :
85 -- Returns True if :
86 -- . the angle between <me> and <Other> is lower or equal
87 -- to <AngularTolerance> and
88 -- . the distance between <me>.Location() and <Other> is lower
89 -- or equal to <LinearTolerance> and
90 -- . the distance between <Other>.Location() and <me> is lower
91 -- or equal to LinearTolerance.
92
93
94 IsNormal (me; Other : Ax2d; AngularTolerance : Real) returns Boolean
95 is static;
96 ---C++:inline
97 --- Purpose : Returns true if this axis and the axis Other are normal to
98 -- each other. That is, if the angle between the two axes is equal to Pi/2 or -Pi/2.
99 -- Note: the tolerance criterion is given by AngularTolerance.
100
101
102 IsOpposite (me; Other : Ax2d; AngularTolerance : Real) returns Boolean
103 is static;
104 ---C++:inline
105 --- Purpose : Returns true if this axis and the axis Other are parallel,
106 -- and have opposite orientations. That is, if the angle
107 -- between the two axes is equal to Pi or -Pi.
108 -- Note: the tolerance criterion is given by AngularTolerance.
109
110 IsParallel (me; Other : Ax2d; AngularTolerance : Real) returns Boolean
111 is static;
112 ---C++:inline
113 --- Purpose : Returns true if this axis and the axis Other are parallel,
114 -- and have either the same or opposite orientations. That
115 -- is, if the angle between the two axes is equal to 0, Pi or -Pi.
116 -- Note: the tolerance criterion is given by AngularTolerance.
117
118 Angle (me; Other : Ax2d) returns Real is static;
119 ---C++:inline
120 --- Purpose :
121 -- Computes the angle, in radians, between this axis and
122 -- the axis Other. The value of the angle is between -Pi and Pi.
123
124 Reverse (me : in out) is static;
125 ---C++:inline
126 --- Purpose : Reverses the direction of <me> and assigns the result to this axis.
127
128
129 Reversed (me) returns Ax2d is static;
130 ---C++:inline
131 --- Purpose :
132 -- Computes a new axis placement with a direction opposite to
133 -- the direction of <me>.
134
135
136 Mirror (me : in out; P : Pnt2d) is static;
137
138 Mirrored (me; P : Pnt2d) returns Ax2d is static;
139
140
141 --- Purpose :
142 -- Performs the symmetrical transformation of an axis
143 -- placement with respect to the point P which is the
144 -- center of the symmetry.
145
146
147
148 Mirror (me : in out; A : Ax2d) is static;
149
150 Mirrored (me; A : Ax2d) returns Ax2d is static;
151 --- Purpose :
152 -- Performs the symmetrical transformation of an axis
153 -- placement with respect to an axis placement which
154 -- is the axis of the symmetry.
155
156
157
158
159
160 Rotate (me : in out; P : Pnt2d; Ang : Real) is static;
161 ---C++:inline
162
163 Rotated (me; P : Pnt2d; Ang : Real) returns Ax2d is static;
164 ---C++:inline
165 --- Purpose :
166 -- Rotates an axis placement. <P> is the center of the
167 -- rotation . Ang is the angular value of the rotation
168 -- in radians.
169
170
171
172
173 Scale (me : in out; P : Pnt2d; S : Real) is static;
174
175 Scaled (me; P : Pnt2d; S : Real) returns Ax2d is static;
176 ---C++:inline
177 --- Purpose :
178 -- Applies a scaling transformation on the axis placement.
179 -- The "Location" point of the axisplacement is modified.
180 -- The "Direction" is reversed if the scale is negative.
181
182
183
184
185
186 Transform (me : in out; T : Trsf2d) is static;
187 ---C++:inline
188
189 Transformed(me; T : Trsf2d) returns Ax2d is static;
190 ---C++:inline
191 --- Purpose : Transforms an axis placement with a Trsf.
192
193
194
195 Translate (me : in out; V : Vec2d) is static;
196 ---C++:inline
197
198 Translated (me; V : Vec2d) returns Ax2d is static;
199 ---C++:inline
200 --- Purpose :
201 -- Translates an axis placement in the direction of the vector
202 -- <V>. The magnitude of the translation is the vector's magnitude.
203
204 Translate (me : in out; P1, P2 : Pnt2d) is static;
205 ---C++:inline
206
207 Translated (me; P1, P2 : Pnt2d) returns Ax2d is static;
208 ---C++:inline
209 --- Purpose :
210 -- Translates an axis placement from the point <P1> to the
211 -- point <P2>.
212
213
214
215fields
216
217 loc : Pnt2d;
218 vdir : Dir2d;
219
220end;