0023948: Wrong intersection between a surface of revolution and a plane.
[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
17#include <Geom2dToIGES_Geom2dPoint.ixx>
18
19#include <gp_XYZ.hxx>
20
21#include <Geom2d_Point.hxx>
22#include <Geom2d_CartesianPoint.hxx>
23
24#include <IGESGeom_Point.hxx>
25
26
27//=============================================================================
28// Geom2dToIGES_Geom2dPoint
29//=============================================================================
30
31Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint()
32:Geom2dToIGES_Geom2dEntity()
33{
34}
35
36
37//=============================================================================
38// Geom2dToIGES_Geom2dPoint
39//=============================================================================
40
41Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint
42(const Geom2dToIGES_Geom2dEntity& G2dE)
43:Geom2dToIGES_Geom2dEntity(G2dE)
44{
45}
46
47
48//=============================================================================
49// Transfer de Point2d de Geom2d vers IGES
50// Tranfer2dPoint
51//=============================================================================
52
53Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint( const Handle(Geom2d_Point)& P)
54{
55
56 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
57 if (P.IsNull()) {
58 return Piges;
59 }
60
61 Standard_Real X,Y;
62 P->Coord (X,Y);
63 Handle(IGESBasic_SubfigureDef) voidsubdef;
64 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
65 return Piges;
66}
67
68//=============================================================================
69// Transfer de CartesianPoint de Geom2d vers IGES
70// Tranfer2dPoint
71//=============================================================================
72
73Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint
74( const Handle(Geom2d_CartesianPoint)& P)
75{
76
77 Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
78 if (P.IsNull()) {
79 return Piges;
80 }
81
82 Standard_Real X,Y;
83 P->Coord (X,Y);
84 Handle(IGESBasic_SubfigureDef) voidsubdef;
85 Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
86 return Piges;
87}