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 typedef Geom2d_Geometry Geometry;
28 typedef gp_Pnt2d Pnt2d;
29 typedef gp_Vec2d Vec2d;
30 typedef gp_Trsf2d Trsf2d;
32 void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
41 void Geom2d_Geometry::Mirror (const gp_Ax2d& A) {
49 void Geom2d_Geometry::Rotate (const gp_Pnt2d& P, const Standard_Real Ang) {
52 T.SetRotation (P, Ang);
57 void Geom2d_Geometry::Scale (const gp_Pnt2d& P, const Standard_Real S) {
65 void Geom2d_Geometry::Translate (const gp_Vec2d& V) {
73 void Geom2d_Geometry::Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
80 Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const
82 Handle(Geom2d_Geometry) G = Copy();
88 Handle(Geom2d_Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const
90 Handle(Geom2d_Geometry) G = Copy();
96 Handle(Geom2d_Geometry) Geom2d_Geometry::Rotated (const gp_Pnt2d& P, const Standard_Real Ang) const
98 Handle(Geom2d_Geometry) G = Copy();
104 Handle(Geom2d_Geometry) Geom2d_Geometry::Scaled (const gp_Pnt2d& P, const Standard_Real S) const
106 Handle(Geom2d_Geometry) G = Copy();
112 Handle(Geom2d_Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const
114 Handle(Geom2d_Geometry) G = Copy();
120 Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const
122 Handle(Geom2d_Geometry) G = Copy();
128 Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const
130 Handle(Geom2d_Geometry) G = Copy();
131 G->Translate (P1, P2);