Salome HOME
22752: [EDF] Provide explicit feedback on what has been done by Shape Processing...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IShapesOperations.hxx
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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 //=============================================================================
24 // File      : GEOMImpl_IShapesOperations.hxx
25 // Created   :
26 // Author    : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
27 // Project   : SALOME
28 //=============================================================================
29
30 #ifndef _GEOMImpl_IShapesOperations_HXX_
31 #define _GEOMImpl_IShapesOperations_HXX_
32
33 #include "GEOM_IOperations.hxx"
34
35 #include "GEOMAlgo_State.hxx"
36
37 #include <TopoDS_Shape.hxx>
38 #include <TopTools_ListOfShape.hxx>
39 #include <NCollection_DataMap.hxx>
40 #include <TColStd_HSequenceOfTransient.hxx>
41 #include <TColStd_HSequenceOfInteger.hxx>
42
43 #include <Handle_Geom_Surface.hxx>
44
45 #include <gp_Pnt.hxx>
46
47 #include <list>
48 #include <functional>
49
50 class GEOM_Engine;
51 class Handle(GEOM_Object);
52 class Handle(TColStd_HArray1OfInteger);
53
54 class GEOMImpl_IShapesOperations : public GEOM_IOperations
55 {
56  public:
57
58   enum SubShapeType {
59     None      = 0x00,
60     Groups    = 0x01,
61     Fields    = 0x02,
62     SubShapes = 0x04,
63     All       = Groups | Fields | SubShapes,
64   };
65
66   Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
67   Standard_EXPORT ~GEOMImpl_IShapesOperations();
68
69   Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
70                                                 Handle(GEOM_Object) thePoint2);
71
72   Standard_EXPORT Handle(GEOM_Object) MakeEdgeOnCurveByLength (Handle(GEOM_Object) theCurve,
73                                                                const Standard_Real theLength,
74                                                                Handle(GEOM_Object) theStartPoint);
75
76   Standard_EXPORT Handle(GEOM_Object) MakeEdgeWire (Handle(GEOM_Object) theWire,
77                                                     const Standard_Real theLinearTolerance,
78                                                     const Standard_Real theAngularTolerance);
79
80   Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
81                                                 const Standard_Real            theTolerance);
82
83   Standard_EXPORT Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
84
85   Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
86                                                      const bool isPlanarWanted);
87
88   Standard_EXPORT Handle(GEOM_Object) MakeFaceFromSurface
89                                               (Handle(GEOM_Object) theFace,
90                                                Handle(GEOM_Object) theWire);
91                                                
92   Standard_EXPORT Handle(GEOM_Object) MakeFaceWithConstraints (std::list<Handle(GEOM_Object)> theConstraints);
93
94   Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
95
96   Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
97
98   Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
99
100   Standard_EXPORT Handle(GEOM_Object) MakeSolidFromConnectedFaces (std::list<Handle(GEOM_Object)> theFacesOrShells,
101                                                                    const Standard_Boolean isIntersect);
102
103   Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
104                                                      const Standard_Real theTolerance,
105                                                      const Standard_Boolean doKeepNonSolids);
106
107   Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
108                                                            const Standard_Real theTolerance,
109                                                            std::list<Handle(GEOM_Object)>& theFaces,
110                                                            const Standard_Boolean doKeepNonSolids,
111                                                            const Standard_Boolean doGlueAllEdges);
112
113   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
114                                                      const Standard_Real theTolerance);
115
116   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
117                                                                       const Standard_Real theTolerance,
118                                                                       const TopAbs_ShapeEnum theType);
119
120   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
121                                                            const Standard_Real theTolerance,
122                                                            std::list<Handle(GEOM_Object)> & theEdges);
123
124   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
125                                                                              const Standard_Boolean theGroupsOnly);
126   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
127                                                                              const Standard_Integer theTypes = All);
128   
129   enum ExplodeType {
130     EXPLODE_OLD_INCLUDE_MAIN,
131     EXPLODE_NEW_INCLUDE_MAIN,
132     EXPLODE_NEW_EXCLUDE_MAIN
133   };
134
135   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
136     (Handle(GEOM_Object)    theShape,
137      const Standard_Integer theShapeType,
138      const Standard_Boolean isSorted,
139      const ExplodeType      theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
140
141   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs
142     (Handle(GEOM_Object)    theShape,
143      const Standard_Integer theShapeType,
144      const Standard_Boolean isSorted,
145      const ExplodeType      theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
146
147   Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object)    theMainShape,
148                                                    const Standard_Integer theID);
149
150   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeSubShapes
151     (Handle(GEOM_Object)              theMainShape,
152      Handle(TColStd_HArray1OfInteger) theIndices);
153
154   Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape,
155                                                      Handle(GEOM_Object) theSubShape);
156   
157   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSubShapesIndices (Handle(GEOM_Object) theMainShape,
158                                                                           std::list<Handle(GEOM_Object)> theSubShapes);
159
160   Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape,
161                                                      Handle(GEOM_Object) theSubShape);
162
163   Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
164
165   Standard_EXPORT Standard_Boolean IsSubShapeBelongsTo(Handle(GEOM_Object) theSubObject,
166                                                        const Standard_Integer theSubObjectIndex,
167                                                        Handle(GEOM_Object) theObject,
168                                                        const Standard_Integer theObjectIndex);
169
170   Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object)    theShape,
171                                                       const Standard_Integer theShapeType);
172
173   Standard_EXPORT Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
174
175   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
176
177   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
178     GetSharedShapes (Handle(GEOM_Object)    theShape1,
179                      Handle(GEOM_Object)    theShape2,
180                      const Standard_Integer theShapeType);
181
182   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
183     GetSharedShapes (std::list<Handle(GEOM_Object)>& theShapes,
184                      const Standard_Integer          theShapeType);
185
186   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
187     GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
188                       const Standard_Integer     theShapeType,
189                       const Handle(GEOM_Object)& theAx1,
190                       const GEOMAlgo_State       theState);
191
192   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
193     GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
194                                   const Standard_Integer     theShapeType,
195                                   const Handle(GEOM_Object)& theAx1,
196                                   const Handle(GEOM_Object)& thePnt,
197                                   const GEOMAlgo_State       theState);
198
199
200   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
201     GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
202                          const Standard_Integer     theShapeType,
203                          const Handle(GEOM_Object)& theAxis,
204                          const Standard_Real        theRadius,
205                          const GEOMAlgo_State       theState);
206
207   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
208     GetShapesOnCylinderWithLocation (const Handle(GEOM_Object)& theShape,
209                                      const Standard_Integer     theShapeType,
210                                      const Handle(GEOM_Object)& theAxis,
211                                      const Handle(GEOM_Object)& thePnt,
212                                      const Standard_Real        theRadius,
213                                      const GEOMAlgo_State       theState);
214
215   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
216     GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
217                        const Standard_Integer     theShapeType,
218                        const Handle(GEOM_Object)& theCenter,
219                        const Standard_Real        theRadius,
220                        const GEOMAlgo_State       theState);
221
222   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
223     GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
224                          const Standard_Integer     theShapeType,
225                          const Handle(GEOM_Object)& theAx1,
226                          const GEOMAlgo_State       theState);
227
228   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
229     GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
230                                      const Standard_Integer     theShapeType,
231                                      const Handle(GEOM_Object)& theAx1,
232                                      const Handle(GEOM_Object)& thePnt,
233                                      const GEOMAlgo_State       theState);
234
235   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
236     GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
237                             const Standard_Integer     theShapeType,
238                             const Handle(GEOM_Object)& theAxis,
239                             const Standard_Real        theRadius,
240                             const GEOMAlgo_State       theState);
241
242   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
243     GetShapesOnCylinderWithLocationIDs (const Handle(GEOM_Object)& theShape,
244                                         const Standard_Integer     theShapeType,
245                                         const Handle(GEOM_Object)& theAxis,
246                                         const Handle(GEOM_Object)& thePnt,
247                                         const Standard_Real        theRadius,
248                                         const GEOMAlgo_State       theState);
249
250   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
251     GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
252                           const Standard_Integer     theShapeType,
253                           const Handle(GEOM_Object)& theCenter,
254                           const Standard_Real        theRadius,
255                           const GEOMAlgo_State       theState);
256
257   /*!
258    * \brief Find sub-shapes complying with given status about quadrangle
259     * \param theShape - the shape to explore
260     * \param theShapeType - type of sub-shape of theShape
261     * \param theTopLeftPoint - top left quadrangle corner
262     * \param theTopRigthPoint - top right quadrangle corner
263     * \param theBottomLeftPoint - bottom left quadrangle corner
264     * \param theBottomRigthPoint - bottom right quadrangle corner
265     * \param theState - required state
266     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
267    */
268   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
269     GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
270                            const Standard_Integer     theShapeType,
271                            const Handle(GEOM_Object)& theTopLeftPoint,
272                            const Handle(GEOM_Object)& theTopRigthPoint,
273                            const Handle(GEOM_Object)& theBottomLeftPoint,
274                            const Handle(GEOM_Object)& theBottomRigthPoint,
275                            const GEOMAlgo_State       theState);
276
277   /*!
278    * \brief Find IDs of sub-shapes complying with given status about quadrangle
279     * \param theShape - the shape to explore
280     * \param theShapeType - type of sub-shape of theShape
281     * \param theTopLeftPoint - top left quadrangle corner
282     * \param theTopRigthPoint - top right quadrangle corner
283     * \param theBottomLeftPoint - bottom left quadrangle corner
284     * \param theBottomRigthPoint - bottom right quadrangle corner
285     * \param theState - required state
286     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
287    */
288   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
289     GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
290                               const Standard_Integer     theShapeType,
291                               const Handle(GEOM_Object)& theTopLeftPoint,
292                               const Handle(GEOM_Object)& theTopRigthPoint,
293                               const Handle(GEOM_Object)& theBottomLeftPoint,
294                               const Handle(GEOM_Object)& theBottomRigthPoint,
295                               const GEOMAlgo_State       theState);
296
297   Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object)    theShape,
298                                                               const Standard_Integer theShapeType,
299                                                               Handle(GEOM_Object)    theAxis,
300                                                               const Standard_Real    theRadius);
301
302   Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object)    theShape,
303                                                             const Standard_Integer theShapeType,
304                                                             Handle(GEOM_Object)    theCenter,
305                                                             const Standard_Real    theRadius);
306
307   void GetShapeProperties(const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt & aPnt);
308
309   Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
310                                                   Handle(GEOM_Object) theShapeWhat);
311
312   Standard_EXPORT Handle(GEOM_Object) GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
313                                                      Handle(GEOM_Object) theShapeWhat);
314
315   Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
316                                                            Handle(GEOM_Object) theShapeWhat);
317
318   /*!
319    * \brief Searches a shape equal to theWhat in the context of theWhere
320    * \param theShapeWhere - a context shap
321    * \param theShapeWhat - a sample shape
322    * \retval Handle(GEOM_Object) - found shape
323    */
324   Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
325                                               const Handle(GEOM_Object)& theShapeWhat);
326
327   /*!
328    * \brief Searches a shape equal to theWhat in the context of theWhere
329    * \param theShapeWhere - a context shap
330    * \param theShapeWhat - a sample shape
331    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
332    */
333   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)& theShapeWhere,
334                                                                  const Handle(GEOM_Object)& theShapeWhat);
335
336   /*!
337    * \brief Find IDs of sub-shapes complying with given status about surface
338     * \param theBox - the box to check state of sub-shapes against
339     * \param theShape - the shape to explore
340     * \param theShapeType - type of sub-shape of theShape
341     * \param theState - required state
342     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
343    */
344   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
345                               GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
346                                                 const Handle(GEOM_Object)& theShape,
347                                                 const Standard_Integer theShapeType,
348                                                 GEOMAlgo_State theState);
349
350   /*!
351    * \brief Find sub-shapes complying with given status about surface
352    * \param theBox - the box to check state of sub-shapes against
353    * \param theShape - the shape to explore
354    * \param theShapeType - type of sub-shape of theShape
355    * \param theState - required state
356    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
357    */
358   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
359                              GetShapesOnBox(const Handle(GEOM_Object)& theBox,
360                                             const Handle(GEOM_Object)& theShape,
361                                             const Standard_Integer theShapeType,
362                                             GEOMAlgo_State theState);
363
364   /*!
365    * \brief Find IDs of sub-shapes complying with given status about surface
366    * \param theCheckShape - the shape to check state of sub-shapes against
367    * \param theShape - the shape to explore
368    * \param theShapeType - type of sub-shape of theShape
369    * \param theState - required state
370    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
371    */
372   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
373                    GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
374                                        const Handle(GEOM_Object)& theShape,
375                                        const Standard_Integer theShapeType,
376                                        GEOMAlgo_State theState);
377
378   /*!
379    * \brief Find sub-shapes complying with given status about surface
380    * \param theCheckShape - the shape to check state of sub-shapes against
381    * \param theShape - the shape to explore
382    * \param theShapeType - type of sub-shape of theShape
383    * \param theState - required state
384    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
385    */
386   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
387                       GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
388                                        const Handle(GEOM_Object)& theShape,
389                                        const Standard_Integer theShapeType,
390                                        GEOMAlgo_State theState);
391   Standard_EXPORT Handle(GEOM_Object)
392             GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
393                                        const Handle(GEOM_Object)& theShape,
394                                        const Standard_Integer theShapeType,
395                                        GEOMAlgo_State theState);
396
397   Standard_EXPORT Handle(GEOM_Object)
398                             ExtendEdge(const Handle(GEOM_Object) &theEdge,
399                                        const Standard_Real        theMin,
400                                        const Standard_Real        theMax);
401
402   Standard_EXPORT Handle(GEOM_Object)
403                             ExtendFace(const Handle(GEOM_Object) &theFace,
404                                        const Standard_Real        theUMin,
405                                        const Standard_Real        theUMax,
406                                        const Standard_Real        theVMin,
407                                        const Standard_Real        theVMax);
408
409   Standard_EXPORT Handle(GEOM_Object)
410                    MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace);
411
412  private:
413   Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)>      theShapes,
414                                  const Standard_Integer         theObjectType,
415                                  const Standard_Integer         theFunctionType,
416                                  const TCollection_AsciiString& theMethodName);
417
418 // ----------------------------------------------------
419 // methods common for all GetShapesOnXXX() functions
420 // ----------------------------------------------------
421
422   /*!
423    * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
424    * \param theShapeType - the shape type to check
425    * \retval bool  - result of the check
426    */
427   bool checkTypeShapesOn(const Standard_Integer theShapeType);
428
429   /*!
430    * \brief Creates Geom_Plane
431    * \param theAx1 - edge defining plane normal
432    * \retval Handle(Geom_Surface) - resulting surface
433    */
434   Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1);
435
436   /*!
437    * \brief Creates Geom_CylindricalSurface
438    * \param theAx1 - edge defining cylinder axis
439    * \param theRadius - cylinder radius
440    * \retval Handle(Geom_Surface) - resulting surface
441    */
442   Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1,
443                                     const Standard_Real theRadius);
444
445   /*!
446    * \brief Find IDs of sub-shapes complying with given status about surface
447    * \param theSurface - the surface to check state of sub-shapes against
448    * \param theShape - the shape to explore
449    * \param theShapeType - type of sub-shape of theShape
450    * \param theState - required state
451    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
452    */
453   Handle(TColStd_HSequenceOfInteger)
454     getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
455                           const TopoDS_Shape&         theShape,
456                           TopAbs_ShapeEnum            theShapeType,
457                           GEOMAlgo_State              theState);
458
459   /*!
460    * \brief Find sub-shapes complying with given status about surface
461    * \param theSurface - the surface to check state of sub-shapes against
462    * \param theShape - the shape to explore
463    * \param theShapeType - type of sub-shape of theShape
464    * \param theState - required state
465    * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
466    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
467    */
468   Handle(TColStd_HSequenceOfTransient)
469     getShapesOnSurface(const Handle(Geom_Surface)& theSurface,
470                        const Handle(GEOM_Object)&  theShape,
471                        TopAbs_ShapeEnum            theShapeType,
472                        GEOMAlgo_State              theState,
473                        TCollection_AsciiString &   theShapeEntries);
474
475   /*!
476    * \brief Find IDs of sub-shapes complying with given status about quadrangle
477    * \param theShape - the shape to explore
478    * \param theShapeType - type of sub-shape of theShape
479    * \param theTopLeftPoint - top left quadrangle corner
480    * \param theTopRigthPoint - top right quadrangle corner
481    * \param theBottomLeftPoint - bottom left quadrangle corner
482    * \param theBottomRigthPoint - bottom right quadrangle corner
483    * \param theState - required state
484    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
485    */
486   Handle(TColStd_HSequenceOfInteger)
487     getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
488                               const Standard_Integer     theShapeType,
489                               const Handle(GEOM_Object)& theTopLeftPoint,
490                               const Handle(GEOM_Object)& theTopRigthPoint,
491                               const Handle(GEOM_Object)& theBottomLeftPoint,
492                               const Handle(GEOM_Object)& theBottomRigthPoint,
493                               const GEOMAlgo_State       theState);
494
495   /*!
496    * \brief Find IDs of sub-shapes complying with given status about surface
497    * \param theBox - the box to check state of sub-shapes against
498    * \param theShape - the shape to explore
499    * \param theShapeType - type of sub-shape of theShape
500    * \param theState - required state
501    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
502    */
503   Handle(TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
504                                                        const Handle(GEOM_Object)& theShape,
505                                                        const Standard_Integer theShapeType,
506                                                        GEOMAlgo_State theState);
507
508   /*!
509    * \brief Find IDs of sub-shapes complying with given status about surface
510    * \param theCheckShape - the shape to check state of sub-shapes against
511    * \param theShape - the shape to explore
512    * \param theShapeType - type of sub-shape of theShape
513    * \param theState - required state
514    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
515    */
516   Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs
517                                       (const Handle(GEOM_Object)& theCheckShape,
518                                        const Handle(GEOM_Object)& theShape,
519                                        const Standard_Integer theShapeType,
520                                        GEOMAlgo_State theState);
521
522   /*!
523    * \brief Find shape objects and their entries by their ids
524    * \param theShape - the main shape
525    * \param theShapeIDs - theShapeIDs - incoming shape ids
526    * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
527    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
528    */
529   Handle(TColStd_HSequenceOfTransient)
530     getObjectsShapesOn(const Handle(GEOM_Object)&                theShape,
531                        const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
532                        TCollection_AsciiString &                 theShapeEntries);
533
534   /*!
535    * \brief Select the object created last
536    * \param theObj1 - Object 1
537    * \param theObj2 - Object 2
538    * \retval Handle(GEOM_Object) - selected object
539    */
540   static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1,
541                                             const Handle(GEOM_Object)& theObj2);
542 };
543
544 #endif