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 | |
42cf5bc1 |
17 | |
18 | #include <Geom2d_Vector.hxx> |
19 | #include <Geom_Vector.hxx> |
20 | #include <GeomToStep_MakeDirection.hxx> |
21 | #include <GeomToStep_MakeVector.hxx> |
7fd59977 |
22 | #include <gp_Dir.hxx> |
23 | #include <gp_Dir2d.hxx> |
24 | #include <gp_Vec.hxx> |
42cf5bc1 |
25 | #include <gp_Vec2d.hxx> |
26 | #include <StdFail_NotDone.hxx> |
7fd59977 |
27 | #include <StepGeom_Vector.hxx> |
7fd59977 |
28 | #include <TCollection_HAsciiString.hxx> |
29 | #include <UnitsMethods.hxx> |
30 | |
31 | //============================================================================= |
32 | // Creation d' un vector de prostep a partir d' un Vec de gp |
33 | //============================================================================= |
7fd59977 |
34 | GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V) |
35 | { |
36 | gp_Dir D = gp_Dir(V); |
37 | Standard_Real lFactor = UnitsMethods::LengthFactor(); |
19286d7c |
38 | #include "GeomToStep_MakeVector_gen.pxx" |
7fd59977 |
39 | } |
40 | //============================================================================= |
41 | // Creation d' un vector de prostep a partir d' un Vec2d de gp |
42 | //============================================================================= |
43 | |
44 | GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V) |
45 | { |
46 | gp_Dir2d D = gp_Dir2d(V); |
47 | Standard_Real lFactor = 1.; |
19286d7c |
48 | #include "GeomToStep_MakeVector_gen.pxx" |
7fd59977 |
49 | } |
50 | |
51 | //============================================================================= |
52 | // Creation d' un vector de prostep a partir d' un Vector de Geom |
53 | //============================================================================= |
54 | |
55 | GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)& |
56 | GVector) |
57 | { |
58 | gp_Vec V; |
59 | V = GVector->Vec(); |
60 | gp_Dir D = gp_Dir(V); |
61 | Standard_Real lFactor = UnitsMethods::LengthFactor(); |
19286d7c |
62 | #include "GeomToStep_MakeVector_gen.pxx" |
7fd59977 |
63 | } |
64 | |
65 | //============================================================================= |
66 | // Creation d' un vector de prostep a partir d' un Vector de Geom2d |
67 | //============================================================================= |
68 | |
69 | GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom2d_Vector)& |
70 | GVector) |
71 | { |
72 | gp_Vec2d V; |
73 | V = GVector->Vec2d(); |
74 | gp_Dir2d D = gp_Dir2d(V); |
75 | Standard_Real lFactor = 1.; |
19286d7c |
76 | #include "GeomToStep_MakeVector_gen.pxx" |
7fd59977 |
77 | } |
78 | |
79 | //============================================================================= |
80 | // renvoi des valeurs |
81 | //============================================================================= |
82 | |
83 | const Handle(StepGeom_Vector) & |
84 | GeomToStep_MakeVector::Value() const |
85 | { |
2d2b3d53 |
86 | StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeVector::Value() - no result"); |
7fd59977 |
87 | return theVector; |
88 | } |