b311480e |
1 | // Created on: 1995-02-01 |
2 | // Created by: Marie Jose MARTZ |
3 | // Copyright (c) 1995-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 | |
7fd59977 |
17 | |
7fd59977 |
18 | #include <Geom2d_CartesianPoint.hxx> |
42cf5bc1 |
19 | #include <Geom2d_Point.hxx> |
42cf5bc1 |
20 | #include <Geom2dToIGES_Geom2dPoint.hxx> |
21 | #include <gp_XYZ.hxx> |
7fd59977 |
22 | #include <IGESGeom_Point.hxx> |
23 | |
7fd59977 |
24 | //============================================================================= |
25 | // Geom2dToIGES_Geom2dPoint |
26 | //============================================================================= |
7fd59977 |
27 | Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint() |
28 | :Geom2dToIGES_Geom2dEntity() |
29 | { |
30 | } |
31 | |
32 | |
33 | //============================================================================= |
34 | // Geom2dToIGES_Geom2dPoint |
35 | //============================================================================= |
36 | |
37 | Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint |
38 | (const Geom2dToIGES_Geom2dEntity& G2dE) |
39 | :Geom2dToIGES_Geom2dEntity(G2dE) |
40 | { |
41 | } |
42 | |
43 | |
44 | //============================================================================= |
45 | // Transfer de Point2d de Geom2d vers IGES |
46 | // Tranfer2dPoint |
47 | //============================================================================= |
48 | |
49 | Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint( const Handle(Geom2d_Point)& P) |
50 | { |
51 | |
52 | Handle(IGESGeom_Point) Piges = new IGESGeom_Point; |
53 | if (P.IsNull()) { |
54 | return Piges; |
55 | } |
56 | |
57 | Standard_Real X,Y; |
58 | P->Coord (X,Y); |
59 | Handle(IGESBasic_SubfigureDef) voidsubdef; |
60 | Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef); |
61 | return Piges; |
62 | } |
63 | |
64 | //============================================================================= |
65 | // Transfer de CartesianPoint de Geom2d vers IGES |
66 | // Tranfer2dPoint |
67 | //============================================================================= |
68 | |
69 | Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint |
70 | ( const Handle(Geom2d_CartesianPoint)& P) |
71 | { |
72 | |
73 | Handle(IGESGeom_Point) Piges = new IGESGeom_Point; |
74 | if (P.IsNull()) { |
75 | return Piges; |
76 | } |
77 | |
78 | Standard_Real X,Y; |
79 | P->Coord (X,Y); |
80 | Handle(IGESBasic_SubfigureDef) voidsubdef; |
81 | Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef); |
82 | return Piges; |
83 | } |