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