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