1 // Copyright (C) 2007-2013 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 GEOM::ListOfLong* GetSubShapesIndices (GEOM::GEOM_Object_ptr theMainShape,
133 const GEOM::ListOfGO& theSubShapes);
135 CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
136 GEOM::GEOM_Object_ptr theSubShape);
138 char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
140 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
141 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
142 CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
143 const CORBA::Long theShapeType);
145 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
147 GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
149 GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
150 GEOM::GEOM_Object_ptr theShape2,
151 CORBA::Long theShapeType);
153 GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
154 CORBA::Long theShapeType);
156 GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
157 CORBA::Long theShapeType,
158 GEOM::GEOM_Object_ptr theAx1,
159 GEOM::shape_state theState);
161 GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
162 CORBA::Long theShapeType,
163 GEOM::GEOM_Object_ptr theAx1,
164 GEOM::GEOM_Object_ptr thePnt,
165 GEOM::shape_state theState);
167 GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
168 CORBA::Long theShapeType,
169 GEOM::GEOM_Object_ptr theAxis,
170 CORBA::Double theRadius,
171 GEOM::shape_state theState);
173 GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
174 CORBA::Long theShapeType,
175 GEOM::GEOM_Object_ptr theAxis,
176 GEOM::GEOM_Object_ptr thePnt,
177 CORBA::Double theRadius,
178 GEOM::shape_state theState);
180 GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
181 CORBA::Long theShapeType,
182 GEOM::GEOM_Object_ptr theCenter,
183 CORBA::Double theRadius,
184 GEOM::shape_state theState);
186 GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
187 CORBA::Long theShapeType,
188 GEOM::GEOM_Object_ptr theTopLeftPoint,
189 GEOM::GEOM_Object_ptr theTopRigthPoint,
190 GEOM::GEOM_Object_ptr theBottomLeftPoint,
191 GEOM::GEOM_Object_ptr theBottomRigthPoint,
192 GEOM::shape_state theState);
194 GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
195 CORBA::Long theShapeType,
196 GEOM::GEOM_Object_ptr theAx1,
197 GEOM::shape_state theState);
199 GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
200 CORBA::Long theShapeType,
201 GEOM::GEOM_Object_ptr theAx1,
202 GEOM::GEOM_Object_ptr thePnt,
203 GEOM::shape_state theState);
205 GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
206 CORBA::Long theShapeType,
207 GEOM::GEOM_Object_ptr theAxis,
208 CORBA::Double theRadius,
209 GEOM::shape_state theState);
211 GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
212 CORBA::Long theShapeType,
213 GEOM::GEOM_Object_ptr theAxis,
214 GEOM::GEOM_Object_ptr thePnt,
215 CORBA::Double theRadius,
216 GEOM::shape_state theState);
218 GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
219 CORBA::Long theShapeType,
220 GEOM::GEOM_Object_ptr theCenter,
221 CORBA::Double theRadius,
222 GEOM::shape_state theState);
224 GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
225 CORBA::Long theShapeType,
226 GEOM::GEOM_Object_ptr theTopLeftPoint,
227 GEOM::GEOM_Object_ptr theTopRigthPoint,
228 GEOM::GEOM_Object_ptr theBottomLeftPoint,
229 GEOM::GEOM_Object_ptr theBottomRigthPoint,
230 GEOM::shape_state theState);
232 GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
233 GEOM::GEOM_Object_ptr theShape,
234 CORBA::Long theShapeType,
235 GEOM::shape_state theState);
237 GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
238 GEOM::GEOM_Object_ptr theShape,
239 CORBA::Long theShapeType,
240 GEOM::shape_state theState);
242 GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
243 GEOM::GEOM_Object_ptr theShape,
244 CORBA::Short theShapeType,
245 GEOM::shape_state theState);
247 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
248 (GEOM::GEOM_Object_ptr theSheckShape,
249 GEOM::GEOM_Object_ptr theShape,
250 CORBA::Short theShapeType,
251 GEOM::shape_state theState);
253 GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
254 GEOM::GEOM_Object_ptr theShape,
255 CORBA::Short theShapeType,
256 GEOM::shape_state theState);
258 GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
259 GEOM::GEOM_Object_ptr theShapeWhat);
261 GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
262 GEOM::GEOM_Object_ptr theShapeWhat);
264 GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
265 GEOM::GEOM_Object_ptr theShapeWhat);
267 GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
268 GEOM::GEOM_Object_ptr theShapeWhat);
270 GEOM::ListOfLong* GetSameIDs (GEOM::GEOM_Object_ptr theShapeWhere,
271 GEOM::GEOM_Object_ptr theShapeWhat);
273 ::GEOMImpl_IShapesOperations* GetOperations()
274 { return (::GEOMImpl_IShapesOperations*)GetImpl(); }