0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[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
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
22#include <Geom2dToIGES_Geom2dPoint.ixx>
23
24#include <gp_XYZ.hxx>
25
26#include <Geom2d_Point.hxx>
27#include <Geom2d_CartesianPoint.hxx>
28
29#include <IGESGeom_Point.hxx>
30
31
32//=============================================================================
33// Geom2dToIGES_Geom2dPoint
34//=============================================================================
35
36Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint()
37:Geom2dToIGES_Geom2dEntity()
38{
39}
40
41
42//=============================================================================
43// Geom2dToIGES_Geom2dPoint
44//=============================================================================
45
46Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint
47(const Geom2dToIGES_Geom2dEntity& G2dE)
48:Geom2dToIGES_Geom2dEntity(G2dE)
49{
50}
51
52
53//=============================================================================
54// Transfer de Point2d de Geom2d vers IGES
55// Tranfer2dPoint
56//=============================================================================
57
58Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint( const Handle(Geom2d_Point)& P)
59{
60
61 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
62 if (P.IsNull()) {
63 return Piges;
64 }
65
66 Standard_Real X,Y;
67 P->Coord (X,Y);
68 Handle(IGESBasic_SubfigureDef) voidsubdef;
69 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
70 return Piges;
71}
72
73//=============================================================================
74// Transfer de CartesianPoint de Geom2d vers IGES
75// Tranfer2dPoint
76//=============================================================================
77
78Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint
79( const Handle(Geom2d_CartesianPoint)& P)
80{
81
82 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
83 if (P.IsNull()) {
84 return Piges;
85 }
86
87 Standard_Real X,Y;
88 P->Coord (X,Y);
89 Handle(IGESBasic_SubfigureDef) voidsubdef;
90 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
91 return Piges;
92}