1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 //=============================================================================
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>
41 #include <Geom_Surface.hxx>
46 class Handle(GEOM_Object);
47 class Handle(TColStd_HArray1OfInteger);
50 class GEOMImpl_IShapesOperations : public GEOM_IOperations
59 All = Groups | Fields | SubShapes,
62 Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
63 Standard_EXPORT ~GEOMImpl_IShapesOperations();
65 Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
66 Handle(GEOM_Object) thePoint2);
68 Standard_EXPORT Handle(GEOM_Object) MakeEdgeOnCurveByLength (Handle(GEOM_Object) theCurve,
69 const Standard_Real theLength,
70 Handle(GEOM_Object) theStartPoint);
72 Standard_EXPORT Handle(GEOM_Object) MakeEdgeWire (Handle(GEOM_Object) theWire,
73 const Standard_Real theLinearTolerance,
74 const Standard_Real theAngularTolerance);
76 Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
77 const Standard_Real theTolerance);
79 Standard_EXPORT Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
81 Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
82 const bool isPlanarWanted);
84 Standard_EXPORT Handle(GEOM_Object) MakeFaceFromSurface
85 (Handle(GEOM_Object) theFace,
86 Handle(GEOM_Object) theWire);
88 Standard_EXPORT Handle(GEOM_Object) MakeFaceWithConstraints (std::list<Handle(GEOM_Object)> theConstraints);
90 Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
92 Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
94 Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
96 Standard_EXPORT Handle(GEOM_Object) MakeSolidFromConnectedFaces (std::list<Handle(GEOM_Object)> theFacesOrShells,
97 const Standard_Boolean isIntersect);
99 Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
100 const Standard_Real theTolerance,
101 const Standard_Boolean doKeepNonSolids);
103 Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
104 const Standard_Real theTolerance,
105 std::list<Handle(GEOM_Object)>& theFaces,
106 const Standard_Boolean doKeepNonSolids,
107 const Standard_Boolean doGlueAllEdges);
109 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
110 const Standard_Real theTolerance);
112 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
113 const Standard_Real theTolerance,
114 const TopAbs_ShapeEnum theType);
116 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
117 const Standard_Real theTolerance,
118 std::list<Handle(GEOM_Object)> & theEdges);
120 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
121 const Standard_Boolean theGroupsOnly);
122 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
123 const Standard_Integer theTypes = All);
126 EXPLODE_OLD_INCLUDE_MAIN,
127 EXPLODE_NEW_INCLUDE_MAIN,
128 EXPLODE_NEW_EXCLUDE_MAIN
131 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
132 (Handle(GEOM_Object) theShape,
133 const Standard_Integer theShapeType,
134 const Standard_Boolean isSorted,
135 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
137 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs
138 (Handle(GEOM_Object) theShape,
139 const Standard_Integer theShapeType,
140 const Standard_Boolean isSorted,
141 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
143 Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape,
144 const Standard_Integer theID);
146 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeSubShapes
147 (Handle(GEOM_Object) theMainShape,
148 Handle(TColStd_HArray1OfInteger) theIndices);
150 Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape,
151 Handle(GEOM_Object) theSubShape);
153 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSubShapesIndices (Handle(GEOM_Object) theMainShape,
154 std::list<Handle(GEOM_Object)> theSubShapes);
156 Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape,
157 Handle(GEOM_Object) theSubShape);
159 Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
161 Standard_EXPORT Standard_Boolean IsSubShapeBelongsTo(Handle(GEOM_Object) theSubObject,
162 const Standard_Integer theSubObjectIndex,
163 Handle(GEOM_Object) theObject,
164 const Standard_Integer theObjectIndex);
166 Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object) theShape,
167 const Standard_Integer theShapeType);
169 Standard_EXPORT Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
171 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
173 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
174 GetSharedShapes (Handle(GEOM_Object) theShape1,
175 Handle(GEOM_Object) theShape2,
176 const Standard_Integer theShapeType);
178 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
179 GetSharedShapes (std::list<Handle(GEOM_Object)>& theShapes,
180 const Standard_Integer theShapeType,
181 const bool theMultiShare = true);
183 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
184 GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
185 const Standard_Integer theShapeType,
186 const Handle(GEOM_Object)& theAx1,
187 const GEOMAlgo_State theState);
189 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
190 GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
191 const Standard_Integer theShapeType,
192 const Handle(GEOM_Object)& theAx1,
193 const Handle(GEOM_Object)& thePnt,
194 const GEOMAlgo_State theState);
197 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
198 GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
199 const Standard_Integer theShapeType,
200 const Handle(GEOM_Object)& theAxis,
201 const Standard_Real theRadius,
202 const GEOMAlgo_State theState);
204 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
205 GetShapesOnCylinderWithLocation (const Handle(GEOM_Object)& theShape,
206 const Standard_Integer theShapeType,
207 const Handle(GEOM_Object)& theAxis,
208 const Handle(GEOM_Object)& thePnt,
209 const Standard_Real theRadius,
210 const GEOMAlgo_State theState);
212 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
213 GetShapesOnSphere (const Handle(GEOM_Object)& theShape,
214 const Standard_Integer theShapeType,
215 const Handle(GEOM_Object)& theCenter,
216 const Standard_Real theRadius,
217 const GEOMAlgo_State theState);
219 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
220 GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
221 const Standard_Integer theShapeType,
222 const Handle(GEOM_Object)& theAx1,
223 const GEOMAlgo_State theState);
225 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
226 GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
227 const Standard_Integer theShapeType,
228 const Handle(GEOM_Object)& theAx1,
229 const Handle(GEOM_Object)& thePnt,
230 const GEOMAlgo_State theState);
232 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
233 GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
234 const Standard_Integer theShapeType,
235 const Handle(GEOM_Object)& theAxis,
236 const Standard_Real theRadius,
237 const GEOMAlgo_State theState);
239 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
240 GetShapesOnCylinderWithLocationIDs (const Handle(GEOM_Object)& theShape,
241 const Standard_Integer theShapeType,
242 const Handle(GEOM_Object)& theAxis,
243 const Handle(GEOM_Object)& thePnt,
244 const Standard_Real theRadius,
245 const GEOMAlgo_State theState);
247 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
248 GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
249 const Standard_Integer theShapeType,
250 const Handle(GEOM_Object)& theCenter,
251 const Standard_Real theRadius,
252 const GEOMAlgo_State theState);
255 * \brief Find sub-shapes complying with given status about quadrangle
256 * \param theShape - the shape to explore
257 * \param theShapeType - type of sub-shape of theShape
258 * \param theTopLeftPoint - top left quadrangle corner
259 * \param theTopRigthPoint - top right quadrangle corner
260 * \param theBottomLeftPoint - bottom left quadrangle corner
261 * \param theBottomRigthPoint - bottom right quadrangle corner
262 * \param theState - required state
263 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
265 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
266 GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
267 const Standard_Integer theShapeType,
268 const Handle(GEOM_Object)& theTopLeftPoint,
269 const Handle(GEOM_Object)& theTopRigthPoint,
270 const Handle(GEOM_Object)& theBottomLeftPoint,
271 const Handle(GEOM_Object)& theBottomRigthPoint,
272 const GEOMAlgo_State theState);
275 * \brief Find IDs of sub-shapes complying with given status about quadrangle
276 * \param theShape - the shape to explore
277 * \param theShapeType - type of sub-shape of theShape
278 * \param theTopLeftPoint - top left quadrangle corner
279 * \param theTopRigthPoint - top right quadrangle corner
280 * \param theBottomLeftPoint - bottom left quadrangle corner
281 * \param theBottomRigthPoint - bottom right quadrangle corner
282 * \param theState - required state
283 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
285 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
286 GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
287 const Standard_Integer theShapeType,
288 const Handle(GEOM_Object)& theTopLeftPoint,
289 const Handle(GEOM_Object)& theTopRigthPoint,
290 const Handle(GEOM_Object)& theBottomLeftPoint,
291 const Handle(GEOM_Object)& theBottomRigthPoint,
292 const GEOMAlgo_State theState);
294 Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
295 const Standard_Integer theShapeType,
296 Handle(GEOM_Object) theAxis,
297 const Standard_Real theRadius);
299 Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object) theShape,
300 const Standard_Integer theShapeType,
301 Handle(GEOM_Object) theCenter,
302 const Standard_Real theRadius);
304 Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
305 Handle(GEOM_Object) theShapeWhat);
307 Standard_EXPORT Handle(GEOM_Object) GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
308 Handle(GEOM_Object) theShapeWhat);
310 Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
311 Handle(GEOM_Object) theShapeWhat);
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(GEOM_Object) - found shape
319 Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
320 const Handle(GEOM_Object)& theShapeWhat);
323 * \brief Searches a shape equal to theWhat in the context of theWhere
324 * \param theShapeWhere - a context shap
325 * \param theShapeWhat - a sample shape
326 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
328 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)& theShapeWhere,
329 const Handle(GEOM_Object)& theShapeWhat);
332 * \brief Find IDs of sub-shapes complying with given status about surface
333 * \param theBox - the box to check state of sub-shapes against
334 * \param theShape - the shape to explore
335 * \param theShapeType - type of sub-shape of theShape
336 * \param theState - required state
337 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
339 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
340 GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
341 const Handle(GEOM_Object)& theShape,
342 const Standard_Integer theShapeType,
343 GEOMAlgo_State theState);
346 * \brief Find sub-shapes complying with given status about surface
347 * \param theBox - the box to check state of sub-shapes against
348 * \param theShape - the shape to explore
349 * \param theShapeType - type of sub-shape of theShape
350 * \param theState - required state
351 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
353 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
354 GetShapesOnBox(const Handle(GEOM_Object)& theBox,
355 const Handle(GEOM_Object)& theShape,
356 const Standard_Integer theShapeType,
357 GEOMAlgo_State theState);
360 * \brief Find IDs of sub-shapes complying with given status about surface
361 * \param theCheckShape - the shape to check state of sub-shapes against
362 * \param theShape - the shape to explore
363 * \param theShapeType - type of sub-shape of theShape
364 * \param theState - required state
365 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
367 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
368 GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
369 const Handle(GEOM_Object)& theShape,
370 const Standard_Integer theShapeType,
371 GEOMAlgo_State theState);
374 * \brief Find sub-shapes complying with given status about surface
375 * \param theCheckShape - the shape to check state of sub-shapes against
376 * \param theShape - the shape to explore
377 * \param theShapeType - type of sub-shape of theShape
378 * \param theState - required state
379 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
381 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
382 GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
383 const Handle(GEOM_Object)& theShape,
384 const Standard_Integer theShapeType,
385 GEOMAlgo_State theState);
386 Standard_EXPORT Handle(GEOM_Object)
387 GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
388 const Handle(GEOM_Object)& theShape,
389 const Standard_Integer theShapeType,
390 GEOMAlgo_State theState);
393 * \brief Resize the input edge with the new Min and Max parameters.
394 * The input edge parameters range is [0, 1]. If theMin parameter is
395 * negative, the input edge is extended, otherwise it is shrinked by
396 * theMin parameter. If theMax is greater than 1, the edge is extended,
397 * otherwise it is shrinked by theMax parameter
398 * \param theEdge the input edge to be resized
399 * \param theMin the minimal parameter value
400 * \param theMax the maximal parameter value
401 * \retval Handle(GEOM_Object) - newly created edge
403 Standard_EXPORT Handle(GEOM_Object)
404 ExtendEdge(const Handle(GEOM_Object)& theEdge,
405 const Standard_Real theMin,
406 const Standard_Real theMax);
409 * \brief Resize the input face with the new UMin, UMax, VMin and VMax
410 * parameters. The input face U and V parameters range is [0, 1]. If
411 * theUMin parameter is negative, the input face is extended, otherwise
412 * it is shrinked along U direction by theUMin parameter. If theUMax is
413 * greater than 1, the face is extended, otherwise it is shrinked along
414 * U direction by theUMax parameter. So as for theVMin, theVMax and
415 * V direction of the input face.
416 * \param theFace the input face to be resized
417 * \param theUMin the minimal U parameter value
418 * \param theUMax the maximal U parameter value
419 * \param theVMin the minimal V parameter value
420 * \param theVMax the maximal V parameter value
421 * \retval Handle(GEOM_Object) - newly created face
423 Standard_EXPORT Handle(GEOM_Object)
424 ExtendFace(const Handle(GEOM_Object)& theFace,
425 const Standard_Real theUMin,
426 const Standard_Real theUMax,
427 const Standard_Real theVMin,
428 const Standard_Real theVMax);
431 * \brief Make a surface from a face. This function takes some face as
432 * input parameter and creates new GEOM_Object, i.e. topological shape
433 * by extracting underlying surface of the source face and limiting it
434 * by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
435 * parametrical space).
436 * \param theFace the input face
437 * \retval Handle(GEOM_Object) - newly created face
439 Standard_EXPORT Handle(GEOM_Object)
440 MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace);
443 * \brief Explode a shape into edges sorted in a row from a starting point.
444 * \param theShape - the shape to be exploded on edges.
445 * \param theStartPoint - the starting point.
446 * \return Ordered list of edges sorted in a row from a starting point.
448 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
449 GetSubShapeEdgeSorted (const Handle(GEOM_Object) &theShape,
450 const Handle(GEOM_Object) &theStartPoint);
453 * \brief Return the list of subshapes that satisfies a certain tolerance
454 * criterion. The user defines the type of shapes to be returned, the
455 * condition and the tolerance value. The operation is defined for
456 * faces, edges and vertices only. E.g. for theShapeType FACE, theCondition
457 * CC_GT and theTolerance 1.e-7 this method returns all faces of theShape
458 * that have tolerances greater then 1.e7.
460 * \param theShape the shape to be exploded
461 * \param theShapeType the type of shapes to be returned. Can have the
462 * values FACE, EDGE and VERTEX only.
463 * \param theCondition the condition type.
464 * \param theTolerance the tolerance filter.
465 * \return the list of shapes that satisfy the conditions.
467 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetSubShapesWithTolerance
468 (const Handle(GEOM_Object) &theShape,
469 const Standard_Integer theShapeType,
470 const GEOMUtils::ComparisonCondition theCondition,
471 const Standard_Real theTolerance);
474 Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)> theShapes,
475 const Standard_Integer theObjectType,
476 const Standard_Integer theFunctionType,
477 const TCollection_AsciiString& theMethodName);
479 // ----------------------------------------------------
480 // methods common for all GetShapesOnXXX() functions
481 // ----------------------------------------------------
484 * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
485 * \param theShapeType - the shape type to check
486 * \retval bool - result of the check
488 bool checkTypeShapesOn(const Standard_Integer theShapeType);
491 * \brief Creates Geom_Plane
492 * \param theAx1 - edge defining plane normal
493 * \retval Handle(Geom_Surface) - resulting surface
495 Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1);
498 * \brief Creates Geom_CylindricalSurface
499 * \param theAx1 - edge defining cylinder axis
500 * \param theRadius - cylinder radius
501 * \retval Handle(Geom_Surface) - resulting surface
503 Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1,
504 const Standard_Real theRadius);
507 * \brief Find IDs of sub-shapes complying with given status about surface
508 * \param theSurface - the surface to check state of sub-shapes against
509 * \param theShape - the shape to explore
510 * \param theShapeType - type of sub-shape of theShape
511 * \param theState - required state
512 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
514 Handle(TColStd_HSequenceOfInteger)
515 getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
516 const TopoDS_Shape& theShape,
517 TopAbs_ShapeEnum theShapeType,
518 GEOMAlgo_State theState);
521 * \brief Find sub-shapes complying with given status about surface
522 * \param theSurface - the surface to check state of sub-shapes against
523 * \param theShape - the shape to explore
524 * \param theShapeType - type of sub-shape of theShape
525 * \param theState - required state
526 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
527 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
529 Handle(TColStd_HSequenceOfTransient)
530 getShapesOnSurface(const Handle(Geom_Surface)& theSurface,
531 const Handle(GEOM_Object)& theShape,
532 TopAbs_ShapeEnum theShapeType,
533 GEOMAlgo_State theState,
534 TCollection_AsciiString & theShapeEntries);
537 * \brief Find IDs of sub-shapes complying with given status about quadrangle
538 * \param theShape - the shape to explore
539 * \param theShapeType - type of sub-shape of theShape
540 * \param theTopLeftPoint - top left quadrangle corner
541 * \param theTopRigthPoint - top right quadrangle corner
542 * \param theBottomLeftPoint - bottom left quadrangle corner
543 * \param theBottomRigthPoint - bottom right quadrangle corner
544 * \param theState - required state
545 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
547 Handle(TColStd_HSequenceOfInteger)
548 getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
549 const Standard_Integer theShapeType,
550 const Handle(GEOM_Object)& theTopLeftPoint,
551 const Handle(GEOM_Object)& theTopRigthPoint,
552 const Handle(GEOM_Object)& theBottomLeftPoint,
553 const Handle(GEOM_Object)& theBottomRigthPoint,
554 const GEOMAlgo_State theState);
557 * \brief Find IDs of sub-shapes complying with given status about surface
558 * \param theBox - the box 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) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
565 const Handle(GEOM_Object)& theShape,
566 const Standard_Integer theShapeType,
567 GEOMAlgo_State theState);
570 * \brief Find IDs of sub-shapes complying with given status about surface
571 * \param theCheckShape - the shape to check state of sub-shapes against
572 * \param theShape - the shape to explore
573 * \param theShapeType - type of sub-shape of theShape
574 * \param theState - required state
575 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
577 Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs
578 (const Handle(GEOM_Object)& theCheckShape,
579 const Handle(GEOM_Object)& theShape,
580 const Standard_Integer theShapeType,
581 GEOMAlgo_State theState);
584 * \brief Find shape objects and their entries by their ids
585 * \param theShape - the main shape
586 * \param theShapeIDs - theShapeIDs - incoming shape ids
587 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
588 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
590 Handle(TColStd_HSequenceOfTransient)
591 getObjectsShapesOn(const Handle(GEOM_Object)& theShape,
592 const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
593 TCollection_AsciiString & theShapeEntries);
596 * \brief Explode a shape into edges sorted in a row from a starting point.
597 * \param theShape - the shape to be exploded on edges.
598 * \param theStartPoint - the starting point.
599 * \return Ordered list of edges sorted in a row from a starting point.
601 Handle(TColStd_HSequenceOfInteger) getSubShapeEdgeSortedIDs
602 (const Handle(GEOM_Object) &theShape,
603 const Handle(GEOM_Object) &theStartPoint);
606 * \brief Select the object created last
607 * \param theObj1 - Object 1
608 * \param theObj2 - Object 2
609 * \retval Handle(GEOM_Object) - selected object
611 static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1,
612 const Handle(GEOM_Object)& theObj2);