b311480e |
1 | -- Created on: 1993-03-24 |
2 | -- Created by: Philippe DAUTRY |
3 | -- Copyright (c) 1993-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 | |
7fd59977 |
22 | |
23 | |
24 | class CartesianPoint from Geom2d inherits Point from Geom2d |
25 | |
26 | --- Purpose : Describes a point in 2D space. A |
27 | -- Geom2d_CartesianPoint is defined by a gp_Pnt2d |
28 | -- point, with its two Cartesian coordinates X and Y. |
29 | |
30 | |
31 | |
32 | uses Ax2d from gp, |
33 | Pnt2d from gp, |
34 | Trsf2d from gp, |
35 | Vec2d from gp, |
36 | Geometry from Geom2d |
37 | |
38 | is |
39 | |
40 | Create (P : Pnt2d) returns mutable CartesianPoint; |
41 | --- Purpose : Returns a persistent copy of P. |
42 | |
43 | |
44 | Create (X, Y : Real) returns mutable CartesianPoint; |
45 | |
46 | |
47 | |
48 | SetCoord (me : mutable; X, Y : Real); |
49 | --- Purpose : Set <me> to X, Y coordinates. |
50 | |
51 | |
52 | SetPnt2d (me : mutable; P : Pnt2d); |
53 | --- Purpose : Set <me> to P.X(), P.Y() coordinates. |
54 | |
55 | |
56 | SetX (me : mutable; X : Real); |
57 | --- Purpose : Changes the X coordinate of me. |
58 | |
59 | |
60 | SetY (me : mutable; Y : Real); |
61 | --- Purpose : Changes the Y coordinate of me. |
62 | |
63 | |
64 | Coord (me; X, Y : out Real); |
65 | --- Purpose : Returns the coordinates of <me>. |
66 | |
67 | |
68 | Pnt2d (me) returns Pnt2d; |
69 | --- Purpose : |
70 | -- Returns a non persistent cartesian point with |
71 | -- the same coordinates as <me>. |
72 | -- -C++: return const& |
73 | |
74 | |
75 | X (me) returns Real; |
76 | --- Purpose : Returns the X coordinate of <me>. |
77 | |
78 | |
79 | Y (me) returns Real; |
80 | --- Purpose : Returns the Y coordinate of <me>. |
81 | |
82 | |
83 | |
84 | Transform (me : mutable; T : Trsf2d); |
85 | |
86 | |
87 | |
88 | Copy (me) returns mutable like me; |
89 | |
90 | fields |
91 | |
92 | gpPnt2d : Pnt2d; |
93 | |
94 | end; |