1 // Created on: 1993-03-24
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <Geom2d_Geometry.hxx>
19 #include <gp_Ax2d.hxx>
20 #include <gp_Pnt2d.hxx>
21 #include <gp_Trsf2d.hxx>
22 #include <gp_Vec2d.hxx>
23 #include <Standard_ConstructionError.hxx>
24 #include <Standard_Type.hxx>
26 IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Geometry,MMgt_TShared)
28 typedef Geom2d_Geometry Geometry;
30 typedef gp_Pnt2d Pnt2d;
31 typedef gp_Vec2d Vec2d;
32 typedef gp_Trsf2d Trsf2d;
34 void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
43 void Geom2d_Geometry::Mirror (const gp_Ax2d& A) {
51 void Geom2d_Geometry::Rotate (const gp_Pnt2d& P, const Standard_Real Ang) {
54 T.SetRotation (P, Ang);
59 void Geom2d_Geometry::Scale (const gp_Pnt2d& P, const Standard_Real S) {
67 void Geom2d_Geometry::Translate (const gp_Vec2d& V) {
75 void Geom2d_Geometry::Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
82 Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const
84 Handle(Geom2d_Geometry) G = Copy();
90 Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const
92 Handle(Geom2d_Geometry) G = Copy();
98 Handle(Geom2d_Geometry) Geom2d_Geometry::Rotated (const gp_Pnt2d& P, const Standard_Real Ang) const
100 Handle(Geom2d_Geometry) G = Copy();
106 Handle(Geom2d_Geometry) Geom2d_Geometry::Scaled (const gp_Pnt2d& P, const Standard_Real S) const
108 Handle(Geom2d_Geometry) G = Copy();
114 Handle(Geom2d_Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const
116 Handle(Geom2d_Geometry) G = Copy();
122 Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const
124 Handle(Geom2d_Geometry) G = Copy();
130 Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const
132 Handle(Geom2d_Geometry) G = Copy();
133 G->Translate (P1, P2);