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