b311480e |
1 | // Created on: 1993-06-17 |
2 | // Created by: Martine LANGLOIS |
3 | // Copyright (c) 1993-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 <GeomToStep_MakeLine.ixx> |
18 | #include <StdFail_NotDone.hxx> |
19 | #include <StepGeom_Line.hxx> |
20 | #include <StepGeom_CartesianPoint.hxx> |
21 | #include <StepGeom_Vector.hxx> |
22 | #include <gp_Vec.hxx> |
23 | #include <gp_Vec2d.hxx> |
24 | #include <GeomToStep_MakeLine.hxx> |
25 | #include <GeomToStep_MakeCartesianPoint.hxx> |
26 | #include <GeomToStep_MakeVector.hxx> |
27 | #include <TCollection_HAsciiString.hxx> |
28 | |
29 | |
30 | //============================================================================= |
31 | // Creation d' une line de prostep a partir d' une Lin de gp |
32 | //============================================================================= |
33 | |
34 | GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L) |
35 | { |
36 | #define Vec_gen gp_Vec |
37 | #include <GeomToStep_MakeLine_gen.pxx> |
38 | #undef Vec_gen |
39 | } |
40 | |
41 | //============================================================================= |
42 | // Creation d' une line de prostep a partir d' une Lin2d de gp |
43 | //============================================================================= |
44 | |
45 | GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L) |
46 | { |
47 | #define Vec_gen gp_Vec2d |
48 | #include <GeomToStep_MakeLine_gen.pxx> |
49 | #undef Vec_gen |
50 | } |
51 | |
52 | //============================================================================= |
53 | // Creation d' une line de prostep a partir d' une Line de Geom |
54 | //============================================================================= |
55 | |
56 | GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline) |
57 | { |
58 | gp_Lin L; |
59 | L = Gline->Lin(); |
60 | #define Vec_gen gp_Vec |
61 | #include <GeomToStep_MakeLine_gen.pxx> |
62 | #undef Vec_gen |
63 | } |
64 | |
65 | //============================================================================= |
66 | // Creation d' une line de prostep a partir d' une Line de Geom2d |
67 | //============================================================================= |
68 | |
69 | GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline) |
70 | { |
71 | gp_Lin2d L; |
72 | L = Gline->Lin2d(); |
73 | #define Vec_gen gp_Vec2d |
74 | #include <GeomToStep_MakeLine_gen.pxx> |
75 | #undef Vec_gen |
76 | } |
77 | |
78 | //============================================================================= |
79 | // renvoi des valeurs |
80 | //============================================================================= |
81 | |
82 | const Handle(StepGeom_Line) & |
83 | GeomToStep_MakeLine::Value() const |
84 | { |
85 | StdFail_NotDone_Raise_if(!done == Standard_True,""); |
86 | return theLine; |
87 | } |
88 | |