0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / Geom2dToIGES / Geom2dToIGES_Geom2dCurve.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.
b311480e 16
7fd59977 17//#53 rln 24.12.98 CCI60005
18//#57 rln 25.12.98 avoid code duplication
19
7fd59977 20#include <Geom2d_BoundedCurve.hxx>
21#include <Geom2d_BSplineCurve.hxx>
7fd59977 22#include <Geom2d_Circle.hxx>
42cf5bc1 23#include <Geom2d_Conic.hxx>
24#include <Geom2d_Curve.hxx>
7fd59977 25#include <Geom2d_Ellipse.hxx>
26#include <Geom2d_Hyperbola.hxx>
27#include <Geom2d_Line.hxx>
42cf5bc1 28#include <Geom2d_OffsetCurve.hxx>
7fd59977 29#include <Geom2d_Parabola.hxx>
42cf5bc1 30#include <Geom2d_TrimmedCurve.hxx>
31#include <Geom2dToIGES_Geom2dCurve.hxx>
32#include <Geom2dToIGES_Geom2dEntity.hxx>
5b111128 33#include <Geom_Curve.hxx>
42cf5bc1 34#include <GeomAPI.hxx>
35#include <GeomToIGES_GeomCurve.hxx>
7fd59977 36#include <gp.hxx>
37#include <gp_Ax2.hxx>
38#include <gp_Ax22d.hxx>
39#include <gp_Circ.hxx>
40#include <gp_Circ2d.hxx>
41#include <gp_Dir.hxx>
42#include <gp_Elips.hxx>
43#include <gp_Elips2d.hxx>
44#include <gp_Hypr.hxx>
45#include <gp_Hypr2d.hxx>
46#include <gp_Parab.hxx>
47#include <gp_Parab2d.hxx>
42cf5bc1 48#include <gp_Pln.hxx>
7fd59977 49#include <gp_Pnt.hxx>
50#include <gp_XY.hxx>
51#include <gp_XYZ.hxx>
7fd59977 52#include <IGESData_IGESEntity.hxx>
53#include <IGESData_ToolLocation.hxx>
7fd59977 54#include <IGESGeom_BSplineCurve.hxx>
55#include <IGESGeom_CircularArc.hxx>
56#include <IGESGeom_CompositeCurve.hxx>
57#include <IGESGeom_ConicArc.hxx>
58#include <IGESGeom_CopiousData.hxx>
59#include <IGESGeom_CurveOnSurface.hxx>
60#include <IGESGeom_Line.hxx>
7fd59977 61#include <IGESGeom_OffsetCurve.hxx>
42cf5bc1 62#include <IGESGeom_Point.hxx>
7fd59977 63#include <IGESGeom_TransformationMatrix.hxx>
7fd59977 64#include <Interface_Macros.hxx>
7fd59977 65#include <Precision.hxx>
66
42cf5bc1 67//#include <Geom2dConvert.hxx>
7fd59977 68//=============================================================================
69// Geom2dToIGES_Geom2dCurve
70//=============================================================================
7fd59977 71Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve()
72:Geom2dToIGES_Geom2dEntity()
73{
74}
75
76
77//=============================================================================
78// Geom2dToIGES_Geom2dCurve
79//=============================================================================
80
81Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve
82(const Geom2dToIGES_Geom2dEntity& G2dE)
83:Geom2dToIGES_Geom2dEntity(G2dE)
84{
85}
86
87
88//=============================================================================
89// Transfer des Entites Curve de Geom2d vers IGES
90// Transfer2dCurve
91//=============================================================================
92
93Handle(IGESData_IGESEntity) Geom2dToIGES_Geom2dCurve::Transfer2dCurve
94(const Handle(Geom2d_Curve)& start, const Standard_Real Udeb, const Standard_Real Ufin)
95{
96 Handle(IGESData_IGESEntity) res;
97 if (start.IsNull()) {
98 return res;
99 }
100
101 //#57 rln 25.12.98 avoid code duplication
102 GeomToIGES_GeomCurve GC;
103 GC.SetModel (GetModel());
104 GC.SetUnit (1.); //not scale 2D curves
105 return GC.TransferCurve (GeomAPI::To3d (start, gp_Pln (0, 0, 1, 0)), Udeb, Ufin);
106}
107