1 // Created on: 1993-03-10
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 //JCV 09/07/92 portage sur C1
26 #include <Geom_Geometry.ixx>
27 #include <Standard_ConstructionError.hxx>
29 typedef Handle(Geom_Geometry) Handle(Geometry);
30 typedef Geom_Geometry Geometry;
39 Handle(Geom_Geometry) Geom_Geometry::Copy() const {
41 Handle(Geom_Geometry) G;
42 Standard_ConstructionError::Raise();
47 void Geom_Geometry::Mirror (const gp_Pnt& P) {
56 void Geom_Geometry::Mirror (const gp_Ax1& A1) {
64 void Geom_Geometry::Mirror (const gp_Ax2& A2) {
72 void Geom_Geometry::Rotate (const gp_Ax1& A1, const Standard_Real Ang) {
75 T.SetRotation (A1, Ang);
80 void Geom_Geometry::Scale (const gp_Pnt& P, const Standard_Real S) {
88 void Geom_Geometry::Translate (const gp_Vec& V) {
96 void Geom_Geometry::Translate (const gp_Pnt& P1, const gp_Pnt& P2) {
103 Handle(Geometry) Geom_Geometry::Mirrored (const gp_Pnt& P) const {
105 Handle(Geometry) me = this;
106 Handle(Geometry) G = me->Copy();
112 Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax1& A1) const {
114 Handle(Geometry) me = this;
115 Handle(Geometry) G = me->Copy();
121 Handle(Geometry) Geom_Geometry::Mirrored (const gp_Ax2& A2) const {
123 Handle(Geometry) me = this;
124 Handle(Geometry) G = me->Copy();
131 Handle(Geometry) Geom_Geometry::Rotated (
134 const Standard_Real Ang
137 Handle(Geometry) me = this;
138 Handle(Geometry) G = me->Copy();
145 Handle(Geometry) Geom_Geometry::Scaled (const gp_Pnt& P, const Standard_Real S) const {
147 Handle(Geometry) me = this;
148 Handle(Geometry) G = me->Copy();
155 Handle(Geometry) Geom_Geometry::Transformed (const gp_Trsf& T) const {
157 Handle(Geometry) me = this;
158 Handle(Geometry) G = me->Copy();
165 Handle(Geometry) Geom_Geometry::Translated (const gp_Vec& V) const {
167 Handle(Geometry) me = this;
168 Handle(Geometry) G = me->Copy();
174 Handle(Geometry) Geom_Geometry::Translated (
180 Handle(Geometry) me = this;
181 Handle(Geometry) G = me->Copy();
182 G->Translate (P1, P2);