0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / Geom2dToIGES / Geom2dToIGES_Geom2dPoint.cxx
CommitLineData
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>
20#include <Geom2dToIGES_Geom2dEntity.hxx>
21#include <Geom2dToIGES_Geom2dPoint.hxx>
22#include <gp_XYZ.hxx>
7fd59977 23#include <IGESGeom_Point.hxx>
24
7fd59977 25//=============================================================================
26// Geom2dToIGES_Geom2dPoint
27//=============================================================================
7fd59977 28Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint()
29:Geom2dToIGES_Geom2dEntity()
30{
31}
32
33
34//=============================================================================
35// Geom2dToIGES_Geom2dPoint
36//=============================================================================
37
38Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint
39(const Geom2dToIGES_Geom2dEntity& G2dE)
40:Geom2dToIGES_Geom2dEntity(G2dE)
41{
42}
43
44
45//=============================================================================
46// Transfer de Point2d de Geom2d vers IGES
47// Tranfer2dPoint
48//=============================================================================
49
50Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint( const Handle(Geom2d_Point)& P)
51{
52
53 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
54 if (P.IsNull()) {
55 return Piges;
56 }
57
58 Standard_Real X,Y;
59 P->Coord (X,Y);
60 Handle(IGESBasic_SubfigureDef) voidsubdef;
61 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
62 return Piges;
63}
64
65//=============================================================================
66// Transfer de CartesianPoint de Geom2d vers IGES
67// Tranfer2dPoint
68//=============================================================================
69
70Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint
71( const Handle(Geom2d_CartesianPoint)& P)
72{
73
74 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
75 if (P.IsNull()) {
76 return Piges;
77 }
78
79 Standard_Real X,Y;
80 P->Coord (X,Y);
81 Handle(IGESBasic_SubfigureDef) voidsubdef;
82 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
83 return Piges;
84}