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 class GEOMImpl_IShapesOperations : public GEOM_IOperations
60 All = Groups | Fields | SubShapes,
64 * This enumeration represents an extraction statistics type.
66 enum ExtractionStatType
68 EST_Removed, ///< Removed sub-shapes
69 EST_Modified, ///< Modified sub-shapes
70 EST_Added ///< Newly created sub-shapes
74 * This structure defines a format of extraction statistics.
78 ExtractionStatType type; ///< Type of extraction statistics.
79 std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
82 Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
83 Standard_EXPORT ~GEOMImpl_IShapesOperations();
85 Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
86 Handle(GEOM_Object) thePoint2);
88 Standard_EXPORT Handle(GEOM_Object) MakeEdgeOnCurveByLength (Handle(GEOM_Object) theCurve,
89 const Standard_Real theLength,
90 Handle(GEOM_Object) theStartPoint);
92 Standard_EXPORT Handle(GEOM_Object) MakeEdgeWire (Handle(GEOM_Object) theWire,
93 const Standard_Real theLinearTolerance,
94 const Standard_Real theAngularTolerance);
96 Standard_EXPORT Handle(GEOM_Object) MakeWire (std::list<Handle(GEOM_Object)> theEdgesAndWires,
97 const Standard_Real theTolerance);
99 Standard_EXPORT Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, const bool isPlanarWanted);
101 Standard_EXPORT Handle(GEOM_Object) MakeFaceWires (std::list<Handle(GEOM_Object)> theWires,
102 const bool isPlanarWanted);
104 Standard_EXPORT Handle(GEOM_Object) MakeFaceFromSurface
105 (Handle(GEOM_Object) theFace,
106 Handle(GEOM_Object) theWire);
108 Standard_EXPORT Handle(GEOM_Object) MakeWrappedFace(std::list<Handle(GEOM_Object)> theEdges,
109 std::list<Handle(GEOM_Object)> theVertices,
110 const Standard_Real theTolerance);
112 Standard_EXPORT Handle(GEOM_Object) MakeFaceWithConstraints (std::list<Handle(GEOM_Object)> theConstraints);
114 Standard_EXPORT Handle(GEOM_Object) MakeShell (std::list<Handle(GEOM_Object)> theShapes);
116 Standard_EXPORT Handle(GEOM_Object) MakeSolidShells (std::list<Handle(GEOM_Object)> theShells);
118 Standard_EXPORT Handle(GEOM_Object) MakeCompound (std::list<Handle(GEOM_Object)> theShapes);
120 Standard_EXPORT Handle(GEOM_Object) MakeSolidFromConnectedFaces (std::list<Handle(GEOM_Object)> theFacesOrShells,
121 const Standard_Boolean isIntersect);
123 Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (std::list< Handle(GEOM_Object) >& theShapes,
124 const Standard_Real theTolerance,
125 const Standard_Boolean doKeepNonSolids);
127 Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (std::list< Handle(GEOM_Object) >& theShapes,
128 const Standard_Real theTolerance,
129 std::list<Handle(GEOM_Object)>& theFaces,
130 const Standard_Boolean doKeepNonSolids,
131 const Standard_Boolean doGlueAllEdges);
133 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdges (std::list< Handle(GEOM_Object) >& theShapes,
134 const Standard_Real theTolerance);
136 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueShapes (std::list< Handle(GEOM_Object) >& theShapes,
137 const Standard_Real theTolerance,
138 const TopAbs_ShapeEnum theType);
140 Standard_EXPORT Handle(GEOM_Object) MakeGlueEdgesByList (std::list< Handle(GEOM_Object) >& theShapes,
141 const Standard_Real theTolerance,
142 std::list<Handle(GEOM_Object)> & theEdges);
144 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
145 const Standard_Boolean theGroupsOnly);
146 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape,
147 const Standard_Integer theTypes = All);
150 EXPLODE_OLD_INCLUDE_MAIN,
151 EXPLODE_NEW_INCLUDE_MAIN,
152 EXPLODE_NEW_EXCLUDE_MAIN
155 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode
156 (Handle(GEOM_Object) theShape,
157 const Standard_Integer theShapeType,
158 const Standard_Boolean isSorted,
159 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
161 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) SubShapeAllIDs
162 (Handle(GEOM_Object) theShape,
163 const Standard_Integer theShapeType,
164 const Standard_Boolean isSorted,
165 const ExplodeType theExplodeType = EXPLODE_NEW_INCLUDE_MAIN);
167 Standard_EXPORT Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape,
168 const Standard_Integer theID);
170 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeSubShapes
171 (Handle(GEOM_Object) theMainShape,
172 Handle(TColStd_HArray1OfInteger) theIndices);
174 Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape,
175 Handle(GEOM_Object) theSubShape);
177 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSubShapesIndices (Handle(GEOM_Object) theMainShape,
178 std::list<Handle(GEOM_Object)> theSubShapes);
180 Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape,
181 Handle(GEOM_Object) theSubShape);
183 Standard_EXPORT TCollection_AsciiString GetShapeTypeString (Handle(GEOM_Object) theShape);
185 Standard_EXPORT Standard_Boolean IsSubShapeBelongsTo(Handle(GEOM_Object) theSubObject,
186 const Standard_Integer theSubObjectIndex,
187 Handle(GEOM_Object) theObject,
188 const Standard_Integer theObjectIndex);
190 Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object) theShape,
191 const Standard_Integer theShapeType);
193 Standard_EXPORT Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes);
195 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetFreeFacesIDs (Handle(GEOM_Object) theShape);
197 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
198 GetSharedShapes (Handle(GEOM_Object) theShape1,
199 Handle(GEOM_Object) theShape2,
200 const Standard_Integer theShapeType);
202 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
203 GetSharedShapes (std::list<Handle(GEOM_Object)>& theShapes,
204 const Standard_Integer theShapeType,
205 const bool theMultiShare = true);
207 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
208 GetShapesOnPlane (const Handle(GEOM_Object)& theShape,
209 const Standard_Integer theShapeType,
210 const Handle(GEOM_Object)& theAx1,
211 const GEOMAlgo_State theState);
213 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
214 GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
215 const Standard_Integer theShapeType,
216 const Handle(GEOM_Object)& theAx1,
217 const Handle(GEOM_Object)& thePnt,
218 const GEOMAlgo_State theState);
221 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
222 GetShapesOnCylinder (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);
228 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
229 GetShapesOnCylinderWithLocation (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);
236 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
237 GetShapesOnSphere (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);
243 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
244 GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape,
245 const Standard_Integer theShapeType,
246 const Handle(GEOM_Object)& theAx1,
247 const GEOMAlgo_State theState);
249 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
250 GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
251 const Standard_Integer theShapeType,
252 const Handle(GEOM_Object)& theAx1,
253 const Handle(GEOM_Object)& thePnt,
254 const GEOMAlgo_State theState);
256 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
257 GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
258 const Standard_Integer theShapeType,
259 const Handle(GEOM_Object)& theAxis,
260 const Standard_Real theRadius,
261 const GEOMAlgo_State theState);
263 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
264 GetShapesOnCylinderWithLocationIDs (const Handle(GEOM_Object)& theShape,
265 const Standard_Integer theShapeType,
266 const Handle(GEOM_Object)& theAxis,
267 const Handle(GEOM_Object)& thePnt,
268 const Standard_Real theRadius,
269 const GEOMAlgo_State theState);
271 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
272 GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape,
273 const Standard_Integer theShapeType,
274 const Handle(GEOM_Object)& theCenter,
275 const Standard_Real theRadius,
276 const GEOMAlgo_State theState);
279 * \brief Find sub-shapes complying with given status about quadrangle
280 * \param theShape - the shape to explore
281 * \param theShapeType - type of sub-shape of theShape
282 * \param theTopLeftPoint - top left quadrangle corner
283 * \param theTopRightPoint - top right quadrangle corner
284 * \param theBottomLeftPoint - bottom left quadrangle corner
285 * \param theBottomRightPoint - bottom right quadrangle corner
286 * \param theState - required state
287 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
289 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
290 GetShapesOnQuadrangle (const Handle(GEOM_Object)& theShape,
291 const Standard_Integer theShapeType,
292 const Handle(GEOM_Object)& theTopLeftPoint,
293 const Handle(GEOM_Object)& theTopRightPoint,
294 const Handle(GEOM_Object)& theBottomLeftPoint,
295 const Handle(GEOM_Object)& theBottomRightPoint,
296 const GEOMAlgo_State theState);
299 * \brief Find IDs of sub-shapes complying with given status about quadrangle
300 * \param theShape - the shape to explore
301 * \param theShapeType - type of sub-shape of theShape
302 * \param theTopLeftPoint - top left quadrangle corner
303 * \param theTopRightPoint - top right quadrangle corner
304 * \param theBottomLeftPoint - bottom left quadrangle corner
305 * \param theBottomRightPoint - bottom right quadrangle corner
306 * \param theState - required state
307 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
309 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
310 GetShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
311 const Standard_Integer theShapeType,
312 const Handle(GEOM_Object)& theTopLeftPoint,
313 const Handle(GEOM_Object)& theTopRightPoint,
314 const Handle(GEOM_Object)& theBottomLeftPoint,
315 const Handle(GEOM_Object)& theBottomRightPoint,
316 const GEOMAlgo_State theState);
318 Standard_EXPORT Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape,
319 const Standard_Integer theShapeType,
320 Handle(GEOM_Object) theAxis,
321 const Standard_Real theRadius);
323 Standard_EXPORT Handle(GEOM_Object) GetShapesOnSphereOld (Handle(GEOM_Object) theShape,
324 const Standard_Integer theShapeType,
325 Handle(GEOM_Object) theCenter,
326 const Standard_Real theRadius);
328 Standard_EXPORT Handle(GEOM_Object) GetInPlace (Handle(GEOM_Object) theShapeWhere,
329 Handle(GEOM_Object) theShapeWhat);
331 Standard_EXPORT Handle(GEOM_Object) GetInPlaceOld (Handle(GEOM_Object) theShapeWhere,
332 Handle(GEOM_Object) theShapeWhat);
334 Standard_EXPORT Handle(GEOM_Object) GetInPlaceByHistory (Handle(GEOM_Object) theShapeWhere,
335 Handle(GEOM_Object) theShapeWhat);
337 Standard_EXPORT void GetInPlaceMap (Handle(GEOM_Object) theShapeWhere,
338 Handle(GEOM_Object) theShapeWhat,
339 std::vector< std::vector< int > > & theResVec);
342 * \brief Searches a shape equal to theWhat in the context of theWhere
343 * \param theShapeWhere - a context shap
344 * \param theShapeWhat - a sample shape
345 * \retval Handle(GEOM_Object) - found shape
347 Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
348 const Handle(GEOM_Object)& theShapeWhat);
351 * \brief Searches a shape equal to theWhat in the context of theWhere
352 * \param theShapeWhere - a context shap
353 * \param theShapeWhat - a sample shape
354 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
356 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)& theShapeWhere,
357 const Handle(GEOM_Object)& theShapeWhat);
360 * \brief Find IDs of sub-shapes complying with given status about surface
361 * \param theBox - the box 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 GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
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 theBox - the box 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 GetShapesOnBox(const Handle(GEOM_Object)& theBox,
383 const Handle(GEOM_Object)& theShape,
384 const Standard_Integer theShapeType,
385 GEOMAlgo_State theState);
388 * \brief Find IDs of sub-shapes complying with given status about surface
389 * \param theCheckShape - the shape to check state of sub-shapes against
390 * \param theShape - the shape to explore
391 * \param theShapeType - type of sub-shape of theShape
392 * \param theState - required state
393 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
395 Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
396 GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape,
397 const Handle(GEOM_Object)& theShape,
398 const Standard_Integer theShapeType,
399 GEOMAlgo_State theState);
402 * \brief Find sub-shapes complying with given status about surface
403 * \param theCheckShape - the shape to check state of sub-shapes against
404 * \param theShape - the shape to explore
405 * \param theShapeType - type of sub-shape of theShape
406 * \param theState - required state
407 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
409 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
410 GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape,
411 const Handle(GEOM_Object)& theShape,
412 const Standard_Integer theShapeType,
413 GEOMAlgo_State theState);
414 Standard_EXPORT Handle(GEOM_Object)
415 GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape,
416 const Handle(GEOM_Object)& theShape,
417 const Standard_Integer theShapeType,
418 GEOMAlgo_State theState);
421 * \brief Resize the input edge with the new Min and Max parameters.
422 * The input edge parameters range is [0, 1]. If theMin parameter is
423 * negative, the input edge is extended, otherwise it is shrinked by
424 * theMin parameter. If theMax is greater than 1, the edge is extended,
425 * otherwise it is shrinked by theMax parameter
426 * \param theEdge the input edge to be resized
427 * \param theMin the minimal parameter value
428 * \param theMax the maximal parameter value
429 * \retval Handle(GEOM_Object) - newly created edge
431 Standard_EXPORT Handle(GEOM_Object)
432 ExtendEdge(const Handle(GEOM_Object)& theEdge,
433 const Standard_Real theMin,
434 const Standard_Real theMax);
437 * \brief Resize the input face with the new UMin, UMax, VMin and VMax
438 * parameters. The input face U and V parameters range is [0, 1]. If
439 * theUMin parameter is negative, the input face is extended, otherwise
440 * it is shrinked along U direction by theUMin parameter. If theUMax is
441 * greater than 1, the face is extended, otherwise it is shrinked along
442 * U direction by theUMax parameter. So as for theVMin, theVMax and
443 * V direction of the input face.
444 * \param theFace the input face to be resized
445 * \param theUMin the minimal U parameter value
446 * \param theUMax the maximal U parameter value
447 * \param theVMin the minimal V parameter value
448 * \param theVMax the maximal V parameter value
449 * \retval Handle(GEOM_Object) - newly created face
451 Standard_EXPORT Handle(GEOM_Object)
452 ExtendFace(const Handle(GEOM_Object)& theFace,
453 const Standard_Real theUMin,
454 const Standard_Real theUMax,
455 const Standard_Real theVMin,
456 const Standard_Real theVMax);
459 * \brief Make a surface from a face. This function takes some face as
460 * input parameter and creates new GEOM_Object, i.e. topological shape
461 * by extracting underlying surface of the source face and limiting it
462 * by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
463 * parametrical space).
464 * \param theFace the input face
465 * \retval Handle(GEOM_Object) - newly created face
467 Standard_EXPORT Handle(GEOM_Object)
468 MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace);
471 * \brief Explode a shape into edges sorted in a row from a starting point.
472 * \param theShape - the shape to be exploded on edges.
473 * \param theStartPoint - the starting point.
474 * \return Ordered list of edges sorted in a row from a starting point.
476 Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
477 GetSubShapeEdgeSorted (const Handle(GEOM_Object) &theShape,
478 const Handle(GEOM_Object) &theStartPoint);
481 * \brief Return the list of subshapes that satisfies a certain tolerance
482 * criterion. The user defines the type of shapes to be returned, the
483 * condition and the tolerance value. The operation is defined for
484 * faces, edges and vertices only. E.g. for theShapeType FACE, theCondition
485 * CC_GT and theTolerance 1.e-7 this method returns all faces of theShape
486 * that have tolerances greater then 1.e7.
488 * \param theShape the shape to be exploded
489 * \param theShapeType the type of shapes to be returned. Can have the
490 * values FACE, EDGE and VERTEX only.
491 * \param theCondition the condition type.
492 * \param theTolerance the tolerance filter.
493 * \return the list of shapes that satisfy the conditions.
495 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetSubShapesWithTolerance
496 (const Handle(GEOM_Object) &theShape,
497 const Standard_Integer theShapeType,
498 const GEOMUtils::ComparisonCondition theCondition,
499 const Standard_Real theTolerance);
502 * \brief Return the shape that is constructed from theShape without
503 * extracted sub-shapes from the input list.
505 * \param theShape the original shape.
506 * \param theSubShapeIDs the list of sub-shape IDs to be extracted from
507 * the original shape.
508 * \param theStats the operation statistics. Output parameter.
509 * \return the shape without extracted sub-shapes.
511 Standard_EXPORT Handle(GEOM_Object) MakeExtraction
512 (const Handle(GEOM_Object) &theShape,
513 const Handle(TColStd_HArray1OfInteger) &theSubShapeIDs,
514 std::list<ExtractionStat> &theStats);
517 Handle(GEOM_Object) MakeShape (std::list<Handle(GEOM_Object)> theShapes,
518 const Standard_Integer theObjectType,
519 const Standard_Integer theFunctionType,
520 const TCollection_AsciiString& theMethodName);
522 // ----------------------------------------------------
523 // methods common for all GetShapesOnXXX() functions
524 // ----------------------------------------------------
527 * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK
528 * \param theShapeType - the shape type to check
529 * \retval bool - result of the check
531 bool checkTypeShapesOn(const Standard_Integer theShapeType);
534 * \brief Creates Geom_Plane
535 * \param theAx1 - edge defining plane normal
536 * \retval Handle(Geom_Surface) - resulting surface
538 Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1);
541 * \brief Creates Geom_CylindricalSurface
542 * \param theAx1 - edge defining cylinder axis
543 * \param theRadius - cylinder radius
544 * \retval Handle(Geom_Surface) - resulting surface
546 Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1,
547 const Standard_Real theRadius);
550 * \brief Find IDs of sub-shapes complying with given status about surface
551 * \param theSurface - the surface to check state of sub-shapes against
552 * \param theShape - the shape to explore
553 * \param theShapeType - type of sub-shape of theShape
554 * \param theState - required state
555 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
557 Handle(TColStd_HSequenceOfInteger)
558 getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
559 const TopoDS_Shape& theShape,
560 TopAbs_ShapeEnum theShapeType,
561 GEOMAlgo_State theState);
564 * \brief Find sub-shapes complying with given status about surface
565 * \param theSurface - the surface to check state of sub-shapes against
566 * \param theShape - the shape to explore
567 * \param theShapeType - type of sub-shape of theShape
568 * \param theState - required state
569 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
570 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
572 Handle(TColStd_HSequenceOfTransient)
573 getShapesOnSurface(const Handle(Geom_Surface)& theSurface,
574 const Handle(GEOM_Object)& theShape,
575 TopAbs_ShapeEnum theShapeType,
576 GEOMAlgo_State theState,
577 TCollection_AsciiString & theShapeEntries);
580 * \brief Find IDs of sub-shapes complying with given status about quadrangle
581 * \param theShape - the shape to explore
582 * \param theShapeType - type of sub-shape of theShape
583 * \param theTopLeftPoint - top left quadrangle corner
584 * \param theTopRightPoint - top right quadrangle corner
585 * \param theBottomLeftPoint - bottom left quadrangle corner
586 * \param theBottomRightPoint - bottom right quadrangle corner
587 * \param theState - required state
588 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
590 Handle(TColStd_HSequenceOfInteger)
591 getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape,
592 const Standard_Integer theShapeType,
593 const Handle(GEOM_Object)& theTopLeftPoint,
594 const Handle(GEOM_Object)& theTopRightPoint,
595 const Handle(GEOM_Object)& theBottomLeftPoint,
596 const Handle(GEOM_Object)& theBottomRightPoint,
597 const GEOMAlgo_State theState);
600 * \brief Find IDs of sub-shapes complying with given status about surface
601 * \param theBox - the box to check state of sub-shapes against
602 * \param theShape - the shape to explore
603 * \param theShapeType - type of sub-shape of theShape
604 * \param theState - required state
605 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
607 Handle(TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
608 const Handle(GEOM_Object)& theShape,
609 const Standard_Integer theShapeType,
610 GEOMAlgo_State theState);
613 * \brief Find IDs of sub-shapes complying with given status about surface
614 * \param theCheckShape - the shape to check state of sub-shapes against
615 * \param theShape - the shape to explore
616 * \param theShapeType - type of sub-shape of theShape
617 * \param theState - required state
618 * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
620 Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs
621 (const Handle(GEOM_Object)& theCheckShape,
622 const Handle(GEOM_Object)& theShape,
623 const Standard_Integer theShapeType,
624 GEOMAlgo_State theState);
627 * \brief Find shape objects and their entries by their ids
628 * \param theShape - the main shape
629 * \param theShapeIDs - theShapeIDs - incoming shape ids
630 * \param theShapeEntries - outgoing entries like "entry1, entry2, ..."
631 * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects
633 Handle(TColStd_HSequenceOfTransient)
634 getObjectsShapesOn(const Handle(GEOM_Object)& theShape,
635 const Handle(TColStd_HSequenceOfInteger)& theShapeIDs,
636 TCollection_AsciiString & theShapeEntries);
639 * \brief Explode a shape into edges sorted in a row from a starting point.
640 * \param theShape - the shape to be exploded on edges.
641 * \param theStartPoint - the starting point.
642 * \return Ordered list of edges sorted in a row from a starting point.
644 Handle(TColStd_HSequenceOfInteger) getSubShapeEdgeSortedIDs
645 (const Handle(GEOM_Object) &theShape,
646 const Handle(GEOM_Object) &theStartPoint);
649 * \brief Select the object created last
650 * \param theObj1 - Object 1
651 * \param theObj2 - Object 2
652 * \retval Handle(GEOM_Object) - selected object
654 static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1,
655 const Handle(GEOM_Object)& theObj2);