1 // Copyright (C) 2007-2011 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.
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
22 // File : GEOM_Gen.idl
23 // Author : Sergey RUIN
28 #include "SALOME_Exception.idl"
29 #include "SALOME_Component.idl"
30 #include "SALOMEDS.idl"
31 #include "SALOMEDS_Attributes.idl"
33 #include "SALOME_GenericObj.idl"
38 * Topological types of shapes (like Open Cascade types)
40 enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
41 FACE, WIRE, EDGE, VERTEX, SHAPE };
46 enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
47 MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
52 enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
53 MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
56 * State of shape relatively geometrical surface like plane, sphere or cylinder.
57 * Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
61 /*! Shape is on surface */
65 * Shape is in the direction defined by the normal and not on surface.
66 * For plane it means above the plane,
67 * For sphere and cylinder it means outside of volume, bounded by the surface.
72 * Shape is in the direction defined by the normal and on surface.
78 * Complementary to ONOUT.
79 * For plane it means below the plane,
80 * For sphere and cylinder it means inside the volume, bounded by the surface
81 * (beyond axis and surface for cylinder and beyond cented and surface for sphere).
86 * Complementary to OUT.
93 * Kind of method to find inside one main shape some sub-shapes,
94 * corresponding to other given shape (its argument)
95 * Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
97 enum find_shape_method
99 /*! Use GetInPlace functionality. Suits all cases, except transformations */
102 /*! To be used only for transformation result, to find sub-shapes of argument.
103 * Only this method can be used after transformation.
107 /*! To find only shared sub-shapes, not modified by the operation */
110 /*! Use GetShapesOnShape method (can work only on solids) */
111 FSM_GetShapesOnShape,
113 /*! Use GetInPlaceByHistory method (can work only after Partition) */
114 FSM_GetInPlaceByHistory,
116 /*! To be used only for multi-transformation result.
117 * Only this method can be used after multi-transformation.
123 * Kind of method to perform filling operation
124 * Is used in functions GEOM_Gen.MakeFilling<xxx>()
126 enum filling_oper_method
128 /*! Default (standard behaviour) */
131 /*! Use edges orientation */
134 /*! Auto-correct edges orientation */
139 * Kind of the curves.
140 * Used in the function GEOM_Gen.MakeCurveParametric()
143 /*! Polyline curve */
149 /*! Interpolation, curve */
154 typedef sequence<string> string_array;
155 typedef sequence<short> short_array;
156 typedef sequence<boolean> ListOfBool;
157 typedef sequence<long> ListOfLong;
158 typedef sequence<double> ListOfDouble;
160 interface GEOM_Object;
162 typedef sequence<GEOM_Object> ListOfGO;
165 * GEOM_Object: interface of geometric object
167 interface GEOM_Object : SALOME::GenericObj
171 * Get an entry of the object in GEOM component.
176 * Get ID of study, where the object is created.
181 * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
186 * Get a <VAR>shape_type</VAR> of the object value.
188 shape_type GetShapeType();
191 * Get the topology type of the object value.
192 * In contrast to the shape type, this function returns type of the most
193 * top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
197 shape_type GetTopologyType();
200 * Get a minimal type of the top-level shapes contained in the object.
201 * This function is useful for the compounds only; for simple shapes it
202 * exactly the same value as GetShapeType().
203 * Note, that compounds are procesed recursively.
204 * \sa GetShapeType(), GetTopologyType(), GetMaxShapeType()
206 shape_type GetMinShapeType();
209 * Get a maximal type of the top-level shapes contained in the object.
210 * This function is useful for the compounds only; for simple shapes it
211 * exactly the same value as GetShapeType().
212 * Note, that compounds are procesed recursively.
213 * \sa GetShapeType(), GetTopologyType(), GetMinShapeType()
215 shape_type GetMaxShapeType();
218 * Set name of the object.
219 * \param theName is a name which will be associated with this object.
221 void SetName (in string theName);
224 * Get name of the object associated with this object.
229 * Set color of the object.
230 * \param theColor is a color of the object.
232 void SetColor(in SALOMEDS::Color theColor);
235 * Get color of the object.
237 SALOMEDS::Color GetColor();
240 * Toggle auto color mode on the object.
241 * \param theAtoColor is a flag which toggles auto color mode.
243 void SetAutoColor(in boolean theAutoColor);
246 * Get flag of object's auto color mode.
248 boolean GetAutoColor();
251 * Set standard point marker for the object
252 * \param theType standard marker type
253 * \param theSize marker relative size
255 void SetMarkerStd(in marker_type theType, in marker_size theSize );
258 * Set custom point marker for the object. The texture can be added
259 * by LoadTexture() or AddTexture() functions.
260 * \param theTextureId texture ID
262 void SetMarkerTexture(in long theTextureId);
265 * Get type of the point marker assigned to the object
266 * \return current marker type (MT_NONE if no marker is set)
268 marker_type GetMarkerType();
271 * Get size of the point marker assigned to the object
272 * \return current marker relative size (MS_NONE if no marker is set)
274 marker_size GetMarkerSize();
277 * Get texture idenifier of the point marker assigned to the object
278 * \return marker texture ID (0 if no marker set)
280 long GetMarkerTexture();
283 * Set a Study entry where this object was published.
285 void SetStudyEntry (in string theEntry);
288 * Get a Study entry where this object was published.
290 string GetStudyEntry();
293 * Get a list of all GEOM objects on which were the arguments
294 * when this object was constructed and modified.
295 * \note This method is supposed to be used by GUI only.
297 ListOfGO GetDependency();
300 * Get a list of GEOM objects on which the last function that created or modified the object depends.
301 * \note This method is supposed to be used by GUI only.
303 ListOfGO GetLastDependency();
306 * Get the TopoDS_Shape, for colocated case only.
308 long long getShape();
311 ######################################################################
312 * Internal methods (For sub-shape identification)
313 ######################################################################
317 * Get geometric shape of the object as a byte stream
319 SALOMEDS::TMPFile GetShapeStream();
322 * Returns True if this object is not a sub-shape of another object.
324 boolean IsMainShape();
327 * Get a list of ID's of sub-shapes in the main shape.
328 * \note Internal method, suppopsed to be used only by GEOM_Client
330 ListOfLong GetSubShapeIndices();
333 * Get a main shape object to which this object is a sub-shape
334 * \note Internal method, suppopsed to be used only by GEOM_Client
336 GEOM_Object GetMainShape();
339 * Return true if geom object representes a shape.
340 * For example, method return false for GEOM_MARKER
345 * Return true if passed object is identical to this object
346 * \param other object being compared with this one
348 boolean IsSame(in GEOM_Object other);
351 * Set list of parameters
352 * \param theParameters is a string containing the notebook variables separated by ":" symbol,
353 * used for object creation
355 void SetParameters (in string theParameters);
358 * Return list of notebook variables used for object creation separated by ":" symbol
360 string GetParameters();
365 * GEOM_IOperations: basic methods of all geometric operations
367 interface GEOM_IOperations : SALOME::GenericObj
370 * To know, if the operation was successfully performed
375 * Set the operation error code
376 * \param theErrorID is a string describing the error occured
377 * \note This method is supposed to be used only by interfaces inheriting from IOperations.
379 void SetErrorCode (in string theErrorID);
382 * Get the operation error code
384 string GetErrorCode();
387 * Get ID of study, where the operation is defined
392 * Opens a new transaction
394 void StartOperation();
397 * Closes the previously opened trasaction
399 void FinishOperation();
402 * Aborts the previously opened transaction
404 void AbortOperation();
408 * GEOM_IBasicOperations: interface for basic geometry creation
409 * (Point, Vector, Plane, Marker)
411 interface GEOM_IBasicOperations : GEOM_IOperations
414 * Create point by three coordinates.
415 * \param theX The X coordinate of the point.
416 * \param theY The Y coordinate of the point.
417 * \param theZ The Z coordinate of the point.
418 * \return New GEOM_Object, containing the created point.
420 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
423 * Create a point, distant from the referenced point
424 * on the given distances along the coordinate axes.
425 * \param theReference The referenced point.
426 * \param theX Displacement from the referenced point along OX axis.
427 * \param theY Displacement from the referenced point along OY axis.
428 * \param theZ Displacement from the referenced point along OZ axis.
429 * \return New GEOM_Object, containing the created point.
431 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
432 in double theX, in double theY, in double theZ);
435 * Create a point, corresponding to the given parameter on the given curve.
436 * \param theRefCurve The referenced curve.
437 * \param theParameter Value of parameter on the referenced curve.
438 * \return New GEOM_Object, containing the created point.
440 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
441 in double theParameter);
444 * Create a point, corresponding to the given length on the given curve.
445 * \param theRefCurve The referenced curve.
446 * \param theLength Length on the referenced curve. It can be negative.
447 * \param theStartPoint Any vertex close to one of edge's
448 * ends to select start point among them.
449 * If NULL, fist vertex is used.
450 * \return New GEOM_Object, containing the created point.
452 GEOM_Object MakePointOnCurveByLength (in GEOM_Object theRefCurve,
454 in GEOM_Object theStartPoint);
457 * Create a point on the given curve, projecting given point
458 * \param theRefCurve The referenced curve.
459 * \param theXParameter X co-ordinate of point to project on curve
460 * \param theYParameter Y co-ordinate of point to project on curve
461 * \param theZParameter Z co-ordinate of point to project on curve
462 * \return New GEOM_Object, containing the created point.
464 GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
465 in double theXParameter,
466 in double theYarameter,
467 in double theZPameter);
470 * Create a point, corresponding to the given parameters on the
472 * \param theRefSurf The referenced surface.
473 * \param theUParameter Value of U-parameter on the referenced surface.
474 * \param theVParameter Value of V-parameter on the referenced surface.
475 * \return New GEOM_Object, containing the created point.
477 GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
478 in double theUParameter,
479 in double theVParameter);
482 * Create a point on the given surface, projecting given point
483 * \param theRefSurf The referenced surface.
484 * \param theXParameter X co-ordinate of point to project on curve
485 * \param theYParameter Y co-ordinate of point to project on curve
486 * \param theZParameter Z co-ordinate of point to project on curve
487 * \return New GEOM_Object, containing the created point.
489 GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
490 in double theXParameter,
491 in double theYarameter,
492 in double theZPameter);
496 * Create a point, on two lines intersection.
497 * \param theRefLine1, theRefLine2 The referenced lines.
498 * \return New GEOM_Object, containing the created point.
500 GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
501 in GEOM_Object theRefLine2);
504 * Create a vector, corresponding to tangent to the given parameter on the given curve.
505 * \param theRefCurve The referenced curve.
506 * \param theParameter Value of parameter on the referenced curve.This value should be have value
507 * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
508 * \last parameter of curve.
509 * \return New GEOM_Object, containing the created point.
511 GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
512 in double theParameter);
515 * Create a vector with the given components.
516 * \param theDX X component of the vector.
517 * \param theDY Y component of the vector.
518 * \param theDZ Z component of the vector.
519 * \return New GEOM_Object, containing the created vector.
521 GEOM_Object MakeVectorDXDYDZ (in double theDX,
526 * Create a vector between two points.
527 * \param thePnt1 Start point for the vector.
528 * \param thePnt2 End point for the vector.
529 * \return New GEOM_Object, containing the created vector.
531 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
534 * Create a line, passing through the given point
535 * and parrallel to the given direction
536 * \param thePnt Point. The resulting line will pass through it.
537 * \param theDir Direction. The resulting line will be parallel to it.
538 * \return New GEOM_Object, containing the created line.
540 GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
543 * Create a line, passing through the given points
544 * \param thePnt1 First of two points, defining the line.
545 * \param thePnt2 Second of two points, defining the line.
546 * \return New GEOM_Object, containing the created line.
548 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
551 * Create a line, given by two faces intersection.
552 * \param theFace1 First of two faces, defining the line.
553 * \param theFace2 Second of two faces, defining the line.
554 * \return New GEOM_Object, containing the created line.
556 GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
559 * Create a plane, passing through the three given points
560 * \param thePnt1 First of three points, defining the plane.
561 * \param thePnt2 Second of three points, defining the plane.
562 * \param thePnt3 Fird of three points, defining the plane.
563 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
564 * \return New GEOM_Object, containing the created plane.
566 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
567 in GEOM_Object thePnt2,
568 in GEOM_Object thePnt3,
569 in double theTrimSize);
572 * Create a plane, passing through the given point
573 * and normal to the given vector.
574 * \param thePnt Point, the plane has to pass through.
575 * \param theVec Vector, defining the plane normal direction.
576 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
577 * \return New GEOM_Object, containing the created plane.
579 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
580 in GEOM_Object theVec,
581 in double theTrimSize);
584 * Create a plane, similar to the existing one, but with another size of representing face.
585 * \param theFace Referenced plane or LCS(Marker).
586 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
587 * \return New GEOM_Object, containing the created plane.
589 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
590 in double theTrimSize);
593 * Create a plane, by two vectors.
594 * \param theVec1 Vector1, the plane has to pass through first point of this vector.
595 * \param theVec Vector2, defining the plane normal direction.
596 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
597 * \return New GEOM_Object, containing the created plane.
599 GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
600 in GEOM_Object theVec2,
601 in double theTrimSize);
604 * Create a plane, defined by local coordinate system.
605 * \param theLCS Referenced LCS(Marker).
606 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
607 * \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
608 * \return New GEOM_Object, containing the created plane.
610 GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
611 in double theTrimSize,
612 in double theOrientation);
615 * Create a local coordinate system.
616 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
617 * \param theXDX,theXDY,theXDZ Three components of OX direction
618 * \param theYDX,theYDY,theYDZ Three components of OY direction
619 * \return New GEOM_Object, containing the created coordinate system.
621 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
622 in double theXDX, in double theXDY, in double theXDZ,
623 in double theYDX, in double theYDY, in double theYDZ);
626 * Create a local coordinate system from shape.
627 * \param theShape The initial shape to detect the coordinate system.
628 * \return New GEOM_Object, containing the created coordinate system.
630 GEOM_Object MakeMarkerFromShape (in GEOM_Object theShape);
633 * Create a local coordinate system from point and two vectors (DX, DY).
634 * \param theOrigin Point of coordinate system origin.
635 * \param theXVec Vector of X direction.
636 * \param theYVec Vector of Y direction.
637 * \return New GEOM_Object, containing the created coordinate system.
639 GEOM_Object MakeMarkerPntTwoVec (in GEOM_Object theOrigin,
640 in GEOM_Object theXVec, in GEOM_Object theYVec);
643 * Create a tangent plane to specified face in the point with specified parameters.
644 * Values of parameters should be between 0. and 1.0
645 * \param theFace - face for which tangent plane shuold be built.
646 * \param theParameterU - value of parameter by U
647 * \param theParameterV - value of parameter Vthe
648 * \param theTrimSize - defines sizes of created face
649 * \return New GEOM_Object, containing the face built on tangent plane.
651 GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
652 in double theParameterU,
653 in double theParameterV,
654 in double theTrimSize);
657 interface GEOM_ITransformOperations : GEOM_IOperations
660 * Translate the given object along the vector, specified by its end points.
661 * \param theObject The object to be translated.
662 * \param thePoint1 Start point of translation vector.
663 * \param thePoint2 End point of translation vector.
666 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
667 in GEOM_Object thePoint1,
668 in GEOM_Object thePoint2);
671 * Translate the given object along the vector, specified
672 * by its end points, creating its copy before the translation.
673 * \param theObject The object to be translated.
674 * \param thePoint1 Start point of translation vector.
675 * \param thePoint2 End point of translation vector.
676 * \return New GEOM_Object, containing the translated object.
678 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
679 in GEOM_Object thePoint1,
680 in GEOM_Object thePoint2);
683 * Translate the given object along the vector, specified by its components.
684 * \param theObject The object to be translated.
685 * \param theDX,theDY,theDZ Components of translation vector.
688 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
689 in double theDX, in double theDY, in double theDZ);
692 * Translate the given object along the vector, specified
693 * by its components, creating its copy before the translation.
694 * \param theObject The object to be translated.
695 * \param theDX,theDY,theDZ Components of translation vector.
696 * \return New GEOM_Object, containing the translated object.
698 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
699 in double theDX, in double theDY, in double theDZ);
703 * Translate the given object along the given vector.
704 * \param theObject The object to be translated.
705 * \param theVector Translation vector, giving both direction and distance.
708 GEOM_Object TranslateVector (in GEOM_Object theObject,
709 in GEOM_Object theVector);
712 * Translate the given object along the given vector,
713 * creating its copy before the translation.
714 * \param theObject The object to be translated.
715 * \param theVector Translation vector, giving both direction and distance.
716 * \return New GEOM_Object, containing the translated object.
718 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
719 in GEOM_Object theVector);
722 * Translate the given object along the given vector on given distance,
723 * creating its copy before the translation.
724 * \param theObject The object to be translated.
725 * \param theVector Translation vector, giving a direction.
726 * \param theDistance Translation distance, giving a distance.
727 * \param theCope Translation copy, creating its copy if true.
728 * \return New GEOM_Object, containing the translated object.
730 GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
731 in GEOM_Object theVector,
732 in double theDistance,
736 * Translate the given object along the given vector a given number times
737 * \param theObject The object to be translated.
738 * \param theVector Direction of the translation.
739 * \param theStep Distance to translate on.
740 * \param theNbTimes Quantity of translations to be done.
741 * \return New GEOM_Object, containing compound of all
742 * the shapes, obtained after each translation.
744 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
745 in GEOM_Object theVector,
750 * Conseqently apply two specified translations to theObject specified number of times.
751 * \param theObject The object to be translated.
752 * \param theVector1 Direction of the first translation.
753 * \param theStep1 Step of the first translation.
754 * \param theNbTimes1 Quantity of translations to be done along theVector1.
755 * \param theVector2 Direction of the second translation.
756 * \param theStep2 Step of the second translation.
757 * \param theNbTimes2 Quantity of translations to be done along theVector2.
758 * \return New GEOM_Object, containing compound of all
759 * the shapes, obtained after each translation.
761 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
762 in GEOM_Object theVector1,
765 in GEOM_Object theVector2,
767 in long theNbTimes2);
770 * Rotate given object around vector perpendicular to plane containing three points.
771 * \param theObject The object to be rotated.
772 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
773 * containing the three points.
774 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
777 GEOM_Object RotateThreePoints (in GEOM_Object theObject,
778 in GEOM_Object theCentPoint,
779 in GEOM_Object thePoint1,
780 in GEOM_Object thePoint2);
784 * Rotate given object around vector perpendicular to plane containing three points.
785 * Creating its copy before the rotatation.
786 * \param theObject The object to be rotated.
787 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
788 * containing the three points.
789 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
790 * \return New GEOM_Object, containing the rotated object.
792 GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
793 in GEOM_Object theCentPoint,
794 in GEOM_Object thePoint1,
795 in GEOM_Object thePoint2);
798 * Rotate the given object around the given axis on the given angle.
799 * \param theObject The object to be rotated.
800 * \param theAxis Rotation axis.
801 * \param theAngle Rotation angle in radians.
804 GEOM_Object Rotate (in GEOM_Object theObject,
805 in GEOM_Object theAxis,
810 * Rotate the given object around the given axis
811 * on the given angle, creating its copy before the rotatation.
812 * \param theObject The object to be rotated.
813 * \param theAxis Rotation axis.
814 * \param theAngle Rotation angle in radians.
815 * \return New GEOM_Object, containing the rotated object.
817 GEOM_Object RotateCopy (in GEOM_Object theObject,
818 in GEOM_Object theAxis,
823 * Rotate the given object around the given axis a given number times.
824 * Rotation angle will be 2*PI/theNbTimes.
825 * \param theObject The object to be rotated.
826 * \param theAxis The rotation axis.
827 * \param theNbTimes Quantity of rotations to be done.
828 * \return New GEOM_Object, containing compound of all the
829 * shapes, obtained after each rotation.
831 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
832 in GEOM_Object theAxis,
836 * Rotate the given object around the
837 * given axis on the given angle a given number
838 * times and multi-translate each rotation result.
839 * Translation direction passes through center of gravity
840 * of rotated shape and its projection on the rotation axis.
841 * \param theObject The object to be rotated.
842 * \param theAxis Rotation axis.
843 * \param theAngle Rotation angle in graduces.
844 * \param theNbTimes1 Quantity of rotations to be done.
845 * \param theStep Translation distance.
846 * \param theNbTimes2 Quantity of translations to be done.
847 * \return New GEOM_Object, containing compound of all the
848 * shapes, obtained after each transformation.
850 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
851 in GEOM_Object theAxis,
855 in long theNbTimes2);
858 * Replace the given object by an object,
859 * symmetrical to it relatively the given plane.
860 * \param theObject The object to be mirrored.
861 * \param thePlane Plane of symmetry.
863 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
866 * Create an object, symmetrical
867 * to the given one relatively the given plane.
868 * \param theObject The object to be mirrored.
869 * \param thePlane Plane of symmetry.
870 * \return New GEOM_Object, containing the mirrored shape.
872 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
875 * Replace the given object by an object,
876 * symmetrical to it relatively the given axis.
877 * \param theObject The object to be mirrored.
878 * \param theAxis Axis of symmetry.
881 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
884 * Create an object, symmetrical
885 * to the given one relatively the given axis.
886 * \param theObject The object to be mirrored.
887 * \param theAxis Axis of symmetry.
888 * \return New GEOM_Object, containing the mirrored object.
890 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
893 * Replace the given object by an object, symmetrical to it relatively the given point.
894 * \param theObject The object to be mirrored.
895 * \param thePoint Point of symmetry.
898 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
901 * Create an object, symmetrical to the given one relatively the given point.
902 * \param theObject The object to be mirrored.
903 * \param thePoint Point of symmetry.
904 * \return New GEOM_Object, containing the mirrored object.
906 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
909 * Replace the given object by its offset.
910 * \param theObject The base object for the offset.
911 * \param theOffset Offset value.
914 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
917 * Create new object as offset of the given one.
918 * \param theObject The base object for the offset.
919 * \param theOffset Offset value.
920 * \return New GEOM_Object, containing the offset object.
922 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
925 * Create new object as projection of the given one on a 2D surface.
926 * \param theSource The source object for the projection. It can be a point, edge or wire.
927 * \param theTarget The target object. It can be planar or cylindrical face.
928 * \return New GEOM_Object, containing the projection.
930 GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget);
933 * Scale the given object by the factor.
934 * \param theObject The object to be scaled.
935 * \param thePoint Center point for scaling.
936 * \param theFactor Scaling factor value.
939 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
940 in double theFactor);
943 * Scale the given object by the factor, creating its copy before the scaling.
944 * \param theObject The object to be scaled.
945 * \param thePoint Center point for scaling.
946 * \param theFactor Scaling factor value.
947 * \return New GEOM_Object, containing the scaled shape.
949 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
950 in double theFactor);
953 * Scale the given object by different factors along coordinate axes.
954 * \param theObject The object to be scaled.
955 * \param thePoint Center point for scaling.
956 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
959 GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
960 in GEOM_Object thePoint,
961 in double theFactorX,
962 in double theFactorY,
963 in double theFactorZ);
966 * Scale the given object by different factors along coordinate axes,
967 * creating its copy before the scaling.
968 * \param theObject The object to be scaled.
969 * \param thePoint Center point for scaling.
970 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
971 * \return New GEOM_Object, containing the scaled shape.
973 GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
974 in GEOM_Object thePoint,
975 in double theFactorX,
976 in double theFactorY,
977 in double theFactorZ);
980 * Modify the Location of the given object by LCS.
981 * \param theObject The object to be displaced.
982 * \param theStartLCS Coordinate system to perform displacement from it.
983 * If \a theStartLCS is NULL, displacement
984 * will be performed from global CS.
985 * If \a theObject itself is used as \a theStartLCS,
986 * its location will be changed to \a theEndLCS.
987 * \param theEndLCS Coordinate system to perform displacement to it.
990 GEOM_Object PositionShape (in GEOM_Object theObject,
991 in GEOM_Object theStartLCS,
992 in GEOM_Object theEndLCS);
995 * Modify the Location of the given object by LCS,
996 * creating its copy before the setting.
997 * \param theObject The object to be displaced.
998 * \param theStartLCS Coordinate system to perform displacement from it.
999 * If \a theStartLCS is NULL, displacement
1000 * will be performed from global CS.
1001 * If \a theObject itself is used as \a theStartLCS,
1002 * its location will be changed to \a theEndLCS.
1003 * \param theEndLCS Coordinate system to perform displacement to it.
1004 * \return New GEOM_Object, containing the displaced shape.
1006 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
1007 in GEOM_Object theStartLCS,
1008 in GEOM_Object theEndLCS);
1011 * Modify the Location of the given object by Path,
1012 * \param theObject The object to be displaced.
1013 * \param thePath Wire or Edge along that the object will be translated.
1014 * \param theDistance progress of Path (0 = actual location, 1 = end of path location).
1015 * \param theCopy is a true or false parameter. true is to create a copy, false to move the object.
1016 * \param theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
1017 * \return New GEOM_Object, containing the displaced shape.
1019 GEOM_Object PositionAlongPath (in GEOM_Object theObject,
1020 in GEOM_Object thePath,
1021 in double theDistance,
1023 in boolean theReverse);
1026 * Transform the shape in the same way what was used for the sample shape creation.
1027 * \param theObject The object to be transformed.
1028 * \param theSample The object containing information about required transformation.
1029 * \note Implementation of this method is limited by multi-transformations now.
1030 * \note Internal method.
1031 * \return New GEOM_Object, containing the transformed shape.
1033 GEOM_Object TransformLikeOtherCopy (in GEOM_Object theObject,
1034 in GEOM_Object theSample);
1037 * Recompute the shape from its arguments.
1038 * \param theObject The object to be recomputed.
1039 * \return theObject.
1041 GEOM_Object RecomputeObject (in GEOM_Object theObject);
1045 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
1046 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
1047 * Pipe (extrusion along contour), Revolution, Solid (from shell).
1049 interface GEOM_I3DPrimOperations : GEOM_IOperations
1052 * Create a box with specified dimensions along the coordinate axes
1053 * and with edges, parallel to the coordinate axes.
1054 * Center of the box will be at point (DX/2, DY/2, DZ/2).
1055 * \param theDX Length of Box edges, parallel to OX axis.
1056 * \param theDY Length of Box edges, parallel to OY axis.
1057 * \param theDZ Length of Box edges, parallel to OZ axis.
1058 * \return New GEOM_Object, containing the created box.
1060 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
1063 * Create a box with two specified opposite vertices,
1064 * and with edges, parallel to the coordinate axes
1065 * \param thePnt1 First of two opposite vertices.
1066 * \param thePnt2 Second of two opposite vertices.
1067 * \return New GEOM_Object, containing the created box.
1069 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1072 * Create a face specified dimensions along OX-OY coordinate axes,
1073 * with edges parallel to the coordinate axes.
1074 * Center of the face will be at point (0, 0, 0).
1075 * \param theH Height of the Face.
1076 * \param theW Width of the Face.
1077 * \param theOrientation Orientation belong axis OXY OYZ OZX
1078 * \return New GEOM_Object, containing the created face.
1080 GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
1082 * Create a face by normale vector or edge and two specified sizes,
1083 * vertical (H) and horisontal (W).
1084 * \param theVec defines plane.
1085 * \param theH vertical size (height).
1086 * \param theW horisontal size (width).
1087 * \return New GEOM_Object, containing the created face.
1089 GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
1091 * Create a Disk (circular face) with given center, normal vector and radius.
1092 * \param thePnt disk center.
1093 * \param theVec Vector, normal to the plane of the disk.
1094 * \param theR Disk radius.
1095 * \return New GEOM_Object, containing the created disk.
1097 GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
1098 in GEOM_Object theVec,
1101 * Create a disk (circular face), passing through three given points
1102 * \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
1103 * \return New GEOM_Object, containing the created disk.
1105 GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
1106 in GEOM_Object thePnt2,
1107 in GEOM_Object thePnt3);
1110 * Create a disk specified dimensions along OX-OY coordinate axes,
1111 * Center of the disk at point (0, 0, 0).
1112 * \param theR of the Disk.
1113 * \param theOrientation Orientation belong axis OXY OYZ OZX
1114 * \return New GEOM_Object, containing the created disk.
1116 GEOM_Object MakeDiskR (in double theR, in short theOrientation);
1119 * Create a cylinder with given radius and height at
1120 * the origin of coordinate system. Axis of the cylinder
1121 * will be collinear to the OZ axis of the coordinate system.
1122 * \param theR Cylinder radius.
1123 * \param theH Cylinder height.
1124 * \return New GEOM_Object, containing the created cylinder.
1126 GEOM_Object MakeCylinderRH (in double theR, in double theH);
1129 * Create a cylinder with given base point, axis, radius and height.
1130 * \param thePnt Central point of cylinder base.
1131 * \param theAxis Cylinder axis.
1132 * \param theR Cylinder radius.
1133 * \param theH Cylinder height.
1134 * \return New GEOM_Object, containing the created cylinder.
1136 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
1137 in GEOM_Object theAxis,
1142 * Create a cone with given height and radiuses at
1143 * the origin of coordinate system. Axis of the cone will
1144 * be collinear to the OZ axis of the coordinate system.
1145 * \param theR1 Radius of the first cone base.
1146 * \param theR2 Radius of the second cone base.
1147 * \note If both radiuses are non-zero, the cone will be truncated.
1148 * \note If the radiuses are equal, a cylinder will be created instead.
1149 * \param theH Cone height.
1150 * \return New GEOM_Object, containing the created cone.
1152 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
1155 * Create a cone with given base point, axis, height and radiuses.
1156 * \param thePnt Central point of the first cone base.
1157 * \param theAxis Cone axis.
1158 * \param theR1 Radius of the first cone base.
1159 * \param theR2 Radius of the second cone base.
1160 * \note If both radiuses are non-zero, the cone will be truncated.
1161 * \note If the radiuses are equal, a cylinder will be created instead.
1162 * \param theH Cone height.
1163 * \return New GEOM_Object, containing the created cone.
1165 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1166 in GEOM_Object theAxis,
1172 * Create a torus with given radiuses at the origin of coordinate system.
1173 * \param theRMajor Torus major radius.
1174 * \param theRMinor Torus minor radius.
1175 * \return New GEOM_Object, containing the created torus.
1177 GEOM_Object MakeTorusRR (in double theRMajor,
1178 in double theRMinor);
1181 * Create a torus with given center, normal vector and radiuses.
1182 * \param thePnt Torus central point.
1183 * \param theVec Torus axis of symmetry.
1184 * \param theRMajor Torus major radius.
1185 * \param theRMinor Torus minor radius.
1186 * \return New GEOM_Object, containing the created torus.
1188 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1189 in GEOM_Object theVec,
1190 in double theRMajor,
1191 in double theRMinor);
1194 * Create a sphere with given radius at the origin of coordinate system.
1195 * \param theR Sphere radius.
1196 * \return New GEOM_Object, containing the created sphere.
1198 GEOM_Object MakeSphereR (in double theR);
1201 * Create a sphere with given center and radius.
1202 * \param thePnt Sphere center.
1203 * \param theR Sphere radius.
1204 * \return New GEOM_Object, containing the created .
1206 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1209 * Create a shape by extrusion of the base shape along the vector,
1210 * i.e. all the space, transfixed by the base shape during its translation
1211 * along the vector on the given distance.
1212 * \param theBase Base shape to be extruded.
1213 * \param theVec Direction of extrusion.
1214 * \param theH Prism dimension along theVec.
1215 * \return New GEOM_Object, containing the created prism.
1217 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1218 in GEOM_Object theVec,
1220 /* The Same Prism but in 2 directions (forward&backward) */
1221 GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1222 in GEOM_Object theVec,
1224 /* The Same as MakePrismVecH but with scaling */
1225 GEOM_Object MakePrismVecHWithScaling (in GEOM_Object theBase,
1226 in GEOM_Object theVec,
1228 in double theScaleFactor);
1231 * Create a shape by extrusion of the base shape along a vector, defined by two points.
1232 * \param theBase Base shape to be extruded.
1233 * \param thePoint1 First end of extrusion vector.
1234 * \param thePoint2 Second end of extrusion vector.
1235 * \return New GEOM_Object, containing the created prism.
1237 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1238 in GEOM_Object thePoint1,
1239 in GEOM_Object thePoint2);
1240 /* The same prism but in two directions forward&backward */
1241 GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1242 in GEOM_Object thePoint1,
1243 in GEOM_Object thePoint2);
1244 /* The Same as MakePrismTwoPnt but with scaling */
1245 GEOM_Object MakePrismTwoPntWithScaling (in GEOM_Object theBase,
1246 in GEOM_Object thePoint1,
1247 in GEOM_Object thePoint2,
1248 in double theScaleFactor);
1251 * Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1252 * \param theBase Base shape to be extruded.
1253 * \param DX, DY, DZ end of extrusion vector.
1254 * \return New GEOM_Object, containing the created prism.
1256 GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1257 in double theDX, in double theDY, in double theDZ);
1258 /* The same prism but in two directions forward&backward */
1259 GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1260 in double theDX, in double theDY, in double theDZ);
1261 /* The Same as MakePrismDXDYDZ but with scaling */
1262 GEOM_Object MakePrismDXDYDZWithScaling (in GEOM_Object theBase,
1263 in double theDX, in double theDY, in double theDZ,
1264 in double theScaleFactor);
1267 * Create a shape by extrusion of the base shape along
1268 * the path shape. The path shape can be a wire or an edge.
1269 * \param theBase Base shape to be extruded.
1270 * \param thePath Path shape to extrude the base shape along it.
1271 * \return New GEOM_Object, containing the created pipe.
1273 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1276 * Create a shape by revolution of the base shape around the axis
1277 * on the given angle, i.e. all the space, transfixed by the base
1278 * shape during its rotation around the axis on the given angle.
1279 * \param theBase Base shape to be rotated.
1280 * \param theAxis Rotation axis.
1281 * \param theAngle Rotation angle in radians.
1282 * \return New GEOM_Object, containing the created revolution.
1284 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1285 in GEOM_Object theAxis,
1286 in double theAngle);
1287 /* The Same Revolution but in both ways forward&backward */
1288 GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1289 in GEOM_Object theAxis,
1290 in double theAngle);
1293 * Create a filling from the given compound of contours.
1294 * \param theMinDeg a minimal degree of BSpline surface to create
1295 * \param theMaxDeg a maximal degree of BSpline surface to create
1296 * \param theTol2D a 2d tolerance to be reached
1297 * \param theTol3D a 3d tolerance to be reached
1298 * \param theNbIter a number of iteration of approximation algorithm
1299 * \param theMethod Kind of method to perform filling operation.
1300 * \return New GEOM_Object, containing the created filling surface.
1302 GEOM_Object MakeFilling (in GEOM_Object theShape,
1303 in long theMinDeg, in long theMaxDeg,
1304 in double theTol2D, in double theTol3D,
1306 in filling_oper_method theMethod,
1307 in boolean theApprox);
1310 * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1311 * \param theSeqSections - set of specified sections.
1312 * \param theModeSolid - mode defining building solid or shell
1313 * \param thePreci - precision 3D used for smoothing by default 1.e-6
1314 * \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1315 * \return New GEOM_Object, containing the created shell or solid.
1317 GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1318 in boolean theModeSolid,
1320 in boolean theRuled);
1323 * Create a shape by extrusion of the profile shape along
1324 * the path shape. The path shape can be a wire or an edge.
1325 * the several profiles can be specified in the several locations of path.
1326 * \param theSeqBases - list of Bases shape to be extruded.
1327 * \param theLocations - list of locations on the path corresponding
1328 * specified list of the Bases shapes. Number of locations
1329 * should be equal to number of bases or list of locations can be empty.
1330 * \param thePath - Path shape to extrude the base shape along it.
1331 * \param theWithContact - the mode defining that the section is translated to be in
1332 * contact with the spine.
1333 * \param - WithCorrection - defining that the section is rotated to be
1334 * orthogonal to the spine tangent in the correspondent point
1335 * \return New GEOM_Object, containing the created pipe.
1337 GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1338 in ListOfGO theLocations,
1339 in GEOM_Object thePath,
1340 in boolean theWithContact ,
1341 in boolean theWithCorrection );
1344 * Create a shape by extrusion of the profile shape along
1345 * the path shape. The path shape can be a shell or a face.
1346 * the several profiles can be specified in the several locations of path.
1347 * \param theSeqBases - list of Bases shape to be extruded.
1348 * \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
1349 * \param theLocations - list of locations on the path corresponding
1350 * specified list of the Bases shapes. Number of locations
1351 * should be equal to number of bases.
1352 * \param thePath - Path shape to extrude the base shape along it.
1353 * \param theWithContact - the mode defining that the section is translated to be in
1354 * contact with the spine.
1355 * \param - WithCorrection - defining that the section is rotated to be
1356 * orthogonal to the spine tangent in the correspondent point
1357 * \return New GEOM_Object, containing the created pipe.
1359 GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1360 in ListOfGO theSeqSubBases,
1361 in ListOfGO theLocations,
1362 in GEOM_Object thePath,
1363 in boolean theWithContact ,
1364 in boolean theWithCorrection );
1367 * Create solids between given sections
1368 * \param theSeqBases - list of sections (shell or face).
1369 * \param theLocations - list of corresponding vertexes
1370 * \return New GEOM_Object, containing the created solids.
1372 GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1373 in ListOfGO theLocations);
1376 * Create a shape by extrusion of the base shape along
1377 * the path shape with constant bi-normal direction along the given vector.
1378 * The path shape can be a wire or an edge.
1379 * \param theBase Base shape to be extruded.
1380 * \param thePath Path shape to extrude the base shape along it.
1381 * \param theVec Vector defines a constant binormal direction to keep the
1382 * same angle beetween the Direction and the sections
1383 * along the sweep surface.
1384 * \return New GEOM_Object, containing the created pipe.
1386 GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1387 in GEOM_Object thePath,
1388 in GEOM_Object theVec);
1393 * GEOM_IShapesOperations: Interface for Shapes creation:
1394 * Edge from two points, Wire from edges, Face from wire,
1395 * Shell from faces, Solid from shells, Compound from shapes
1397 interface GEOM_IShapesOperations : GEOM_IOperations
1400 * Create a linear edge with specified ends.
1401 * \param thePnt1 Point for the first end of edge.
1402 * \param thePnt2 Point for the second end of edge.
1403 * \return New GEOM_Object, containing the created edge.
1405 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1408 * Create an edge on another edge, corresponding to the given length on the given edge.
1409 * \param theRefCurve The referenced edge.
1410 * \param theLength Length on the referenced edge. It can be
1411 * negative for extrapolation on base curve.
1412 * \param theStartPoint Any vertex close to one of edge's
1413 * ends to select start point among them.
1414 * If NULL, fist vertex is used.
1415 * \return New GEOM_Object, containing the created edge.
1417 GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
1418 in double theLength,
1419 in GEOM_Object theStartPoint);
1422 * Create an edge from specified wire.
1423 * \param theWire source Wire.
1424 * \param theLinearTolerance linear tolerance value
1425 * \param theAngularTolerance angular tolerance value
1426 * \return New GEOM_Object, containing the created edge.
1428 GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
1429 in double theLinearTolerance,
1430 in double theAngularTolerance);
1433 * Create a wire from the set of edges and wires.
1434 * \param theEdgesAndWires List of edge and/or wires.
1435 * \param theTolerance Maximum distance between vertices, that will be merged.
1436 * Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1437 * \return New GEOM_Object, containing the created wire.
1439 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1440 in double theTolerance);
1443 * Create a face on the given wire.
1444 * \param theWire closed Wire or Edge to build the face on.
1445 * \param isPlanarWanted If TRUE, only planar face will be built.
1446 * If impossible, NULL object will be returned.
1447 * \return New GEOM_Object, containing the created face.
1449 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1452 * Create a face on the given wires set.
1453 * \param theWires List of closed wires or edges to build the face on.
1454 * \param isPlanarWanted If TRUE, only planar face will be built.
1455 * If impossible, NULL object will be returned.
1456 * \return New GEOM_Object, containing the created face.
1458 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1461 * Create a shell from the set of faces and shells.
1462 * \param theFacesAndShells List of faces and/or shells.
1463 * \return New GEOM_Object, containing the created shell.
1465 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1468 * Create a solid, bounded by the given shell.
1469 * \param theShell Bounding shell.
1470 * \return New GEOM_Object, containing the created solid.
1472 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1475 * Create a solid, bounded by the given shells.
1476 * \param theShells Bounding shells.
1477 * \return New GEOM_Object, containing the created solid.
1479 GEOM_Object MakeSolidShells (in ListOfGO theShells);
1482 * Create a compound of the given shapes.
1483 * \param theShapes List of shapes to put in compound.
1484 * \return New GEOM_Object, containing the created compound.
1486 GEOM_Object MakeCompound (in ListOfGO theShapes);
1489 * Replace coincident faces in theShape by one face.
1490 * \param theShape Initial shape.
1491 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1492 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1493 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
1495 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1498 * Find coincident faces in theShape for possible gluing.
1499 * \param theShape Initial shape.
1500 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1503 ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1506 * Replace coincident faces in theShape by one face
1507 * in compliance with given list of faces
1508 * \param theShape Initial shape.
1509 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1510 * \param theFaces List of faces for gluing.
1511 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1512 * \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
1513 * will be glued, otherwise only the edges,
1514 * belonging to <VAR>theFaces</VAR>.
1515 * \return New GEOM_Object, containing a copy of theShape without some faces.
1517 GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1518 in ListOfGO theFaces, in boolean doKeepNonSolids,
1519 in boolean doGlueAllEdges);
1522 * Replace coincident edges in theShape by one edge.
1523 * \param theShape Initial shape.
1524 * \param theTolerance Maximum distance between edges, which can be considered as coincident.
1525 * \return New GEOM_Object, containing a copy of theShape without coincident edges.
1527 GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
1530 * Find coincident edges in theShape for possible gluing.
1531 * \param theShape Initial shape.
1532 * \param theTolerance Maximum distance between edges, which can be considered as coincident.
1535 ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
1538 * Replace coincident edges in theShape by one edge
1539 * in compliance with given list of edges
1540 * \param theShape Initial shape.
1541 * \param theTolerance Maximum distance between edges, which can be considered as coincident.
1542 * \param theFaces List of edges for gluing.
1543 * \return New GEOM_Object, containing a copy of theShape without some edges.
1545 GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
1546 in double theTolerance,
1547 in ListOfGO theEdges);
1550 * Get all sub-shapes and groups of \a theShape,
1551 * that were created already by any other methods.
1552 * \param theShape Any shape.
1553 * \param theGroupsOnly If this parameter is TRUE, only groups will be
1554 * returned, else all found sub-shapes and groups.
1555 * \return List of existing sub-objects of \a theShape.
1557 ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
1558 in boolean theGroupsOnly);
1561 * Deprecated method. Use MakeAllSubShapes() instead.
1563 ListOfGO MakeExplode (in GEOM_Object theShape,
1564 in long theShapeType,
1565 in boolean isSorted);
1568 * Explode a shape on sub-shapes of a given type. If the
1569 * shape itself has the given type, it is also returned.
1570 * \param theShape Shape to be exploded.
1571 * \param theShapeType Type of sub-shapes to be retrieved.
1572 * \param isSorted If this parameter is TRUE, sub-shapes will be
1573 * sorted by coordinates of their gravity centers.
1574 * \return List of sub-shapes of type theShapeType, contained in theShape.
1576 ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
1577 in long theShapeType,
1578 in boolean isSorted);
1581 * Extract all sub-shapes of the given type from
1582 * the given shape, excluding the shape itself.
1583 * \param theShape Shape to be exploded.
1584 * \param theShapeType Type of sub-shapes to be retrieved.
1585 * \param isSorted If this parameter is TRUE, sub-shapes will be
1586 * sorted by coordinates of their gravity centers.
1587 * \return List of sub-shapes of type theShapeType, contained in theShape.
1589 ListOfGO ExtractSubShapes (in GEOM_Object theShape,
1590 in long theShapeType,
1591 in boolean isSorted);
1594 * Deprecated method. Use GetAllSubShapesIDs() instead.
1596 ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1597 in long theShapeType,
1598 in boolean isSorted);
1601 * Explode a shape on sub-shapes of a given type.
1602 * Does the same, as MakeAllSubShapes, but returns IDs of
1603 * sub-shapes, not GEOM_Objects. It works faster.
1604 * \param theShape Shape to be exploded.
1605 * \param theShapeType Type of sub-shapes to be retrieved.
1606 * \param isSorted If this parameter is TRUE, sub-shapes will be
1607 * sorted by coordinates of their gravity centers.
1608 * \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1610 ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
1611 in long theShapeType,
1612 in boolean isSorted);
1615 * Get a sub-shape defined by its unique ID inside \a theMainShape
1616 * \param theMainShape Main shape.
1617 * \param theID Unique ID of sub-shape inside \a theMainShape.
1618 * \return GEOM_Object, corresponding to found sub-shape.
1619 * \note The sub-shape GEOM_Objects can has ONLY ONE function.
1620 * Don't try to apply modification operations (without copy) on them.
1622 GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1626 * Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
1627 * \param theMainShape Main shape.
1628 * \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
1629 * \return List of GEOM_Objects, corresponding to found sub-shapes.
1630 * \note The sub-shape GEOM_Objects can has ONLY ONE function.
1631 * Don't try to apply modification operations (without copy) on them.
1633 ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
1634 in ListOfLong theIndices);
1637 * Get global index of \a theSubShape in \a theMainShape.
1638 * \param theMainShape Main shape.
1639 * \param theSubShape Sub-shape of the main shape.
1640 * \return global index of \a theSubShape in \a theMainShape.
1642 long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1645 * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1646 * Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1647 * to generate automatic names for sub-shapes, when publishing them in a study.
1648 * \param theMainShape Main shape.
1649 * \param theSubShape Sub-shape of the main shape.
1650 * \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1652 long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1655 * \brief Get name of type of \a theShape.
1657 * Use wide type notation, taking into consideration both topology and geometry of the shape.
1658 * Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1659 * to generate automatic names for sub-shapes, when publishing them in a study.
1660 * \param theShape The shape to get a type of.
1661 * \return String, containing a type name of \a theShape.
1663 string GetShapeTypeString (in GEOM_Object theShape);
1666 * Count number of faces in the given shape.
1667 * \param theShape Shape to count faces in.
1668 * \return Number of faces in the given shape.
1670 long NumberOfFaces (in GEOM_Object theShape);
1673 * Count number of edges in the given shape.
1674 * \param theShape Shape to count edges in.
1675 * \return Number of edges in theShape.
1677 long NumberOfEdges (in GEOM_Object theShape);
1680 * Count number of sub-shapes of type \a theShapeType in the given shape.
1681 * \param theShape Shape to count sub-shapes in.
1682 * \param theShapeType The type of sub-shapes to count.
1683 * \return Number of sub-shapes of type \a theShapeType in \a theShape.
1685 long NumberOfSubShapes (in GEOM_Object theShape,
1686 in long theShapeType);
1689 * Reverses an orientation the given shape.
1690 * \param theShape Shape to be reversed.
1691 * \return The reversed copy of theShape.
1693 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1696 * Retrieve all free faces from the given shape.
1697 * Free face is a face, which is not shared between two shells of the shape.
1698 * \param theShape Shape to find free faces in.
1699 * \return List of IDs of all free faces, contained in theShape.
1701 ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1704 * Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1705 * \param theShape1 Shape to find sub-shapes in.
1706 * \param theShape2 Shape to find shared sub-shapes with.
1707 * \param theShapeType Type of sub-shapes to be retrieved.
1708 * \return List of sub-shapes of theShape1, shared with theShape2.
1710 ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1711 in GEOM_Object theShape2,
1712 in long theShapeType);
1715 * Get all sub-shapes, shared by all shapes in the list \a theShapes.
1716 * \param theShapes Shapes to find common sub-shapes of.
1717 * \param theShapeType Type of sub-shapes to be retrieved.
1718 * \return List of objects, that are sub-shapes of all given shapes.
1720 ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
1721 in long theShapeType);
1724 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1725 * the specified plane by the certain way, defined through \a theState parameter.
1726 * \param theShape Shape to find sub-shapes of.
1727 * \param theShapeType Type of sub-shapes to be retrieved.
1728 * \param theAx1 Vector (or line, or linear edge), specifying normal
1729 * direction and location of the plane to find shapes on.
1730 * \param theState The state of the sub-shapes to find.
1731 * \return List of all found sub-shapes.
1733 ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1734 in long theShapeType,
1735 in GEOM_Object theAx1,
1736 in shape_state theState);
1738 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1739 * the specified plane by the certain way, defined through \a theState parameter.
1740 * \param theShape Shape to find sub-shapes of.
1741 * \param theShapeType Type of sub-shapes to be retrieved.
1742 * \param theAx1 Vector (or line, or linear edge), specifying normal
1743 * direction of the plane to find shapes on.
1744 * \param thePnt Point specifying location of the plane to find shapes on.
1745 * \param theState The state of the sub-shapes to find.
1746 * \return List of all found sub-shapes.
1748 ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1749 in long theShapeType,
1750 in GEOM_Object theAx1,
1751 in GEOM_Object thePnt,
1752 in shape_state theState);
1757 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1758 * the specified cylinder by the certain way, defined through \a theState parameter.
1759 * \param theShape Shape to find sub-shapes of.
1760 * \param theShapeType Type of sub-shapes to be retrieved.
1761 * \param theAxis Vector (or line, or linear edge), specifying
1762 * axis of the cylinder to find shapes on.
1763 * \param theRadius Radius of the cylinder to find shapes on.
1764 * \param theState The state of the sub-shapes to find.
1765 * \return List of all found sub-shapes.
1767 ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1768 in long theShapeType,
1769 in GEOM_Object theAxis,
1770 in double theRadius,
1771 in shape_state theState);
1774 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1775 * the specified cylinder by the certain way, defined through \a theState parameter.
1776 * \param theShape Shape to find sub-shapes of.
1777 * \param theShapeType Type of sub-shapes to be retrieved.
1778 * \param theAxis Vector (or line, or linear edge), specifying
1779 * axis of the cylinder to find shapes on.
1780 * \param thePnt Point specifying location of the bottom of the cylinder.
1781 * \param theRadius Radius of the cylinder to find shapes on.
1782 * \param theState The state of the sub-shapes to find.
1783 * \return List of all found sub-shapes.
1785 ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
1786 in long theShapeType,
1787 in GEOM_Object theAxis,
1788 in GEOM_Object thePnt,
1789 in double theRadius,
1790 in shape_state theState);
1793 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1794 * the specified sphere by the certain way, defined through \a theState parameter.
1795 * \param theShape Shape to find sub-shapes of.
1796 * \param theShapeType Type of sub-shapes to be retrieved.
1797 * \param theCenter Point, specifying center of the sphere to find shapes on.
1798 * \param theRadius Radius of the sphere to find shapes on.
1799 * \param theState The state of the sub-shapes to find.
1800 * \return List of all found sub-shapes.
1802 ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1803 in long theShapeType,
1804 in GEOM_Object theCenter,
1805 in double theRadius,
1806 in shape_state theState);
1809 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1810 * the specified quadrangle by the certain way, defined through \a theState parameter.
1811 * \param theShape Shape to find sub-shapes of.
1812 * \param theShapeType Type of sub-shapes to be retrieved.
1813 * \param theTopLeftPoint Top left quadrangle corner
1814 * \param theTopRigthPoint Top right quadrangle corner
1815 * \param theBottomLeftPoint Bottom left quadrangle corner
1816 * \param theBottomRigthPoint Bottom right quadrangle corner
1817 * \param theState The state of the sub-shapes to find.
1818 * \return List of all found sub-shapes.
1820 ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1821 in long theShapeType,
1822 in GEOM_Object theTopLeftPoint,
1823 in GEOM_Object theTopRigthPoint,
1824 in GEOM_Object theBottomLeftPoint,
1825 in GEOM_Object theBottomRigthPoint,
1826 in shape_state theState);
1829 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1830 * the specified plane by the certain way, defined through \a theState parameter.
1831 * \param theShape Shape to find sub-shapes of.
1832 * \param theShapeType Type of sub-shapes to be retrieved.
1833 * \param theAx1 Vector (or line, or linear edge), specifying normal
1834 * direction and location of the plane to find shapes on.
1835 * \param theState The state of the sub-shapes to find.
1836 * \return List of IDs of all found sub-shapes.
1838 ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1839 in long theShapeType,
1840 in GEOM_Object theAx1,
1841 in shape_state theState);
1844 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1845 * the specified plane by the certain way, defined through \a theState parameter.
1846 * \param theShape Shape to find sub-shapes of.
1847 * \param theShapeType Type of sub-shapes to be retrieved.
1848 * \param theAx1 Vector (or line, or linear edge), specifying normal
1849 * direction of the plane to find shapes on.
1850 * \param thePnt Point specifying location of the plane to find shapes on.
1851 * \param theState The state of the sub-shapes to find.
1852 * \return List of IDs of all found sub-shapes.
1854 ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1855 in long theShapeType,
1856 in GEOM_Object theAx1,
1857 in GEOM_Object thePnt,
1858 in shape_state theState);
1861 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1862 * the specified cylinder by the certain way, defined through \a theState parameter.
1863 * \param theShape Shape to find sub-shapes of.
1864 * \param theShapeType Type of sub-shapes to be retrieved.
1865 * \param theAxis Vector (or line, or linear edge), specifying
1866 * axis of the cylinder to find shapes on.
1867 * \param theRadius Radius of the cylinder to find shapes on.
1868 * \param theState The state of the sub-shapes to find.
1869 * \return List of IDs of all found sub-shapes.
1871 ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1872 in long theShapeType,
1873 in GEOM_Object theAxis,
1874 in double theRadius,
1875 in shape_state theState);
1878 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1879 * the specified cylinder by the certain way, defined through \a theState parameter.
1880 * \param theShape Shape to find sub-shapes of.
1881 * \param theShapeType Type of sub-shapes to be retrieved.
1882 * \param theAxis Vector (or line, or linear edge), specifying
1883 * axis of the cylinder to find shapes on.
1884 * \param thePnt Point specifying location of the bottom of the cylinder.
1885 * \param theRadius Radius of the cylinder to find shapes on.
1886 * \param theState The state of the sub-shapes to find.
1887 * \return List of IDs all found sub-shapes.
1889 ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
1890 in long theShapeType,
1891 in GEOM_Object theAxis,
1892 in GEOM_Object thePnt,
1893 in double theRadius,
1894 in shape_state theState);
1897 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1898 * the specified sphere by the certain way, defined through \a theState parameter.
1899 * \param theShape Shape to find sub-shapes of.
1900 * \param theShapeType Type of sub-shapes to be retrieved.
1901 * \param theCenter Point, specifying center of the sphere to find shapes on.
1902 * \param theRadius Radius of the sphere to find shapes on.
1903 * \param theState The state of the sub-shapes to find.
1904 * \return List of IDs of all found sub-shapes.
1906 ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1907 in long theShapeType,
1908 in GEOM_Object theCenter,
1909 in double theRadius,
1910 in shape_state theState);
1913 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1914 * the specified quadrangle by the certain way, defined through \a theState parameter.
1915 * \param theShape Shape to find sub-shapes of.
1916 * \param theShapeType Type of sub-shapes to be retrieved.
1917 * \param theTopLeftPoint Top left quadrangle corner
1918 * \param theTopRigthPoint Top right quadrangle corner
1919 * \param theBottomLeftPoint Bottom left quadrangle corner
1920 * \param theBottomRigthPoint Bottom right quadrangle corner
1921 * \param theState The state of the sub-shapes to find.
1922 * \return List of IDs of all found sub-shapes.
1924 ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1925 in long theShapeType,
1926 in GEOM_Object theTopLeftPoint,
1927 in GEOM_Object theTopRigthPoint,
1928 in GEOM_Object theBottomLeftPoint,
1929 in GEOM_Object theBottomRigthPoint,
1930 in shape_state theState);
1933 * \brief Find sub-shapes complying with given status
1934 * \param theBox - the box to check state of sub-shapes against
1935 * \param theShape - the shape to explore
1936 * \param theShapeType - type of sub-shape of theShape
1937 * \param theState - required state
1938 * \return List of IDs of all found sub-shapes.
1940 ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1941 in GEOM_Object theShape,
1942 in long theShapeType,
1943 in shape_state theState);
1946 * \brief Find sub-shapes complying with given status
1947 * \param theBox - the box to check state of sub-shapes against
1948 * \param theShape - the shape to explore
1949 * \param theShapeType - type of sub-shape of theShape
1950 * \param theState - required state
1951 * \return List of all found sub-shapes.
1953 ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1954 in GEOM_Object theShape,
1955 in long theShapeType,
1956 in shape_state theState);
1959 * \brief Find sub-shapes complying with given status
1960 * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
1961 * \param theShape - the shape to explore
1962 * \param theShapeType - type of sub-shape of theShape
1963 * \param theState - required state
1964 * \return List of IDs of all found sub-shapes.
1966 ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1967 in GEOM_Object theShape,
1968 in short theShapeType,
1969 in shape_state theState);
1972 * \brief Find sub-shapes complying with given status
1973 * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
1974 * \param theShape - the shape to explore
1975 * \param theShapeType - type of sub-shape of theShape
1976 * \param theState - required state
1977 * \return List of all found sub-shapes.
1979 ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1980 in GEOM_Object theShape,
1981 in short theShapeType,
1982 in shape_state theState);
1985 * \brief Find sub-shapes complying with given status
1986 * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
1987 * \param theShape - the shape to explore
1988 * \param theShapeType - type of sub-shape of theShape
1989 * \param theState - required state
1990 * \return compound includes all found sub-shapes.
1992 GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1993 in GEOM_Object theShape,
1994 in short theShapeType,
1995 in shape_state theState);
1998 * Get sub-shape(s) of \a theShapeWhere, which are
1999 * coincident with \a theShapeWhat or could be a part of it.
2000 * \param theShapeWhere Shape to find sub-shapes of.
2001 * \param theShapeWhat Shape, specifying what to find.
2002 * \return Group of all found sub-shapes or a single found sub-shape.
2004 GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2005 in GEOM_Object theShapeWhat);
2008 * Old implementation of GetInPlace functionality, based on shape properties.
2010 GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
2011 in GEOM_Object theShapeWhat);
2014 * Get sub-shape(s) of \a theShapeWhere, which are
2015 * coincident with \a theShapeWhat or could be a part of it.
2017 * Implementation of this method is based on a saved history of an operation,
2018 * produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2019 * arguments (an argument shape or a sub-shape of an argument shape).
2020 * The operation could be the Partition or one of boolean operations,
2021 * performed on simple shapes (not on compounds).
2023 * \param theShapeWhere Shape to find sub-shapes of.
2024 * \param theShapeWhat Shape, specifying what to find.
2025 * \return Group of all found sub-shapes or a single found sub-shape.
2027 GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2028 in GEOM_Object theShapeWhat);
2031 * Get sub-shape of theShapeWhere, which are
2032 * coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2033 * \param theShapeWhere Shape to find sub-shapes of.
2034 * \param theShapeWhat Shape, specifying what to find.
2035 * \return found sub-shape.
2037 GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2038 in GEOM_Object theShapeWhat);
2042 * GEOM_IBlocksOperations: Interface for Blocks construction
2043 * Face from points or edges, Block from faces,
2044 * Blocks multi-translation and multi-rotation
2046 interface GEOM_IBlocksOperations : GEOM_IOperations
2049 * Creation of blocks
2053 * Create a quadrangle face from four edges. Order of Edges is not
2054 * important. It is not necessary that edges share the same vertex.
2055 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2056 * \return New GEOM_Object, containing the created face.
2058 GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2059 in GEOM_Object theEdge2,
2060 in GEOM_Object theEdge3,
2061 in GEOM_Object theEdge4);
2064 * Create a quadrangle face on two edges.
2065 * The missing edges will be built by creating the shortest ones.
2066 * \param theEdge1,theEdge2 Two opposite edges for the face.
2067 * \return New GEOM_Object, containing the created face.
2069 GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2070 in GEOM_Object theEdge2);
2073 * Create a quadrangle face with specified corners.
2074 * The missing edges will be built by creating the shortest ones.
2075 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2076 * \return New GEOM_Object, containing the created face.
2078 GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2079 in GEOM_Object thePnt2,
2080 in GEOM_Object thePnt3,
2081 in GEOM_Object thePnt4);
2084 * Create a hexahedral solid, bounded by the six given faces. Order of
2085 * faces is not important. It is not necessary that Faces share the same edge.
2086 * \param theFace1-theFace6 Faces for the hexahedral solid.
2087 * \return New GEOM_Object, containing the created solid.
2089 GEOM_Object MakeHexa (in GEOM_Object theFace1,
2090 in GEOM_Object theFace2,
2091 in GEOM_Object theFace3,
2092 in GEOM_Object theFace4,
2093 in GEOM_Object theFace5,
2094 in GEOM_Object theFace6);
2097 * Create a hexahedral solid between two given faces.
2098 * The missing faces will be built by creating the smallest ones.
2099 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2100 * \return New GEOM_Object, containing the created solid.
2102 GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2103 in GEOM_Object theFace2);
2106 * Extract elements of blocks and blocks compounds
2110 * Get a vertex, found in the given shape by its coordinates.
2111 * \param theShape Block or a compound of blocks.
2112 * \param theX,theY,theZ Coordinates of the sought vertex.
2113 * \param theEpsilon Maximum allowed distance between the resulting
2114 * vertex and point with the given coordinates.
2115 * \return New GEOM_Object, containing the found vertex.
2117 GEOM_Object GetPoint (in GEOM_Object theShape,
2121 in double theEpsilon);
2124 * Find a vertex of the given shape, which has minimal distance to the given point.
2125 * \param theShape Any shape.
2126 * \param thePoint Point, close to the desired vertex.
2127 * \return New GEOM_Object, containing the found vertex.
2129 GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2130 in GEOM_Object thePoint);
2133 * Get an edge, found in the given shape by two given vertices.
2134 * \param theShape Block or a compound of blocks.
2135 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2136 * \return New GEOM_Object, containing the found edge.
2138 GEOM_Object GetEdge (in GEOM_Object theShape,
2139 in GEOM_Object thePoint1,
2140 in GEOM_Object thePoint2);
2143 * Find an edge of the given shape, which has minimal distance to the given point.
2144 * \param theShape Block or a compound of blocks.
2145 * \param thePoint Point, close to the desired edge.
2146 * \return New GEOM_Object, containing the found edge.
2148 GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2149 in GEOM_Object thePoint);
2152 * Returns a face, found in the given shape by four given corner vertices.
2153 * \param theShape Block or a compound of blocks.
2154 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
2155 * \return New GEOM_Object, containing the found face.
2157 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2158 in GEOM_Object thePoint1,
2159 in GEOM_Object thePoint2,
2160 in GEOM_Object thePoint3,
2161 in GEOM_Object thePoint4);
2164 * Get a face of block, found in the given shape by two given edges.
2165 * \param theShape Block or a compound of blocks.
2166 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2167 * \return New GEOM_Object, containing the found face.
2169 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2170 in GEOM_Object theEdge1,
2171 in GEOM_Object theEdge2);
2174 * Find a face, opposite to the given one in the given block.
2175 * \param theBlock Must be a hexahedral solid.
2176 * \param theFace Face of \a theBlock, opposite to the desired face.
2177 * \return New GEOM_Object, containing the found face.
2179 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2180 in GEOM_Object theFace);
2183 * Find a face of the given shape, which has minimal distance to the given point.
2184 * \param theShape Block or a compound of blocks.
2185 * \param thePoint Point, close to the desired face.
2186 * \return New GEOM_Object, containing the found face.
2188 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2189 in GEOM_Object thePoint);
2192 * Find a face of block, whose outside normale has minimal angle with the given vector.
2193 * \param theShape Block or a compound of blocks.
2194 * \param theVector Vector, close to the normale of the desired face.
2195 * \return New GEOM_Object, containing the found face.
2197 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2198 in GEOM_Object theVector);
2201 * Find all sub-shapes of type \a theShapeType of the given shape,
2202 * which have minimal distance to the given point.
2203 * \param theShape Any shape.
2204 * \param thePoint Point, close to the desired shape.
2205 * \param theShapeType Defines what kind of sub-shapes is searched.
2206 * \param theTolerance The tolerance for distances comparison. All shapes
2207 * with distances to the given point in interval
2208 * [minimal_distance, minimal_distance + theTolerance] will be gathered.
2209 * \return New GEOM_Object, containing a group of all found shapes.
2211 GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2212 in GEOM_Object thePoint,
2213 in long theShapeType,
2214 in double theTolerance);
2217 * Extract blocks from blocks compounds
2221 * Check, if the compound contains only specified blocks.
2222 * \param theCompound The compound to check.
2223 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
2224 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2225 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2226 * \return TRUE, if the given compound contains only blocks.
2227 * \return theNbBlocks Number of specified blocks in theCompound.
2229 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2230 in long theMinNbFaces,
2231 in long theMaxNbFaces,
2232 out long theNbBlocks);
2235 * Enumeration of Blocks Compound defects.
2239 /* Each element of the compound should be a Block */
2242 /* An element is a potential block, but has degenerated and/or seam edge(s). */
2245 /* A connection between two Blocks should be an entire face or an entire edge */
2248 /* The compound should be connexe */
2251 /* The glue between two quadrangle faces should be applied */
2256 * Description of Blocks Compound defect: type and incriminated sub-shapes.
2261 ListOfLong incriminated;
2265 * Sequence of all Blocks Compound defects.
2267 typedef sequence<BCError> BCErrors;
2270 * Check, if the compound of blocks is given.
2271 * To be considered as a compound of blocks, the
2272 * given shape must satisfy the following conditions:
2273 * - Each element of the compound should be a Block (6 faces and 12 edges).
2274 * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2275 * - The compound should be connexe.
2276 * - The glue between two quadrangle faces should be applied.
2277 * \note Single block is also accepted as a valid compound of blocks.
2278 * \param theCompound The compound to check.
2279 * \return TRUE, if the given shape is a compound of blocks.
2280 * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
2282 boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
2283 out BCErrors theErrors);
2286 * Convert sequence of Blocks Compound errors, returned by
2287 * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
2288 * \param theCompound The bad compound.
2289 * \param theErrors The sequence of \a theCompound errors.
2290 * \return String, describing all the errors in form, suitable for printing.
2292 string PrintBCErrors (in GEOM_Object theCompound,
2293 in BCErrors theErrors);
2296 * Remove all seam and degenerated edges from \a theShape.
2297 * Unite faces and edges, sharing one surface.
2298 * \param theShape The compound or single solid to remove irregular edges from.
2299 * \param theOptimumNbFaces If more than zero, unite faces only for those solids,
2300 * that have more than theOptimumNbFaces faces. If zero, unite faces always,
2301 * regardsless their quantity in the solid. If negative, do not unite faces at all.
2302 * For blocks repairing recommended value is 6.
2303 * \return Improved shape.
2305 GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
2306 in long theOptimumNbFaces);
2309 * Check, if the given shape is a blocks compound.
2310 * Fix all detected errors.
2311 * \note Single block can be also fixed by this method.
2312 * \param theCompound The compound to check and improve.
2313 * \return Improved compound.
2315 GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
2318 * Get all the blocks, contained in the given compound.
2319 * \param theCompound The compound to explode.
2320 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
2321 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2322 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2323 * \return List of GEOM_Objects, containing the retrieved blocks.
2325 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2326 in long theMinNbFaces,
2327 in long theMaxNbFaces);
2330 * Find block, containing the given point inside its volume or on boundary.
2331 * \param theCompound Compound, to find block in.
2332 * \param thePoint Point, close to the desired block. If the point lays on
2333 * boundary between some blocks, we return block with nearest center.
2334 * \return New GEOM_Object, containing the found block.
2336 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2337 in GEOM_Object thePoint);
2340 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2341 * \param theCompound Compound, to find block in.
2342 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2343 * \return New GEOM_Object, containing the found block.
2345 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2346 in ListOfGO theParts);
2349 * Return all blocks, containing all the elements, passed as the parts.
2350 * \param theCompound Compound, to find blocks in.
2351 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2352 * \return List of GEOM_Objects, containing the found blocks.
2354 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2355 in ListOfGO theParts);
2358 * Operations on blocks with gluing of result
2362 * Multi-transformate block and glue the result.
2363 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2364 * \param theBlock Hexahedral solid to be multi-transformed.
2365 * \param theDirFace1 First direction face global index.
2366 * \param theDirFace2 Second direction face global index.
2367 * \param theNbTimes Quantity of transformations to be done.
2368 * \note Global index of sub-shape can be obtained, using method
2369 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2370 * \return New GEOM_Object, containing the result shape.
2372 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2373 in long theDirFace1,
2374 in long theDirFace2,
2375 in long theNbTimes);
2378 * Multi-transformate block and glue the result.
2379 * \param theBlock Hexahedral solid to be multi-transformed.
2380 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2381 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2382 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2383 * \return New GEOM_Object, containing the result shape.
2385 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2386 in long theDirFace1U,
2387 in long theDirFace2U,
2388 in long theNbTimesU,
2389 in long theDirFace1V,
2390 in long theDirFace2V,
2391 in long theNbTimesV);
2394 * Special operation - propagation
2398 * Build all possible propagation groups.
2399 * Propagation group is a set of all edges, opposite to one (main)
2400 * edge of this group directly or through other opposite edges.
2401 * Notion of Opposite Edge make sence only on quadrangle face.
2402 * \param theShape Shape to build propagation groups on.
2403 * \return List of GEOM_Objects, each of them is a propagation group.
2405 ListOfGO Propagate (in GEOM_Object theShape);
2409 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
2411 interface GEOM_IBooleanOperations : GEOM_IOperations
2414 * Perform one of boolean operations on two given shapes.
2415 * \param theShape1 First argument for boolean operation.
2416 * \param theShape2 Second argument for boolean operation.
2417 * \param theOperation Indicates the operation to be done:
2418 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2419 * \return New GEOM_Object, containing the result shape.
2421 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2422 in GEOM_Object theShape2,
2423 in long theOperation);
2426 * Perform partition operation.
2427 * \param theShapes Shapes to be intersected.
2428 * \param theTools Shapes to intersect theShapes.
2429 * \note Each compound from ListShapes and ListTools will be exploded in order
2430 * to avoid possible intersection between shapes from this compound.
2431 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2432 * \param KeepNonlimitShapes: if this parameter == 0, then only shapes of
2433 * target type (equal to Limit) are kept in the result,
2434 * else standalone shapes of lower dimension
2435 * are kept also (if they exist).
2437 * After implementation new version of PartitionAlgo (October 2006)
2438 * other parameters are ignored by current functionality. They are kept
2439 * in this function only for supporting old versions.
2440 * Ignored parameters:
2441 * \param theKeepInside Shapes, outside which the results will be deleted.
2442 * Each shape from theKeepInside must belong to theShapes also.
2443 * \param theRemoveInside Shapes, inside which the results will be deleted.
2444 * Each shape from theRemoveInside must belong to theShapes also.
2445 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2446 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2448 * \return New GEOM_Object, containing the result shapes.
2450 GEOM_Object MakePartition (in ListOfGO theShapes,
2451 in ListOfGO theTools,
2452 in ListOfGO theKeepInside,
2453 in ListOfGO theRemoveInside,
2455 in boolean theRemoveWebs,
2456 in ListOfLong theMaterials,
2457 in short theKeepNonlimitShapes);
2460 * Perform partition operation.
2461 * This method may be usefull if it is needed to make a partition for
2462 * a compound containing nonintersected shapes. Performance will be better
2463 * since intersection between shapes from compound is not performed.
2465 * Description of all parameters as in previous method MakePartition()
2467 * \note Passed compounds (via ListShapes or via ListTools)
2468 * have to consist of nonintersecting shapes.
2470 * \return New GEOM_Object, containing the result shapes.
2472 GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO theShapes,
2473 in ListOfGO theTools,
2474 in ListOfGO theKeepInside,
2475 in ListOfGO theRemoveInside,
2477 in boolean theRemoveWebs,
2478 in ListOfLong theMaterials,
2479 in short theKeepNonlimitShapes);
2482 * Perform partition of the Shape with the Plane
2483 * \param theShape Shape to be intersected.
2484 * \param thePlane Tool shape, to intersect theShape.
2485 * \return New GEOM_Object, containing the result shape.
2487 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2488 in GEOM_Object thePlane);
2492 * GEOM_ICurvesOperations: Interface for curves creation.
2493 * Polyline, Circle, Spline (Bezier and Interpolation)
2495 interface GEOM_ICurvesOperations : GEOM_IOperations
2498 * Create a circle with given center, normal vector and radius.
2499 * \param thePnt Circle center.
2500 * \param theVec Vector, normal to the plane of the circle.
2501 * \param theR Circle radius.
2502 * \return New GEOM_Object, containing the created circle.
2504 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2505 in GEOM_Object theVec,
2508 * Create a circle, passing through three given points
2509 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2510 * \return New GEOM_Object, containing the created circle.
2512 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2513 in GEOM_Object thePnt2,
2514 in GEOM_Object thePnt3);
2516 * Create a circle with given center, with a radius equals the distance from center to Point1
2517 * and on a plane defined by all of three points.
2518 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2519 * \return New GEOM_Object, containing the created circle.
2521 GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2522 in GEOM_Object thePnt2,
2523 in GEOM_Object thePnt3);
2525 * Create an ellipse with given center, normal vector and radiuses.
2526 * \param thePnt Ellipse center.
2527 * \param theVec Vector, normal to the plane of the ellipse.
2528 * \param theRMajor Major ellipse radius.
2529 * \param theRMinor Minor ellipse radius.
2530 * \return New GEOM_Object, containing the created ellipse.
2532 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2533 in GEOM_Object theVec,
2534 in double theRMajor,
2535 in double theRMinor);
2538 * Create an ellipse with given center, normal vector, main axis vector and radiuses.
2539 * \param thePnt Ellipse center.
2540 * \param theVec Vector, normal to the plane of the ellipse.
2541 * \param theRMajor Major ellipse radius.
2542 * \param theRMinor Minor ellipse radius.
2543 * \param theVecMaj Vector, direction of the ellipse's main axis.
2544 * \return New GEOM_Object, containing the created ellipse.
2546 GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2547 in GEOM_Object theVec,
2548 in double theRMajor,
2549 in double theRMinor,
2550 in GEOM_Object theVecMaj);
2553 * Create an arc of circle, passing through three given points.
2554 * \param thePnt1 Start point of the arc.
2555 * \param thePnt2 Middle point of the arc.
2556 * \param thePnt3 End point of the arc.
2557 * \return New GEOM_Object, containing the created arc.
2559 GEOM_Object MakeArc (in GEOM_Object thePnt1,
2560 in GEOM_Object thePnt2,
2561 in GEOM_Object thePnt3);
2564 * Create an arc of circle of center C from one point to another
2565 * \param theCenter Center point of the arc.
2566 * \param thePnt1 Start point of the arc.
2567 * \param thePnt2 End point of the arc.
2568 * \param theSense Orientation of the arc
2569 * \return New GEOM_Object, containing the created arc.
2571 GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2572 in GEOM_Object thePnt1,
2573 in GEOM_Object thePnt2,
2574 in boolean theSense);
2577 * Create an arc of ellipse of center C and two points P1 P2.
2578 * \param theCenter Center point of the arc.
2579 * \param thePnt1 Major radius is distance from center to Pnt1.
2580 * \param thePnt2 define a plane and Minor radius as a shortest
2581 * distance from Pnt2 to vector Center->Pnt1.
2582 * \return New GEOM_Object, containing the created arc.
2584 GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2585 in GEOM_Object thePnt1,
2586 in GEOM_Object thePnt2);
2590 * Create a polyline on the set of points.
2591 * \param thePoints Sequence of points for the polyline.
2592 * \param theIsClosed If TRUE, build a closed wire.
2593 * \return New GEOM_Object, containing the created polyline.
2595 GEOM_Object MakePolyline (in ListOfGO thePoints,
2596 in boolean theIsClosed);
2599 * Create bezier curve on the set of points.
2600 * \param thePoints Sequence of points for the bezier curve.
2601 * \param theIsClosed If TRUE, build a closed curve.
2602 * \return New GEOM_Object, containing the created bezier curve.
2604 GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
2605 in boolean theIsClosed);
2608 * Create B-Spline curve on the set of points.
2609 * \param thePoints Sequence of points for the B-Spline curve.
2610 * \param theIsClosed If TRUE, build a closed curve.
2611 * \param theDoReordering If TRUE, the algo does not follow the order of
2612 * \a thePoints but searches for the closest vertex.
2613 * \return New GEOM_Object, containing the created B-Spline curve.
2615 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
2616 in boolean theIsClosed,
2617 in boolean theDoReordering);
2620 * Creates a curve using the parametric definition of the basic points.
2621 * \param thexExpr parametric equation of the coordinates X.
2622 * \param theyExpr parametric equation of the coordinates Y.
2623 * \param thezExpr parametric equation of the coordinates Z.
2624 * \param theParamMin the minimal value of the parameter.
2625 * \param theParamMax the maximum value of the parameter.
2626 * \param theParamStep the step of the parameter.
2627 * \param theCurveType the type of the curve.
2628 * \return New GEOM_Object, containing the created curve.
2630 GEOM_Object MakeCurveParametric(in string thexExpr,
2633 in double theParamMin,
2634 in double theParamMax,
2635 in double theParamStep,
2636 in curve_type theCurveType);
2639 * Creates a curve using the parametric definition of the basic points.
2640 * \param thexExpr parametric equation of the coordinates X.
2641 * \param theyExpr parametric equation of the coordinates Y.
2642 * \param thezExpr parametric equation of the coordinates Z.
2643 * \param theParamMin the minimal value of the parameter.
2644 * \param theParamMax the maximum value of the parameter.
2645 * \param theParamStep the number of steps of the parameter discretization.
2646 * \param theCurveType the type of the curve.
2647 * \return New GEOM_Object, containing the created curve.
2649 GEOM_Object MakeCurveParametricNew(in string thexExpr,
2652 in double theParamMin,
2653 in double theParamMax,
2654 in long theParamNbStep,
2655 in curve_type theCurveType);
2658 * Create a sketcher (wire or face), following the textual description,
2659 * passed through \a theCommand argument. \n
2660 * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2661 * Format of the description string have to be the following:
2663 * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2666 * - x1, y1 are coordinates of the first sketcher point (zero by default),
2668 * - "R angle" : Set the direction by angle
2669 * - "D dx dy" : Set the direction by DX & DY
2672 * - "TT x y" : Create segment by point at X & Y
2673 * - "T dx dy" : Create segment by point with DX & DY
2674 * - "L length" : Create segment by direction & Length
2675 * - "IX x" : Create segment by direction & Intersect. X
2676 * - "IY y" : Create segment by direction & Intersect. Y
2679 * - "C radius length" : Create arc by direction, radius and length(in degree)
2682 * - "WW" : Close Wire (to finish)
2683 * - "WF" : Close Wire and build face (to finish)
2685 * \param theCommand String, defining the sketcher in local
2686 * coordinates of the working plane.
2687 * \param theWorkingPlane Nine double values, defining origin,
2688 * OZ and OX directions of the working plane.
2689 * \return New GEOM_Object, containing the created wire.
2691 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2694 * Create a 3D sketcher, following the numerical description,
2695 * passed through points created by \a theCoordinates argument. \n
2696 * Format of the description string have to be the following:
2698 * "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]"
2701 GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2704 * Create a sketcher (wire or face), following the textual description,
2705 * passed through \a theCommand argument. \n
2706 * For format of the description string see the previous method.\n
2707 * \param theCommand String, defining the sketcher in local
2708 * coordinates of the working plane.
2709 * \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2710 * \return New GEOM_Object, containing the created wire.
2712 GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2716 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2718 interface GEOM_ILocalOperations : GEOM_IOperations
2721 * Perform a fillet on all edges of the given shape.
2722 * \param theShape Shape, to perform fillet on.
2723 * \param theR Fillet radius.
2724 * \return New GEOM_Object, containing the result shape.
2726 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2730 * Perform a fillet on the specified edges of the given shape
2731 * \param theShape Shape, to perform fillet on.
2732 * \param theR Fillet radius.
2733 * \param theEdges Global indices of edges to perform fillet on.
2734 * \note Global index of sub-shape can be obtained, using method
2735 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2736 * \return New GEOM_Object, containing the result shape.
2738 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2740 in ListOfLong theEdges);
2741 GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2744 in ListOfLong theEdges);
2747 * Perform a fillet on all edges of the specified faces of the given shape.
2748 * \param theShape Shape, to perform fillet on.
2749 * \param theR Fillet radius.
2750 * \param theFaces Global indices of faces to perform fillet on.
2751 * \note Global index of sub-shape can be obtained, using method
2752 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2753 * \return New GEOM_Object, containing the result shape.
2755 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2757 in ListOfLong theFaces);
2759 GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2762 in ListOfLong theFaces);
2765 * Perform a fillet on a face or a shell at the specified vertexes.
2766 * \param theShape Shape, to perform fillet on.
2767 * \param theR Fillet radius.
2768 * \param theVertexes Global indices of vertexes to perform fillet on.
2769 * \note Global index of sub-shape can be obtained, using method
2770 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2771 * \return New GEOM_Object, containing the result shape.
2773 GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2775 in ListOfLong theVertexes);
2778 * Perform a fillet on edges of the specified vertexes of the given wire.
2779 * \param theShape Shape, to perform fillet on.
2780 * \param theR Fillet radius.
2781 * \param theVertexes Global indices of vertexes to perform fillet on.
2782 * \note Global index of sub-shape can be obtained, using method
2783 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2784 * \note The list of vertices coudl be empty, in this case fillet fill be done
2785 * at all vertices in given wire
2786 * \return New GEOM_Object, containing the result shape.
2788 GEOM_Object MakeFillet1D (in GEOM_Object theShape,
2790 in ListOfLong theVertexes);
2793 * Perform a symmetric chamfer on all edges of the given shape.
2794 * \param theShape Shape, to perform chamfer on.
2795 * \param theD Chamfer size along each face.
2796 * \return New GEOM_Object, containing the result shape.
2798 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2802 * Perform a chamfer on edges, common to the specified faces.
2803 * with distance D1 on the Face1
2804 * \param theShape Shape, to perform chamfer on.
2805 * \param theD1 Chamfer size along \a theFace1.
2806 * \param theD2 Chamfer size along \a theFace2.
2807 * \param theFace1,theFace2 Global indices of two faces of \a theShape.
2808 * \note Global index of sub-shape can be obtained, using method
2809 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2810 * \return New GEOM_Object, containing the result shape.
2812 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2813 in double theD1, in double theD2,
2814 in long theFace1, in long theFace2);
2816 * The Same but with params theD = Chamfer Lenght
2817 * and theAngle = Chamfer Angle (Angle in radians)
2819 GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2820 in double theD, in double theAngle,
2821 in long theFace1, in long theFace2);
2824 * Perform a chamfer on all edges of the specified faces.
2825 * with distance D1 on the first specified face (if several for one edge)
2826 * \param theShape Shape, to perform chamfer on.
2827 * \param theD1 Chamfer size along face from \a theFaces. If both faces,
2828 * connected to the edge, are in \a theFaces, \a theD1
2829 * will be get along face, which is nearer to \a theFaces beginning.
2830 * \param theD2 Chamfer size along another of two faces, connected to the edge.
2831 * \param theFaces Sequence of global indices of faces of \a theShape.
2832 * \note Global index of sub-shape can be obtained, using method
2833 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2834 * \return New GEOM_Object, containing the result shape.
2836 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2837 in double theD1, in double theD2,
2838 in ListOfLong theFaces);
2840 * The Same but with params theD = Chamfer Lenght
2841 * and theAngle = Chamfer Angle (Angle in radians)
2843 GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2844 in double theD, in double theAngle,
2845 in ListOfLong theFaces);
2848 * Perform a chamfer on edges,
2849 * with distance D1 on the first specified face (if several for one edge)
2850 * \param theShape Shape, to perform chamfer on.
2851 * \param theD1 theD2 Chamfer size
2852 * \param theEdges Sequence of edges of \a theShape.
2853 * \return New GEOM_Object, containing the result shape.
2855 GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2856 in double theD1, in double theD2,
2857 in ListOfLong theEdges);
2859 * The Same but with params theD = Chamfer Lenght
2860 * and theAngle = Chamfer Angle (Angle in radians)
2862 GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2863 in double theD, in double theAngle,
2864 in ListOfLong theEdges);
2867 * Perform an Archimde operation on the given shape with given parameters.
2868 * The object presenting the resulting face is returned
2869 * \param theShape Shape to be put in water.
2870 * \param theWeight Weight og the shape.
2871 * \param theWaterDensity Density of the water.
2872 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
2873 * \return New GEOM_Object, containing a section of \a theShape
2874 * by a plane, corresponding to water level.
2876 GEOM_Object MakeArchimede (in GEOM_Object theShape,
2877 in double theWeight,
2878 in double theWaterDensity,
2879 in double theMeshDeflection);
2882 * Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2883 * Present here only for compatibility.
2885 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2889 * GEOM_IHealingOperations: Interface for shape healing operations.
2890 * Shape Processing, SuppressFaces, etc.
2892 interface GEOM_IHealingOperations : GEOM_IOperations
2895 * Apply a sequence of Shape Healing operators to the given object.
2896 * \param theShapes Shape to be processed.
2897 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2898 * \param theParameters List of names of parameters
2899 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2900 * \param theValues List of values of parameters, in the same order
2901 * as parameters are listed in \a theParameters list.
2902 * \return New GEOM_Object, containing processed shape.
2904 GEOM_Object ProcessShape (in GEOM_Object theShapes,
2905 in string_array theOperators,
2906 in string_array theParameters,
2907 in string_array theValues);
2910 * Get default sequence of operators, their parameters and parameters' values
2911 * of Shape Process operation. In the current implementation the defaults are
2912 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2913 * \param theOperators Output. Default list of names of operators.
2914 * \param theParameters Output. Default list of names of parameters.
2915 * \param theValues Output. List of default values of parameters, in the same order
2916 * as parameters are listed in \a theParameters list.
2918 void GetShapeProcessParameters (out string_array theOperators,
2919 out string_array theParameters,
2920 out string_array theValues);
2922 * Get parameters and parameters' values for the given Shape Process operation.
2923 * In the current implementation the defaults are
2924 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2925 * \param theOperator Input. The operator's name.
2926 * \param theParameters Output. Default list of names of parameters.
2927 * \param theValues Output. List of default values of parameters, in the same order
2928 * as parameters are listed in \a theParameters list.
2930 void GetOperatorParameters (in string theOperator,
2931 out string_array theParameters,
2932 out string_array theValues);
2935 * Remove faces from the given object (shape).
2936 * \param theObject Shape to be processed.
2937 * \param theFaces Indices of faces to be removed, if EMPTY then the method
2938 * removes ALL faces of the given object.
2939 * \return New GEOM_Object, containing processed shape.
2941 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2944 * Close an open wire.
2945 * \param theObject Shape to be processed.
2946 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2947 * if -1, then theObject itself is a wire.
2948 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
2949 * If FALS : closure by creation of an edge between ends.
2950 * \return New GEOM_Object, containing processed shape.
2952 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2953 in boolean isCommonVertex);
2956 * Remove internal wires and edges from the given object (face).
2957 * \param theObject Shape to be processed.
2958 * \param theWires Indices of wires to be removed, if EMPTY then the method
2959 * removes ALL internal wires of the given object.
2960 * \return New GEOM_Object, containing processed shape.
2962 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2965 * Remove internal closed contours (holes) from the given object.
2966 * \param theObject Shape to be processed.
2967 * \param theWires Indices of wires to be removed, if EMPTY then the method
2968 * removes ALL internal holes of the given object
2969 * \return New GEOM_Object, containing processed shape.
2971 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2974 * Sewing of the given object.
2975 * \param theObject Shape to be processed.
2976 * \param theTolerance Required tolerance value.
2977 * \return New GEOM_Object, containing processed shape.
2979 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2982 * Addition of a point to a given edge object.
2983 * \param theObject Shape to be processed.
2984 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
2985 * if -1, then theObject itself is the edge.
2986 * \param theValue Value of parameter on edge or length parameter,
2987 * depending on \a isByParameter.
2988 * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2989 * if FALSE : \a theValue is treated as a length parameter [0..1]
2990 * \return New GEOM_Object, containing processed shape.
2992 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2993 in double theValue, in boolean isByParameter);
2996 * Get a list of wires (wrapped in GEOM_Object-s),
2997 * that constitute a free boundary of the given shape.
2998 * \param theObject Shape to get free boundary of.
2999 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
3000 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
3001 * \return FALSE, if an error(s) occured during the method execution.
3003 boolean GetFreeBoundary (in GEOM_Object theObject,
3004 out ListOfGO theClosedWires,
3005 out ListOfGO theOpenWires);
3008 * Change orientation of the given object.
3009 * \param theObject Shape to be processed.
3010 * \return New GEOM_Object, containing processed shape.
3012 GEOM_Object ChangeOrientation (in GEOM_Object theObject);
3013 GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
3016 * Try to limit tolerance of the given object by value \a theTolerance.
3017 * \param theObject Shape to be processed.
3018 * \param theTolerance Required tolerance value.
3019 * \return New GEOM_Object, containing processed shape.
3021 GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
3026 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
3029 interface GEOM_IInsertOperations : GEOM_IOperations
3032 * Create a copy of the given object
3034 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
3037 * Export the given shape into a file with given name.
3038 * \param theObject Shape to be stored in the file.
3039 * \param theFileName Name of the file to store the given shape in.
3040 * \param theFormatName Specify format for the shape storage.
3041 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3043 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
3046 * Import a shape from the BRep or IGES or STEP file
3047 * (depends on given format) with given name.
3048 * \param theFileName The file, containing the shape.
3049 * \param theFormatName Specify format for the file reading.
3050 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3051 * If format 'IGES_SCALE' is used instead 'IGES' length unit will be
3052 * set to 'meter' and result model will be scaled.
3053 * \return New GEOM_Object, containing the imported shape.
3055 GEOM_Object ImportFile (in string theFileName, in string theFormatName);
3058 * Get the supported import formats and corresponding patterns for File dialog.
3059 * \param theFormats Output. List of formats, available for import.
3060 * \param thePatterns Output. List of file patterns, corresponding to available formats.
3061 * \return Returns available formats and patterns through the arguments.
3063 void ImportTranslators (out string_array theFormats,
3064 out string_array thePatterns);
3067 * Get the supported export formats and corresponding patterns for File dialog.
3068 * \param theFormats Output. List of formats, available for export.
3069 * \param thePatterns Output. List of file patterns, corresponding to available formats.
3070 * \return Returns available formats and patterns through the arguments.
3072 void ExportTranslators (out string_array theFormats,
3073 out string_array thePatterns);
3076 * Load texture from file
3077 * \param theTextureFile texture file name
3078 * \return unique texture identifier
3080 long LoadTexture(in string theTextureFile);
3083 * Add texture to the study
3084 * \param theWidth texture width in pixels
3085 * \param theHeight texture height in pixels
3086 * \param theTexture texture byte array
3087 * \return unique texture identifier
3089 long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
3092 * Get previously loaded texture data
3093 * \param theID texture identifier
3094 * \param theWidth texture width in pixels
3095 * \param theHeight texture height in pixels
3096 * \return texture byte array
3098 SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
3101 * Get list of all avaiable texture IDs
3102 * \return list of all texture IDs avaiable for the current study
3104 ListOfLong GetAllTextures();
3108 * GEOM_IKindOfShape: namespace for shape_kind enumeration.
3110 interface GEOM_IKindOfShape
3120 SPHERE, // full sphere
3121 CYLINDER, // cylinder
3122 BOX, // box with faces, parallel to global coordinate planes
3123 ROTATED_BOX, // other box
3124 TORUS, // full torus
3126 POLYHEDRON, // solid, bounded by polygons
3127 SOLID, // other solid
3129 SPHERE2D, // spherical face (closed)
3130 CYLINDER2D, // cylindrical face with defined height
3131 TORUS2D, // toroidal face (closed)
3132 CONE2D, // conical face with defined height
3133 DISK_CIRCLE, // planar, bounded by circle
3134 DISK_ELLIPSE, // planar, bounded by ellipse
3135 POLYGON, // planar, bounded by segments
3136 PLANE, // infinite planar
3137 PLANAR, // other planar
3140 CIRCLE, // full circle
3141 ARC_CIRCLE, // arc of circle
3142 ELLIPSE, // full ellipse
3143 ARC_ELLIPSE, // arc of ellipse
3144 LINE, // infinite segment
3150 ADVANCED // all advanced shapes (temporary implementation)
3156 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
3157 * properties calculation (like Centre of Mass, Inertia, etc.).
3160 interface GEOM_IMeasureOperations : GEOM_IOperations
3163 * Get kind of theShape.
3164 * \param theShape Shape to get a kind of.
3165 * \param theIntegers Output. Integer and enumerated shape's parameters
3166 * (kind of surface, closed/unclosed, number of edges, etc.)
3167 * \param theDoubles Output. Double shape's parameters (coordinates, dimensions, etc.)
3168 * \note Concrete meaning of each value, returned via \a theIntegers
3169 * or \a theDoubles list depends on the kind of the shape.
3170 * \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
3172 //short KindOfShape (in GEOM_Object theShape,
3173 GEOM_IKindOfShape::shape_kind KindOfShape (in GEOM_Object theShape,
3174 out ListOfLong theIntegers,
3175 out ListOfDouble theDoubles);
3178 * Get position (LCS) of theShape.
3179 * \param theShape Shape to calculate position of.
3180 * \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
3181 * Origin of the LCS is situated at the shape's center of mass.
3182 * \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
3183 * \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
3184 * Axes of the LCS are obtained from shape's location or,
3185 * if the shape is a planar face, from position of its plane.
3186 * \return Returns position of the shape through the last nine arguments.
3188 void GetPosition (in GEOM_Object theShape,
3189 out double Ox, out double Oy, out double Oz,
3190 out double Zx, out double Zy, out double Zz,
3191 out double Xx, out double Xy, out double Xz);
3194 * Get summarized length of all wires,
3195 * area of surface and volume of the given shape.
3196 * \param theShape Shape to define properties of.
3197 * \param theLength Output. Summarized length of all wires of the given shape.
3198 * \param theSurfArea Output. Area of surface of the given shape.
3199 * \param theVolume Output. Volume of the given shape.
3200 * \return Returns shape properties through the last three arguments.
3202 void GetBasicProperties (in GEOM_Object theShape,
3203 out double theLength,
3204 out double theSurfArea,
3205 out double theVolume);
3208 * Get a point, situated at the centre of mass of theShape.
3209 * \param theShape Shape to define centre of mass of.
3210 * \return New GEOM_Object, containing the created point.
3212 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
3215 * Get the vertex by index for 1D objects depends the edge/wire orientation
3216 * \param theShape Shape (wire or edge) to find the vertex on it
3217 * \param theIndex Index of vertex sub-shape
3218 * \return New GEOM_Object, vertex.
3220 GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
3223 * Get a vector, representing the normal of theFace.
3224 * If the face is not planar, theOptionalPoint is obligatory.
3225 * \param theFace Shape (face) to define the normal of.
3226 * \param theOptionalPoint Shape (point) to define the normal at.
3227 * Can be NULL in case of planar face.
3228 * \return New GEOM_Object, containing the created normal vector.
3230 GEOM_Object GetNormal (in GEOM_Object theFace,
3231 in GEOM_Object theOptionalPoint);
3234 * Get inertia matrix and moments of inertia of theShape.
3235 * \param theShape Shape to calculate inertia of.
3236 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
3237 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
3238 * \return Returns inertia through the last twelve arguments.
3240 void GetInertia (in GEOM_Object theShape,
3241 out double I11, out double I12, out double I13,
3242 out double I21, out double I22, out double I23,
3243 out double I31, out double I32, out double I33,
3244 out double Ix , out double Iy , out double Iz);
3247 * Get parameters of bounding box of the given shape
3248 * \param theShape Shape to obtain bounding box of.
3249 * \param Xmin,Xmax Output. Limits of shape along OX axis.
3250 * \param Ymin,Ymax Output. Limits of shape along OY axis.
3251 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
3252 * \return Returns parameters of bounding box through the last six arguments.
3254 void GetBoundingBox (in GEOM_Object theShape,
3255 out double Xmin, out double Xmax,
3256 out double Ymin, out double Ymax,
3257 out double Zmin, out double Zmax);
3260 * Get min and max tolerances of sub-shapes of theShape
3261 * \param theShape Shape, to get tolerances of.
3262 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
3263 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
3264 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
3265 * \return Returns shape tolerances through the last six arguments.
3267 void GetTolerance (in GEOM_Object theShape,
3268 out double FaceMin, out double FaceMax,
3269 out double EdgeMin, out double EdgeMax,
3270 out double VertMin, out double VertMax);
3273 * Check a topology of the given shape.
3274 * \param theShape Shape to check validity of.
3275 * \param theDescription Output. Description of problems in the shape, if they are.
3276 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
3278 boolean CheckShape (in GEOM_Object theShape,
3279 out string theDescription);
3282 * Check a topology and a geometry of the given shape.
3283 * \param theShape Shape to check validity of.
3284 * \param theDescription Output. Description of problems in the shape, if they are.
3285 * \return TRUE, if the shape "seems to be valid".
3287 boolean CheckShapeWithGeometry (in GEOM_Object theShape,
3288 out string theDescription);
3291 * Check a topology of the given shape on self-intersections presence.
3292 * \param theShape Shape to check validity of.
3293 * \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
3294 * \return TRUE, if the shape does not have any self-intersections.
3296 boolean CheckSelfIntersections (in GEOM_Object theShape,
3297 out ListOfLong theIntersections);
3300 * Check if the given shape can be an argument for MakeSolid operation
3301 * \param theShape Shape to be described.
3302 * \return Empty string if a solid can be made on this shape, error code otherwise.
3304 string IsGoodForSolid (in GEOM_Object theShape);
3307 * Obtain description of the given shape
3308 * \param theShape Shape to be described.
3309 * \return Description of the given shape.
3311 string WhatIs (in GEOM_Object theShape);
3314 * Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
3315 * the shape theShape.
3316 * \param theShape Shape to check.
3317 * \param coords list of coordinates.
3318 * \param tolerance tolerance.
3319 * \return list of boolean.
3321 ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
3324 * Get minimal distance between the given shapes.
3325 * \param theShape1,theShape2 Shapes to find minimal distance between.
3326 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
3327 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
3328 * \return Value of the minimal distance between the given shapes.
3330 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
3331 out double X1, out double Y1, out double Z1,
3332 out double X2, out double Y2, out double Z2);
3335 * Get angle between the given lines or linear edges.
3336 * \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
3337 * \return Value of the angle between the given shapes.
3339 double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
3342 * Get angle between the given vectors.
3343 * \param theShape1,theShape2 Vectors to find angle between.
3344 * \return Value of the angle between the given vectors.
3346 double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
3349 * Get point coordinates
3351 void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
3354 * Get radius of curvature of curve in the point determinated by param
3355 * \param theShape - curve.
3356 * \param theParam - parameter on curve
3357 * \return Value of curvature.
3359 double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
3362 * Get radius of curvature of curve in the given point
3363 * \param theShape - curve.
3364 * \param thePoint - point
3365 * \return Value of curvature.
3367 double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3370 * Get max radius of curvature of surface in the point determinated by params
3371 * \param theShape - surface.
3372 * \param theUParam - U-parameter on surface
3373 * \param theVParam - V-parameter on surface
3374 * \return Value of curvature.
3376 double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3377 in double theVParam);
3380 * Get max radius of curvature of surface in the given point
3381 * \param theShape - surface.
3382 * \param thePoint - point
3383 * \return Value of curvature.
3385 double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3388 * Get min radius of curvature of surface in the point determinated by params
3389 * \param theShape - surface.
3390 * \param theUParam - U-parameter on surface
3391 * \param theVParam - V-parameter on surface
3392 * \return Value of curvature.
3394 double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3395 in double theVParam);
3398 * Get min radius of curvature of surface in the given point
3399 * \param theShape - surface.
3400 * \param thePoint - point
3401 * \return Value of curvature.
3403 double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3409 * GEOM_IGroupOperations: Interface for groups creation.
3411 interface GEOM_IGroupOperations : GEOM_IOperations
3414 * Creates a new group which will store sub-shapes of theMainShape
3415 * \param theMainShape is a GEOM object on which the group is selected
3416 * \param theShapeType defines a shape type of the group
3417 * \return a newly created GEOM group
3419 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
3422 * Adds a sub-object with ID theSubShapeId to the group
3423 * \param theGroup is a GEOM group to which the new sub-shape is added
3424 * \param theSubShapeId is a sub-shape ID in the main object.
3425 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
3427 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
3430 * Removes a sub-object with ID \a theSubShapeId from the group
3431 * \param theGroup is a GEOM group from which the sub-shape is removed.
3432 * \param theSubShapeId is a sub-shape ID in the main object.
3433 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
3435 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
3438 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3439 * \param theGroup is a GEOM group to which the new sub-shapes are added.
3440 * \param theSubShapes is a list of sub-shapes to be added.
3442 void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3445 * Removes from the group all the given shapes. No errors, if some shapes are not included.
3446 * \param theGroup is a GEOM group from which the sub-shapes are removed.
3447 * \param theSubShapes is a list of sub-shapes to be removed.
3449 void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3452 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3453 * \param theGroup is a GEOM group to which the new sub-shapes are added.
3454 * \param theSubShapes is a list of IDs of sub-shapes to be added.
3456 void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3459 * Removes from the group all the given shapes. No errors, if some shapes are not included.
3460 * \param theGroup is a GEOM group from which the sub-shapes are removed.
3461 * \param theSubShapes is a list of IDs of sub-shapes to be removed.
3463 void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3466 * Returns a type of sub-objects stored in the group
3467 * \param theGroup is a GEOM group which type is returned.
3469 long GetType (in GEOM_Object theGroup);
3472 * Returns a main shape associated with the group
3473 * \param theGroup is a GEOM group for which a main shape object is requested
3474 * \return a GEOM object which is a main shape for theGroup
3476 GEOM_Object GetMainShape (in GEOM_Object theGroup);
3479 * Returns a list of sub-objects ID stored in the group
3480 * \param theGroup is a GEOM group for which a list of IDs is requested
3482 ListOfLong GetObjects (in GEOM_Object theGroup);
3487 * GEOM_IAdvancedOperations: Interface for advanced modeling functions.
3489 interface GEOM_IAdvancedOperations : GEOM_IOperations
3492 * Create a T-shape object with specified caracteristics for the main and
3493 * the incident pipes (radius, width, half-length).
3494 * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3495 * \param theR1 Internal radius of main pipe
3496 * \param theW1 Width of main pipe
3497 * \param theL1 Half-length of main pipe
3498 * \param theR2 Internal radius of incident pipe (R2 < R1)
3499 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3500 * \param theL2 Half-length of incident pipe
3501 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3502 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3504 ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
3505 in double theR2, in double theW2, in double theL2,
3506 in boolean theHexMesh);
3508 * Create a T-shape object with specified caracteristics for the main and
3509 * the incident pipes (radius, width, half-length).
3510 * The extremities of the main pipe are located on junctions points P1 and P2.
3511 * The extremity of the incident pipe is located on junction point P3.
3512 * \param theR1 Internal radius of main pipe
3513 * \param theW1 Width of main pipe
3514 * \param theL1 Half-length of main pipe
3515 * \param theR2 Internal radius of incident pipe (R2 < R1)
3516 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3517 * \param theL2 Half-length of incident pipe
3518 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3519 * \param theP1 1st junction point of main pipe
3520 * \param theP2 2nd junction point of main pipe
3521 * \param theP3 Junction point of incident pipe
3522 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3524 ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
3525 in double theR2, in double theW2, in double theL2,
3526 in boolean theHexMesh,
3527 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3529 * Create a T-shape object with specified caracteristics for the main and
3530 * the incident pipes (radius, width, half-length). A chamfer is created
3531 * on the junction of the pipes.
3532 * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3533 * \param theR1 Internal radius of main pipe
3534 * \param theW1 Width of main pipe
3535 * \param theL1 Half-length of main pipe
3536 * \param theR2 Internal radius of incident pipe (R2 < R1)
3537 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3538 * \param theL2 Half-length of incident pipe
3539 * \param theH Height of the chamfer.
3540 * \param theW Width of the chamfer.
3541 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3542 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3544 ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
3545 in double theR2, in double theW2, in double theL2,
3546 in double theH, in double theW, in boolean theHexMesh);
3548 * Create a T-shape object with specified caracteristics for the main and
3549 * the incident pipes (radius, width, half-length). A chamfer is created
3550 * on the junction of the pipes.
3551 * The extremities of the main pipe are located on junctions points P1 and P2.
3552 * The extremity of the incident pipe is located on junction point P3.
3553 * \param theR1 Internal radius of main pipe
3554 * \param theW1 Width of main pipe
3555 * \param theL1 Half-length of main pipe
3556 * \param theR2 Internal radius of incident pipe (R2 < R1)
3557 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3558 * \param theL2 Half-length of incident pipe
3559 * \param theH Height of the chamfer.
3560 * \param theW Width of the chamfer.
3561 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3562 * \param theP1 1st junction point of main pipe
3563 * \param theP2 2nd junction point of main pipe
3564 * \param theP3 Junction point of incident pipe
3565 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3567 ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
3568 in double theR2, in double theW2, in double theL2,
3569 in double theH, in double theW, in boolean theHexMesh,
3570 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3572 * Create a T-shape object with specified caracteristics for the main and
3573 * the incident pipes (radius, width, half-length). A fillet is created
3574 * on the junction of the pipes.
3575 * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3576 * \param theR1 Internal radius of main pipe
3577 * \param theW1 Width of main pipe
3578 * \param theL1 Half-length of main pipe
3579 * \param theR2 Internal radius of incident pipe (R2 < R1)
3580 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3581 * \param theL2 Half-length of incident pipe
3582 * \param theRF Radius of curvature of fillet.
3583 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3584 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3586 ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
3587 in double theR2, in double theW2, in double theL2,
3588 in double theRF, in boolean theHexMesh);
3590 * Create a T-shape object with specified caracteristics for the main and
3591 * the incident pipes (radius, width, half-length). A fillet is created
3592 * on the junction of the pipes.
3593 * The extremities of the main pipe are located on junctions points P1 and P2.
3594 * The extremity of the incident pipe is located on junction point P3.
3595 * \param theR1 Internal radius of main pipe
3596 * \param theW1 Width of main pipe
3597 * \param theL1 Half-length of main pipe
3598 * \param theR2 Internal radius of incident pipe (R2 < R1)
3599 * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3600 * \param theL2 Half-length of incident pipe
3601 * \param theRF Radius of curvature of fillet.
3602 * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3603 * \param theP1 1st junction point of main pipe
3604 * \param theP2 2nd junction point of main pipe
3605 * \param theP3 Junction point of incident pipe
3606 * \return List of GEOM_Objects, containing the created shape and propagation groups.
3608 ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
3609 in double theR2, in double theW2, in double theL2,
3610 in double theRF, in boolean theHexMesh,
3611 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3612 /*@@ insert new functions before this line @@ do not remove this line @@*/
3616 * GEOM_Gen: Interface to access other GEOM interfaces.
3617 * Also contains some methods to access and manage GEOM objects.
3619 interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
3622 * Undo/Redo Management
3625 void Undo (in long theStudyID);
3627 void Redo (in long theStudyID);
3630 * Publishing management
3631 * Adds in theStudy a object theObject under with a name theName,
3632 * if theFather is not NULL the object is placed under thFather's SObject.
3633 * Returns a SObject where theObject is placed
3635 SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
3636 in GEOM_Object theObject,
3638 in GEOM_Object theFather);
3641 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3642 * To be used from python scripts out of geompy.addToStudy (non-default usage)
3643 * \param theStudy the study, in which theObject is published already,
3644 * and in which the arguments will be published
3645 * \param theObject published GEOM object, arguments of which will be published
3646 * \param theArgs list of GEOM_Object, operation arguments to be published.
3647 * If this list is empty, all operation arguments will be published
3648 * \param theFindMethod method to search sub-shapes, corresponding to arguments and
3649 * their sub-shapes. Value from enumeration GEOM::find_shape_method.
3650 * \param theInheritFirstArg set properties of the first argument for \a theObject.
3651 * Do not publish sub-shapes in place of arguments, but only
3652 * in place of sub-shapes of the first argument,
3653 * because the whole shape corresponds to the first argument.
3654 * Mainly to be used after transformations, but it also can be
3655 * usefull after partition with one object shape, and some other
3656 * operations, where only the first argument has to be considered.
3657 * If theObject has only one argument shape, this flag is automatically
3658 * considered as True, not regarding really passed value.
3659 * \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3660 * and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
3661 * \return list of published sub-shapes
3663 ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
3664 in GEOM_Object theObject,
3665 in ListOfGO theArgs,
3666 in find_shape_method theFindMethod,
3667 in boolean theInheritFirstArg,
3668 in boolean theAddPrefix);
3671 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3672 * To be used from python scripts out of geompy.addToStudy (non-default usage)
3673 * \param theStudy the study, in which theObject is published already,
3674 * and in which the arguments will be published
3675 * \param theObject published GEOM object, arguments of which will be published
3676 * \param theArgs list of GEOM_Object, operation arguments to be published.
3677 * If this list is empty, all operation arguments will be published
3678 * \param theFindMethod method to search sub-shapes, corresponding to arguments and
3679 * their sub-shapes. Value from enumeration GEOM::find_shape_method.
3680 * \param theInheritFirstArg set properties of the first argument for \a theObject.
3681 * Do not publish sub-shapes in place of arguments, but only
3682 * in place of sub-shapes of the first argument,
3683 * because the whole shape corresponds to the first argument.
3684 * Mainly to be used after transformations, but it also can be
3685 * usefull after partition with one object shape, and some other
3686 * operations, where only the first argument has to be considered.
3687 * If theObject has only one argument shape, this flag is automatically
3688 * considered as True, not regarding really passed value.
3689 * \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3690 * and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
3691 * \return list of published sub-shapes
3693 ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study theStudy,
3694 in GEOM_Object theObject,
3695 in ListOfGO theArgs,
3696 in find_shape_method theFindMethod,
3697 in boolean theInheritFirstArg,
3698 in boolean theAddPrefix);
3701 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3702 * To be used from GUI and from geompy.addToStudy.
3703 * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3704 * \param theSObject study object, referencing GEOM object, arguments of which will be published
3706 ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
3707 in SALOMEDS::SObject theSObject,
3708 in ListOfGO theArgs,
3709 in find_shape_method theFindMethod,
3710 in boolean theInheritFirstArg,
3711 in boolean theAddPrefix);
3714 * Methods to access interfaces for objects creation and transformation
3716 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3717 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
3718 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3719 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3720 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3721 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3722 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3723 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3724 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3725 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3726 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3727 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3728 GEOM_IAdvancedOperations GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3731 * Objects Management
3735 * Removes the object from the GEOM component
3736 * \param theObject is a GEOM object to be removed
3738 void RemoveObject (in GEOM_Object theObject);
3741 * Returns an object defined by the study and its entry in the GEOM component
3742 * \param theStudyID is a SALOMEDS Study ID
3743 * \param theEntry is an entry of the requested GEOM object in the GEOM component
3744 * \note if the object has not previously been created a NULL GEOM object is returned
3746 GEOM_Object GetObject (in long theStudyID, in string theEntry);
3749 * Add a sub-shape defined by indices in \a theIndices
3750 * (contains unique IDs of sub-shapes inside \a theMainShape)
3751 * \note The sub-shape GEOM_Objects can has ONLY ONE function.
3752 * Don't try to apply modification operations on them.
3753 * \note Internal method
3755 GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
3758 * GEOM object's IOR Management
3762 * Returns a GEOM Object defined by its IOR
3763 * \param theIOR a string containg an IOR of the requested GEOM object
3765 GEOM_Object GetIORFromString (in string theIOR);
3768 * Returns a string which contains an IOR of the GEOM object
3769 * \param theObject is a GEOM object which IOR is requested
3771 string GetStringFromIOR (in GEOM_Object theObject);
3774 * Returns a name with which a GEOM object was dumped into python script
3775 * \param theStudyEntry is an entry of the GEOM object in the study
3777 string GetDumpName (in string theStudyEntry);
3780 * Returns all names with which a GEOM objects was dumped
3781 * into python script to avoid the same names in SMESH script
3783 string_array GetAllDumpNames();
3786 * Publishes the named sub-shapes of given object in the study.
3787 * \param theStudy The study in which the object is published
3788 * \param theObject The object which named sub-shapes are published
3790 ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
3791 //in SObject theSObject,
3792 in Object theObject);