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
9 // under the terms of the GNU Lesser General Public 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.
17 #include <Geom2d_Geometry.ixx>
18 #include <Standard_ConstructionError.hxx>
20 typedef Handle(Geom2d_Geometry) Handle(Geometry);
21 typedef Geom2d_Geometry Geometry;
23 typedef gp_Pnt2d Pnt2d;
24 typedef gp_Vec2d Vec2d;
25 typedef gp_Trsf2d Trsf2d;
29 void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
38 void Geom2d_Geometry::Mirror (const gp_Ax2d& A) {
46 void Geom2d_Geometry::Rotate (const gp_Pnt2d& P, const Standard_Real Ang) {
49 T.SetRotation (P, Ang);
54 void Geom2d_Geometry::Scale (const gp_Pnt2d& P, const Standard_Real S) {
62 void Geom2d_Geometry::Translate (const gp_Vec2d& V) {
70 void Geom2d_Geometry::Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
77 Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const {
79 Handle(Geometry) me = this;
80 Handle(Geometry) G = me->Copy();
86 Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const {
88 Handle(Geometry) me = this;
89 Handle(Geometry) G = me->Copy();
95 Handle(Geometry) Geom2d_Geometry::Rotated (
96 const gp_Pnt2d& P, const Standard_Real Ang) const {
98 Handle(Geometry) me = this;
99 Handle(Geometry) G = me->Copy();
105 Handle(Geometry) Geom2d_Geometry::Scaled (
106 const gp_Pnt2d& P, const Standard_Real S) const {
108 Handle(Geometry) me = this;
109 Handle(Geometry) G = me->Copy();
115 Handle(Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const {
117 Handle(Geometry) me = this;
118 Handle(Geometry) G = me->Copy();
124 Handle(Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const {
126 Handle(Geometry) me = this;
127 Handle(Geometry) G = me->Copy();
133 Handle(Geometry) Geom2d_Geometry::Translated (
134 const gp_Pnt2d& P1, const gp_Pnt2d& P2) const {
136 Handle(Geometry) me = this;
137 Handle(Geometry) G = me->Copy();
138 G->Translate (P1, P2);