Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/geom.git] / src / GEOM_I / GEOM_IShapesOperations_i.hh
1 //  Copyright (C) 2007-2010  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
23 #ifndef _GEOM_IShapesOperations_i_HeaderFile
24 #define _GEOM_IShapesOperations_i_HeaderFile
25
26 #include "GEOMImpl_Gen.hxx"
27
28 #include <SALOMEconfig.h>
29
30 #include CORBA_SERVER_HEADER(GEOM_Gen)
31 #include "GEOM_IOperations_i.hh"
32 #include "GEOM_Object_i.hh"
33
34 #include "GEOMImpl_IShapesOperations.hxx"
35
36 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
37     public virtual POA_GEOM::GEOM_IShapesOperations,
38     public virtual GEOM_IOperations_i
39 {
40  public:
41   GEOM_IShapesOperations_i (PortableServer::POA_ptr       thePOA,
42                             GEOM::GEOM_Gen_ptr            theEngine,
43                             ::GEOMImpl_IShapesOperations* theImpl);
44   ~GEOM_IShapesOperations_i();
45
46   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
47                                   GEOM::GEOM_Object_ptr thePnt2);
48
49   GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
50                                   const CORBA::Double   theTolerance);
51
52   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
53                                   CORBA::Boolean  isPlanarWanted);
54
55   GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
56                                        CORBA::Boolean  isPlanarWanted);
57
58   GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
59
60   GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
61
62   GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
63
64   GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
65
66   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
67                                        CORBA::Double         theTolerance,
68                                        CORBA::Boolean        doKeepNonSolids);
69
70   GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
71                                 CORBA::Double         theTolerance);
72
73   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
74                                              CORBA::Double         theTolerance,
75                                              const GEOM::ListOfGO& theFaces,
76                                                  CORBA::Boolean  doKeepNonSolids);
77
78
79   GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
80                                CORBA::Long           theShapeType,
81                                CORBA::Boolean  isSorted);
82
83   GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
84                                     CORBA::Long           theShapeType,
85                                     CORBA::Boolean  isSorted);
86
87   GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
88                                      CORBA::Long           theID);
89
90   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
91                                 GEOM::GEOM_Object_ptr theSubShape);
92
93   CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
94                                 GEOM::GEOM_Object_ptr theSubShape);
95
96   char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
97
98   CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
99   CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
100   CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
101                                  const CORBA::Long     theShapeType);
102
103   GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
104
105   GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
106
107   GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
108                                    GEOM::GEOM_Object_ptr theShape2,
109                                    CORBA::Long           theShapeType);
110
111   GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
112                                     CORBA::Long           theShapeType,
113                                     GEOM::GEOM_Object_ptr theAx1,
114                                     GEOM::shape_state     theState);
115
116   GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
117                                                CORBA::Long           theShapeType,
118                                                GEOM::GEOM_Object_ptr theAx1,
119                                                GEOM::GEOM_Object_ptr thePnt,
120                                                GEOM::shape_state     theState);
121
122   GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
123                                        CORBA::Long           theShapeType,
124                                        GEOM::GEOM_Object_ptr theAxis,
125                                        CORBA::Double         theRadius,
126                                        GEOM::shape_state     theState);
127
128   GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
129                                                    CORBA::Long           theShapeType,
130                                                    GEOM::GEOM_Object_ptr theAxis,
131                                                    GEOM::GEOM_Object_ptr thePnt,
132                                                    CORBA::Double         theRadius,
133                                                    GEOM::shape_state     theState);
134
135   GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
136                                      CORBA::Long           theShapeType,
137                                      GEOM::GEOM_Object_ptr theCenter,
138                                      CORBA::Double         theRadius,
139                                      GEOM::shape_state     theState);
140
141   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
142                                          CORBA::Long           theShapeType,
143                                          GEOM::GEOM_Object_ptr theTopLeftPoint,
144                                          GEOM::GEOM_Object_ptr theTopRigthPoint,
145                                          GEOM::GEOM_Object_ptr theBottomLeftPoint,
146                                          GEOM::GEOM_Object_ptr theBottomRigthPoint,
147                                          GEOM::shape_state     theState);
148
149   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
150                                          CORBA::Long           theShapeType,
151                                          GEOM::GEOM_Object_ptr theAx1,
152                                          GEOM::shape_state     theState);
153
154   GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
155                                                      CORBA::Long           theShapeType,
156                                                      GEOM::GEOM_Object_ptr theAx1,
157                                                      GEOM::GEOM_Object_ptr thePnt,
158                                                      GEOM::shape_state     theState);
159
160   GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
161                                             CORBA::Long           theShapeType,
162                                             GEOM::GEOM_Object_ptr theAxis,
163                                             CORBA::Double         theRadius,
164                                             GEOM::shape_state     theState);
165
166   GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
167                                                         CORBA::Long           theShapeType,
168                                                         GEOM::GEOM_Object_ptr theAxis,
169                                                         GEOM::GEOM_Object_ptr thePnt,
170                                                         CORBA::Double         theRadius,
171                                                         GEOM::shape_state     theState);
172
173   GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
174                                           CORBA::Long           theShapeType,
175                                           GEOM::GEOM_Object_ptr theCenter,
176                                           CORBA::Double         theRadius,
177                                           GEOM::shape_state     theState);
178
179   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
180                                               CORBA::Long           theShapeType,
181                                               GEOM::GEOM_Object_ptr theTopLeftPoint,
182                                               GEOM::GEOM_Object_ptr theTopRigthPoint,
183                                               GEOM::GEOM_Object_ptr theBottomLeftPoint,
184                                               GEOM::GEOM_Object_ptr theBottomRigthPoint,
185                                               GEOM::shape_state     theState);
186
187   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
188                                   GEOM::GEOM_Object_ptr theShape,
189                                   CORBA::Long           theShapeType,
190                                   GEOM::shape_state     theState);
191
192   GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
193                                        GEOM::GEOM_Object_ptr theShape,
194                                        CORBA::Long           theShapeType,
195                                        GEOM::shape_state     theState);
196
197   GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
198                                     GEOM::GEOM_Object_ptr theShape,
199                                     CORBA::Short          theShapeType,
200                                     GEOM::shape_state     theState);
201
202   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
203                                    (GEOM::GEOM_Object_ptr theSheckShape,
204                                     GEOM::GEOM_Object_ptr theShape,
205                                     CORBA::Short          theShapeType,
206                                     GEOM::shape_state     theState);
207
208   GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
209                                          GEOM::GEOM_Object_ptr theShape,
210                                          CORBA::Short          theShapeType,
211                                          GEOM::shape_state     theState);
212
213   GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
214                                     GEOM::GEOM_Object_ptr theShapeWhat);
215
216   GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
217                                              GEOM::GEOM_Object_ptr theShapeWhat);
218
219   GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
220                                  GEOM::GEOM_Object_ptr theShapeWhat);
221
222   ::GEOMImpl_IShapesOperations* GetOperations()
223   { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
224 };
225
226 #endif