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_Geometry.ixx>
24 #include <Standard_ConstructionError.hxx>
26 typedef Handle(Geom2d_Geometry) Handle(Geometry);
27 typedef Geom2d_Geometry Geometry;
29 typedef gp_Pnt2d Pnt2d;
30 typedef gp_Vec2d Vec2d;
31 typedef gp_Trsf2d Trsf2d;
35 void Geom2d_Geometry::Mirror (const gp_Pnt2d& P) {
44 void Geom2d_Geometry::Mirror (const gp_Ax2d& A) {
52 void Geom2d_Geometry::Rotate (const gp_Pnt2d& P, const Standard_Real Ang) {
55 T.SetRotation (P, Ang);
60 void Geom2d_Geometry::Scale (const gp_Pnt2d& P, const Standard_Real S) {
68 void Geom2d_Geometry::Translate (const gp_Vec2d& V) {
76 void Geom2d_Geometry::Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
83 Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Pnt2d& P) const {
85 Handle(Geometry) me = this;
86 Handle(Geometry) G = me->Copy();
92 Handle(Geometry) Geom2d_Geometry::Mirrored (const gp_Ax2d& A) const {
94 Handle(Geometry) me = this;
95 Handle(Geometry) G = me->Copy();
101 Handle(Geometry) Geom2d_Geometry::Rotated (
102 const gp_Pnt2d& P, const Standard_Real Ang) const {
104 Handle(Geometry) me = this;
105 Handle(Geometry) G = me->Copy();
111 Handle(Geometry) Geom2d_Geometry::Scaled (
112 const gp_Pnt2d& P, const Standard_Real S) const {
114 Handle(Geometry) me = this;
115 Handle(Geometry) G = me->Copy();
121 Handle(Geometry) Geom2d_Geometry::Transformed (const gp_Trsf2d& T) const {
123 Handle(Geometry) me = this;
124 Handle(Geometry) G = me->Copy();
130 Handle(Geometry) Geom2d_Geometry::Translated (const gp_Vec2d& V) const {
132 Handle(Geometry) me = this;
133 Handle(Geometry) G = me->Copy();
139 Handle(Geometry) Geom2d_Geometry::Translated (
140 const gp_Pnt2d& P1, const gp_Pnt2d& P2) const {
142 Handle(Geometry) me = this;
143 Handle(Geometry) G = me->Copy();
144 G->Translate (P1, P2);