1 // Copyright (C) 2007-2024 CEA, EDF, 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 //=============================================================================
24 // File : GEOMImpl_IShapesOperations.hxx
26 // Author : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
28 //=============================================================================
30 #ifndef _GEOMImpl_IShapesOperations_HXX_
31 #define _GEOMImpl_IShapesOperations_HXX_
33 #include "GEOM_IOperations.hxx"
35 #include "GEOMAlgo_State.hxx"
36 #include "GEOMUtils.hxx"
38 #include <TColStd_HSequenceOfTransient.hxx>
39 #include <TColStd_HSequenceOfInteger.hxx>
40 #include <TColStd_HArray1OfInteger.hxx>
42 #include <Geom_Surface.hxx>
51 enum GEOMImpl_WireBuildMode {
52 GEOMImpl_WBM_FixTolerance = 1,
53 GEOMImpl_WBM_Approximation = 2,
54 GEOMImpl_WBM_KeepCurveType = 3
57 class GEOMImpl_IShapesOperations : public GEOM_IOperations
66 All = Groups | Fields | SubShapes,
70 * This enumeration represents an extraction statistics type.
72 enum ExtractionStatType
74 EST_Removed, ///< Removed sub-shapes
75 EST_Modified, ///< Modified sub-shapes
76 EST_Added ///< Newly created sub-shapes
80 * This structure defines a format of extraction statistics.
84 ExtractionStatType type; ///< Type of extraction statistics.
85 std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
88 Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
89 Standard_EXPORT ~GEOMImpl_IShapesOperations();
91 Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
92 Handle(GEOM_Object) thePoint2);
94 Standard_EXPORT Handle(GEOM_Object) MakeEdgeOnCurveByLength (Handle(GEOM_Object) theCurve,
95 const Standard_Real theLength,
96 Handle(GEOM_Object) theStartPoint);
98 Standard_EXPORT Handle(GEOM_Object) MakeEdgeWire (Handle(GEOM_Object) theWire,
99 const Standard_Real theLinearTolerance,
100 const Standard_Real theAngularTolerance);
102 Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
103 const Standard_Real theTolerance,
104 const GEOMImpl_WireBuildMode theMode = GEOMImpl_WBM_FixTolerance);
106 Standard_EXPORT Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
108 Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
109 const bool isPlanarWanted);
111 Standard_EXPORT Handle(GEOM_Object) MakeFaceFromSurface
112 (Handle(GEOM_Object) theFace,
113 Handle(GEOM_Object) theWire);
115 Standard_EXPORT Handle(GEOM_Object) MakeWrappedFace(std::list<Handle(GEOM_Object)> theEdges,
116 std::list<Handle(GEOM_Object)> theVertices,
117 const Standard_Real theTolerance);
119 Standard_EXPORT Handle(GEOM_Object) MakeFaceWithConstraints (std::list<Handle(GEOM_Object)> theConstraints);
121 Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
123 Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
125 Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
127 Standard_EXPORT Handle(GEOM_Object) MakeSolidFromConnectedFaces (std::list<Handle(GEOM_Object)> theFacesOrShells,
128 const Standard_Boolean isIntersect);
130 Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
131 const Standard_Real theTolerance,
132 const Standard_Boolean doKeepNonSolids);
134 Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
135 const Standard_Real theTolerance,
136 std::list<Handle(GEOM_Object)>& theFaces,
137 const Standard_Boolean doKeepNonSolids,
138 const Standard_Boolean doGlueAllEdges);
140 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
141 const Standard_Real theTolerance);
143 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
144 const Standard_Real theTolerance,
145 const TopAbs_ShapeEnum theType);
147 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
148 const Standard_Real theTolerance,
149 std::list<Handle(GEOM_Object)> & theEdges);
151 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
152 const Standard_Boolean theGroupsOnly);
153 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
154 const Standard_Integer theTypes = All);
157 EXPLODE_OLD_INCLUDE_MAIN,
158 EXPLODE_NEW_INCLUDE_MAIN,
159 EXPLODE_NEW_EXCLUDE_MAIN
162 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
163 (Handle(GEOM_Object) theShape,
164 const Standard_Integer theShapeType,
165 const Standard_Boolean isSorted,
166 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
168 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs
169 (Handle(GEOM_Object) theShape,
170 const Standard_Integer theShapeType,
171 const Standard_Boolean isSorted,
172 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
174 Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape,
175 const Standard_Integer theID);
177 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeSubShapes
178 (Handle(GEOM_Object) theMainShape,
179 Handle(TColStd_HArray1OfInteger) theIndices);
181 Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape,
182 Handle(GEOM_Object) theSubShape);
184 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSubShapesIndices (Handle(GEOM_Object) theMainShape,
185 std::list<Handle(GEOM_Object)> theSubShapes);
187 Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape,
188 Handle(GEOM_Object) theSubShape);
190 Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
192 Standard_EXPORT Standard_Boolean IsSubShapeBelongsTo(Handle(GEOM_Object) theSubObject,
193 const Standard_Integer theSubObjectIndex,
194 Handle(GEOM_Object) theObject,
195 const Standard_Integer theObjectIndex);
197 Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object) theShape,
198 const Standard_Integer theShapeType);
200 Standard_EXPORT Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
202 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
204 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
205 GetSharedShapes (Handle(GEOM_Object) theShape1,
206 Handle(GEOM_Object) theShape2,
207 const Standard_Integer theShapeType);
209 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
210 GetSharedShapes (std::list<Handle(GEOM_Object)>& theShapes,
211 const Standard_Integer theShapeType,
212 const bool theMultiShare = true);
214 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
215 GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
216 const Standard_Integer theShapeType,
217 const Handle(GEOM_Object)& theAx1,
218 const GEOMAlgo_State theState);
220 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
221 GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
222 const Standard_Integer theShapeType,
223 const Handle(GEOM_Object)& theAx1,
224 const Handle(GEOM_Object)& thePnt,
225 const GEOMAlgo_State theState);
228 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
229 GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
230 const Standard_Integer theShapeType,
231 const Handle(GEOM_Object)& theAxis,
232 const Standard_Real theRadius,
233 const GEOMAlgo_State theState);
235 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
236 GetShapesOnCylinderWithLocation (const Handle(GEOM_Object)& theShape,
237 const Standard_Integer theShapeType,
238 const Handle(GEOM_Object)& theAxis,
239 const Handle(GEOM_Object)& thePnt,
240 const Standard_Real theRadius,
241 const GEOMAlgo_State theState);
243 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
244 GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
245 const Standard_Integer theShapeType,
246 const Handle(GEOM_Object)& theCenter,
247 const Standard_Real theRadius,
248 const GEOMAlgo_State theState);
250 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
251 GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
252 const Standard_Integer theShapeType,
253 const Handle(GEOM_Object)& theAx1,
254 const GEOMAlgo_State theState);
256 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
257 GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
258 const Standard_Integer theShapeType,
259 const Handle(GEOM_Object)& theAx1,
260 const Handle(GEOM_Object)& thePnt,
261 const GEOMAlgo_State theState);
263 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
264 GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
265 const Standard_Integer theShapeType,
266 const Handle(GEOM_Object)& theAxis,
267 const Standard_Real theRadius,
268 const GEOMAlgo_State theState);
270 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
271 GetShapesOnCylinderWithLocationIDs (const Handle(GEOM_Object)& theShape,
272 const Standard_Integer theShapeType,
273 const Handle(GEOM_Object)& theAxis,
274 const Handle(GEOM_Object)& thePnt,
275 const Standard_Real theRadius,
276 const GEOMAlgo_State theState);
278 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
279 GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
280 const Standard_Integer theShapeType,
281 const Handle(GEOM_Object)& theCenter,
282 const Standard_Real theRadius,
283 const GEOMAlgo_State theState);
286 * \brief Find sub-shapes complying with given status about quadrangle
287 * \param theShape - the shape to explore
288 * \param theShapeType - type of sub-shape of theShape
289 * \param theTopLeftPoint - top left quadrangle corner
290 * \param theTopRightPoint - top right quadrangle corner
291 * \param theBottomLeftPoint - bottom left quadrangle corner
292 * \param theBottomRightPoint - bottom right quadrangle corner
293 * \param theState - required state
294 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
296 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
297 GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
298 const Standard_Integer theShapeType,
299 const Handle(GEOM_Object)& theTopLeftPoint,
300 const Handle(GEOM_Object)& theTopRightPoint,
301 const Handle(GEOM_Object)& theBottomLeftPoint,
302 const Handle(GEOM_Object)& theBottomRightPoint,
303 const GEOMAlgo_State theState);
306 * \brief Find IDs of sub-shapes complying with given status about quadrangle
307 * \param theShape - the shape to explore
308 * \param theShapeType - type of sub-shape of theShape
309 * \param theTopLeftPoint - top left quadrangle corner
310 * \param theTopRightPoint - top right quadrangle corner
311 * \param theBottomLeftPoint - bottom left quadrangle corner
312 * \param theBottomRightPoint - bottom right quadrangle corner
313 * \param theState - required state
314 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
316 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
317 GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
318 const Standard_Integer theShapeType,
319 const Handle(GEOM_Object)& theTopLeftPoint,
320 const Handle(GEOM_Object)& theTopRightPoint,
321 const Handle(GEOM_Object)& theBottomLeftPoint,
322 const Handle(GEOM_Object)& theBottomRightPoint,
323 const GEOMAlgo_State theState);
325 Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
326 const Standard_Integer theShapeType,
327 Handle(GEOM_Object) theAxis,
328 const Standard_Real theRadius);
330 Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object) theShape,
331 const Standard_Integer theShapeType,
332 Handle(GEOM_Object) theCenter,
333 const Standard_Real theRadius);
335 Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
336 Handle(GEOM_Object) theShapeWhat);
338 Standard_EXPORT Handle(GEOM_Object) GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
339 Handle(GEOM_Object) theShapeWhat);
341 Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
342 Handle(GEOM_Object) theShapeWhat);
344 Standard_EXPORT void GetInPlaceMap (Handle(GEOM_Object) theShapeWhere,
345 Handle(GEOM_Object) theShapeWhat,
346 std::vector< std::vector< int > > & theResVec);
349 * \brief Searches a shape equal to theWhat in the context of theWhere
350 * \param theShapeWhere - a context shap
351 * \param theShapeWhat - a sample shape
352 * \retval Handle(GEOM_Object) - found shape
354 Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
355 const Handle(GEOM_Object)& theShapeWhat);
358 * \brief Searches a shape equal to theWhat in the context of theWhere
359 * \param theShapeWhere - a context shap
360 * \param theShapeWhat - a sample shape
361 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
363 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)& theShapeWhere,
364 const Handle(GEOM_Object)& theShapeWhat);
367 * \brief Find IDs of sub-shapes complying with given status about surface
368 * \param theBox - the box to check state of sub-shapes against
369 * \param theShape - the shape to explore
370 * \param theShapeType - type of sub-shape of theShape
371 * \param theState - required state
372 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
374 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
375 GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
376 const Handle(GEOM_Object)& theShape,
377 const Standard_Integer theShapeType,
378 GEOMAlgo_State theState);
381 * \brief Find sub-shapes complying with given status about surface
382 * \param theBox - the box to check state of sub-shapes against
383 * \param theShape - the shape to explore
384 * \param theShapeType - type of sub-shape of theShape
385 * \param theState - required state
386 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
388 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
389 GetShapesOnBox(const Handle(GEOM_Object)& theBox,
390 const Handle(GEOM_Object)& theShape,
391 const Standard_Integer theShapeType,
392 GEOMAlgo_State theState);
395 * \brief Find IDs of sub-shapes complying with given status about surface
396 * \param theCheckShape - the shape to check state of sub-shapes against
397 * \param theShape - the shape to explore
398 * \param theShapeType - type of sub-shape of theShape
399 * \param theState - required state
400 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
402 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
403 GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
404 const Handle(GEOM_Object)& theShape,
405 const Standard_Integer theShapeType,
406 GEOMAlgo_State theState);
409 * \brief Find sub-shapes complying with given status about surface
410 * \param theCheckShape - the shape to check state of sub-shapes against
411 * \param theShape - the shape to explore
412 * \param theShapeType - type of sub-shape of theShape
413 * \param theState - required state
414 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
416 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
417 GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
418 const Handle(GEOM_Object)& theShape,
419 const Standard_Integer theShapeType,
420 GEOMAlgo_State theState);
421 Standard_EXPORT Handle(GEOM_Object)
422 GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
423 const Handle(GEOM_Object)& theShape,
424 const Standard_Integer theShapeType,
425 GEOMAlgo_State theState);
428 * \brief Resize the input edge with the new Min and Max parameters.
429 * The input edge parameters range is [0, 1]. If theMin parameter is
430 * negative, the input edge is extended, otherwise it is shrinked by
431 * theMin parameter. If theMax is greater than 1, the edge is extended,
432 * otherwise it is shrinked by theMax parameter
433 * \param theEdge the input edge to be resized
434 * \param theMin the minimal parameter value
435 * \param theMax the maximal parameter value
436 * \retval Handle(GEOM_Object) - newly created edge
438 Standard_EXPORT Handle(GEOM_Object)
439 ExtendEdge(const Handle(GEOM_Object)& theEdge,
440 const Standard_Real theMin,
441 const Standard_Real theMax);
444 * \brief Resize the input face with the new UMin, UMax, VMin and VMax
445 * parameters. The input face U and V parameters range is [0, 1]. If
446 * theUMin parameter is negative, the input face is extended, otherwise
447 * it is shrinked along U direction by theUMin parameter. If theUMax is
448 * greater than 1, the face is extended, otherwise it is shrinked along
449 * U direction by theUMax parameter. So as for theVMin, theVMax and
450 * V direction of the input face.
451 * \param theFace the input face to be resized
452 * \param theUMin the minimal U parameter value
453 * \param theUMax the maximal U parameter value
454 * \param theVMin the minimal V parameter value
455 * \param theVMax the maximal V parameter value
456 * \retval Handle(GEOM_Object) - newly created face
458 Standard_EXPORT Handle(GEOM_Object)
459 ExtendFace(const Handle(GEOM_Object)& theFace,
460 const Standard_Real theUMin,
461 const Standard_Real theUMax,
462 const Standard_Real theVMin,
463 const Standard_Real theVMax);
466 * \brief Make a surface from a face. This function takes some face as
467 * input parameter and creates new GEOM_Object, i.e. topological shape
468 * by extracting underlying surface of the source face and limiting it
469 * by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
470 * parametrical space).
471 * \param theFace the input face
472 * \retval Handle(GEOM_Object) - newly created face
474 Standard_EXPORT Handle(GEOM_Object)
475 MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace);
478 * \brief Explode a shape into edges sorted in a row from a starting point.
479 * \param theShape - the shape to be exploded on edges.
480 * \param theStartPoint - the starting point.
481 * \return Ordered list of edges sorted in a row from a starting point.
483 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
484 GetSubShapeEdgeSorted (const Handle(GEOM_Object) &theShape,
485 const Handle(GEOM_Object) &theStartPoint);
488 * \brief Return the list of subshapes that satisfies a certain tolerance
489 * criterion. The user defines the type of shapes to be returned, the
490 * condition and the tolerance value. The operation is defined for
491 * faces, edges and vertices only. E.g. for theShapeType FACE, theCondition
492 * CC_GT and theTolerance 1.e-7 this method returns all faces of theShape
493 * that have tolerances greater then 1.e7.
495 * \param theShape the shape to be exploded
496 * \param theShapeType the type of shapes to be returned. Can have the
497 * values FACE, EDGE and VERTEX only.
498 * \param theCondition the condition type.
499 * \param theTolerance the tolerance filter.
500 * \return the list of shapes that satisfy the conditions.
502 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetSubShapesWithTolerance
503 (const Handle(GEOM_Object) &theShape,
504 const Standard_Integer theShapeType,
505 const GEOMUtils::ComparisonCondition theCondition,
506 const Standard_Real theTolerance);
509 * \brief Return the shape that is constructed from theShape without
510 * extracted sub-shapes from the input list.
512 * \param theShape the original shape.
513 * \param theSubShapeIDs the list of sub-shape IDs to be extracted from
514 * the original shape.
515 * \param theStats the operation statistics. Output parameter.
516 * \return the shape without extracted sub-shapes.
518 Standard_EXPORT Handle(GEOM_Object) MakeExtraction
519 (const Handle(GEOM_Object) &theShape,
520 const Handle(TColStd_HArray1OfInteger) &theSubShapeIDs,
521 std::list<ExtractionStat> &theStats);
524 Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)> theShapes,
525 const Standard_Integer theObjectType,
526 const Standard_Integer theFunctionType,
527 const TCollection_AsciiString& theMethodName);
529 // ----------------------------------------------------
530 // methods common for all GetShapesOnXXX() functions
531 // ----------------------------------------------------
534 * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
535 * \param theShapeType - the shape type to check
536 * \retval bool - result of the check
538 bool checkTypeShapesOn(const Standard_Integer theShapeType);
541 * \brief Creates Geom_Plane
542 * \param theAx1 - edge defining plane normal
543 * \retval Handle(Geom_Surface) - resulting surface
545 Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1);
548 * \brief Creates Geom_CylindricalSurface
549 * \param theAx1 - edge defining cylinder axis
550 * \param theRadius - cylinder radius
551 * \retval Handle(Geom_Surface) - resulting surface
553 Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1,
554 const Standard_Real theRadius);
557 * \brief Find IDs of sub-shapes complying with given status about surface
558 * \param theSurface - the surface to check state of sub-shapes against
559 * \param theShape - the shape to explore
560 * \param theShapeType - type of sub-shape of theShape
561 * \param theState - required state
562 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
564 Handle(TColStd_HSequenceOfInteger)
565 getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
566 const TopoDS_Shape& theShape,
567 TopAbs_ShapeEnum theShapeType,
568 GEOMAlgo_State theState);
571 * \brief Find sub-shapes complying with given status about surface
572 * \param theSurface - the surface to check state of sub-shapes against
573 * \param theShape - the shape to explore
574 * \param theShapeType - type of sub-shape of theShape
575 * \param theState - required state
576 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
577 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
579 Handle(TColStd_HSequenceOfTransient)
580 getShapesOnSurface(const Handle(Geom_Surface)& theSurface,
581 const Handle(GEOM_Object)& theShape,
582 TopAbs_ShapeEnum theShapeType,
583 GEOMAlgo_State theState,
584 TCollection_AsciiString & theShapeEntries);
587 * \brief Find IDs of sub-shapes complying with given status about quadrangle
588 * \param theShape - the shape to explore
589 * \param theShapeType - type of sub-shape of theShape
590 * \param theTopLeftPoint - top left quadrangle corner
591 * \param theTopRightPoint - top right quadrangle corner
592 * \param theBottomLeftPoint - bottom left quadrangle corner
593 * \param theBottomRightPoint - bottom right quadrangle corner
594 * \param theState - required state
595 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
597 Handle(TColStd_HSequenceOfInteger)
598 getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
599 const Standard_Integer theShapeType,
600 const Handle(GEOM_Object)& theTopLeftPoint,
601 const Handle(GEOM_Object)& theTopRightPoint,
602 const Handle(GEOM_Object)& theBottomLeftPoint,
603 const Handle(GEOM_Object)& theBottomRightPoint,
604 const GEOMAlgo_State theState);
607 * \brief Find IDs of sub-shapes complying with given status about surface
608 * \param theBox - the box to check state of sub-shapes against
609 * \param theShape - the shape to explore
610 * \param theShapeType - type of sub-shape of theShape
611 * \param theState - required state
612 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
614 Handle(TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
615 const Handle(GEOM_Object)& theShape,
616 const Standard_Integer theShapeType,
617 GEOMAlgo_State theState);
620 * \brief Find IDs of sub-shapes complying with given status about surface
621 * \param theCheckShape - the shape to check state of sub-shapes against
622 * \param theShape - the shape to explore
623 * \param theShapeType - type of sub-shape of theShape
624 * \param theState - required state
625 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
627 Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs
628 (const Handle(GEOM_Object)& theCheckShape,
629 const Handle(GEOM_Object)& theShape,
630 const Standard_Integer theShapeType,
631 GEOMAlgo_State theState);
634 * \brief Find shape objects and their entries by their ids
635 * \param theShape - the main shape
636 * \param theShapeIDs - theShapeIDs - incoming shape ids
637 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
638 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
640 Handle(TColStd_HSequenceOfTransient)
641 getObjectsShapesOn(const Handle(GEOM_Object)& theShape,
642 const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
643 TCollection_AsciiString & theShapeEntries);
646 * \brief Explode a shape into edges sorted in a row from a starting point.
647 * \param theShape - the shape to be exploded on edges.
648 * \param theStartPoint - the starting point.
649 * \return Ordered list of edges sorted in a row from a starting point.
651 Handle(TColStd_HSequenceOfInteger) getSubShapeEdgeSortedIDs
652 (const Handle(GEOM_Object) &theShape,
653 const Handle(GEOM_Object) &theStartPoint);
656 * \brief Select the object created last
657 * \param theObj1 - Object 1
658 * \param theObj2 - Object 2
659 * \retval Handle(GEOM_Object) - selected object
661 static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1,
662 const Handle(GEOM_Object)& theObj2);