7fd59977 |
1 | // File: Geom_Axis1Placement.cxx |
2 | // Created: Tue Mar 9 19:25:37 1993 |
3 | // Author: JCV |
4 | // <fid@phylox> |
5 | // Copyright: Matra Datavision 1993 |
6 | |
7 | //File Geom_Axis1Placement.cxx, JCV 17/01/91 |
8 | |
9 | #include <Geom_Axis1Placement.ixx> |
10 | |
11 | typedef Geom_Axis1Placement Axis1Placement; |
12 | typedef Handle(Geom_Axis1Placement) Handle(Axis1Placement); |
13 | typedef gp_Ax2 Ax2; |
14 | typedef gp_Dir Dir; |
15 | typedef gp_Pnt Pnt; |
16 | typedef gp_Trsf Trsf; |
17 | typedef gp_Vec Vec; |
18 | |
19 | //======================================================================= |
20 | //function : Copy |
21 | //purpose : |
22 | //======================================================================= |
23 | |
24 | Handle(Geom_Geometry) Geom_Axis1Placement::Copy() const { |
25 | |
26 | Handle(Axis1Placement) A1; |
27 | A1 = new Axis1Placement (axis); |
28 | return A1; |
29 | } |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | //======================================================================= |
36 | //function : Geom_Axis1Placement |
37 | //purpose : |
38 | //======================================================================= |
39 | |
40 | Geom_Axis1Placement::Geom_Axis1Placement (const gp_Ax1& A1) |
41 | { |
42 | axis = A1; |
43 | } |
44 | |
45 | |
46 | Geom_Axis1Placement::Geom_Axis1Placement (const Pnt& P, const Dir& V) { |
47 | |
48 | axis = gp_Ax1 (P, V); |
49 | } |
50 | |
51 | |
52 | |
53 | void Geom_Axis1Placement::SetDirection (const Dir& V) {axis.SetDirection (V);} |
54 | |
55 | const gp_Ax1& Geom_Axis1Placement::Ax1 () const { return Axis(); } |
56 | |
57 | void Geom_Axis1Placement::Reverse() { axis.Reverse(); } |
58 | |
59 | void Geom_Axis1Placement::Transform (const Trsf& T) { axis.Transform (T); } |
60 | |
61 | Handle(Axis1Placement) Geom_Axis1Placement::Reversed() const { |
62 | |
63 | gp_Ax1 A1 = axis; |
64 | A1.Reverse(); |
65 | Handle (Axis1Placement) Temp = new Axis1Placement (A1); |
66 | return Temp; |
67 | } |
68 | |
69 | |