1 // Created on: 1993-03-24
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
23 #include <Geom2d_AxisPlacement.ixx>
27 typedef Geom2d_AxisPlacement AxisPlacement;
28 typedef Handle(Geom2d_AxisPlacement) Handle(AxisPlacement);
29 typedef gp_Dir2d Dir2d;
30 typedef gp_Pnt2d Pnt2d;
31 typedef gp_Trsf2d Trsf2d;
32 typedef gp_Vec2d Vec2d;
37 Handle(Geom2d_Geometry) Geom2d_AxisPlacement::Copy() const {
39 Handle(AxisPlacement) A;
40 A = new AxisPlacement (axis);
49 Geom2d_AxisPlacement::Geom2d_AxisPlacement (const gp_Ax2d& A) { axis = A; }
52 Geom2d_AxisPlacement::Geom2d_AxisPlacement (const Pnt2d& P, const Dir2d& V) {
54 axis = gp_Ax2d (P, V);
57 gp_Ax2d Geom2d_AxisPlacement::Ax2d () const { return axis; }
59 Dir2d Geom2d_AxisPlacement::Direction () const { return axis.Direction(); }
61 Pnt2d Geom2d_AxisPlacement::Location () const { return axis.Location(); }
63 void Geom2d_AxisPlacement::Reverse() { axis.Reverse(); }
65 Handle(AxisPlacement) Geom2d_AxisPlacement::Reversed() const {
69 Handle(AxisPlacement) Temp = new AxisPlacement (A);
73 void Geom2d_AxisPlacement::Transform (const Trsf2d& T) { axis.Transform (T); }
76 void Geom2d_AxisPlacement::SetAxis (const gp_Ax2d& A) { axis = A; }
78 void Geom2d_AxisPlacement::SetLocation (const Pnt2d& P) {axis.SetLocation (P);}
80 void Geom2d_AxisPlacement::SetDirection (const Dir2d& V) {
85 Standard_Real Geom2d_AxisPlacement::Angle (const Handle(AxisPlacement)& Other) const {
87 return axis.Angle (Other->Ax2d());