1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef _GEOM_IShapesOperations_i_HeaderFile
24 #define _GEOM_IShapesOperations_i_HeaderFile
26 #include "GEOMImpl_Gen.hxx"
28 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(GEOM_Gen)
31 #include "GEOM_IOperations_i.hh"
32 #include "GEOM_Object_i.hh"
34 #include "GEOMImpl_IShapesOperations.hxx"
36 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
37 public virtual POA_GEOM::GEOM_IShapesOperations,
38 public virtual GEOM_IOperations_i
41 GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA,
42 GEOM::GEOM_Gen_ptr theEngine,
43 ::GEOMImpl_IShapesOperations* theImpl);
44 ~GEOM_IShapesOperations_i();
46 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
47 GEOM::GEOM_Object_ptr thePnt2);
49 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theCurve,
50 CORBA::Double theLength,
51 GEOM::GEOM_Object_ptr theStartPoint);
53 GEOM::GEOM_Object_ptr MakeEdgeWire (GEOM::GEOM_Object_ptr theWire,
54 const CORBA::Double theLinearTolerance,
55 const CORBA::Double theAngularTolerance);
57 GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
58 const CORBA::Double theTolerance);
60 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
61 CORBA::Boolean isPlanarWanted);
63 GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
64 CORBA::Boolean isPlanarWanted);
66 GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
68 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
70 GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
72 GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
74 GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
75 CORBA::Double theTolerance,
76 CORBA::Boolean doKeepNonSolids);
78 GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
79 CORBA::Double theTolerance);
81 GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
82 CORBA::Double theTolerance,
83 const GEOM::ListOfGO& theFaces,
84 CORBA::Boolean doKeepNonSolids,
85 CORBA::Boolean doGlueAllEdges);
87 GEOM::GEOM_Object_ptr MakeGlueEdges (GEOM::GEOM_Object_ptr theShape,
88 CORBA::Double theTolerance);
90 GEOM::ListOfGO* GetGlueEdges (GEOM::GEOM_Object_ptr theShape,
91 CORBA::Double theTolerance);
93 GEOM::GEOM_Object_ptr MakeGlueEdgesByList (GEOM::GEOM_Object_ptr theShape,
94 CORBA::Double theTolerance,
95 const GEOM::ListOfGO& theEdges);
97 GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
98 CORBA::Boolean theGroupsOnly);
100 // For old SubShapeAll()
101 // Deprecated, use MakeAllSubShapes() instead
102 GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
103 CORBA::Long theShapeType,
104 CORBA::Boolean isSorted);
106 GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
107 CORBA::Long theShapeType,
108 CORBA::Boolean isSorted);
110 GEOM::ListOfGO* ExtractSubShapes (GEOM::GEOM_Object_ptr theShape,
111 CORBA::Long theShapeType,
112 CORBA::Boolean isSorted);
114 // Deprecated, use GetAllSubShapesIDs() instead
115 GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
116 CORBA::Long theShapeType,
117 CORBA::Boolean isSorted);
119 GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
120 CORBA::Long theShapeType,
121 CORBA::Boolean isSorted);
123 GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
126 GEOM::ListOfGO* MakeSubShapes (GEOM::GEOM_Object_ptr theMainShape,
127 const GEOM::ListOfLong& theIndices);
129 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
130 GEOM::GEOM_Object_ptr theSubShape);
132 CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
133 GEOM::GEOM_Object_ptr theSubShape);
135 char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
137 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
138 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
139 CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
140 const CORBA::Long theShapeType);
142 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
144 GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
146 GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
147 GEOM::GEOM_Object_ptr theShape2,
148 CORBA::Long theShapeType);
150 GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
151 CORBA::Long theShapeType);
153 GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
154 CORBA::Long theShapeType,
155 GEOM::GEOM_Object_ptr theAx1,
156 GEOM::shape_state theState);
158 GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
159 CORBA::Long theShapeType,
160 GEOM::GEOM_Object_ptr theAx1,
161 GEOM::GEOM_Object_ptr thePnt,
162 GEOM::shape_state theState);
164 GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
165 CORBA::Long theShapeType,
166 GEOM::GEOM_Object_ptr theAxis,
167 CORBA::Double theRadius,
168 GEOM::shape_state theState);
170 GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
171 CORBA::Long theShapeType,
172 GEOM::GEOM_Object_ptr theAxis,
173 GEOM::GEOM_Object_ptr thePnt,
174 CORBA::Double theRadius,
175 GEOM::shape_state theState);
177 GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
178 CORBA::Long theShapeType,
179 GEOM::GEOM_Object_ptr theCenter,
180 CORBA::Double theRadius,
181 GEOM::shape_state theState);
183 GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
184 CORBA::Long theShapeType,
185 GEOM::GEOM_Object_ptr theTopLeftPoint,
186 GEOM::GEOM_Object_ptr theTopRigthPoint,
187 GEOM::GEOM_Object_ptr theBottomLeftPoint,
188 GEOM::GEOM_Object_ptr theBottomRigthPoint,
189 GEOM::shape_state theState);
191 GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
192 CORBA::Long theShapeType,
193 GEOM::GEOM_Object_ptr theAx1,
194 GEOM::shape_state theState);
196 GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
197 CORBA::Long theShapeType,
198 GEOM::GEOM_Object_ptr theAx1,
199 GEOM::GEOM_Object_ptr thePnt,
200 GEOM::shape_state theState);
202 GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
203 CORBA::Long theShapeType,
204 GEOM::GEOM_Object_ptr theAxis,
205 CORBA::Double theRadius,
206 GEOM::shape_state theState);
208 GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
209 CORBA::Long theShapeType,
210 GEOM::GEOM_Object_ptr theAxis,
211 GEOM::GEOM_Object_ptr thePnt,
212 CORBA::Double theRadius,
213 GEOM::shape_state theState);
215 GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
216 CORBA::Long theShapeType,
217 GEOM::GEOM_Object_ptr theCenter,
218 CORBA::Double theRadius,
219 GEOM::shape_state theState);
221 GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
222 CORBA::Long theShapeType,
223 GEOM::GEOM_Object_ptr theTopLeftPoint,
224 GEOM::GEOM_Object_ptr theTopRigthPoint,
225 GEOM::GEOM_Object_ptr theBottomLeftPoint,
226 GEOM::GEOM_Object_ptr theBottomRigthPoint,
227 GEOM::shape_state theState);
229 GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
230 GEOM::GEOM_Object_ptr theShape,
231 CORBA::Long theShapeType,
232 GEOM::shape_state theState);
234 GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
235 GEOM::GEOM_Object_ptr theShape,
236 CORBA::Long theShapeType,
237 GEOM::shape_state theState);
239 GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
240 GEOM::GEOM_Object_ptr theShape,
241 CORBA::Short theShapeType,
242 GEOM::shape_state theState);
244 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
245 (GEOM::GEOM_Object_ptr theSheckShape,
246 GEOM::GEOM_Object_ptr theShape,
247 CORBA::Short theShapeType,
248 GEOM::shape_state theState);
250 GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
251 GEOM::GEOM_Object_ptr theShape,
252 CORBA::Short theShapeType,
253 GEOM::shape_state theState);
255 GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
256 GEOM::GEOM_Object_ptr theShapeWhat);
258 GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
259 GEOM::GEOM_Object_ptr theShapeWhat);
261 GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
262 GEOM::GEOM_Object_ptr theShapeWhat);
264 GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
265 GEOM::GEOM_Object_ptr theShapeWhat);
267 GEOM::ListOfLong* GetSameIDs (GEOM::GEOM_Object_ptr theShapeWhere,
268 GEOM::GEOM_Object_ptr theShapeWhat);
270 ::GEOMImpl_IShapesOperations* GetOperations()
271 { return (::GEOMImpl_IShapesOperations*)GetImpl(); }