cab2ece7a08611c877bf330c1bae3bf75868ae23
[occt.git] / src / GeomToStep / GeomToStep_MakeVector.cxx
1 // Created on: 1993-06-17
2 // Created by: Martine LANGLOIS
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <Geom2d_Vector.hxx>
19 #include <Geom_Vector.hxx>
20 #include <GeomToStep_MakeDirection.hxx>
21 #include <GeomToStep_MakeVector.hxx>
22 #include <gp_Dir.hxx>
23 #include <gp_Dir2d.hxx>
24 #include <gp_Vec.hxx>
25 #include <gp_Vec2d.hxx>
26 #include <StdFail_NotDone.hxx>
27 #include <StepGeom_Vector.hxx>
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 //=============================================================================
34 GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V)
35 {
36   gp_Dir D = gp_Dir(V);
37   Standard_Real lFactor = UnitsMethods::LengthFactor();
38 #include "GeomToStep_MakeVector_gen.pxx"
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.;
48 #include "GeomToStep_MakeVector_gen.pxx"
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();
62 #include "GeomToStep_MakeVector_gen.pxx"
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.;
76 #include "GeomToStep_MakeVector_gen.pxx"
77 }
78
79 //=============================================================================
80 // renvoi des valeurs
81 //=============================================================================
82
83 const Handle(StepGeom_Vector) &
84       GeomToStep_MakeVector::Value() const
85 {
86   StdFail_NotDone_Raise_if(!done, "");
87   return theVector;
88 }