7fd59977 |
1 | // Copyright: Matra-Datavision 1995 |
2 | // File: Geom2dToIGES_Geom2dCurve.cxx |
3 | // Created: Wed Feb 1 15:58:25 1995 |
4 | // Author: Marie Jose MARTZ |
5 | // <mjm> |
6 | //#53 rln 24.12.98 CCI60005 |
7 | //#57 rln 25.12.98 avoid code duplication |
8 | |
9 | #include <Geom2dToIGES_Geom2dCurve.ixx> |
10 | |
11 | #include <Geom2d_Curve.hxx> |
12 | #include <Geom2d_BoundedCurve.hxx> |
13 | #include <Geom2d_BSplineCurve.hxx> |
14 | #include <Geom2d_TrimmedCurve.hxx> |
15 | #include <Geom2d_OffsetCurve.hxx> |
16 | #include <Geom2d_Conic.hxx> |
17 | #include <Geom2d_Circle.hxx> |
18 | #include <Geom2d_Ellipse.hxx> |
19 | #include <Geom2d_Hyperbola.hxx> |
20 | #include <Geom2d_Line.hxx> |
21 | #include <Geom2d_Parabola.hxx> |
22 | |
23 | //#include <Geom2dConvert.hxx> |
24 | |
25 | #include <gp.hxx> |
26 | #include <gp_Ax2.hxx> |
27 | #include <gp_Ax22d.hxx> |
28 | #include <gp_Circ.hxx> |
29 | #include <gp_Circ2d.hxx> |
30 | #include <gp_Dir.hxx> |
31 | #include <gp_Elips.hxx> |
32 | #include <gp_Elips2d.hxx> |
33 | #include <gp_Hypr.hxx> |
34 | #include <gp_Hypr2d.hxx> |
35 | #include <gp_Parab.hxx> |
36 | #include <gp_Parab2d.hxx> |
37 | #include <gp_Pnt.hxx> |
38 | #include <gp_XY.hxx> |
39 | #include <gp_XYZ.hxx> |
40 | |
41 | #include <IGESData_IGESEntity.hxx> |
42 | #include <IGESData_ToolLocation.hxx> |
43 | |
44 | #include <IGESGeom_BSplineCurve.hxx> |
45 | #include <IGESGeom_CircularArc.hxx> |
46 | #include <IGESGeom_CompositeCurve.hxx> |
47 | #include <IGESGeom_ConicArc.hxx> |
48 | #include <IGESGeom_CopiousData.hxx> |
49 | #include <IGESGeom_CurveOnSurface.hxx> |
50 | #include <IGESGeom_Line.hxx> |
51 | #include <IGESGeom_Point.hxx> |
52 | #include <IGESGeom_OffsetCurve.hxx> |
53 | #include <IGESGeom_TransformationMatrix.hxx> |
54 | |
55 | #include <Interface_Macros.hxx> |
56 | |
57 | #include <Precision.hxx> |
58 | |
59 | #include <GeomToIGES_GeomCurve.hxx> |
60 | #include <GeomAPI.hxx> |
61 | #include <gp_Pln.hxx> |
62 | |
63 | |
64 | //============================================================================= |
65 | // Geom2dToIGES_Geom2dCurve |
66 | //============================================================================= |
67 | |
68 | Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve() |
69 | :Geom2dToIGES_Geom2dEntity() |
70 | { |
71 | } |
72 | |
73 | |
74 | //============================================================================= |
75 | // Geom2dToIGES_Geom2dCurve |
76 | //============================================================================= |
77 | |
78 | Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve |
79 | (const Geom2dToIGES_Geom2dEntity& G2dE) |
80 | :Geom2dToIGES_Geom2dEntity(G2dE) |
81 | { |
82 | } |
83 | |
84 | |
85 | //============================================================================= |
86 | // Transfer des Entites Curve de Geom2d vers IGES |
87 | // Transfer2dCurve |
88 | //============================================================================= |
89 | |
90 | Handle(IGESData_IGESEntity) Geom2dToIGES_Geom2dCurve::Transfer2dCurve |
91 | (const Handle(Geom2d_Curve)& start, const Standard_Real Udeb, const Standard_Real Ufin) |
92 | { |
93 | Handle(IGESData_IGESEntity) res; |
94 | if (start.IsNull()) { |
95 | return res; |
96 | } |
97 | |
98 | //#57 rln 25.12.98 avoid code duplication |
99 | GeomToIGES_GeomCurve GC; |
100 | GC.SetModel (GetModel()); |
101 | GC.SetUnit (1.); //not scale 2D curves |
102 | return GC.TransferCurve (GeomAPI::To3d (start, gp_Pln (0, 0, 1, 0)), Udeb, Ufin); |
103 | } |
104 | |