0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Geom / Geom_Axis1Placement.cxx
CommitLineData
b311480e 1// Created on: 1993-03-09
2// Created by: JCV
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 <Geom_Axis1Placement.hxx>
19#include <Geom_Geometry.hxx>
20#include <gp_Ax1.hxx>
21#include <gp_Dir.hxx>
22#include <gp_Pnt.hxx>
23#include <gp_Trsf.hxx>
24#include <Standard_Type.hxx>
7fd59977 25
92efcf78 26IMPLEMENT_STANDARD_RTTIEXT(Geom_Axis1Placement,Geom_AxisPlacement)
27
7fd59977 28typedef Geom_Axis1Placement Axis1Placement;
7fd59977 29typedef gp_Ax2 Ax2;
30typedef gp_Dir Dir;
31typedef gp_Pnt Pnt;
32typedef gp_Trsf Trsf;
33typedef gp_Vec Vec;
34
35//=======================================================================
36//function : Copy
37//purpose :
38//=======================================================================
39
40Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const {
41
c04c30b3 42 Handle(Geom_Axis1Placement) A1;
7fd59977 43 A1 = new Axis1Placement (axis);
44 return A1;
45}
46
47
48
49
50
51//=======================================================================
52//function : Geom_Axis1Placement
53//purpose :
54//=======================================================================
55
56Geom_Axis1Placement::Geom_Axis1Placement (const gp_Ax1& A1)
57{
58 axis = A1;
59}
60
61
62Geom_Axis1Placement::Geom_Axis1Placement (const Pnt& P, const Dir& V) {
63
64 axis = gp_Ax1 (P, V);
65}
66
67
68
69void Geom_Axis1Placement::SetDirection (const Dir& V) {axis.SetDirection (V);}
70
71const gp_Ax1& Geom_Axis1Placement::Ax1 () const { return Axis(); }
72
73void Geom_Axis1Placement::Reverse() { axis.Reverse(); }
74
75void Geom_Axis1Placement::Transform (const Trsf& T) { axis.Transform (T); }
76
c04c30b3 77Handle(Geom_Axis1Placement) Geom_Axis1Placement::Reversed() const {
7fd59977 78
79 gp_Ax1 A1 = axis;
80 A1.Reverse();
81 Handle (Axis1Placement) Temp = new Axis1Placement (A1);
82 return Temp;
83}
84
85