1 // Created on: 1993-03-09
2 // Created by: JCV
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 <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>
25 
26 IMPLEMENT_STANDARD_RTTIEXT(Geom_Axis1Placement,Geom_AxisPlacement)
27 
28 typedef Geom_Axis1Placement         Axis1Placement;
29 typedef gp_Ax2  Ax2;
30 typedef gp_Dir  Dir;
31 typedef gp_Pnt  Pnt;
32 typedef gp_Trsf Trsf;
33 typedef gp_Vec  Vec;
34 
35 //=======================================================================
36 //function : Copy
37 //purpose  :
38 //=======================================================================
39 
Handle(Geom_Geometry)40 Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const {
41 
42   Handle(Geom_Axis1Placement) A1;
43   A1 = new Axis1Placement (axis);
44   return A1;
45 }
46 
47 
48 
49 
50 
51 //=======================================================================
52 //function : Geom_Axis1Placement
53 //purpose  :
54 //=======================================================================
55 
Geom_Axis1Placement(const gp_Ax1 & A1)56 Geom_Axis1Placement::Geom_Axis1Placement (const gp_Ax1& A1)
57 {
58  axis = A1;
59 }
60 
61 
Geom_Axis1Placement(const Pnt & P,const Dir & V)62 Geom_Axis1Placement::Geom_Axis1Placement (const Pnt& P, const Dir& V) {
63 
64  axis = gp_Ax1 (P, V);
65 }
66 
67 
68 
SetDirection(const Dir & V)69 void Geom_Axis1Placement::SetDirection (const Dir& V) {axis.SetDirection (V);}
70 
Ax1() const71 const gp_Ax1& Geom_Axis1Placement::Ax1 () const { return Axis(); }
72 
Reverse()73 void Geom_Axis1Placement::Reverse()  { axis.Reverse(); }
74 
Transform(const Trsf & T)75 void Geom_Axis1Placement::Transform (const Trsf& T) { axis.Transform (T); }
76 
Handle(Geom_Axis1Placement)77 Handle(Geom_Axis1Placement) Geom_Axis1Placement::Reversed() const {
78 
79    gp_Ax1 A1 = axis;
80    A1.Reverse();
81    Handle (Axis1Placement) Temp = new Axis1Placement (A1);
82    return Temp;
83 }
84 
85 
86