Salome HOME
0022746: [EDF] Improvement of Glue Faces and Glue Edges operations
[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) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
89
90   Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
91
92   Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
93
94   Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
95                                                      const Standard_Real theTolerance,
96                                                      const Standard_Boolean doKeepNonSolids);
97
98   Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
99                                                            const Standard_Real theTolerance,
100                                                            std::list<Handle(GEOM_Object)>& theFaces,
101                                                            const Standard_Boolean doKeepNonSolids,
102                                                            const Standard_Boolean doGlueAllEdges);
103
104   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
105                                                      const Standard_Real theTolerance);
106
107   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
108                                                                       const Standard_Real theTolerance,
109                                                                       const TopAbs_ShapeEnum theType);
110
111   Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
112                                                            const Standard_Real theTolerance,
113                                                            std::list<Handle(GEOM_Object)> & theEdges);
114
115   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
116                                                                              const Standard_Boolean theGroupsOnly);
117   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
118                                                                              const Standard_Integer theTypes = All);
119   
120   enum ExplodeType {
121     EXPLODE_OLD_INCLUDE_MAIN,
122     EXPLODE_NEW_INCLUDE_MAIN,
123     EXPLODE_NEW_EXCLUDE_MAIN
124   };
125
126   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
127     (Handle(GEOM_Object)    theShape,
128      const Standard_Integer theShapeType,
129      const Standard_Boolean isSorted,
130      const ExplodeType      theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
131
132   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs
133     (Handle(GEOM_Object)    theShape,
134      const Standard_Integer theShapeType,
135      const Standard_Boolean isSorted,
136      const ExplodeType      theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
137
138   Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object)    theMainShape,
139                                                    const Standard_Integer theID);
140
141   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeSubShapes
142     (Handle(GEOM_Object)              theMainShape,
143      Handle(TColStd_HArray1OfInteger) theIndices);
144
145   Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape,
146                                                      Handle(GEOM_Object) theSubShape);
147   
148   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSubShapesIndices (Handle(GEOM_Object) theMainShape,
149                                                                           std::list<Handle(GEOM_Object)> theSubShapes);
150
151   Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape,
152                                                      Handle(GEOM_Object) theSubShape);
153
154   Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
155
156   Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object)    theShape,
157                                                       const Standard_Integer theShapeType);
158
159   Standard_EXPORT Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
160
161   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
162
163   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
164     GetSharedShapes (Handle(GEOM_Object)    theShape1,
165                      Handle(GEOM_Object)    theShape2,
166                      const Standard_Integer theShapeType);
167
168   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
169     GetSharedShapes (std::list<Handle(GEOM_Object)> theShapes,
170                      const Standard_Integer         theShapeType);
171
172   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
173     GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
174                       const Standard_Integer     theShapeType,
175                       const Handle(GEOM_Object)& theAx1,
176                       const GEOMAlgo_State       theState);
177
178   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
179     GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
180                                   const Standard_Integer     theShapeType,
181                                   const Handle(GEOM_Object)& theAx1,
182                                   const Handle(GEOM_Object)& thePnt,
183                                   const GEOMAlgo_State       theState);
184
185
186   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
187     GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
188                          const Standard_Integer     theShapeType,
189                          const Handle(GEOM_Object)& theAxis,
190                          const Standard_Real        theRadius,
191                          const GEOMAlgo_State       theState);
192
193   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
194     GetShapesOnCylinderWithLocation (const Handle(GEOM_Object)& theShape,
195                                      const Standard_Integer     theShapeType,
196                                      const Handle(GEOM_Object)& theAxis,
197                                      const Handle(GEOM_Object)& thePnt,
198                                      const Standard_Real        theRadius,
199                                      const GEOMAlgo_State       theState);
200
201   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
202     GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
203                        const Standard_Integer     theShapeType,
204                        const Handle(GEOM_Object)& theCenter,
205                        const Standard_Real        theRadius,
206                        const GEOMAlgo_State       theState);
207
208   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
209     GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
210                          const Standard_Integer     theShapeType,
211                          const Handle(GEOM_Object)& theAx1,
212                          const GEOMAlgo_State       theState);
213
214   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
215     GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
216                                      const Standard_Integer     theShapeType,
217                                      const Handle(GEOM_Object)& theAx1,
218                                      const Handle(GEOM_Object)& thePnt,
219                                      const GEOMAlgo_State       theState);
220
221   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
222     GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
223                             const Standard_Integer     theShapeType,
224                             const Handle(GEOM_Object)& theAxis,
225                             const Standard_Real        theRadius,
226                             const GEOMAlgo_State       theState);
227
228   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
229     GetShapesOnCylinderWithLocationIDs (const Handle(GEOM_Object)& theShape,
230                                         const Standard_Integer     theShapeType,
231                                         const Handle(GEOM_Object)& theAxis,
232                                         const Handle(GEOM_Object)& thePnt,
233                                         const Standard_Real        theRadius,
234                                         const GEOMAlgo_State       theState);
235
236   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
237     GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
238                           const Standard_Integer     theShapeType,
239                           const Handle(GEOM_Object)& theCenter,
240                           const Standard_Real        theRadius,
241                           const GEOMAlgo_State       theState);
242
243   /*!
244    * \brief Find sub-shapes complying with given status about quadrangle
245     * \param theShape - the shape to explore
246     * \param theShapeType - type of sub-shape of theShape
247     * \param theTopLeftPoint - top left quadrangle corner
248     * \param theTopRigthPoint - top right quadrangle corner
249     * \param theBottomLeftPoint - bottom left quadrangle corner
250     * \param theBottomRigthPoint - bottom right quadrangle corner
251     * \param theState - required state
252     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
253    */
254   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
255     GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
256                            const Standard_Integer     theShapeType,
257                            const Handle(GEOM_Object)& theTopLeftPoint,
258                            const Handle(GEOM_Object)& theTopRigthPoint,
259                            const Handle(GEOM_Object)& theBottomLeftPoint,
260                            const Handle(GEOM_Object)& theBottomRigthPoint,
261                            const GEOMAlgo_State       theState);
262
263   /*!
264    * \brief Find IDs of sub-shapes complying with given status about quadrangle
265     * \param theShape - the shape to explore
266     * \param theShapeType - type of sub-shape of theShape
267     * \param theTopLeftPoint - top left quadrangle corner
268     * \param theTopRigthPoint - top right quadrangle corner
269     * \param theBottomLeftPoint - bottom left quadrangle corner
270     * \param theBottomRigthPoint - bottom right quadrangle corner
271     * \param theState - required state
272     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
273    */
274   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
275     GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
276                               const Standard_Integer     theShapeType,
277                               const Handle(GEOM_Object)& theTopLeftPoint,
278                               const Handle(GEOM_Object)& theTopRigthPoint,
279                               const Handle(GEOM_Object)& theBottomLeftPoint,
280                               const Handle(GEOM_Object)& theBottomRigthPoint,
281                               const GEOMAlgo_State       theState);
282
283   Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object)    theShape,
284                                                               const Standard_Integer theShapeType,
285                                                               Handle(GEOM_Object)    theAxis,
286                                                               const Standard_Real    theRadius);
287
288   Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object)    theShape,
289                                                             const Standard_Integer theShapeType,
290                                                             Handle(GEOM_Object)    theCenter,
291                                                             const Standard_Real    theRadius);
292
293   void GetShapeProperties(const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt & aPnt);
294
295   Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
296                                                   Handle(GEOM_Object) theShapeWhat);
297
298   Standard_EXPORT Handle(GEOM_Object) GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
299                                                      Handle(GEOM_Object) theShapeWhat);
300
301   Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
302                                                            Handle(GEOM_Object) theShapeWhat);
303
304   /*!
305    * \brief Searches a shape equal to theWhat in the context of theWhere
306    * \param theShapeWhere - a context shap
307    * \param theShapeWhat - a sample shape
308    * \retval Handle(GEOM_Object) - found shape
309    */
310   Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
311                                               const Handle(GEOM_Object)& theShapeWhat);
312
313   /*!
314    * \brief Searches a shape equal to theWhat in the context of theWhere
315    * \param theShapeWhere - a context shap
316    * \param theShapeWhat - a sample shape
317    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
318    */
319   Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)& theShapeWhere,
320                                                                  const Handle(GEOM_Object)& theShapeWhat);
321
322   /*!
323    * \brief Find IDs of sub-shapes complying with given status about surface
324     * \param theBox - the box to check state of sub-shapes against
325     * \param theShape - the shape to explore
326     * \param theShapeType - type of sub-shape of theShape
327     * \param theState - required state
328     * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
329    */
330   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
331                               GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
332                                                 const Handle(GEOM_Object)& theShape,
333                                                 const Standard_Integer theShapeType,
334                                                 GEOMAlgo_State theState);
335
336   /*!
337    * \brief Find 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_HSequenceOfTransient) - found shape objects
343    */
344   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
345                              GetShapesOnBox(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 IDs of sub-shapes complying with given status about surface
352    * \param theCheckShape - the shape 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_HSequenceOfInteger) - IDs of found sub-shapes
357    */
358   Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
359                    GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
360                                        const Handle(GEOM_Object)& theShape,
361                                        const Standard_Integer theShapeType,
362                                        GEOMAlgo_State theState);
363
364   /*!
365    * \brief Find 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_HSequenceOfTransient) - found shape objects
371    */
372   Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
373                       GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
374                                        const Handle(GEOM_Object)& theShape,
375                                        const Standard_Integer theShapeType,
376                                        GEOMAlgo_State theState);
377   Standard_EXPORT Handle(GEOM_Object)
378             GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
379                                        const Handle(GEOM_Object)& theShape,
380                                        const Standard_Integer theShapeType,
381                                        GEOMAlgo_State theState);
382
383  private:
384   Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)>      theShapes,
385                                  const Standard_Integer         theObjectType,
386                                  const Standard_Integer         theFunctionType,
387                                  const TCollection_AsciiString& theMethodName);
388
389 // ----------------------------------------------------
390 // methods common for all GetShapesOnXXX() functions
391 // ----------------------------------------------------
392
393   /*!
394    * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
395    * \param theShapeType - the shape type to check
396    * \retval bool  - result of the check
397    */
398   bool checkTypeShapesOn(const Standard_Integer theShapeType);
399
400   /*!
401    * \brief Creates Geom_Plane
402    * \param theAx1 - edge defining plane normal
403    * \retval Handle(Geom_Surface) - resulting surface
404    */
405   Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1);
406
407   /*!
408    * \brief Creates Geom_CylindricalSurface
409    * \param theAx1 - edge defining cylinder axis
410    * \param theRadius - cylinder radius
411    * \retval Handle(Geom_Surface) - resulting surface
412    */
413   Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1,
414                                     const Standard_Real theRadius);
415
416   /*!
417    * \brief Find IDs of sub-shapes complying with given status about surface
418    * \param theSurface - the surface to check state of sub-shapes against
419    * \param theShape - the shape to explore
420    * \param theShapeType - type of sub-shape of theShape
421    * \param theState - required state
422    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
423    */
424   Handle(TColStd_HSequenceOfInteger)
425     getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
426                           const TopoDS_Shape&         theShape,
427                           TopAbs_ShapeEnum            theShapeType,
428                           GEOMAlgo_State              theState);
429
430   /*!
431    * \brief Find sub-shapes complying with given status about surface
432    * \param theSurface - the surface to check state of sub-shapes against
433    * \param theShape - the shape to explore
434    * \param theShapeType - type of sub-shape of theShape
435    * \param theState - required state
436    * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
437    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
438    */
439   Handle(TColStd_HSequenceOfTransient)
440     getShapesOnSurface(const Handle(Geom_Surface)& theSurface,
441                        const Handle(GEOM_Object)&  theShape,
442                        TopAbs_ShapeEnum            theShapeType,
443                        GEOMAlgo_State              theState,
444                        TCollection_AsciiString &   theShapeEntries);
445
446   /*!
447    * \brief Find IDs of sub-shapes complying with given status about quadrangle
448    * \param theShape - the shape to explore
449    * \param theShapeType - type of sub-shape of theShape
450    * \param theTopLeftPoint - top left quadrangle corner
451    * \param theTopRigthPoint - top right quadrangle corner
452    * \param theBottomLeftPoint - bottom left quadrangle corner
453    * \param theBottomRigthPoint - bottom right quadrangle corner
454    * \param theState - required state
455    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
456    */
457   Handle(TColStd_HSequenceOfInteger)
458     getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
459                               const Standard_Integer     theShapeType,
460                               const Handle(GEOM_Object)& theTopLeftPoint,
461                               const Handle(GEOM_Object)& theTopRigthPoint,
462                               const Handle(GEOM_Object)& theBottomLeftPoint,
463                               const Handle(GEOM_Object)& theBottomRigthPoint,
464                               const GEOMAlgo_State       theState);
465
466   /*!
467    * \brief Find IDs of sub-shapes complying with given status about surface
468    * \param theBox - the box to check state of sub-shapes against
469    * \param theShape - the shape to explore
470    * \param theShapeType - type of sub-shape of theShape
471    * \param theState - required state
472    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
473    */
474   Handle(TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
475                                                        const Handle(GEOM_Object)& theShape,
476                                                        const Standard_Integer theShapeType,
477                                                        GEOMAlgo_State theState);
478
479   /*!
480    * \brief Find IDs of sub-shapes complying with given status about surface
481    * \param theCheckShape - the shape to check state of sub-shapes against
482    * \param theShape - the shape to explore
483    * \param theShapeType - type of sub-shape of theShape
484    * \param theState - required state
485    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
486    */
487   Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs
488                                       (const Handle(GEOM_Object)& theCheckShape,
489                                        const Handle(GEOM_Object)& theShape,
490                                        const Standard_Integer theShapeType,
491                                        GEOMAlgo_State theState);
492
493   /*!
494    * \brief Find shape objects and their entries by their ids
495    * \param theShape - the main shape
496    * \param theShapeIDs - theShapeIDs - incoming shape ids
497    * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
498    * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
499    */
500   Handle(TColStd_HSequenceOfTransient)
501     getObjectsShapesOn(const Handle(GEOM_Object)&                theShape,
502                        const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
503                        TCollection_AsciiString &                 theShapeEntries);
504
505   /*!
506    * \brief Select the object created last
507    * \param theObj1 - Object 1
508    * \param theObj2 - Object 2
509    * \retval Handle(GEOM_Object) - selected object
510    */
511   static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1,
512                                             const Handle(GEOM_Object)& theObj2);
513 };
514
515 #endif