1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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 "GEOM_GEOM_I.hxx"
27 #include "GEOMImpl_Gen.hxx"
29 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(GEOM_Gen)
32 #include "GEOM_IOperations_i.hh"
33 #include "GEOM_Object_i.hh"
35 #include "GEOMImpl_IShapesOperations.hxx"
37 class GEOM_I_EXPORT GEOM_IShapesOperations_i :
38 public virtual POA_GEOM::GEOM_IShapesOperations,
39 public virtual GEOM_IOperations_i
42 GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA,
43 GEOM::GEOM_Gen_ptr theEngine,
44 ::GEOMImpl_IShapesOperations* theImpl);
45 ~GEOM_IShapesOperations_i();
47 GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
48 GEOM::GEOM_Object_ptr thePnt2);
50 GEOM::GEOM_Object_ptr MakeEdgeOnCurveByLength (GEOM::GEOM_Object_ptr theCurve,
51 CORBA::Double theLength,
52 GEOM::GEOM_Object_ptr theStartPoint);
54 GEOM::GEOM_Object_ptr MakeEdgeWire (GEOM::GEOM_Object_ptr theWire,
55 const CORBA::Double theLinearTolerance,
56 const CORBA::Double theAngularTolerance);
58 GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
59 const CORBA::Double theTolerance);
61 GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
62 CORBA::Boolean isPlanarWanted);
64 GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
65 CORBA::Boolean isPlanarWanted);
67 GEOM::GEOM_Object_ptr MakeFaceFromSurface(GEOM::GEOM_Object_ptr theFace,
68 GEOM::GEOM_Object_ptr theWire);
70 GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
72 GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
74 GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells);
76 GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
78 GEOM::GEOM_Object_ptr MakeSolidFromConnectedFaces (const GEOM::ListOfGO& theFacesOrShells,
79 CORBA::Boolean isIntersect);
81 GEOM::GEOM_Object_ptr MakeGlueFaces (const GEOM::ListOfGO& theShape,
82 CORBA::Double theTolerance,
83 CORBA::Boolean doKeepNonSolids);
85 GEOM::ListOfGO* GetGlueFaces (const GEOM::ListOfGO& theShape,
86 CORBA::Double theTolerance);
88 GEOM::GEOM_Object_ptr MakeGlueFacesByList (const GEOM::ListOfGO& theShape,
89 CORBA::Double theTolerance,
90 const GEOM::ListOfGO& theFaces,
91 CORBA::Boolean doKeepNonSolids,
92 CORBA::Boolean doGlueAllEdges);
94 GEOM::GEOM_Object_ptr MakeGlueEdges (const GEOM::ListOfGO& theShape,
95 CORBA::Double theTolerance);
97 GEOM::ListOfGO* GetGlueEdges (const GEOM::ListOfGO& theShape,
98 CORBA::Double theTolerance);
100 GEOM::GEOM_Object_ptr MakeGlueEdgesByList (const GEOM::ListOfGO& theShape,
101 CORBA::Double theTolerance,
102 const GEOM::ListOfGO& theEdges);
104 GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
105 CORBA::Boolean theGroupsOnly);
107 // For old SubShapeAll()
108 // Deprecated, use MakeAllSubShapes() instead
109 GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
110 CORBA::Long theShapeType,
111 CORBA::Boolean isSorted);
113 GEOM::ListOfGO* MakeAllSubShapes (GEOM::GEOM_Object_ptr theShape,
114 CORBA::Long theShapeType,
115 CORBA::Boolean isSorted);
117 GEOM::ListOfGO* ExtractSubShapes (GEOM::GEOM_Object_ptr theShape,
118 CORBA::Long theShapeType,
119 CORBA::Boolean isSorted);
121 // Deprecated, use GetAllSubShapesIDs() instead
122 GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
123 CORBA::Long theShapeType,
124 CORBA::Boolean isSorted);
126 GEOM::ListOfLong* GetAllSubShapesIDs (GEOM::GEOM_Object_ptr theShape,
127 CORBA::Long theShapeType,
128 CORBA::Boolean isSorted);
130 GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
133 GEOM::ListOfGO* MakeSubShapes (GEOM::GEOM_Object_ptr theMainShape,
134 const GEOM::ListOfLong& theIndices);
136 CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
137 GEOM::GEOM_Object_ptr theSubShape);
139 GEOM::ListOfLong* GetSubShapesIndices (GEOM::GEOM_Object_ptr theMainShape,
140 const GEOM::ListOfGO& theSubShapes);
142 CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
143 GEOM::GEOM_Object_ptr theSubShape);
145 char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
147 CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
148 CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
149 CORBA::Long NumberOfSubShapes (GEOM::GEOM_Object_ptr theShape,
150 const CORBA::Long theShapeType);
152 GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape);
154 GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
156 GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
157 GEOM::GEOM_Object_ptr theShape2,
158 CORBA::Long theShapeType);
160 GEOM::ListOfGO* GetSharedShapesMulti (const GEOM::ListOfGO& theShapes,
161 CORBA::Long theShapeType);
163 GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
164 CORBA::Long theShapeType,
165 GEOM::GEOM_Object_ptr theAx1,
166 GEOM::shape_state theState);
168 GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
169 CORBA::Long theShapeType,
170 GEOM::GEOM_Object_ptr theAx1,
171 GEOM::GEOM_Object_ptr thePnt,
172 GEOM::shape_state theState);
174 GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
175 CORBA::Long theShapeType,
176 GEOM::GEOM_Object_ptr theAxis,
177 CORBA::Double theRadius,
178 GEOM::shape_state theState);
180 GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
181 CORBA::Long theShapeType,
182 GEOM::GEOM_Object_ptr theAxis,
183 GEOM::GEOM_Object_ptr thePnt,
184 CORBA::Double theRadius,
185 GEOM::shape_state theState);
187 GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
188 CORBA::Long theShapeType,
189 GEOM::GEOM_Object_ptr theCenter,
190 CORBA::Double theRadius,
191 GEOM::shape_state theState);
193 GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
194 CORBA::Long theShapeType,
195 GEOM::GEOM_Object_ptr theTopLeftPoint,
196 GEOM::GEOM_Object_ptr theTopRigthPoint,
197 GEOM::GEOM_Object_ptr theBottomLeftPoint,
198 GEOM::GEOM_Object_ptr theBottomRigthPoint,
199 GEOM::shape_state theState);
201 GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
202 CORBA::Long theShapeType,
203 GEOM::GEOM_Object_ptr theAx1,
204 GEOM::shape_state theState);
206 GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
207 CORBA::Long theShapeType,
208 GEOM::GEOM_Object_ptr theAx1,
209 GEOM::GEOM_Object_ptr thePnt,
210 GEOM::shape_state theState);
212 GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
213 CORBA::Long theShapeType,
214 GEOM::GEOM_Object_ptr theAxis,
215 CORBA::Double theRadius,
216 GEOM::shape_state theState);
218 GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
219 CORBA::Long theShapeType,
220 GEOM::GEOM_Object_ptr theAxis,
221 GEOM::GEOM_Object_ptr thePnt,
222 CORBA::Double theRadius,
223 GEOM::shape_state theState);
225 GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
226 CORBA::Long theShapeType,
227 GEOM::GEOM_Object_ptr theCenter,
228 CORBA::Double theRadius,
229 GEOM::shape_state theState);
231 GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
232 CORBA::Long theShapeType,
233 GEOM::GEOM_Object_ptr theTopLeftPoint,
234 GEOM::GEOM_Object_ptr theTopRigthPoint,
235 GEOM::GEOM_Object_ptr theBottomLeftPoint,
236 GEOM::GEOM_Object_ptr theBottomRigthPoint,
237 GEOM::shape_state theState);
239 GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
240 GEOM::GEOM_Object_ptr theShape,
241 CORBA::Long theShapeType,
242 GEOM::shape_state theState);
244 GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
245 GEOM::GEOM_Object_ptr theShape,
246 CORBA::Long theShapeType,
247 GEOM::shape_state theState);
249 GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
250 GEOM::GEOM_Object_ptr theShape,
251 CORBA::Short theShapeType,
252 GEOM::shape_state theState);
254 GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
255 (GEOM::GEOM_Object_ptr theSheckShape,
256 GEOM::GEOM_Object_ptr theShape,
257 CORBA::Short theShapeType,
258 GEOM::shape_state theState);
260 GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
261 GEOM::GEOM_Object_ptr theShape,
262 CORBA::Short theShapeType,
263 GEOM::shape_state theState);
265 GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
266 GEOM::GEOM_Object_ptr theShapeWhat);
268 GEOM::GEOM_Object_ptr GetInPlaceOld (GEOM::GEOM_Object_ptr theShapeWhere,
269 GEOM::GEOM_Object_ptr theShapeWhat);
271 GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
272 GEOM::GEOM_Object_ptr theShapeWhat);
274 GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
275 GEOM::GEOM_Object_ptr theShapeWhat);
277 GEOM::ListOfLong* GetSameIDs (GEOM::GEOM_Object_ptr theShapeWhere,
278 GEOM::GEOM_Object_ptr theShapeWhat);
280 GEOM::GEOM_Object_ptr ExtendEdge(GEOM::GEOM_Object_ptr theEdge,
281 CORBA::Double theMin,
282 CORBA::Double theMax);
284 GEOM::GEOM_Object_ptr ExtendFace(GEOM::GEOM_Object_ptr theFace,
285 CORBA::Double theUMin,
286 CORBA::Double theUMax,
287 CORBA::Double theVMin,
288 CORBA::Double theVMax);
290 GEOM::GEOM_Object_ptr MakeSurfaceFromFace(GEOM::GEOM_Object_ptr theFace);
292 ::GEOMImpl_IShapesOperations* GetOperations()
293 { return (::GEOMImpl_IShapesOperations*)GetImpl(); }