b311480e |
1 | -- Created on: 1993-03-24 |
2 | -- Created by: Philippe DAUTRY |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class CartesianPoint from Geom2d inherits Point from Geom2d |
18 | |
19 | --- Purpose : Describes a point in 2D space. A |
20 | -- Geom2d_CartesianPoint is defined by a gp_Pnt2d |
21 | -- point, with its two Cartesian coordinates X and Y. |
22 | |
23 | |
24 | |
25 | uses Ax2d from gp, |
26 | Pnt2d from gp, |
27 | Trsf2d from gp, |
28 | Vec2d from gp, |
29 | Geometry from Geom2d |
30 | |
31 | is |
32 | |
6e33d3ce |
33 | Create (P : Pnt2d) returns CartesianPoint; |
7fd59977 |
34 | --- Purpose : Returns a persistent copy of P. |
35 | |
36 | |
6e33d3ce |
37 | Create (X, Y : Real) returns CartesianPoint; |
7fd59977 |
38 | |
39 | |
40 | |
41 | SetCoord (me : mutable; X, Y : Real); |
42 | --- Purpose : Set <me> to X, Y coordinates. |
43 | |
44 | |
45 | SetPnt2d (me : mutable; P : Pnt2d); |
46 | --- Purpose : Set <me> to P.X(), P.Y() coordinates. |
47 | |
48 | |
49 | SetX (me : mutable; X : Real); |
50 | --- Purpose : Changes the X coordinate of me. |
51 | |
52 | |
53 | SetY (me : mutable; Y : Real); |
54 | --- Purpose : Changes the Y coordinate of me. |
55 | |
56 | |
57 | Coord (me; X, Y : out Real); |
58 | --- Purpose : Returns the coordinates of <me>. |
59 | |
60 | |
61 | Pnt2d (me) returns Pnt2d; |
62 | --- Purpose : |
63 | -- Returns a non persistent cartesian point with |
64 | -- the same coordinates as <me>. |
65 | -- -C++: return const& |
66 | |
67 | |
68 | X (me) returns Real; |
69 | --- Purpose : Returns the X coordinate of <me>. |
70 | |
71 | |
72 | Y (me) returns Real; |
73 | --- Purpose : Returns the Y coordinate of <me>. |
74 | |
75 | |
76 | |
77 | Transform (me : mutable; T : Trsf2d); |
78 | |
79 | |
80 | |
6e33d3ce |
81 | Copy (me) returns like me; |
7fd59977 |
82 | |
83 | fields |
84 | |
85 | gpPnt2d : Pnt2d; |
86 | |
87 | end; |