Salome HOME
a003f0fb960e1d202647d17c9167bc95031c1328
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ITransformOperations.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 #ifndef _GEOMImpl_ITransformOperations_HXX_
23 #define _GEOMImpl_ITransformOperations_HXX_
24
25 #include "Utils_SALOME_Exception.hxx"
26 #include "GEOM_IOperations.hxx"
27 #include "GEOM_Engine.hxx"
28 #include "GEOM_Object.hxx"
29
30 #include <TDocStd_Document.hxx>
31 #include <TopoDS_Shape.hxx>
32
33 class GEOMImpl_ITranslate;
34 class GEOMImpl_IRotate;
35
36 class GEOMImpl_ITransformOperations : public GEOM_IOperations
37 {
38  public:
39   Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID);
40   Standard_EXPORT ~GEOMImpl_ITransformOperations();
41
42   Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,
43                                                           Handle(GEOM_Object) thePoint1,
44                                                           Handle(GEOM_Object) thePoint2);
45
46   Standard_EXPORT Handle(GEOM_Object) TranslateTwoPointsCopy (Handle(GEOM_Object) theObject,
47                                                               Handle(GEOM_Object) thePoint1,
48                                                               Handle(GEOM_Object) thePoint2);
49
50   Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZ (Handle(GEOM_Object) theObject,
51                                                        double theX, double theY,  double theZ);
52
53   Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZCopy (Handle(GEOM_Object) theObject,
54                                                            double theX, double theY,  double theZ);
55
56   Standard_EXPORT Handle(GEOM_Object) TranslateVector (Handle(GEOM_Object) theObject,
57                                                        Handle(GEOM_Object) theVector);
58
59   Standard_EXPORT Handle(GEOM_Object) TranslateVectorCopy (Handle(GEOM_Object) theObject,
60                                                            Handle(GEOM_Object) theVector);
61
62   Standard_EXPORT Handle(GEOM_Object) TranslateVectorDistance (Handle(GEOM_Object) theObject,
63                                                                Handle(GEOM_Object) theVector,
64                                                                double theDistance,
65                                                                bool theCopy);
66
67   Standard_EXPORT Handle(GEOM_Object) Translate1D (Handle(GEOM_Object) theObject,
68                                                    Handle(GEOM_Object) theVector,
69                                                    double theStep,
70                                                    Standard_Integer theNbTimes);
71
72   Standard_EXPORT Handle(GEOM_Object) Translate2D (Handle(GEOM_Object) theObject,
73                                                    Handle(GEOM_Object) theVector,
74                                                    double theStep1,
75                                                    Standard_Integer theNbTimes1,
76                                                    Handle(GEOM_Object) theVector2,
77                                                    double theStep2,
78                                                    Standard_Integer theNbTimes2);
79
80   /*
81   Standard_EXPORT static TopoDS_Shape TranslateShape1D (const TopoDS_Shape&  theShape,
82                                                         GEOMImpl_ITranslate* theTI);
83
84   Standard_EXPORT static TopoDS_Shape TranslateShape2D (const TopoDS_Shape&  theShape,
85                                                         GEOMImpl_ITranslate* theTI);
86   */
87
88   Standard_EXPORT Handle(GEOM_Object) MirrorPlane (Handle(GEOM_Object) theObject,
89                                                    Handle(GEOM_Object) thePlane);
90
91   Standard_EXPORT Handle(GEOM_Object) MirrorPlaneCopy (Handle(GEOM_Object) theObject,
92                                                        Handle(GEOM_Object) thePlane);
93
94   Standard_EXPORT Handle(GEOM_Object) MirrorAxis (Handle(GEOM_Object) theObject,
95                                                   Handle(GEOM_Object) theAxis);
96
97   Standard_EXPORT Handle(GEOM_Object) MirrorAxisCopy (Handle(GEOM_Object) theObject,
98                                                       Handle(GEOM_Object) theAxis);
99
100   Standard_EXPORT Handle(GEOM_Object) MirrorPoint (Handle(GEOM_Object) theObject,
101                                                    Handle(GEOM_Object) thePoint);
102
103   Standard_EXPORT Handle(GEOM_Object) MirrorPointCopy (Handle(GEOM_Object) theObject,
104                                                        Handle(GEOM_Object) thePoint);
105
106   Standard_EXPORT Handle(GEOM_Object) OffsetShape (Handle(GEOM_Object) theObject,
107                                                    double theOffset);
108
109   Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject,
110                                                        double theOffset);
111
112   Standard_EXPORT Handle(GEOM_Object) ProjectShapeCopy (Handle(GEOM_Object) theSource,
113                                                         Handle(GEOM_Object) theTarget);
114
115   Standard_EXPORT Handle(GEOM_Object) ScaleShape (Handle(GEOM_Object) theObject,
116                                                   Handle(GEOM_Object) thePoint,
117                                                   double theFactor);
118
119   Standard_EXPORT Handle(GEOM_Object) ScaleShapeCopy (Handle(GEOM_Object) theObject,
120                                                       Handle(GEOM_Object) thePoint,
121                                                       double theFactor);
122
123   Standard_EXPORT Handle(GEOM_Object) ScaleShapeAlongAxes (Handle(GEOM_Object) theObject,
124                                                            Handle(GEOM_Object) thePoint,
125                                                            double theFactorX,
126                                                            double theFactorY,
127                                                            double theFactorZ,
128                                                            bool doCopy);
129
130   Standard_EXPORT Handle(GEOM_Object) PositionShape (Handle(GEOM_Object) theObject,
131                                                      Handle(GEOM_Object) theStartLCS,
132                                                      Handle(GEOM_Object) theEndLCS);
133
134   Standard_EXPORT Handle(GEOM_Object) PositionShapeCopy (Handle(GEOM_Object) theObject,
135                                                          Handle(GEOM_Object) theStartLCS,
136                                                          Handle(GEOM_Object) theEndLCS);
137
138   Standard_EXPORT Handle(GEOM_Object) PositionAlongPath (Handle(GEOM_Object) theObject,
139                                                          Handle(GEOM_Object) thePath,
140                                                          double theDistance,
141                                                          bool   theCopy,
142                                                          bool   theReverse);
143
144   Standard_EXPORT Handle(GEOM_Object) Rotate (Handle(GEOM_Object) theObject,
145                                               Handle(GEOM_Object) theAxis,
146                                               double theAngle);
147
148   Standard_EXPORT Handle(GEOM_Object) RotateCopy (Handle(GEOM_Object) theObject,
149                                                   Handle(GEOM_Object) theAxis,
150                                                   double theAngle);
151
152   Standard_EXPORT Handle(GEOM_Object) Rotate1D (Handle(GEOM_Object) theObject,
153                                                 Handle(GEOM_Object) theAxis,
154                                                 Standard_Integer theNbTimes);
155
156   Standard_EXPORT Handle(GEOM_Object) Rotate1D (Handle(GEOM_Object) theObject,
157                                                 Handle(GEOM_Object) theAxis,
158                                                 double theAngleStep,
159                                                 Standard_Integer theNbSteps);
160
161   Standard_EXPORT Handle(GEOM_Object) Rotate2D (Handle(GEOM_Object) theObject,
162                                                 Handle(GEOM_Object) theAxis,
163                                                 Standard_Integer theNbObjects,
164                                                 double theRadialStep,
165                                                 Standard_Integer theNbSteps);
166
167   Standard_EXPORT Handle(GEOM_Object) Rotate2D (Handle(GEOM_Object) theObject,
168                                                 Handle(GEOM_Object) theAxis,
169                                                 double theAngle,
170                                                 Standard_Integer theNbTimes1,
171                                                 double theStep,
172                                                 Standard_Integer theNbTimes2);
173
174   Standard_EXPORT Handle(GEOM_Object) RotateThreePoints (Handle(GEOM_Object) theObject,
175                                                          Handle(GEOM_Object) theCentPoint,
176                                                          Handle(GEOM_Object) thePoint1,
177                                                          Handle(GEOM_Object) thePoint2);
178
179   Standard_EXPORT Handle(GEOM_Object) RotateThreePointsCopy (Handle(GEOM_Object) theObject,
180                                                              Handle(GEOM_Object) theCentPoint,
181                                                              Handle(GEOM_Object) thePoint1,
182                                                              Handle(GEOM_Object) thePoint2);
183
184   Standard_EXPORT Handle(GEOM_Object) TransformLikeOtherCopy (Handle(GEOM_Object) theObject,
185                                                               Handle(GEOM_Object) theSample);
186
187 };
188
189 #endif