1 // Copyright (C) 2007-2008 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 };
45 * State of shape relatively geometrical surface like plane, sphere or cylinder.
46 * Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
50 /*! Shape is on surface */
54 * Shape is in the direction defined by the normal and not on surface.
55 * For plane it means above the plane,
56 * For sphere and cylinder it means outside of volume, bounded by the surface.
61 * Shape is in the direction defined by the normal and on surface.
67 * Complementary to ONOUT.
68 * For plane it means below the plane,
69 * For sphere and cylinder it means inside the volume, bounded by the surface
70 * (beyond axis and surface for cylinder and beyond cented and surface for sphere).
75 * Complementary to OUT.
82 * Kind of method to find inside one main shape some subshapes,
83 * corresponding to other given shape (its argument)
84 * Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
86 enum find_shape_method
88 /*! Use GetInPlace functionality. Suits all cases, except transformations */
91 /*! To be used only for transformation result, to find subshapes of argument.
92 * Only this method can be used after transformation.
96 /*! To find only shared subshapes, not modified by the operation */
99 /*! Use GetShapesOnShape method (can work only on solids) */
100 FSM_GetShapesOnShape,
102 /*! Use GetInPlaceByHistory method (can work only after Partition) */
103 FSM_GetInPlaceByHistory
107 typedef sequence<string> string_array;
108 typedef sequence<short> short_array;
109 typedef sequence<long> ListOfLong;
110 typedef sequence<double> ListOfDouble;
112 interface GEOM_Object;
114 typedef sequence<GEOM_Object> ListOfGO;
117 * GEOM_Object: interface of geometric object
119 interface GEOM_Object : SALOME::GenericObj
123 * Get an entry of the object in GEOM component.
128 * Get ID of study, where the object is created.
133 * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
138 * Get a <VAR>shape_type</VAR> of the object value.
140 shape_type GetShapeType();
143 * Set name of the object.
144 * \param theName is a name which will be associated with this object.
146 void SetName (in string theName);
149 * Get name of the object associated with this object.
154 * Set color of the object.
155 * \param theColor is a color of the object.
157 void SetColor(in SALOMEDS::Color theColor);
160 * Get color of the object.
162 SALOMEDS::Color GetColor();
165 * Toggle auto color mode on the object.
166 * \param theAtoColor is a flag which toggles auto color mode.
168 void SetAutoColor(in boolean theAutoColor);
171 * Get flag of object's auto color mode.
173 boolean GetAutoColor();
176 * Set a Study entry where this object was published.
178 void SetStudyEntry (in string theEntry);
181 * Get a Study entry where this object was published.
183 string GetStudyEntry();
186 * Get a list of all GEOM objects on which were the arguments
187 * when this object was constructed and modified.
188 * \note This method is supposed to be used by GUI only.
190 ListOfGO GetDependency();
193 * Get a list of GEOM objects on which the last function that created or modified the object depends.
194 * \note This method is supposed to be used by GUI only.
196 ListOfGO GetLastDependency();
199 * Get the TopoDS_Shape, for colocated case only.
201 long long getShape();
204 ######################################################################
205 * Internal methods (For sub shape identification)
206 ######################################################################
210 * Get geometric shape of the object as a byte stream
212 SALOMEDS::TMPFile GetShapeStream();
215 * Returns True if this object is not a sub shape of another object.
217 boolean IsMainShape();
220 * Get a list of ID's of sub shapes in the main shape.
221 * \note Internal method, suppopsed to be used only by GEOM_Client
223 ListOfLong GetSubShapeIndices();
226 * Get a main shape object to which this object is a sub shape
227 * \note Internal method, suppopsed to be used only by GEOM_Client
229 GEOM_Object GetMainShape();
232 * Return true if geom object representes a shape.
233 * For example, method return false for GEOM_MARKER
238 * Set list of parameters
239 * \param theParameters is a string containing the notebook variables separated by ":" symbol,
240 * used for object creation
242 void SetParameters (in string theParameters);
245 * Return list of notebook variables used for object creation separated by ":" symbol
247 string GetParameters();
252 * GEOM_IOperations: basic methods of all geometric operations
254 interface GEOM_IOperations : SALOME::GenericObj
257 * To know, if the operation was successfully performed
262 * Set the operation error code
263 * \param theErrorID is a string describing the error occured
264 * \note This method is supposed to be used only by interfaces inheriting from IOperations.
266 void SetErrorCode (in string theErrorID);
269 * Get the operation error code
271 string GetErrorCode();
274 * Get ID of study, where the operation is defined
279 * Opens a new transaction
281 void StartOperation();
284 * Closes the previously opened trasaction
286 void FinishOperation();
289 * Aborts the previously opened transaction
291 void AbortOperation();
295 * GEOM_IBasicOperations: interface for basic geometry creation
296 * (Point, Vector, Plane, Marker)
298 interface GEOM_IBasicOperations : GEOM_IOperations
301 * Create point by three coordinates.
302 * \param theX The X coordinate of the point.
303 * \param theY The Y coordinate of the point.
304 * \param theZ The Z coordinate of the point.
305 * \return New GEOM_Object, containing the created point.
307 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
310 * Create a point, distant from the referenced point
311 * on the given distances along the coordinate axes.
312 * \param theReference The referenced point.
313 * \param theX Displacement from the referenced point along OX axis.
314 * \param theY Displacement from the referenced point along OY axis.
315 * \param theZ Displacement from the referenced point along OZ axis.
316 * \return New GEOM_Object, containing the created point.
318 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
319 in double theX, in double theY, in double theZ);
322 * Create a point, corresponding to the given parameter on the given curve.
323 * \param theRefCurve The referenced curve.
324 * \param theParameter Value of parameter on the referenced curve.
325 * \return New GEOM_Object, containing the created point.
327 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
328 in double theParameter);
331 * Create a point on the given curve, projecting given point
332 * \param theRefCurve The referenced curve.
333 * \param theXParameter X co-ordinate of point to project on curve
334 * \param theYParameter Y co-ordinate of point to project on curve
335 * \param theZParameter Z co-ordinate of point to project on curve
336 * \return New GEOM_Object, containing the created point.
338 GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
339 in double theXParameter,
340 in double theYarameter,
341 in double theZPameter);
344 * Create a point, corresponding to the given parameters on the
346 * \param theRefSurf The referenced surface.
347 * \param theUParameter Value of U-parameter on the referenced surface.
348 * \param theVParameter Value of V-parameter on the referenced surface.
349 * \return New GEOM_Object, containing the created point.
351 GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
352 in double theUParameter,
353 in double theVParameter);
356 * Create a point on the given surface, projecting given point
357 * \param theRefSurf The referenced surface.
358 * \param theXParameter X co-ordinate of point to project on curve
359 * \param theYParameter Y co-ordinate of point to project on curve
360 * \param theZParameter Z co-ordinate of point to project on curve
361 * \return New GEOM_Object, containing the created point.
363 GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
364 in double theXParameter,
365 in double theYarameter,
366 in double theZPameter);
370 * Create a point, on two lines intersection.
371 * \param theRefLine1, theRefLine2 The referenced lines.
372 * \return New GEOM_Object, containing the created point.
374 GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
375 in GEOM_Object theRefLine2);
378 * Create a vector, corresponding to tangent to the given parameter on the given curve.
379 * \param theRefCurve The referenced curve.
380 * \param theParameter Value of parameter on the referenced curve.This value should be have value
381 * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
382 * \last parameter of curve.
383 * \return New GEOM_Object, containing the created point.
385 GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
386 in double theParameter);
389 * Create a vector with the given components.
390 * \param theDX X component of the vector.
391 * \param theDY Y component of the vector.
392 * \param theDZ Z component of the vector.
393 * \return New GEOM_Object, containing the created vector.
395 GEOM_Object MakeVectorDXDYDZ (in double theDX,
400 * Create a vector between two points.
401 * \param thePnt1 Start point for the vector.
402 * \param thePnt2 End point for the vector.
403 * \return New GEOM_Object, containing the created vector.
405 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
408 * Create a line, passing through the given point
409 * and parrallel to the given direction
410 * \param thePnt Point. The resulting line will pass through it.
411 * \param theDir Direction. The resulting line will be parallel to it.
412 * \return New GEOM_Object, containing the created line.
414 GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
417 * Create a line, passing through the given points
418 * \param thePnt1 First of two points, defining the line.
419 * \param thePnt2 Second of two points, defining the line.
420 * \return New GEOM_Object, containing the created line.
422 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
425 * Create a line, given by two faces intersection.
426 * \param theFace1 First of two faces, defining the line.
427 * \param theFace2 Second of two faces, defining the line.
428 * \return New GEOM_Object, containing the created line.
430 GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
433 * Create a plane, passing through the three given points
434 * \param thePnt1 First of three points, defining the plane.
435 * \param thePnt2 Second of three points, defining the plane.
436 * \param thePnt3 Fird of three points, defining the plane.
437 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
438 * \return New GEOM_Object, containing the created plane.
440 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
441 in GEOM_Object thePnt2,
442 in GEOM_Object thePnt3,
443 in double theTrimSize);
446 * Create a plane, passing through the given point
447 * and normal to the given vector.
448 * \param thePnt Point, the plane has to pass through.
449 * \param theVec Vector, defining the plane normal direction.
450 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
451 * \return New GEOM_Object, containing the created plane.
453 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
454 in GEOM_Object theVec,
455 in double theTrimSize);
458 * Create a plane, similar to the existing one, but with another size of representing face.
459 * \param theFace Referenced plane or LCS(Marker).
460 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
461 * \return New GEOM_Object, containing the created plane.
463 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
464 in double theTrimSize);
467 * Create a plane, by two vectors.
468 * \param theVec1 Vector1, the plane has to pass through first point of this vector.
469 * \param theVec Vector2, defining the plane normal direction.
470 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
471 * \return New GEOM_Object, containing the created plane.
473 GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
474 in GEOM_Object theVec2,
475 in double theTrimSize);
478 * Create a plane, defined by local coordinate system.
479 * \param theLCS Referenced LCS(Marker).
480 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
481 * \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
482 * \return New GEOM_Object, containing the created plane.
484 GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
485 in double theTrimSize,
486 in double theOrientation);
489 * Create a local coordinate system.
490 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
491 * \param theXDX,theXDY,theXDZ Three components of OX direction
492 * \param theYDX,theYDY,theYDZ Three components of OY direction
493 * \return New GEOM_Object, containing the created coordinate system.
495 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
496 in double theXDX, in double theXDY, in double theXDZ,
497 in double theYDX, in double theYDY, in double theYDZ);
500 * Create a tangent plane to specified face in the point with specified parameters.
501 * Values of parameters should be between 0. and 1.0
502 * \param theFace - face for which tangent plane shuold be built.
503 * \param theParameterU - value of parameter by U
504 * \param theParameterV - value of parameter Vthe
505 * \param theTrimSize - defines sizes of created face
506 * \return New GEOM_Object, containing the face built on tangent plane.
508 GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
509 in double theParameterU,
510 in double theParameterV,
511 in double theTrimSize);
514 interface GEOM_ITransformOperations : GEOM_IOperations
517 * Translate the given object along the vector, specified by its end points.
518 * \param theObject The object to be translated.
519 * \param thePoint1 Start point of translation vector.
520 * \param thePoint2 End point of translation vector.
523 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
524 in GEOM_Object thePoint1,
525 in GEOM_Object thePoint2);
528 * Translate the given object along the vector, specified
529 * by its end points, creating its copy before the translation.
530 * \param theObject The object to be translated.
531 * \param thePoint1 Start point of translation vector.
532 * \param thePoint2 End point of translation vector.
533 * \return New GEOM_Object, containing the translated object.
535 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
536 in GEOM_Object thePoint1,
537 in GEOM_Object thePoint2);
540 * Translate the given object along the vector, specified by its components.
541 * \param theObject The object to be translated.
542 * \param theDX,theDY,theDZ Components of translation vector.
545 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
546 in double theDX, in double theDY, in double theDZ);
549 * Translate the given object along the vector, specified
550 * by its components, creating its copy before the translation.
551 * \param theObject The object to be translated.
552 * \param theDX,theDY,theDZ Components of translation vector.
553 * \return New GEOM_Object, containing the translated object.
555 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
556 in double theDX, in double theDY, in double theDZ);
560 * Translate the given object along the given vector.
561 * \param theObject The object to be translated.
562 * \param theVector Translation vector, giving both direction and distance.
565 GEOM_Object TranslateVector (in GEOM_Object theObject,
566 in GEOM_Object theVector);
569 * Translate the given object along the given vector,
570 * creating its copy before the translation.
571 * \param theObject The object to be translated.
572 * \param theVector Translation vector, giving both direction and distance.
573 * \return New GEOM_Object, containing the translated object.
575 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
576 in GEOM_Object theVector);
579 * Translate the given object along the given vector on given distance,
580 * creating its copy before the translation.
581 * \param theObject The object to be translated.
582 * \param theVector Translation vector, giving a direction.
583 * \param theDistance Translation distance, giving a distance.
584 * \param theCope Translation copy, creating its copy if true.
585 * \return New GEOM_Object, containing the translated object.
587 GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
588 in GEOM_Object theVector,
589 in double theDistance,
593 * Translate the given object along the given vector a given number times
594 * \param theObject The object to be translated.
595 * \param theVector Direction of the translation.
596 * \param theStep Distance to translate on.
597 * \param theNbTimes Quantity of translations to be done.
598 * \return New GEOM_Object, containing compound of all
599 * the shapes, obtained after each translation.
601 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
602 in GEOM_Object theVector,
607 * Conseqently apply two specified translations to theObject specified number of times.
608 * \param theObject The object to be translated.
609 * \param theVector1 Direction of the first translation.
610 * \param theStep1 Step of the first translation.
611 * \param theNbTimes1 Quantity of translations to be done along theVector1.
612 * \param theVector2 Direction of the second translation.
613 * \param theStep2 Step of the second translation.
614 * \param theNbTimes2 Quantity of translations to be done along theVector2.
615 * \return New GEOM_Object, containing compound of all
616 * the shapes, obtained after each translation.
618 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
619 in GEOM_Object theVector1,
622 in GEOM_Object theVector2,
624 in long theNbTimes2);
627 * Rotate given object around vector perpendicular to plane containing three points.
628 * \param theObject The object to be rotated.
629 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
630 * containing the three points.
631 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
634 GEOM_Object RotateThreePoints (in GEOM_Object theObject,
635 in GEOM_Object theCentPoint,
636 in GEOM_Object thePoint1,
637 in GEOM_Object thePoint2);
641 * Rotate given object around vector perpendicular to plane containing three points.
642 * Creating its copy before the rotatation.
643 * \param theObject The object to be rotated.
644 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
645 * containing the three points.
646 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
647 * \return New GEOM_Object, containing the rotated object.
649 GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
650 in GEOM_Object theCentPoint,
651 in GEOM_Object thePoint1,
652 in GEOM_Object thePoint2);
655 * Rotate the given object around the given axis on the given angle.
656 * \param theObject The object to be rotated.
657 * \param theAxis Rotation axis.
658 * \param theAngle Rotation angle in radians.
661 GEOM_Object Rotate (in GEOM_Object theObject,
662 in GEOM_Object theAxis,
667 * Rotate the given object around the given axis
668 * on the given angle, creating its copy before the rotatation.
669 * \param theObject The object to be rotated.
670 * \param theAxis Rotation axis.
671 * \param theAngle Rotation angle in radians.
672 * \return New GEOM_Object, containing the rotated object.
674 GEOM_Object RotateCopy (in GEOM_Object theObject,
675 in GEOM_Object theAxis,
680 * Rotate the given object around the given axis a given number times.
681 * Rotation angle will be 2*PI/theNbTimes.
682 * \param theObject The object to be rotated.
683 * \param theAxis The rotation axis.
684 * \param theNbTimes Quantity of rotations to be done.
685 * \return New GEOM_Object, containing compound of all the
686 * shapes, obtained after each rotation.
688 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
689 in GEOM_Object theAxis,
693 * Rotate the given object around the
694 * given axis on the given angle a given number
695 * times and multi-translate each rotation result.
696 * Translation direction passes through center of gravity
697 * of rotated shape and its projection on the rotation axis.
698 * \param theObject The object to be rotated.
699 * \param theAxis Rotation axis.
700 * \param theAngle Rotation angle in graduces.
701 * \param theNbTimes1 Quantity of rotations to be done.
702 * \param theStep Translation distance.
703 * \param theNbTimes2 Quantity of translations to be done.
704 * \return New GEOM_Object, containing compound of all the
705 * shapes, obtained after each transformation.
707 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
708 in GEOM_Object theAxis,
712 in long theNbTimes2);
715 * Replace the given object by an object,
716 * symmetrical to it relatively the given plane.
717 * \param theObject The object to be mirrored.
718 * \param thePlane Plane of symmetry.
720 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
723 * Create an object, symmetrical
724 * to the given one relatively the given plane.
725 * \param theObject The object to be mirrored.
726 * \param thePlane Plane of symmetry.
727 * \return New GEOM_Object, containing the mirrored shape.
729 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
732 * Replace the given object by an object,
733 * symmetrical to it relatively the given axis.
734 * \param theObject The object to be mirrored.
735 * \param theAxis Axis of symmetry.
738 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
741 * Create an object, symmetrical
742 * to the given one relatively the given axis.
743 * \param theObject The object to be mirrored.
744 * \param theAxis Axis of symmetry.
745 * \return New GEOM_Object, containing the mirrored object.
747 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
750 * Replace the given object by an object, symmetrical to it relatively the given point.
751 * \param theObject The object to be mirrored.
752 * \param thePoint Point of symmetry.
755 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
758 * Create an object, symmetrical to the given one relatively the given point.
759 * \param theObject The object to be mirrored.
760 * \param thePoint Point of symmetry.
761 * \return New GEOM_Object, containing the mirrored object.
763 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
766 * Replace the given object by its offset.
767 * \param theObject The base object for the offset.
768 * \param theOffset Offset value.
771 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
774 * Create new object as offset of the given one.
775 * \param theObject The base object for the offset.
776 * \param theOffset Offset value.
777 * \return New GEOM_Object, containing the offset object.
779 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
782 * Scale the given object by the factor.
783 * \param theObject The object to be scaled.
784 * \param thePoint Center point for scaling.
785 * \param theFactor Scaling factor value.
788 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
789 in double theFactor);
792 * Scale the given object by the factor, creating its copy before the scaling.
793 * \param theObject The object to be scaled.
794 * \param thePoint Center point for scaling.
795 * \param theFactor Scaling factor value.
796 * \return New GEOM_Object, containing the scaled shape.
798 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
799 in double theFactor);
802 * Scale the given object by different factors along coordinate axes.
803 * \param theObject The object to be scaled.
804 * \param thePoint Center point for scaling.
805 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
808 GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
809 in GEOM_Object thePoint,
810 in double theFactorX,
811 in double theFactorY,
812 in double theFactorZ);
815 * Scale the given object by different factors along coordinate axes,
816 * creating its copy before the scaling.
817 * \param theObject The object to be scaled.
818 * \param thePoint Center point for scaling.
819 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
820 * \return New GEOM_Object, containing the scaled shape.
822 GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
823 in GEOM_Object thePoint,
824 in double theFactorX,
825 in double theFactorY,
826 in double theFactorZ);
829 * Modify the Location of the given object by LCS.
830 * \param theObject The object to be displaced.
831 * \param theStartLCS Coordinate system to perform displacement from it.
832 * If \a theStartLCS is NULL, displacement
833 * will be performed from global CS.
834 * If \a theObject itself is used as \a theStartLCS,
835 * its location will be changed to \a theEndLCS.
836 * \param theEndLCS Coordinate system to perform displacement to it.
839 GEOM_Object PositionShape (in GEOM_Object theObject,
840 in GEOM_Object theStartLCS,
841 in GEOM_Object theEndLCS);
844 * Modify the Location of the given object by LCS,
845 * creating its copy before the setting.
846 * \param theObject The object to be displaced.
847 * \param theStartLCS Coordinate system to perform displacement from it.
848 * If \a theStartLCS is NULL, displacement
849 * will be performed from global CS.
850 * If \a theObject itself is used as \a theStartLCS,
851 * its location will be changed to \a theEndLCS.
852 * \param theEndLCS Coordinate system to perform displacement to it.
853 * \return New GEOM_Object, containing the displaced shape.
855 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
856 in GEOM_Object theStartLCS,
857 in GEOM_Object theEndLCS);
860 * Modify the Location of the given object by Path,
861 * \param theObject The object to be displaced.
862 * \param thePath Wire or Edge along that the object will be translated.
863 * \param theDistance progress of Path (0 = actual location, 1 = end of path location).
864 * \param theCopy is a true or false parameter. true is to create a copy, false to move the object.
865 * \param theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
866 * \return New GEOM_Object, containing the displaced shape.
869 GEOM_Object PositionAlongPath (in GEOM_Object theObject,
870 in GEOM_Object thePath,
871 in double theDistance,
873 in boolean theReverse);
876 * Recompute the shape from its arguments.
877 * \param theObject The object to be recomputed.
880 GEOM_Object RecomputeObject (in GEOM_Object theObject);
884 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
885 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
886 * Pipe (extrusion along contour), Revolution, Solid (from shell).
888 interface GEOM_I3DPrimOperations : GEOM_IOperations
891 * Create a box with specified dimensions along the coordinate axes
892 * and with edges, parallel to the coordinate axes.
893 * Center of the box will be at point (DX/2, DY/2, DZ/2).
894 * \param theDX Length of Box edges, parallel to OX axis.
895 * \param theDY Length of Box edges, parallel to OY axis.
896 * \param theDZ Length of Box edges, parallel to OZ axis.
897 * \return New GEOM_Object, containing the created box.
899 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
902 * Create a box with two specified opposite vertices,
903 * and with edges, parallel to the coordinate axes
904 * \param thePnt1 First of two opposite vertices.
905 * \param thePnt2 Second of two opposite vertices.
906 * \return New GEOM_Object, containing the created box.
908 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
911 * Create a face specified dimensions along OX-OY coordinate axes,
912 * with edges parallel to the coordinate axes.
913 * Center of the face will be at point (0, 0, 0).
914 * \param theH Height of the Face.
915 * \param theW Width of the Face.
916 * \param theOrientation Orientation belong axis OXY OYZ OZX
917 * \return New GEOM_Object, containing the created face.
919 GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
921 * Create a face by normale vector or edge and two specified sizes,
922 * vertical (H) and horisontal (W).
923 * \param theVec defines plane.
924 * \param theH vertical size (height).
925 * \param theW horisontal size (width).
926 * \return New GEOM_Object, containing the created face.
928 GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
930 * Create a Disk (circular face) with given center, normal vector and radius.
931 * \param thePnt disk center.
932 * \param theVec Vector, normal to the plane of the disk.
933 * \param theR Disk radius.
934 * \return New GEOM_Object, containing the created disk.
936 GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
937 in GEOM_Object theVec,
940 * Create a disk (circular face), passing through three given points
941 * \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
942 * \return New GEOM_Object, containing the created disk.
944 GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
945 in GEOM_Object thePnt2,
946 in GEOM_Object thePnt3);
949 * Create a disk specified dimensions along OX-OY coordinate axes,
950 * Center of the disk at point (0, 0, 0).
951 * \param theR of the Disk.
952 * \param theOrientation Orientation belong axis OXY OYZ OZX
953 * \return New GEOM_Object, containing the created disk.
955 GEOM_Object MakeDiskR (in double theR, in short theOrientation);
958 * Create a cylinder with given radius and height at
959 * the origin of coordinate system. Axis of the cylinder
960 * will be collinear to the OZ axis of the coordinate system.
961 * \param theR Cylinder radius.
962 * \param theH Cylinder height.
963 * \return New GEOM_Object, containing the created cylinder.
965 GEOM_Object MakeCylinderRH (in double theR, in double theH);
968 * Create a cylinder with given base point, axis, radius and height.
969 * \param thePnt Central point of cylinder base.
970 * \param theAxis Cylinder axis.
971 * \param theR Cylinder radius.
972 * \param theH Cylinder height.
973 * \return New GEOM_Object, containing the created cylinder.
975 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
976 in GEOM_Object theAxis,
981 * Create a cone with given height and radiuses at
982 * the origin of coordinate system. Axis of the cone will
983 * be collinear to the OZ axis of the coordinate system.
984 * \param theR1 Radius of the first cone base.
985 * \param theR2 Radius of the second cone base.
986 * \note If both radiuses are non-zero, the cone will be truncated.
987 * \note If the radiuses are equal, a cylinder will be created instead.
988 * \param theH Cone height.
989 * \return New GEOM_Object, containing the created cone.
991 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
994 * Create a cone with given base point, axis, height and radiuses.
995 * \param thePnt Central point of the first cone base.
996 * \param theAxis Cone axis.
997 * \param theR1 Radius of the first cone base.
998 * \param theR2 Radius of the second cone base.
999 * \note If both radiuses are non-zero, the cone will be truncated.
1000 * \note If the radiuses are equal, a cylinder will be created instead.
1001 * \param theH Cone height.
1002 * \return New GEOM_Object, containing the created cone.
1004 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1005 in GEOM_Object theAxis,
1011 * Create a torus with given radiuses at the origin of coordinate system.
1012 * \param theRMajor Torus major radius.
1013 * \param theRMinor Torus minor radius.
1014 * \return New GEOM_Object, containing the created torus.
1016 GEOM_Object MakeTorusRR (in double theRMajor,
1017 in double theRMinor);
1020 * Create a torus with given center, normal vector and radiuses.
1021 * \param thePnt Torus central point.
1022 * \param theVec Torus axis of symmetry.
1023 * \param theRMajor Torus major radius.
1024 * \param theRMinor Torus minor radius.
1025 * \return New GEOM_Object, containing the created torus.
1027 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1028 in GEOM_Object theVec,
1029 in double theRMajor,
1030 in double theRMinor);
1033 * Create a sphere with given radius at the origin of coordinate system.
1034 * \param theR Sphere radius.
1035 * \return New GEOM_Object, containing the created sphere.
1037 GEOM_Object MakeSphereR (in double theR);
1040 * Create a sphere with given center and radius.
1041 * \param thePnt Sphere center.
1042 * \param theR Sphere radius.
1043 * \return New GEOM_Object, containing the created .
1045 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1048 * Create a shape by extrusion of the base shape along the vector,
1049 * i.e. all the space, transfixed by the base shape during its translation
1050 * along the vector on the given distance.
1051 * \param theBase Base shape to be extruded.
1052 * \param theVec Direction of extrusion.
1053 * \param theH Prism dimension along theVec.
1054 * \return New GEOM_Object, containing the created prism.
1056 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1057 in GEOM_Object theVec,
1059 /* The Same Prism but in 2 directions (forward&backward) */
1060 GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1061 in GEOM_Object theVec,
1065 * Create a shape by extrusion of the base shape along a vector, defined by two points.
1066 * \param theBase Base shape to be extruded.
1067 * \param thePoint1 First end of extrusion vector.
1068 * \param thePoint2 Second end of extrusion vector.
1069 * \return New GEOM_Object, containing the created prism.
1071 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1072 in GEOM_Object thePoint1,
1073 in GEOM_Object thePoint2);
1074 /* The same prism but in two directions forward&backward */
1075 GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1076 in GEOM_Object thePoint1,
1077 in GEOM_Object thePoint2);
1080 * Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1081 * \param theBase Base shape to be extruded.
1082 * \param DX, DY, DZ end of extrusion vector.
1083 * \return New GEOM_Object, containing the created prism.
1085 GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1086 in double theDX, in double theDY, in double theDZ);
1087 /* The same prism but in two directions forward&backward */
1088 GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1089 in double theDX, in double theDY, in double theDZ);
1092 * Create a shape by extrusion of the base shape along
1093 * the path shape. The path shape can be a wire or an edge.
1094 * \param theBase Base shape to be extruded.
1095 * \param thePath Path shape to extrude the base shape along it.
1096 * \return New GEOM_Object, containing the created pipe.
1098 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1101 * Create a shape by revolution of the base shape around the axis
1102 * on the given angle, i.e. all the space, transfixed by the base
1103 * shape during its rotation around the axis on the given angle.
1104 * \param theBase Base shape to be rotated.
1105 * \param theAxis Rotation axis.
1106 * \param theAngle Rotation angle in radians.
1107 * \return New GEOM_Object, containing the created revolution.
1109 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1110 in GEOM_Object theAxis,
1111 in double theAngle);
1112 /* The Same Revolution but in both ways forward&backward */
1113 GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1114 in GEOM_Object theAxis,
1115 in double theAngle);
1118 * Create a filling from the given compound of contours.
1119 * \param theMinDeg a minimal degree of BSpline surface to create
1120 * \param theMaxDeg a maximal degree of BSpline surface to create
1121 * \param theTol2D a 2d tolerance to be reached
1122 * \param theTol3D a 3d tolerance to be reached
1123 * \param theNbIter a number of iteration of approximation algorithm
1124 * \return New GEOM_Object, containing the created filling surface.
1126 GEOM_Object MakeFilling (in GEOM_Object theShape,
1127 in long theMinDeg, in long theMaxDeg,
1128 in double theTol2D, in double theTol3D,
1129 in long theNbIter, in boolean theApprox);
1132 * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1133 * \param theSeqSections - set of specified sections.
1134 * \param theModeSolid - mode defining building solid or shell
1135 * \param thePreci - precision 3D used for smoothing by default 1.e-6
1136 * \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1137 * \return New GEOM_Object, containing the created shell or solid.
1139 GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1140 in boolean theModeSolid,
1142 in boolean theRuled);
1145 * Create a shape by extrusion of the profile shape along
1146 * the path shape. The path shape can be a wire or an edge.
1147 * the several profiles can be specified in the several locations of path.
1148 * \param theSeqBases - list of Bases shape to be extruded.
1149 * \param theLocations - list of locations on the path corresponding
1150 * specified list of the Bases shapes. Number of locations
1151 * should be equal to number of bases or list of locations can be empty.
1152 * \param thePath - Path shape to extrude the base shape along it.
1153 * \param theWithContact - the mode defining that the section is translated to be in
1154 * contact with the spine.
1155 * \param - WithCorrection - defining that the section is rotated to be
1156 * orthogonal to the spine tangent in the correspondent point
1157 * \return New GEOM_Object, containing the created pipe.
1159 GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1160 in ListOfGO theLocations,
1161 in GEOM_Object thePath,
1162 in boolean theWithContact ,
1163 in boolean theWithCorrection );
1166 * Create a shape by extrusion of the profile shape along
1167 * the path shape. The path shape can be a shell or a face.
1168 * the several profiles can be specified in the several locations of path.
1169 * \param theSeqBases - list of Bases shape to be extruded.
1170 * \param theSeqSubBases - list of corresponding subshapes of section shapes.
1171 * \param theLocations - list of locations on the path corresponding
1172 * specified list of the Bases shapes. Number of locations
1173 * should be equal to number of bases.
1174 * \param thePath - Path shape to extrude the base shape along it.
1175 * \param theWithContact - the mode defining that the section is translated to be in
1176 * contact with the spine.
1177 * \param - WithCorrection - defining that the section is rotated to be
1178 * orthogonal to the spine tangent in the correspondent point
1179 * \return New GEOM_Object, containing the created pipe.
1181 GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1182 in ListOfGO theSeqSubBases,
1183 in ListOfGO theLocations,
1184 in GEOM_Object thePath,
1185 in boolean theWithContact ,
1186 in boolean theWithCorrection );
1189 * Create solids between given sections
1190 * \param theSeqBases - list of sections (shell or face).
1191 * \param theLocations - list of corresponding vertexes
1192 * \return New GEOM_Object, containing the created solids.
1194 GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1195 in ListOfGO theLocations);
1198 * Create a shape by extrusion of the base shape along
1199 * the path shape with constant bi-normal direction along the given vector.
1200 * The path shape can be a wire or an edge.
1201 * \param theBase Base shape to be extruded.
1202 * \param thePath Path shape to extrude the base shape along it.
1203 * \param theVec Vector defines a constant binormal direction to keep the
1204 * same angle beetween the Direction and the sections
1205 * along the sweep surface.
1206 * \return New GEOM_Object, containing the created pipe.
1208 GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1209 in GEOM_Object thePath,
1210 in GEOM_Object theVec);
1215 * GEOM_IShapesOperations: Interface for Shapes creation:
1216 * Edge from two points, Wire from edges, Face from wire,
1217 * Shell from faces, Solid from shells, Compound from shapes
1219 interface GEOM_IShapesOperations : GEOM_IOperations
1222 * Create a linear edge with specified ends.
1223 * \param thePnt1 Point for the first end of edge.
1224 * \param thePnt2 Point for the second end of edge.
1225 * \return New GEOM_Object, containing the created edge.
1227 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1230 * Create a wire from the set of edges and wires.
1231 * \param theEdgesAndWires List of edge and/or wires.
1232 * \param theTolerance Maximum distance between vertices, that will be merged.
1233 * Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1234 * \return New GEOM_Object, containing the created wire.
1236 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1237 in double theTolerance);
1240 * Create a face on the given wire.
1241 * \param theWire closed Wire or Edge to build the face on.
1242 * \param isPlanarWanted If TRUE, only planar face will be built.
1243 * If impossible, NULL object will be returned.
1244 * \return New GEOM_Object, containing the created face.
1246 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1249 * Create a face on the given wires set.
1250 * \param theWires List of closed wires or edges to build the face on.
1251 * \param isPlanarWanted If TRUE, only planar face will be built.
1252 * If impossible, NULL object will be returned.
1253 * \return New GEOM_Object, containing the created face.
1255 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1258 * Create a shell from the set of faces and shells.
1259 * \param theFacesAndShells List of faces and/or shells.
1260 * \return New GEOM_Object, containing the created shell.
1262 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1265 * Create a solid, bounded by the given shell.
1266 * \param theShell Bounding shell.
1267 * \return New GEOM_Object, containing the created solid.
1269 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1272 * Create a solid, bounded by the given shells.
1273 * \param theShells Bounding shells.
1274 * \return New GEOM_Object, containing the created solid.
1276 GEOM_Object MakeSolidShells (in ListOfGO theShells);
1279 * Create a compound of the given shapes.
1280 * \param theShapes List of shapes to put in compound.
1281 * \return New GEOM_Object, containing the created compound.
1283 GEOM_Object MakeCompound (in ListOfGO theShapes);
1286 * Replace coincident faces in theShape by one face.
1287 * \param theShape Initial shape.
1288 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1289 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1290 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
1292 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1295 * Find coincident faces in theShape for possible gluing.
1296 * \param theShape Initial shape.
1297 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1300 ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1303 * Replace coincident faces in theShape by one face
1304 * in compliance with given list of faces
1305 * \param theShape Initial shape.
1306 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1307 * \param theFaces List of faces for gluing.
1308 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1309 * \return New GEOM_Object, containing a copy of theShape without some faces.
1311 GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1312 in ListOfGO theFaces, in boolean doKeepNonSolids);
1315 * Explode a shape on subshapes of a given type.
1316 * \param theShape Shape to be exploded.
1317 * \param theShapeType Type of sub-shapes to be retrieved.
1318 * \param isSorted If this parameter is TRUE, sub-shapes will be
1319 * sorted by coordinates of their gravity centers.
1320 * \return List of sub-shapes of type theShapeType, contained in theShape.
1322 ListOfGO MakeExplode (in GEOM_Object theShape,
1323 in long theShapeType,
1324 in boolean isSorted);
1327 * Explode a shape on subshapes of a given type.
1328 * Does the same, as the above method, but returns IDs of sub-shapes,
1329 * not GEOM_Objects. It works faster.
1330 * \param theShape Shape to be exploded.
1331 * \param theShapeType Type of sub-shapes to be retrieved.
1332 * \param isSorted If this parameter is TRUE, sub-shapes will be
1333 * sorted by coordinates of their gravity centers.
1334 * \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1336 ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1337 in long theShapeType,
1338 in boolean isSorted);
1341 * Get a sub shape defined by its unique ID inside \a theMainShape
1342 * \note The sub shape GEOM_Objects can has ONLY ONE function.
1343 * Don't try to apply modification operations on them.
1345 GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1349 * Get global index of \a theSubShape in \a theMainShape.
1350 * \param theMainShape Main shape.
1351 * \param theSubShape Sub-shape of the main shape.
1352 * \return global index of \a theSubShape in \a theMainShape.
1354 long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1357 * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1358 * Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1359 * to generate automatic names for sub-shapes, when publishing them in a study.
1360 * \param theMainShape Main shape.
1361 * \param theSubShape Sub-shape of the main shape.
1362 * \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1364 long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1367 * \brief Get name of type of \a theShape.
1369 * Use wide type notation, taking into consideration both topology and geometry of the shape.
1370 * Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1371 * to generate automatic names for sub-shapes, when publishing them in a study.
1372 * \param theShape The shape to get a type of.
1373 * \return String, containing a type name of \a theShape.
1375 string GetShapeTypeString (in GEOM_Object theShape);
1378 * Count number of faces in the given shape.
1379 * \param theShape Shape to count faces in.
1380 * \return Number of faces in the given shape.
1382 long NumberOfFaces (in GEOM_Object theShape);
1385 * Count number of edges in the given shape.
1386 * \param theShape Shape to count edges in.
1387 * \return Number of edges in theShape.
1389 long NumberOfEdges (in GEOM_Object theShape);
1392 * Count number of subshapes of type \a theShapeType in the given shape.
1393 * \param theShape Shape to count subshapes in.
1394 * \param theShapeType The type of subshapes to count.
1395 * \return Number of subshapes of type \a theShapeType in \a theShape.
1397 long NumberOfSubShapes (in GEOM_Object theShape,
1398 in long theShapeType);
1401 * Reverses an orientation the given shape.
1402 * \param theShape Shape to be reversed.
1403 * \return The reversed copy of theShape.
1405 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1408 * Retrieve all free faces from the given shape.
1409 * Free face is a face, which is not shared between two shells of the shape.
1410 * \param theShape Shape to find free faces in.
1411 * \return List of IDs of all free faces, contained in theShape.
1413 ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1416 * Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1417 * \param theShape1 Shape to find sub-shapes in.
1418 * \param theShape2 Shape to find shared sub-shapes with.
1419 * \param theShapeType Type of sub-shapes to be retrieved.
1420 * \return List of sub-shapes of theShape1, shared with theShape2.
1422 ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1423 in GEOM_Object theShape2,
1424 in long theShapeType);
1427 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1428 * the specified plane by the certain way, defined through \a theState parameter.
1429 * \param theShape Shape to find sub-shapes of.
1430 * \param theShapeType Type of sub-shapes to be retrieved.
1431 * \param theAx1 Vector (or line, or linear edge), specifying normal
1432 * direction and location of the plane to find shapes on.
1433 * \param theState The state of the subshapes to find.
1434 * \return List of all found sub-shapes.
1436 ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1437 in long theShapeType,
1438 in GEOM_Object theAx1,
1439 in shape_state theState);
1441 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1442 * the specified plane by the certain way, defined through \a theState parameter.
1443 * \param theShape Shape to find sub-shapes of.
1444 * \param theShapeType Type of sub-shapes to be retrieved.
1445 * \param theAx1 Vector (or line, or linear edge), specifying normal
1446 * direction of the plane to find shapes on.
1447 * \param thePnt Point specifying location of the plane to find shapes on.
1448 * \param theState The state of the subshapes to find.
1449 * \return List of all found sub-shapes.
1451 ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1452 in long theShapeType,
1453 in GEOM_Object theAx1,
1454 in GEOM_Object thePnt,
1455 in shape_state theState);
1460 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1461 * the specified cylinder by the certain way, defined through \a theState parameter.
1462 * \param theShape Shape to find sub-shapes of.
1463 * \param theShapeType Type of sub-shapes to be retrieved.
1464 * \param theAxis Vector (or line, or linear edge), specifying
1465 * axis of the cylinder to find shapes on.
1466 * \param theRadius Radius of the cylinder to find shapes on.
1467 * \param theState The state of the subshapes to find.
1468 * \return List of all found sub-shapes.
1470 ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1471 in long theShapeType,
1472 in GEOM_Object theAxis,
1473 in double theRadius,
1474 in shape_state theState);
1477 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1478 * the specified sphere by the certain way, defined through \a theState parameter.
1479 * \param theShape Shape to find sub-shapes of.
1480 * \param theShapeType Type of sub-shapes to be retrieved.
1481 * \param theCenter Point, specifying center of the sphere to find shapes on.
1482 * \param theRadius Radius of the sphere to find shapes on.
1483 * \param theState The state of the subshapes to find.
1484 * \return List of all found sub-shapes.
1486 ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1487 in long theShapeType,
1488 in GEOM_Object theCenter,
1489 in double theRadius,
1490 in shape_state theState);
1493 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1494 * the specified quadrangle by the certain way, defined through \a theState parameter.
1495 * \param theShape Shape to find sub-shapes of.
1496 * \param theShapeType Type of sub-shapes to be retrieved.
1497 * \param theTopLeftPoint Top left quadrangle corner
1498 * \param theTopRigthPoint Top right quadrangle corner
1499 * \param theBottomLeftPoint Bottom left quadrangle corner
1500 * \param theBottomRigthPoint Bottom right quadrangle corner
1501 * \param theState The state of the subshapes to find.
1502 * \return List of all found sub-shapes.
1504 ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1505 in long theShapeType,
1506 in GEOM_Object theTopLeftPoint,
1507 in GEOM_Object theTopRigthPoint,
1508 in GEOM_Object theBottomLeftPoint,
1509 in GEOM_Object theBottomRigthPoint,
1510 in shape_state theState);
1513 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1514 * the specified plane by the certain way, defined through \a theState parameter.
1515 * \param theShape Shape to find sub-shapes of.
1516 * \param theShapeType Type of sub-shapes to be retrieved.
1517 * \param theAx1 Vector (or line, or linear edge), specifying normal
1518 * direction and location of the plane to find shapes on.
1519 * \param theState The state of the subshapes to find.
1520 * \return List of IDs of all found sub-shapes.
1522 ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1523 in long theShapeType,
1524 in GEOM_Object theAx1,
1525 in shape_state theState);
1528 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1529 * the specified plane by the certain way, defined through \a theState parameter.
1530 * \param theShape Shape to find sub-shapes of.
1531 * \param theShapeType Type of sub-shapes to be retrieved.
1532 * \param theAx1 Vector (or line, or linear edge), specifying normal
1533 * direction of the plane to find shapes on.
1534 * \param thePnt Point specifying location of the plane to find shapes on.
1535 * \param theState The state of the subshapes to find.
1536 * \return List of IDs of all found sub-shapes.
1538 ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1539 in long theShapeType,
1540 in GEOM_Object theAx1,
1541 in GEOM_Object thePnt,
1542 in shape_state theState);
1545 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1546 * the specified cylinder by the certain way, defined through \a theState parameter.
1547 * \param theShape Shape to find sub-shapes of.
1548 * \param theShapeType Type of sub-shapes to be retrieved.
1549 * \param theAxis Vector (or line, or linear edge), specifying
1550 * axis of the cylinder to find shapes on.
1551 * \param theRadius Radius of the cylinder to find shapes on.
1552 * \param theState The state of the subshapes to find.
1553 * \return List of IDs of all found sub-shapes.
1555 ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1556 in long theShapeType,
1557 in GEOM_Object theAxis,
1558 in double theRadius,
1559 in shape_state theState);
1562 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1563 * the specified sphere by the certain way, defined through \a theState parameter.
1564 * \param theShape Shape to find sub-shapes of.
1565 * \param theShapeType Type of sub-shapes to be retrieved.
1566 * \param theCenter Point, specifying center of the sphere to find shapes on.
1567 * \param theRadius Radius of the sphere to find shapes on.
1568 * \param theState The state of the subshapes to find.
1569 * \return List of IDs of all found sub-shapes.
1571 ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1572 in long theShapeType,
1573 in GEOM_Object theCenter,
1574 in double theRadius,
1575 in shape_state theState);
1578 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1579 * the specified quadrangle by the certain way, defined through \a theState parameter.
1580 * \param theShape Shape to find sub-shapes of.
1581 * \param theShapeType Type of sub-shapes to be retrieved.
1582 * \param theTopLeftPoint Top left quadrangle corner
1583 * \param theTopRigthPoint Top right quadrangle corner
1584 * \param theBottomLeftPoint Bottom left quadrangle corner
1585 * \param theBottomRigthPoint Bottom right quadrangle corner
1586 * \param theState The state of the subshapes to find.
1587 * \return List of IDs of all found sub-shapes.
1589 ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1590 in long theShapeType,
1591 in GEOM_Object theTopLeftPoint,
1592 in GEOM_Object theTopRigthPoint,
1593 in GEOM_Object theBottomLeftPoint,
1594 in GEOM_Object theBottomRigthPoint,
1595 in shape_state theState);
1598 * \brief Find subshapes complying with given status
1599 * \param theBox - the box to check state of subshapes against
1600 * \param theShape - the shape to explore
1601 * \param theShapeType - type of subshape of theShape
1602 * \param theState - required state
1603 * \return List of IDs of all found sub-shapes.
1605 ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1606 in GEOM_Object theShape,
1607 in long theShapeType,
1608 in shape_state theState);
1611 * \brief Find subshapes complying with given status
1612 * \param theBox - the box to check state of subshapes against
1613 * \param theShape - the shape to explore
1614 * \param theShapeType - type of subshape of theShape
1615 * \param theState - required state
1616 * \return List of all found sub-shapes.
1618 ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1619 in GEOM_Object theShape,
1620 in long theShapeType,
1621 in shape_state theState);
1624 * \brief Find subshapes complying with given status
1625 * \param theCheckShape - the shape to check state of subshapes against
1626 * \param theShape - the shape to explore
1627 * \param theShapeType - type of subshape of theShape
1628 * \param theState - required state
1629 * \return List of IDs of all found sub-shapes.
1631 ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1632 in GEOM_Object theShape,
1633 in short theShapeType,
1634 in shape_state theState);
1637 * \brief Find subshapes complying with given status
1638 * \param theCheckShape - the shape to check state of subshapes against
1639 * \param theShape - the shape to explore
1640 * \param theShapeType - type of subshape of theShape
1641 * \param theState - required state
1642 * \return List of all found sub-shapes.
1644 ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1645 in GEOM_Object theShape,
1646 in short theShapeType,
1647 in shape_state theState);
1650 * \brief Find subshapes complying with given status
1651 * \param theCheckShape - the shape to check state of subshapes against
1652 * \param theShape - the shape to explore
1653 * \param theShapeType - type of subshape of theShape
1654 * \param theState - required state
1655 * \return compound includes all found sub-shapes.
1657 GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1658 in GEOM_Object theShape,
1659 in short theShapeType,
1660 in shape_state theState);
1663 * Get sub-shape(s) of \a theShapeWhere, which are
1664 * coincident with \a theShapeWhat or could be a part of it.
1665 * \param theShapeWhere Shape to find sub-shapes of.
1666 * \param theShapeWhat Shape, specifying what to find.
1667 * \return Group of all found sub-shapes or a single found sub-shape.
1669 GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
1670 in GEOM_Object theShapeWhat);
1673 * Get sub-shape(s) of \a theShapeWhere, which are
1674 * coincident with \a theShapeWhat or could be a part of it.
1676 * Implementation of this method is based on a saved history of an operation,
1677 * produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
1678 * arguments (an argument shape or a sub-shape of an argument shape).
1679 * The operation could be the Partition or one of boolean operations,
1680 * performed on simple shapes (not on compounds).
1682 * \param theShapeWhere Shape to find sub-shapes of.
1683 * \param theShapeWhat Shape, specifying what to find.
1684 * \return Group of all found sub-shapes or a single found sub-shape.
1686 GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
1687 in GEOM_Object theShapeWhat);
1690 * Get sub-shape of theShapeWhere, which are
1691 * coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
1692 * \param theShapeWhere Shape to find sub-shapes of.
1693 * \param theShapeWhat Shape, specifying what to find.
1694 * \return found sub-shape.
1696 GEOM_Object GetSame (in GEOM_Object theShapeWhere,
1697 in GEOM_Object theShapeWhat);
1701 * GEOM_IBlocksOperations: Interface for Blocks construction
1702 * Face from points or edges, Block from faces,
1703 * Blocks multi-translation and multi-rotation
1705 interface GEOM_IBlocksOperations : GEOM_IOperations
1708 * Creation of blocks
1712 * Create a quadrangle face from four edges. Order of Edges is not
1713 * important. It is not necessary that edges share the same vertex.
1714 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
1715 * \return New GEOM_Object, containing the created face.
1717 GEOM_Object MakeQuad (in GEOM_Object theEdge1,
1718 in GEOM_Object theEdge2,
1719 in GEOM_Object theEdge3,
1720 in GEOM_Object theEdge4);
1723 * Create a quadrangle face on two edges.
1724 * The missing edges will be built by creating the shortest ones.
1725 * \param theEdge1,theEdge2 Two opposite edges for the face.
1726 * \return New GEOM_Object, containing the created face.
1728 GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
1729 in GEOM_Object theEdge2);
1732 * Create a quadrangle face with specified corners.
1733 * The missing edges will be built by creating the shortest ones.
1734 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
1735 * \return New GEOM_Object, containing the created face.
1737 GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
1738 in GEOM_Object thePnt2,
1739 in GEOM_Object thePnt3,
1740 in GEOM_Object thePnt4);
1743 * Create a hexahedral solid, bounded by the six given faces. Order of
1744 * faces is not important. It is not necessary that Faces share the same edge.
1745 * \param theFace1-theFace6 Faces for the hexahedral solid.
1746 * \return New GEOM_Object, containing the created solid.
1748 GEOM_Object MakeHexa (in GEOM_Object theFace1,
1749 in GEOM_Object theFace2,
1750 in GEOM_Object theFace3,
1751 in GEOM_Object theFace4,
1752 in GEOM_Object theFace5,
1753 in GEOM_Object theFace6);
1756 * Create a hexahedral solid between two given faces.
1757 * The missing faces will be built by creating the smallest ones.
1758 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
1759 * \return New GEOM_Object, containing the created solid.
1761 GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
1762 in GEOM_Object theFace2);
1765 * Extract elements of blocks and blocks compounds
1769 * Get a vertex, found in the given shape by its coordinates.
1770 * \param theShape Block or a compound of blocks.
1771 * \param theX,theY,theZ Coordinates of the sought vertex.
1772 * \param theEpsilon Maximum allowed distance between the resulting
1773 * vertex and point with the given coordinates.
1774 * \return New GEOM_Object, containing the found vertex.
1776 GEOM_Object GetPoint (in GEOM_Object theShape,
1780 in double theEpsilon);
1783 * Get an edge, found in the given shape by two given vertices.
1784 * \param theShape Block or a compound of blocks.
1785 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
1786 * \return New GEOM_Object, containing the found edge.
1788 GEOM_Object GetEdge (in GEOM_Object theShape,
1789 in GEOM_Object thePoint1,
1790 in GEOM_Object thePoint2);
1793 * Find an edge of the given shape, which has minimal distance to the given point.
1794 * \param theShape Block or a compound of blocks.
1795 * \param thePoint Point, close to the desired edge.
1796 * \return New GEOM_Object, containing the found edge.
1798 GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
1799 in GEOM_Object thePoint);
1802 * Returns a face, found in the given shape by four given corner vertices.
1803 * \param theShape Block or a compound of blocks.
1804 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
1805 * \return New GEOM_Object, containing the found face.
1807 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
1808 in GEOM_Object thePoint1,
1809 in GEOM_Object thePoint2,
1810 in GEOM_Object thePoint3,
1811 in GEOM_Object thePoint4);
1814 * Get a face of block, found in the given shape by two given edges.
1815 * \param theShape Block or a compound of blocks.
1816 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
1817 * \return New GEOM_Object, containing the found face.
1819 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
1820 in GEOM_Object theEdge1,
1821 in GEOM_Object theEdge2);
1824 * Find a face, opposite to the given one in the given block.
1825 * \param theBlock Must be a hexahedral solid.
1826 * \param theFace Face of \a theBlock, opposite to the desired face.
1827 * \return New GEOM_Object, containing the found face.
1829 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
1830 in GEOM_Object theFace);
1833 * Find a face of the given shape, which has minimal distance to the given point.
1834 * \param theShape Block or a compound of blocks.
1835 * \param thePoint Point, close to the desired face.
1836 * \return New GEOM_Object, containing the found face.
1838 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
1839 in GEOM_Object thePoint);
1842 * Find a face of block, whose outside normale has minimal angle with the given vector.
1843 * \param theShape Block or a compound of blocks.
1844 * \param theVector Vector, close to the normale of the desired face.
1845 * \return New GEOM_Object, containing the found face.
1847 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
1848 in GEOM_Object theVector);
1851 * Extract blocks from blocks compounds
1855 * Check, if the compound contains only specified blocks.
1856 * \param theCompound The compound to check.
1857 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1858 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1859 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1860 * \return TRUE, if the given compound contains only blocks.
1861 * \return theNbBlocks Number of specified blocks in theCompound.
1863 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1864 in long theMinNbFaces,
1865 in long theMaxNbFaces,
1866 out long theNbBlocks);
1869 * Enumeration of Blocks Compound defects.
1873 /* Each element of the compound should be a Block */
1876 /* An element is a potential block, but has degenerated and/or seam edge(s). */
1879 /* A connection between two Blocks should be an entire face or an entire edge */
1882 /* The compound should be connexe */
1885 /* The glue between two quadrangle faces should be applied */
1890 * Description of Blocks Compound defect: type and incriminated sub-shapes.
1895 ListOfLong incriminated;
1899 * Sequence of all Blocks Compound defects.
1901 typedef sequence<BCError> BCErrors;
1904 * Check, if the compound of blocks is given.
1905 * To be considered as a compound of blocks, the
1906 * given shape must satisfy the following conditions:
1907 * - Each element of the compound should be a Block (6 faces and 12 edges).
1908 * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1909 * - The compound should be connexe.
1910 * - The glue between two quadrangle faces should be applied.
1911 * \note Single block is also accepted as a valid compound of blocks.
1912 * \param theCompound The compound to check.
1913 * \return TRUE, if the given shape is a compound of blocks.
1914 * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1916 boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1917 out BCErrors theErrors);
1920 * Convert sequence of Blocks Compound errors, returned by
1921 * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1922 * \param theCompound The bad compound.
1923 * \param theErrors The sequence of \a theCompound errors.
1924 * \return String, describing all the errors in form, suitable for printing.
1926 string PrintBCErrors (in GEOM_Object theCompound,
1927 in BCErrors theErrors);
1930 * Remove all seam and degenerated edges from \a theShape.
1931 * Unite faces and edges, sharing one surface.
1932 * \param theShape The compound or single solid to remove irregular edges from.
1933 * \param theOptimumNbFaces If more than zero, unite faces only for those solids,
1934 * that have more than theOptimumNbFaces faces. If zero, unite faces always,
1935 * regardsless their quantity in the solid. If negative, do not unite faces at all.
1936 * For blocks repairing recommended value is 6.
1937 * \return Improved shape.
1939 GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
1940 in long theOptimumNbFaces);
1943 * Check, if the given shape is a blocks compound.
1944 * Fix all detected errors.
1945 * \note Single block can be also fixed by this method.
1946 * \param theCompound The compound to check and improve.
1947 * \return Improved compound.
1949 GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
1952 * Get all the blocks, contained in the given compound.
1953 * \param theCompound The compound to explode.
1954 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1955 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1956 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1957 * \return List of GEOM_Objects, containing the retrieved blocks.
1959 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1960 in long theMinNbFaces,
1961 in long theMaxNbFaces);
1964 * Find block, containing the given point inside its volume or on boundary.
1965 * \param theCompound Compound, to find block in.
1966 * \param thePoint Point, close to the desired block. If the point lays on
1967 * boundary between some blocks, we return block with nearest center.
1968 * \return New GEOM_Object, containing the found block.
1970 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
1971 in GEOM_Object thePoint);
1974 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
1975 * \param theCompound Compound, to find block in.
1976 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
1977 * \return New GEOM_Object, containing the found block.
1979 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1980 in ListOfGO theParts);
1983 * Return all blocks, containing all the elements, passed as the parts.
1984 * \param theCompound Compound, to find blocks in.
1985 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1986 * \return List of GEOM_Objects, containing the found blocks.
1988 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1989 in ListOfGO theParts);
1992 * Operations on blocks with gluing of result
1996 * Multi-transformate block and glue the result.
1997 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1998 * \param theBlock Hexahedral solid to be multi-transformed.
1999 * \param theDirFace1 First direction face global index.
2000 * \param theDirFace2 Second direction face global index.
2001 * \param theNbTimes Quantity of transformations to be done.
2002 * \note Global index of sub-shape can be obtained, using method
2003 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2004 * \return New GEOM_Object, containing the result shape.
2006 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2007 in long theDirFace1,
2008 in long theDirFace2,
2009 in long theNbTimes);
2012 * Multi-transformate block and glue the result.
2013 * \param theBlock Hexahedral solid to be multi-transformed.
2014 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2015 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2016 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2017 * \return New GEOM_Object, containing the result shape.
2019 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2020 in long theDirFace1U,
2021 in long theDirFace2U,
2022 in long theNbTimesU,
2023 in long theDirFace1V,
2024 in long theDirFace2V,
2025 in long theNbTimesV);
2028 * Special operation - propagation
2032 * Build all possible propagation groups.
2033 * Propagation group is a set of all edges, opposite to one (main)
2034 * edge of this group directly or through other opposite edges.
2035 * Notion of Opposite Edge make sence only on quadrangle face.
2036 * \param theShape Shape to build propagation groups on.
2037 * \return List of GEOM_Objects, each of them is a propagation group.
2039 ListOfGO Propagate (in GEOM_Object theShape);
2043 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
2045 interface GEOM_IBooleanOperations : GEOM_IOperations
2048 * Perform one of boolean operations on two given shapes.
2049 * \param theShape1 First argument for boolean operation.
2050 * \param theShape2 Second argument for boolean operation.
2051 * \param theOperation Indicates the operation to be done:
2052 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2053 * \return New GEOM_Object, containing the result shape.
2055 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2056 in GEOM_Object theShape2,
2057 in long theOperation);
2060 * Perform partition operation.
2061 * \param theShapes Shapes to be intersected.
2062 * \param theTools Shapes to intersect theShapes.
2063 * \note Each compound from ListShapes and ListTools will be exploded in order
2064 * to avoid possible intersection between shapes from this compound.
2065 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2066 # \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
2067 # type <= Limit are kept in the result,
2068 # else - shapes with type > Limit are kept
2069 # also (if they exist)
2071 * After implementation new version of PartitionAlgo (October 2006)
2072 * other parameters are ignored by current functionality. They are kept
2073 * in this function only for supporting old versions.
2074 * Ignored parameters:
2075 * \param theKeepInside Shapes, outside which the results will be deleted.
2076 * Each shape from theKeepInside must belong to theShapes also.
2077 * \param theRemoveInside Shapes, inside which the results will be deleted.
2078 * Each shape from theRemoveInside must belong to theShapes also.
2079 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2080 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2082 * \return New GEOM_Object, containing the result shapes.
2084 GEOM_Object MakePartition (in ListOfGO theShapes,
2085 in ListOfGO theTools,
2086 in ListOfGO theKeepInside,
2087 in ListOfGO theRemoveInside,
2089 in boolean theRemoveWebs,
2090 in ListOfLong theMaterials,
2091 in short theKeepNonlimitShapes);
2094 * Perform partition operation.
2095 * This method may be usefull if it is needed to make a partition for
2096 * a compound containing nonintersected shapes. Performance will be better
2097 * since intersection between shapes from compound is not performed.
2099 * Description of all parameters as in previous method MakePartition()
2101 * \note Passed compounds (via ListShapes or via ListTools)
2102 * have to consist of nonintersecting shapes.
2104 * \return New GEOM_Object, containing the result shapes.
2106 GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO theShapes,
2107 in ListOfGO theTools,
2108 in ListOfGO theKeepInside,
2109 in ListOfGO theRemoveInside,
2111 in boolean theRemoveWebs,
2112 in ListOfLong theMaterials,
2113 in short theKeepNonlimitShapes);
2116 * Perform partition of the Shape with the Plane
2117 * \param theShape Shape to be intersected.
2118 * \param thePlane Tool shape, to intersect theShape.
2119 * \return New GEOM_Object, containing the result shape.
2121 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2122 in GEOM_Object thePlane);
2126 * GEOM_ICurvesOperations: Interface for curves creation.
2127 * Polyline, Circle, Spline (Bezier and Interpolation)
2129 interface GEOM_ICurvesOperations : GEOM_IOperations
2132 * Create a circle with given center, normal vector and radius.
2133 * \param thePnt Circle center.
2134 * \param theVec Vector, normal to the plane of the circle.
2135 * \param theR Circle radius.
2136 * \return New GEOM_Object, containing the created circle.
2138 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2139 in GEOM_Object theVec,
2142 * Create a circle, passing through three given points
2143 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2144 * \return New GEOM_Object, containing the created circle.
2146 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2147 in GEOM_Object thePnt2,
2148 in GEOM_Object thePnt3);
2150 * Create a circle with given center, with a radius equals the distance from center to Point1
2151 * and on a plane defined by all of three points.
2152 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2153 * \return New GEOM_Object, containing the created circle.
2155 GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2156 in GEOM_Object thePnt2,
2157 in GEOM_Object thePnt3);
2159 * Create an ellipse with given center, normal vector and radiuses.
2160 * \param thePnt Ellipse center.
2161 * \param theVec Vector, normal to the plane of the ellipse.
2162 * \param theRMajor Major ellipse radius.
2163 * \param theRMinor Minor ellipse radius.
2164 * \return New GEOM_Object, containing the created ellipse.
2166 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2167 in GEOM_Object theVec,
2168 in double theRMajor,
2169 in double theRMinor);
2172 * Create an ellipse with given center, normal vector, main axis vector and radiuses.
2173 * \param thePnt Ellipse center.
2174 * \param theVec Vector, normal to the plane of the ellipse.
2175 * \param theRMajor Major ellipse radius.
2176 * \param theRMinor Minor ellipse radius.
2177 * \param theVecMaj Vector, direction of the ellipse's main axis.
2178 * \return New GEOM_Object, containing the created ellipse.
2180 GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2181 in GEOM_Object theVec,
2182 in double theRMajor,
2183 in double theRMinor,
2184 in GEOM_Object theVecMaj);
2187 * Create an arc of circle, passing through three given points.
2188 * \param thePnt1 Start point of the arc.
2189 * \param thePnt2 Middle point of the arc.
2190 * \param thePnt3 End point of the arc.
2191 * \return New GEOM_Object, containing the created arc.
2193 GEOM_Object MakeArc (in GEOM_Object thePnt1,
2194 in GEOM_Object thePnt2,
2195 in GEOM_Object thePnt3);
2198 * Create an arc of circle of center C from one point to another
2199 * \param theCenter Center point of the arc.
2200 * \param thePnt1 Start point of the arc.
2201 * \param thePnt2 End point of the arc.
2202 * \param theSense Orientation of the arc
2203 * \return New GEOM_Object, containing the created arc.
2205 GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2206 in GEOM_Object thePnt1,
2207 in GEOM_Object thePnt2,
2208 in boolean theSense);
2211 * Create an arc of ellipse of center C and two points P1 P2.
2212 * \param theCenter Center point of the arc.
2213 * \param thePnt1 Major radius is distance from center to Pnt1.
2214 * \param thePnt2 define a plane and Minor radius as a shortest distance from Pnt2 to vector Center->Pnt1.
2215 * \return New GEOM_Object, containing the created arc.
2217 GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2218 in GEOM_Object thePnt1,
2219 in GEOM_Object thePnt2);
2223 * Create a polyline on the set of points.
2224 * \param thePoints Sequence of points for the polyline.
2225 * \return New GEOM_Object, containing the created polyline.
2227 GEOM_Object MakePolyline (in ListOfGO thePoints);
2230 * Create bezier curve on the set of points.
2231 * \param thePoints Sequence of points for the bezier curve.
2232 * \return New GEOM_Object, containing the created bezier curve.
2234 GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
2237 * Create B-Spline curve on the set of points.
2238 * \param thePoints Sequence of points for the B-Spline curve.
2239 * \param theIsClosed If TRUE, build a closed curve.
2240 * \return New GEOM_Object, containing the created B-Spline curve.
2242 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
2243 in boolean theIsClosed);
2246 * Create a sketcher (wire or face), following the textual description,
2247 * passed through \a theCommand argument. \n
2248 * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2249 * Format of the description string have to be the following:
2251 * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2254 * - x1, y1 are coordinates of the first sketcher point (zero by default),
2256 * - "R angle" : Set the direction by angle
2257 * - "D dx dy" : Set the direction by DX & DY
2260 * - "TT x y" : Create segment by point at X & Y
2261 * - "T dx dy" : Create segment by point with DX & DY
2262 * - "L length" : Create segment by direction & Length
2263 * - "IX x" : Create segment by direction & Intersect. X
2264 * - "IY y" : Create segment by direction & Intersect. Y
2267 * - "C radius length" : Create arc by direction, radius and length(in degree)
2270 * - "WW" : Close Wire (to finish)
2271 * - "WF" : Close Wire and build face (to finish)
2273 * \param theCommand String, defining the sketcher in local
2274 * coordinates of the working plane.
2275 * \param theWorkingPlane Nine double values, defining origin,
2276 * OZ and OX directions of the working plane.
2277 * \return New GEOM_Object, containing the created wire.
2279 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2282 * Create a 3D sketcher, following the numerical description,
2283 * passed through points created by \a theCoordinates argument. \n
2284 * Format of the description string have to be the following:
2286 * "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]"
2289 GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2292 * Create a sketcher (wire or face), following the textual description,
2293 * passed through \a theCommand argument. \n
2294 * For format of the description string see the previous method.\n
2295 * \param theCommand String, defining the sketcher in local
2296 * coordinates of the working plane.
2297 * \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2298 * \return New GEOM_Object, containing the created wire.
2300 GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2304 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2306 interface GEOM_ILocalOperations : GEOM_IOperations
2309 * Perform a fillet on all edges of the given shape.
2310 * \param theShape Shape, to perform fillet on.
2311 * \param theR Fillet radius.
2312 * \return New GEOM_Object, containing the result shape.
2314 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2318 * Perform a fillet on the specified edges of the given shape
2319 * \param theShape Shape, to perform fillet on.
2320 * \param theR Fillet radius.
2321 * \param theEdges Global indices of edges to perform fillet on.
2322 * \note Global index of sub-shape can be obtained, using method
2323 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2324 * \return New GEOM_Object, containing the result shape.
2326 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2328 in ListOfLong theEdges);
2329 GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2332 in ListOfLong theEdges);
2335 * Perform a fillet on all edges of the specified faces of the given shape.
2336 * \param theShape Shape, to perform fillet on.
2337 * \param theR Fillet radius.
2338 * \param theFaces Global indices of faces to perform fillet on.
2339 * \note Global index of sub-shape can be obtained, using method
2340 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2341 * \return New GEOM_Object, containing the result shape.
2343 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2345 in ListOfLong theFaces);
2347 GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2350 in ListOfLong theFaces);
2353 * Perform a fillet on face of the specified vertexes of the given shape.
2354 * \param theShape Shape, to perform fillet on.
2355 * \param theR Fillet radius.
2356 * \param theVertexes Global indices of vertexes to perform fillet on.
2357 * \note Global index of sub-shape can be obtained, using method
2358 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2359 * \return New GEOM_Object, containing the result shape.
2361 GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2363 in ListOfLong theVertexes);
2366 * Perform a fillet on edges of the specified vertexes of the given wire.
2367 * \param theShape Shape, to perform fillet on.
2368 * \param theR Fillet radius.
2369 * \param theVertexes Global indices of vertexes to perform fillet on.
2370 * \note Global index of sub-shape can be obtained, using method
2371 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2372 * \note The list of vertices coudl be empty, in this case fillet fill be done
2373 * at all vertices in given wire
2374 * \return New GEOM_Object, containing the result shape.
2376 GEOM_Object MakeFillet1D (in GEOM_Object theShape,
2378 in ListOfLong theVertexes);
2381 * Perform a symmetric chamfer on all edges of the given shape.
2382 * \param theShape Shape, to perform chamfer on.
2383 * \param theD Chamfer size along each face.
2384 * \return New GEOM_Object, containing the result shape.
2386 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2390 * Perform a chamfer on edges, common to the specified faces.
2391 * with distance D1 on the Face1
2392 * \param theShape Shape, to perform chamfer on.
2393 * \param theD1 Chamfer size along \a theFace1.
2394 * \param theD2 Chamfer size along \a theFace2.
2395 * \param theFace1,theFace2 Global indices of two faces of \a theShape.
2396 * \note Global index of sub-shape can be obtained, using method
2397 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2398 * \return New GEOM_Object, containing the result shape.
2400 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2401 in double theD1, in double theD2,
2402 in long theFace1, in long theFace2);
2404 * The Same but with params theD = Chamfer Lenght
2405 * and theAngle = Chamfer Angle (Angle in radians)
2407 GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2408 in double theD, in double theAngle,
2409 in long theFace1, in long theFace2);
2412 * Perform a chamfer on all edges of the specified faces.
2413 * with distance D1 on the first specified face (if several for one edge)
2414 * \param theShape Shape, to perform chamfer on.
2415 * \param theD1 Chamfer size along face from \a theFaces. If both faces,
2416 * connected to the edge, are in \a theFaces, \a theD1
2417 * will be get along face, which is nearer to \a theFaces beginning.
2418 * \param theD2 Chamfer size along another of two faces, connected to the edge.
2419 * \param theFaces Sequence of global indices of faces of \a theShape.
2420 * \note Global index of sub-shape can be obtained, using method
2421 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2422 * \return New GEOM_Object, containing the result shape.
2424 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2425 in double theD1, in double theD2,
2426 in ListOfLong theFaces);
2428 * The Same but with params theD = Chamfer Lenght
2429 * and theAngle = Chamfer Angle (Angle in radians)
2431 GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2432 in double theD, in double theAngle,
2433 in ListOfLong theFaces);
2436 * Perform a chamfer on edges,
2437 * with distance D1 on the first specified face (if several for one edge)
2438 * \param theShape Shape, to perform chamfer on.
2439 * \param theD1 theD2 Chamfer size
2440 * \param theEdges Sequence of edges of \a theShape.
2441 * \return New GEOM_Object, containing the result shape.
2443 GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2444 in double theD1, in double theD2,
2445 in ListOfLong theEdges);
2447 * The Same but with params theD = Chamfer Lenght
2448 * and theAngle = Chamfer Angle (Angle in radians)
2450 GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2451 in double theD, in double theAngle,
2452 in ListOfLong theEdges);
2455 * Perform an Archimde operation on the given shape with given parameters.
2456 * The object presenting the resulting face is returned
2457 * \param theShape Shape to be put in water.
2458 * \param theWeight Weight og the shape.
2459 * \param theWaterDensity Density of the water.
2460 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
2461 * \return New GEOM_Object, containing a section of \a theShape
2462 * by a plane, corresponding to water level.
2464 GEOM_Object MakeArchimede (in GEOM_Object theShape,
2465 in double theWeight,
2466 in double theWaterDensity,
2467 in double theMeshDeflection);
2470 * Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2471 * Present here only for compatibility.
2473 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2477 * GEOM_IHealingOperations: Interface for shape healing operations.
2478 * Shape Processing, SuppressFaces, etc.
2480 interface GEOM_IHealingOperations : GEOM_IOperations
2483 * Apply a sequence of Shape Healing operators to the given object.
2484 * \param theShapes Shape to be processed.
2485 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2486 * \param theParameters List of names of parameters
2487 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2488 * \param theValues List of values of parameters, in the same order
2489 * as parameters are listed in \a theParameters list.
2490 * \return New GEOM_Object, containing processed shape.
2492 GEOM_Object ProcessShape (in GEOM_Object theShapes,
2493 in string_array theOperators,
2494 in string_array theParameters,
2495 in string_array theValues);
2498 * Get default sequence of operators, their parameters and parameters' values
2499 * of Shape Process operation. In the current implementation the defaults are
2500 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2501 * \param theOperators Output. Default list of names of operators.
2502 * \param theParameters Output. Default list of names of parameters.
2503 * \param theValues Output. List of default values of parameters, in the same order
2504 * as parameters are listed in \a theParameters list.
2506 void GetShapeProcessParameters (out string_array theOperators,
2507 out string_array theParameters,
2508 out string_array theValues);
2510 * Get parameters and parameters' values for the given Shape Process operation.
2511 * In the current implementation the defaults are
2512 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2513 * \param theOperator Input. The operator's name.
2514 * \param theParameters Output. Default list of names of parameters.
2515 * \param theValues Output. List of default values of parameters, in the same order
2516 * as parameters are listed in \a theParameters list.
2518 void GetOperatorParameters (in string theOperator,
2519 out string_array theParameters,
2520 out string_array theValues);
2523 * Remove faces from the given object (shape).
2524 * \param theObject Shape to be processed.
2525 * \param theFaces Indices of faces to be removed, if EMPTY then the method
2526 * removes ALL faces of the given object.
2527 * \return New GEOM_Object, containing processed shape.
2529 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2532 * Close an open wire.
2533 * \param theObject Shape to be processed.
2534 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2535 * if -1, then theObject itself is a wire.
2536 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
2537 * If FALS : closure by creation of an edge between ends.
2538 * \return New GEOM_Object, containing processed shape.
2540 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2541 in boolean isCommonVertex);
2544 * Remove internal wires and edges from the given object (face).
2545 * \param theObject Shape to be processed.
2546 * \param theWires Indices of wires to be removed, if EMPTY then the method
2547 * removes ALL internal wires of the given object.
2548 * \return New GEOM_Object, containing processed shape.
2550 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2553 * Remove internal closed contours (holes) from the given object.
2554 * \param theObject Shape to be processed.
2555 * \param theWires Indices of wires to be removed, if EMPTY then the method
2556 * removes ALL internal holes of the given object
2557 * \return New GEOM_Object, containing processed shape.
2559 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2562 * Sewing of the given object.
2563 * \param theObject Shape to be processed.
2564 * \param theTolerance Required tolerance value.
2565 * \return New GEOM_Object, containing processed shape.
2567 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2570 * Addition of a point to a given edge object.
2571 * \param theObject Shape to be processed.
2572 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
2573 * if -1, then theObject itself is the edge.
2574 * \param theValue Value of parameter on edge or length parameter,
2575 * depending on \a isByParameter.
2576 * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2577 * if FALSE : \a theValue is treated as a length parameter [0..1]
2578 * \return New GEOM_Object, containing processed shape.
2580 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2581 in double theValue, in boolean isByParameter);
2584 * Get a list of wires (wrapped in GEOM_Object-s),
2585 * that constitute a free boundary of the given shape.
2586 * \param theObject Shape to get free boundary of.
2587 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
2588 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
2589 * \return FALSE, if an error(s) occured during the method execution.
2591 boolean GetFreeBoundary (in GEOM_Object theObject,
2592 out ListOfGO theClosedWires,
2593 out ListOfGO theOpenWires);
2596 * Change orientation of the given object.
2597 * \param theObject Shape to be processed.
2598 * \return New GEOM_Object, containing processed shape.
2600 GEOM_Object ChangeOrientation (in GEOM_Object theObject);
2601 GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
2606 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
2609 interface GEOM_IInsertOperations : GEOM_IOperations
2612 * Create a copy of the given object
2614 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
2617 * Export the given shape into a file with given name.
2618 * \param theObject Shape to be stored in the file.
2619 * \param theFileName Name of the file to store the given shape in.
2620 * \param theFormatName Specify format for the shape storage.
2621 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2623 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
2626 * Import a shape from the BRep or IGES or STEP file
2627 * (depends on given format) with given name.
2628 * \param theFileName The file, containing the shape.
2629 * \param theFormatName Specify format for the file reading.
2630 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2631 * If format 'IGES_SCALE' is used instead 'IGES' length unit will be
2632 * set to 'meter' and result model will be scaled.
2633 * \return New GEOM_Object, containing the imported shape.
2635 GEOM_Object Import (in string theFileName, in string theFormatName);
2638 * Get the supported import formats and corresponding patterns for File dialog.
2639 * \param theFormats Output. List of formats, available for import.
2640 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2641 * \return Returns available formats and patterns through the arguments.
2643 void ImportTranslators (out string_array theFormats,
2644 out string_array thePatterns);
2647 * Get the supported export formats and corresponding patterns for File dialog.
2648 * \param theFormats Output. List of formats, available for export.
2649 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2650 * \return Returns available formats and patterns through the arguments.
2652 void ExportTranslators (out string_array theFormats,
2653 out string_array thePatterns);
2657 * GEOM_IKindOfShape: namespace for shape_kind enumeration.
2659 interface GEOM_IKindOfShape
2669 SPHERE, // full sphere
2670 CYLINDER, // cylinder
2671 BOX, // box with faces, parallel to global coordinate planes
2672 ROTATED_BOX, // other box
2673 TORUS, // full torus
2675 POLYHEDRON, // solid, bounded by polygons
2676 SOLID, // other solid
2678 SPHERE2D, // spherical face (closed)
2679 CYLINDER2D, // cylindrical face with defined height
2680 TORUS2D, // toroidal face (closed)
2681 CONE2D, // conical face with defined height
2682 DISK_CIRCLE, // planar, bounded by circle
2683 DISK_ELLIPSE, // planar, bounded by ellipse
2684 POLYGON, // planar, bounded by segments
2685 PLANE, // infinite planar
2686 PLANAR, // other planar
2689 CIRCLE, // full circle
2690 ARC_CIRCLE, // arc of circle
2691 ELLIPSE, // full ellipse
2692 ARC_ELLIPSE, // arc of ellipse
2693 LINE, // infinite segment
2703 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
2704 * properties calculation (like Centre of Mass, Inertia, etc.).
2707 interface GEOM_IMeasureOperations : GEOM_IOperations
2710 * Get kind of theShape.
2711 * \param theShape Shape to get a kind of.
2712 * \param theIntegers Output. Integer and enumerated shape's parameters
2713 * (kind of surface, closed/unclosed, number of edges, etc.)
2714 * \param theDoubles Output. Double shape's parameters (coordinates, dimensions, etc.)
2715 * \note Concrete meaning of each value, returned via \a theIntegers
2716 * or \a theDoubles list depends on the kind of the shape.
2717 * \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
2719 //short KindOfShape (in GEOM_Object theShape,
2720 GEOM_IKindOfShape::shape_kind KindOfShape (in GEOM_Object theShape,
2721 out ListOfLong theIntegers,
2722 out ListOfDouble theDoubles);
2725 * Get position (LCS) of theShape.
2726 * \param theShape Shape to calculate position of.
2727 * \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
2728 * Origin of the LCS is situated at the shape's center of mass.
2729 * \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
2730 * \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
2731 * Axes of the LCS are obtained from shape's location or,
2732 * if the shape is a planar face, from position of its plane.
2733 * \return Returns position of the shape through the last nine arguments.
2735 void GetPosition (in GEOM_Object theShape,
2736 out double Ox, out double Oy, out double Oz,
2737 out double Zx, out double Zy, out double Zz,
2738 out double Xx, out double Xy, out double Xz);
2741 * Get summarized length of all wires,
2742 * area of surface and volume of the given shape.
2743 * \param theShape Shape to define properties of.
2744 * \param theLength Output. Summarized length of all wires of the given shape.
2745 * \param theSurfArea Output. Area of surface of the given shape.
2746 * \param theVolume Output. Volume of the given shape.
2747 * \return Returns shape properties through the last three arguments.
2749 void GetBasicProperties (in GEOM_Object theShape,
2750 out double theLength,
2751 out double theSurfArea,
2752 out double theVolume);
2755 * Get a point, situated at the centre of mass of theShape.
2756 * \param theShape Shape to define centre of mass of.
2757 * \return New GEOM_Object, containing the created point.
2759 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
2762 * Get a vector, representing the normal of theFace.
2763 * If the face is not planar, theOptionalPoint is obligatory.
2764 * \param theFace Shape (face) to define the normal of.
2765 * \param theOptionalPoint Shape (point) to define the normal at.
2766 * Can be NULL in case of planar face.
2767 * \return New GEOM_Object, containing the created normal vector.
2769 GEOM_Object GetNormal (in GEOM_Object theFace,
2770 in GEOM_Object theOptionalPoint);
2773 * Get inertia matrix and moments of inertia of theShape.
2774 * \param theShape Shape to calculate inertia of.
2775 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
2776 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
2777 * \return Returns inertia through the last twelve arguments.
2779 void GetInertia (in GEOM_Object theShape,
2780 out double I11, out double I12, out double I13,
2781 out double I21, out double I22, out double I23,
2782 out double I31, out double I32, out double I33,
2783 out double Ix , out double Iy , out double Iz);
2786 * Get parameters of bounding box of the given shape
2787 * \param theShape Shape to obtain bounding box of.
2788 * \param Xmin,Xmax Output. Limits of shape along OX axis.
2789 * \param Ymin,Ymax Output. Limits of shape along OY axis.
2790 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
2791 * \return Returns parameters of bounding box through the last six arguments.
2793 void GetBoundingBox (in GEOM_Object theShape,
2794 out double Xmin, out double Xmax,
2795 out double Ymin, out double Ymax,
2796 out double Zmin, out double Zmax);
2799 * Get min and max tolerances of sub-shapes of theShape
2800 * \param theShape Shape, to get tolerances of.
2801 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
2802 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
2803 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
2804 * \return Returns shape tolerances through the last six arguments.
2806 void GetTolerance (in GEOM_Object theShape,
2807 out double FaceMin, out double FaceMax,
2808 out double EdgeMin, out double EdgeMax,
2809 out double VertMin, out double VertMax);
2812 * Check a topology of the given shape.
2813 * \param theShape Shape to check validity of.
2814 * \param theDescription Output. Description of problems in the shape, if they are.
2815 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
2817 boolean CheckShape (in GEOM_Object theShape,
2818 out string theDescription);
2821 * Check a topology and a geometry of the given shape.
2822 * \param theShape Shape to check validity of.
2823 * \param theDescription Output. Description of problems in the shape, if they are.
2824 * \return TRUE, if the shape "seems to be valid".
2826 boolean CheckShapeWithGeometry (in GEOM_Object theShape,
2827 out string theDescription);
2830 * Obtain description of the given shape
2831 * \param theShape Shape to be described.
2832 * \return Description of the given shape.
2834 string WhatIs (in GEOM_Object theShape);
2837 * Get minimal distance between the given shapes.
2838 * \param theShape1,theShape2 Shapes to find minimal distance between.
2839 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
2840 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
2841 * \return Value of the minimal distance between the given shapes.
2843 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
2844 out double X1, out double Y1, out double Z1,
2845 out double X2, out double Y2, out double Z2);
2848 * Get angle between the given lines or linear edges.
2849 * \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
2850 * \return Value of the angle between the given shapes.
2852 double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
2855 * Get point coordinates
2857 void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
2860 * Get radius of curvature of curve in the point determinated by param
2861 * \param theShape - curve.
2862 * \param theParam - parameter on curve
2863 * \return Value of curvature.
2865 double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
2868 * Get radius of curvature of curve in the given point
2869 * \param theShape - curve.
2870 * \param thePoint - point
2871 * \return Value of curvature.
2873 double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2876 * Get max radius of curvature of surface in the point determinated by params
2877 * \param theShape - surface.
2878 * \param theUParam - U-parameter on surface
2879 * \param theVParam - V-parameter on surface
2880 * \return Value of curvature.
2882 double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2883 in double theVParam);
2886 * Get max radius of curvature of surface in the given point
2887 * \param theShape - surface.
2888 * \param thePoint - point
2889 * \return Value of curvature.
2891 double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2894 * Get min radius of curvature of surface in the point determinated by params
2895 * \param theShape - surface.
2896 * \param theUParam - U-parameter on surface
2897 * \param theVParam - V-parameter on surface
2898 * \return Value of curvature.
2900 double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2901 in double theVParam);
2904 * Get min radius of curvature of surface in the given point
2905 * \param theShape - surface.
2906 * \param thePoint - point
2907 * \return Value of curvature.
2909 double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2915 * GEOM_IGroupOperations: Interface for groups creation.
2917 interface GEOM_IGroupOperations : GEOM_IOperations
2920 * Creates a new group which will store sub shapes of theMainShape
2921 * \param theMainShape is a GEOM object on which the group is selected
2922 * \param theShapeType defines a shape type of the group
2923 * \return a newly created GEOM group
2925 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
2928 * Adds a sub object with ID theSubShapeId to the group
2929 * \param theGroup is a GEOM group to which the new sub shape is added
2930 * \param theSubShapeId is a sub shape ID in the main object.
2931 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2933 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
2936 * Removes a sub object with ID \a theSubShapeId from the group
2937 * \param theGroup is a GEOM group from which the sub shape is removed.
2938 * \param theSubShapeId is a sub shape ID in the main object.
2939 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2941 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
2944 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2945 * \param theGroup is a GEOM group to which the new sub shapes are added.
2946 * \param theSubShapes is a list of sub shapes to be added.
2948 void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2951 * Removes from the group all the given shapes. No errors, if some shapes are not included.
2952 * \param theGroup is a GEOM group from which the sub-shapes are removed.
2953 * \param theSubShapes is a list of sub-shapes to be removed.
2955 void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2958 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2959 * \param theGroup is a GEOM group to which the new sub shapes are added.
2960 * \param theSubShapes is a list of IDs of sub shapes to be added.
2962 void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2965 * Removes from the group all the given shapes. No errors, if some shapes are not included.
2966 * \param theGroup is a GEOM group from which the sub-shapes are removed.
2967 * \param theSubShapes is a list of IDs of sub-shapes to be removed.
2969 void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2972 * Returns a type of sub objects stored in the group
2973 * \param theGroup is a GEOM group which type is returned.
2975 long GetType (in GEOM_Object theGroup);
2978 * Returns a main shape associated with the group
2979 * \param theGroup is a GEOM group for which a main shape object is requested
2980 * \return a GEOM object which is a main shape for theGroup
2982 GEOM_Object GetMainShape (in GEOM_Object theGroup);
2985 * Returns a list of sub objects ID stored in the group
2986 * \param theGroup is a GEOM group for which a list of IDs is requested
2988 ListOfLong GetObjects (in GEOM_Object theGroup);
2993 * GEOM_Gen: Interface to access other GEOM interfaces.
2994 * Also contains some methods to access and manage GEOM objects.
2996 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
2999 * Undo/Redo Management
3002 void Undo (in long theStudyID);
3004 void Redo (in long theStudyID);
3007 * Publishing management
3008 * Adds in theStudy a object theObject under with a name theName,
3009 * if theFather is not NULL the object is placed under thFather's SObject.
3010 * Returns a SObject where theObject is placed
3012 SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
3013 in GEOM_Object theObject,
3015 in GEOM_Object theFather);
3018 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3019 * To be used from python scripts out of geompy.addToStudy (non-default usage)
3020 * \param theStudy the study, in which theObject is published already,
3021 * and in which the arguments will be published
3022 * \param theObject published GEOM object, arguments of which will be published
3023 * \param theArgs list of GEOM_Object, operation arguments to be published.
3024 * If this list is empty, all operation arguments will be published
3025 * \param theFindMethod method to search subshapes, corresponding to arguments and
3026 * their subshapes. Value from enumeration GEOM::find_shape_method.
3027 * \param theInheritFirstArg set properties of the first argument for \a theObject.
3028 * Do not publish subshapes in place of arguments, but only
3029 * in place of subshapes of the first argument,
3030 * because the whole shape corresponds to the first argument.
3031 * Mainly to be used after transformations, but it also can be
3032 * usefull after partition with one object shape, and some other
3033 * operations, where only the first argument has to be considered.
3034 * If theObject has only one argument shape, this flag is automatically
3035 * considered as True, not regarding really passed value.
3036 * \return list of published sub-shapes
3038 ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
3039 in GEOM_Object theObject,
3040 in ListOfGO theArgs,
3041 in find_shape_method theFindMethod,
3042 in boolean theInheritFirstArg);
3045 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3046 * To be used from GUI and from geompy.addToStudy.
3047 * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3048 * \param theSObject study object, referencing GEOM object, arguments of which will be published
3050 ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
3051 in SALOMEDS::SObject theSObject,
3052 in ListOfGO theArgs,
3053 in find_shape_method theFindMethod,
3054 in boolean theInheritFirstArg);
3057 * Methods to access interfaces for objects creation and transformation
3059 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3060 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
3061 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3062 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3063 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3064 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3065 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3066 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3067 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3068 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3069 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3070 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3073 * Objects Management
3077 * Removes the object from the GEOM component
3078 * \param theObject is a GEOM object to be removed
3080 void RemoveObject (in GEOM_Object theObject);
3083 * Returns an object defined by the study and its entry in the GEOM component
3084 * \param theStudyID is a SALOMEDS Study ID
3085 * \param theEntry is an entry of the requested GEOM object in the GEOM component
3086 * \note if the object has not previously been created a NULL GEOM object is returned
3088 GEOM_Object GetObject (in long theStudyID, in string theEntry);
3091 * Add a sub shape defined by indices in \a theIndices
3092 * (contains unique IDs of sub shapes inside theMainShape)
3093 * \note The sub shape GEOM_Objects can has ONLY ONE function.
3094 * Don't try to apply modification operations on them.
3095 * \note Internal method
3097 GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
3100 * GEOM object's IOR Management
3104 * Returns a GEOM Object defined by its IOR
3105 * \param theIOR a string containg an IOR of the requested GEOM object
3107 GEOM_Object GetIORFromString (in string theIOR);
3110 * Returns a string which contains an IOR of the GEOM object
3111 * \param theObject is a GEOM object which IOR is requested
3113 string GetStringFromIOR (in GEOM_Object theObject);
3116 * Returns a name with which a GEOM object was dumped into python script
3117 * \param theStudyEntry is an entry of the GEOM object in the study
3119 string GetDumpName (in string theStudyEntry);
3122 * Returns all names with which a GEOM objects was dumped
3123 * into python script to avoid the same names in SMESH script
3125 string_array GetAllDumpNames();
3128 * Publishes the named subshapes of given object in the study.
3129 * \param theStudy The study in which the object is published
3130 * \param theObject The object which named subshapes are published
3132 ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
3133 //in SObject theSObject,
3134 in Object theObject);