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"
32 #include "SALOME_Notebook.idl"
34 #include "SALOME_GenericObj.idl"
39 * Topological types of shapes (like Open Cascade types)
41 enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
42 FACE, WIRE, EDGE, VERTEX, SHAPE };
47 enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
48 MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
53 enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
54 MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
57 * State of shape relatively geometrical surface like plane, sphere or cylinder.
58 * Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
62 /*! Shape is on surface */
66 * Shape is in the direction defined by the normal and not on surface.
67 * For plane it means above the plane,
68 * For sphere and cylinder it means outside of volume, bounded by the surface.
73 * Shape is in the direction defined by the normal and on surface.
79 * Complementary to ONOUT.
80 * For plane it means below the plane,
81 * For sphere and cylinder it means inside the volume, bounded by the surface
82 * (beyond axis and surface for cylinder and beyond cented and surface for sphere).
87 * Complementary to OUT.
94 * Kind of method to find inside one main shape some subshapes,
95 * corresponding to other given shape (its argument)
96 * Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
98 enum find_shape_method
100 /*! Use GetInPlace functionality. Suits all cases, except transformations */
103 /*! To be used only for transformation result, to find subshapes of argument.
104 * Only this method can be used after transformation.
108 /*! To find only shared subshapes, not modified by the operation */
111 /*! Use GetShapesOnShape method (can work only on solids) */
112 FSM_GetShapesOnShape,
114 /*! Use GetInPlaceByHistory method (can work only after Partition) */
115 FSM_GetInPlaceByHistory
119 typedef sequence<string> string_array;
120 typedef sequence<short> short_array;
121 typedef sequence<long> ListOfLong;
122 typedef sequence<double> ListOfDouble;
124 interface GEOM_Object;
126 typedef sequence<GEOM_Object> ListOfGO;
129 * GEOM_Object: interface of geometric object
131 interface GEOM_Object : SALOME::ParameterizedObject
135 * Get an entry of the object in GEOM component.
137 //string GetEntry(); ASL: it is declared in the SALOME::ParameterizedObject
140 * Get ID of study, where the object is created.
145 * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
150 * Get a <VAR>shape_type</VAR> of the object value.
152 shape_type GetShapeType();
155 * Set name of the object.
156 * \param theName is a name which will be associated with this object.
158 void SetName (in string theName);
161 * Get name of the object associated with this object.
166 * Set color of the object.
167 * \param theColor is a color of the object.
169 void SetColor(in SALOMEDS::Color theColor);
172 * Get color of the object.
174 SALOMEDS::Color GetColor();
177 * Toggle auto color mode on the object.
178 * \param theAtoColor is a flag which toggles auto color mode.
180 void SetAutoColor(in boolean theAutoColor);
183 * Get flag of object's auto color mode.
185 boolean GetAutoColor();
188 * Set standard point marker for the object
189 * \param theType standard marker type
190 * \param theSize marker relative size
192 void SetMarkerStd(in marker_type theType, in marker_size theSize );
195 * Set custom point marker for the object. The texture can be added
196 * by LoadTexture() or AddTexture() functions.
197 * \param theTextureId texture ID
199 void SetMarkerTexture(in long theTextureId);
202 * Get type of the point marker assigned to the object
203 * \return current marker type (MT_NONE if no marker is set)
205 marker_type GetMarkerType();
208 * Get size of the point marker assigned to the object
209 * \return current marker relative size (MS_NONE if no marker is set)
211 marker_size GetMarkerSize();
214 * Get texture idenifier of the point marker assigned to the object
215 * \return marker texture ID (0 if no marker set)
217 long GetMarkerTexture();
220 * Set a Study entry where this object was published.
222 void SetStudyEntry (in string theEntry);
225 * Get a Study entry where this object was published.
227 string GetStudyEntry();
230 * Get a list of all GEOM objects on which were the arguments
231 * when this object was constructed and modified.
232 * \note This method is supposed to be used by GUI only.
234 ListOfGO GetDependency();
237 * Get a list of GEOM objects on which the last function that created or modified the object depends.
238 * \note This method is supposed to be used by GUI only.
240 ListOfGO GetLastDependency();
243 * Get the TopoDS_Shape, for colocated case only.
245 long long getShape();
248 ######################################################################
249 * Internal methods (For sub shape identification)
250 ######################################################################
254 * Get geometric shape of the object as a byte stream
256 SALOMEDS::TMPFile GetShapeStream();
259 * Returns True if this object is not a sub shape of another object.
261 boolean IsMainShape();
264 * Get a list of ID's of sub shapes in the main shape.
265 * \note Internal method, suppopsed to be used only by GEOM_Client
267 ListOfLong GetSubShapeIndices();
270 * Get a main shape object to which this object is a sub shape
271 * \note Internal method, suppopsed to be used only by GEOM_Client
273 GEOM_Object GetMainShape();
276 * Return true if geom object representes a shape.
277 * For example, method return false for GEOM_MARKER
282 * Store dependecies of this geom object on other geom objects into notebook
283 * \param theNotebook is the instance of notebook
285 void StoreDependencies(in SALOME::Notebook theNotebook);
290 * GEOM_IOperations: basic methods of all geometric operations
292 interface GEOM_IOperations : SALOME::GenericObj
295 * To know, if the operation was successfully performed
300 * Set the operation error code
301 * \param theErrorID is a string describing the error occured
302 * \note This method is supposed to be used only by interfaces inheriting from IOperations.
304 void SetErrorCode (in string theErrorID);
307 * Get the operation error code
309 string GetErrorCode();
312 * Get ID of study, where the operation is defined
317 * Opens a new transaction
319 void StartOperation();
322 * Closes the previously opened trasaction
324 void FinishOperation();
327 * Aborts the previously opened transaction
329 void AbortOperation();
333 * GEOM_IBasicOperations: interface for basic geometry creation
334 * (Point, Vector, Plane, Marker)
336 interface GEOM_IBasicOperations : GEOM_IOperations
339 * Create point by three coordinates.
340 * \param theX The X coordinate of the point.
341 * \param theY The Y coordinate of the point.
342 * \param theZ The Z coordinate of the point.
343 * \return New GEOM_Object, containing the created point.
345 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
348 * Create a point, distant from the referenced point
349 * on the given distances along the coordinate axes.
350 * \param theReference The referenced point.
351 * \param theX Displacement from the referenced point along OX axis.
352 * \param theY Displacement from the referenced point along OY axis.
353 * \param theZ Displacement from the referenced point along OZ axis.
354 * \return New GEOM_Object, containing the created point.
356 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
357 in double theX, in double theY, in double theZ);
360 * Create a point, corresponding to the given parameter on the given curve.
361 * \param theRefCurve The referenced curve.
362 * \param theParameter Value of parameter on the referenced curve.
363 * \return New GEOM_Object, containing the created point.
365 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
366 in double theParameter);
369 * Create a point on the given curve, projecting given point
370 * \param theRefCurve The referenced curve.
371 * \param theXParameter X co-ordinate of point to project on curve
372 * \param theYParameter Y co-ordinate of point to project on curve
373 * \param theZParameter Z co-ordinate of point to project on curve
374 * \return New GEOM_Object, containing the created point.
376 GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
377 in double theXParameter,
378 in double theYarameter,
379 in double theZPameter);
382 * Create a point, corresponding to the given parameters on the
384 * \param theRefSurf The referenced surface.
385 * \param theUParameter Value of U-parameter on the referenced surface.
386 * \param theVParameter Value of V-parameter on the referenced surface.
387 * \return New GEOM_Object, containing the created point.
389 GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
390 in double theUParameter,
391 in double theVParameter);
394 * Create a point on the given surface, projecting given point
395 * \param theRefSurf The referenced surface.
396 * \param theXParameter X co-ordinate of point to project on curve
397 * \param theYParameter Y co-ordinate of point to project on curve
398 * \param theZParameter Z co-ordinate of point to project on curve
399 * \return New GEOM_Object, containing the created point.
401 GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
402 in double theXParameter,
403 in double theYarameter,
404 in double theZPameter);
408 * Create a point, on two lines intersection.
409 * \param theRefLine1, theRefLine2 The referenced lines.
410 * \return New GEOM_Object, containing the created point.
412 GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
413 in GEOM_Object theRefLine2);
416 * Create a vector, corresponding to tangent to the given parameter on the given curve.
417 * \param theRefCurve The referenced curve.
418 * \param theParameter Value of parameter on the referenced curve.This value should be have value
419 * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
420 * \last parameter of curve.
421 * \return New GEOM_Object, containing the created point.
423 GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
424 in double theParameter);
427 * Create a vector with the given components.
428 * \param theDX X component of the vector.
429 * \param theDY Y component of the vector.
430 * \param theDZ Z component of the vector.
431 * \return New GEOM_Object, containing the created vector.
433 GEOM_Object MakeVectorDXDYDZ (in double theDX,
438 * Create a vector between two points.
439 * \param thePnt1 Start point for the vector.
440 * \param thePnt2 End point for the vector.
441 * \return New GEOM_Object, containing the created vector.
443 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
446 * Create a line, passing through the given point
447 * and parrallel to the given direction
448 * \param thePnt Point. The resulting line will pass through it.
449 * \param theDir Direction. The resulting line will be parallel to it.
450 * \return New GEOM_Object, containing the created line.
452 GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
455 * Create a line, passing through the given points
456 * \param thePnt1 First of two points, defining the line.
457 * \param thePnt2 Second of two points, defining the line.
458 * \return New GEOM_Object, containing the created line.
460 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
463 * Create a line, given by two faces intersection.
464 * \param theFace1 First of two faces, defining the line.
465 * \param theFace2 Second of two faces, defining the line.
466 * \return New GEOM_Object, containing the created line.
468 GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
471 * Create a plane, passing through the three given points
472 * \param thePnt1 First of three points, defining the plane.
473 * \param thePnt2 Second of three points, defining the plane.
474 * \param thePnt3 Fird of three points, defining the plane.
475 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
476 * \return New GEOM_Object, containing the created plane.
478 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
479 in GEOM_Object thePnt2,
480 in GEOM_Object thePnt3,
481 in double theTrimSize);
484 * Create a plane, passing through the given point
485 * and normal to the given vector.
486 * \param thePnt Point, the plane has to pass through.
487 * \param theVec Vector, defining the plane normal direction.
488 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
489 * \return New GEOM_Object, containing the created plane.
491 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
492 in GEOM_Object theVec,
493 in double theTrimSize);
496 * Create a plane, similar to the existing one, but with another size of representing face.
497 * \param theFace Referenced plane or LCS(Marker).
498 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
499 * \return New GEOM_Object, containing the created plane.
501 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
502 in double theTrimSize);
505 * Create a plane, by two vectors.
506 * \param theVec1 Vector1, the plane has to pass through first point of this vector.
507 * \param theVec Vector2, defining the plane normal direction.
508 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
509 * \return New GEOM_Object, containing the created plane.
511 GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
512 in GEOM_Object theVec2,
513 in double theTrimSize);
516 * Create a plane, defined by local coordinate system.
517 * \param theLCS Referenced LCS(Marker).
518 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
519 * \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
520 * \return New GEOM_Object, containing the created plane.
522 GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
523 in double theTrimSize,
524 in double theOrientation);
527 * Create a local coordinate system.
528 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
529 * \param theXDX,theXDY,theXDZ Three components of OX direction
530 * \param theYDX,theYDY,theYDZ Three components of OY direction
531 * \return New GEOM_Object, containing the created coordinate system.
533 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
534 in double theXDX, in double theXDY, in double theXDZ,
535 in double theYDX, in double theYDY, in double theYDZ);
538 * Create a tangent plane to specified face in the point with specified parameters.
539 * Values of parameters should be between 0. and 1.0
540 * \param theFace - face for which tangent plane shuold be built.
541 * \param theParameterU - value of parameter by U
542 * \param theParameterV - value of parameter Vthe
543 * \param theTrimSize - defines sizes of created face
544 * \return New GEOM_Object, containing the face built on tangent plane.
546 GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
547 in double theParameterU,
548 in double theParameterV,
549 in double theTrimSize);
552 interface GEOM_ITransformOperations : GEOM_IOperations
555 * Translate the given object along the vector, specified by its end points.
556 * \param theObject The object to be translated.
557 * \param thePoint1 Start point of translation vector.
558 * \param thePoint2 End point of translation vector.
561 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
562 in GEOM_Object thePoint1,
563 in GEOM_Object thePoint2);
566 * Translate the given object along the vector, specified
567 * by its end points, creating its copy before the translation.
568 * \param theObject The object to be translated.
569 * \param thePoint1 Start point of translation vector.
570 * \param thePoint2 End point of translation vector.
571 * \return New GEOM_Object, containing the translated object.
573 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
574 in GEOM_Object thePoint1,
575 in GEOM_Object thePoint2);
578 * Translate the given object along the vector, specified by its components.
579 * \param theObject The object to be translated.
580 * \param theDX,theDY,theDZ Components of translation vector.
583 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
584 in double theDX, in double theDY, in double theDZ);
587 * Translate the given object along the vector, specified
588 * by its components, creating its copy before the translation.
589 * \param theObject The object to be translated.
590 * \param theDX,theDY,theDZ Components of translation vector.
591 * \return New GEOM_Object, containing the translated object.
593 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
594 in double theDX, in double theDY, in double theDZ);
598 * Translate the given object along the given vector.
599 * \param theObject The object to be translated.
600 * \param theVector Translation vector, giving both direction and distance.
603 GEOM_Object TranslateVector (in GEOM_Object theObject,
604 in GEOM_Object theVector);
607 * Translate the given object along the given vector,
608 * creating its copy before the translation.
609 * \param theObject The object to be translated.
610 * \param theVector Translation vector, giving both direction and distance.
611 * \return New GEOM_Object, containing the translated object.
613 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
614 in GEOM_Object theVector);
617 * Translate the given object along the given vector on given distance,
618 * creating its copy before the translation.
619 * \param theObject The object to be translated.
620 * \param theVector Translation vector, giving a direction.
621 * \param theDistance Translation distance, giving a distance.
622 * \param theCope Translation copy, creating its copy if true.
623 * \return New GEOM_Object, containing the translated object.
625 GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
626 in GEOM_Object theVector,
627 in double theDistance,
631 * Translate the given object along the given vector a given number times
632 * \param theObject The object to be translated.
633 * \param theVector Direction of the translation.
634 * \param theStep Distance to translate on.
635 * \param theNbTimes Quantity of translations to be done.
636 * \return New GEOM_Object, containing compound of all
637 * the shapes, obtained after each translation.
639 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
640 in GEOM_Object theVector,
645 * Conseqently apply two specified translations to theObject specified number of times.
646 * \param theObject The object to be translated.
647 * \param theVector1 Direction of the first translation.
648 * \param theStep1 Step of the first translation.
649 * \param theNbTimes1 Quantity of translations to be done along theVector1.
650 * \param theVector2 Direction of the second translation.
651 * \param theStep2 Step of the second translation.
652 * \param theNbTimes2 Quantity of translations to be done along theVector2.
653 * \return New GEOM_Object, containing compound of all
654 * the shapes, obtained after each translation.
656 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
657 in GEOM_Object theVector1,
660 in GEOM_Object theVector2,
662 in long theNbTimes2);
665 * Rotate given object around vector perpendicular to plane containing three points.
666 * \param theObject The object to be rotated.
667 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
668 * containing the three points.
669 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
672 GEOM_Object RotateThreePoints (in GEOM_Object theObject,
673 in GEOM_Object theCentPoint,
674 in GEOM_Object thePoint1,
675 in GEOM_Object thePoint2);
679 * Rotate given object around vector perpendicular to plane containing three points.
680 * Creating its copy before the rotatation.
681 * \param theObject The object to be rotated.
682 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
683 * containing the three points.
684 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
685 * \return New GEOM_Object, containing the rotated object.
687 GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
688 in GEOM_Object theCentPoint,
689 in GEOM_Object thePoint1,
690 in GEOM_Object thePoint2);
693 * Rotate the given object around the given axis on the given angle.
694 * \param theObject The object to be rotated.
695 * \param theAxis Rotation axis.
696 * \param theAngle Rotation angle in radians.
699 GEOM_Object Rotate (in GEOM_Object theObject,
700 in GEOM_Object theAxis,
705 * Rotate the given object around the given axis
706 * on the given angle, creating its copy before the rotatation.
707 * \param theObject The object to be rotated.
708 * \param theAxis Rotation axis.
709 * \param theAngle Rotation angle in radians.
710 * \return New GEOM_Object, containing the rotated object.
712 GEOM_Object RotateCopy (in GEOM_Object theObject,
713 in GEOM_Object theAxis,
718 * Rotate the given object around the given axis a given number times.
719 * Rotation angle will be 2*PI/theNbTimes.
720 * \param theObject The object to be rotated.
721 * \param theAxis The rotation axis.
722 * \param theNbTimes Quantity of rotations to be done.
723 * \return New GEOM_Object, containing compound of all the
724 * shapes, obtained after each rotation.
726 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
727 in GEOM_Object theAxis,
731 * Rotate the given object around the
732 * given axis on the given angle a given number
733 * times and multi-translate each rotation result.
734 * Translation direction passes through center of gravity
735 * of rotated shape and its projection on the rotation axis.
736 * \param theObject The object to be rotated.
737 * \param theAxis Rotation axis.
738 * \param theAngle Rotation angle in graduces.
739 * \param theNbTimes1 Quantity of rotations to be done.
740 * \param theStep Translation distance.
741 * \param theNbTimes2 Quantity of translations to be done.
742 * \return New GEOM_Object, containing compound of all the
743 * shapes, obtained after each transformation.
745 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
746 in GEOM_Object theAxis,
750 in long theNbTimes2);
753 * Replace the given object by an object,
754 * symmetrical to it relatively the given plane.
755 * \param theObject The object to be mirrored.
756 * \param thePlane Plane of symmetry.
758 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
761 * Create an object, symmetrical
762 * to the given one relatively the given plane.
763 * \param theObject The object to be mirrored.
764 * \param thePlane Plane of symmetry.
765 * \return New GEOM_Object, containing the mirrored shape.
767 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
770 * Replace the given object by an object,
771 * symmetrical to it relatively the given axis.
772 * \param theObject The object to be mirrored.
773 * \param theAxis Axis of symmetry.
776 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
779 * Create an object, symmetrical
780 * to the given one relatively the given axis.
781 * \param theObject The object to be mirrored.
782 * \param theAxis Axis of symmetry.
783 * \return New GEOM_Object, containing the mirrored object.
785 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
788 * Replace the given object by an object, symmetrical to it relatively the given point.
789 * \param theObject The object to be mirrored.
790 * \param thePoint Point of symmetry.
793 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
796 * Create an object, symmetrical to the given one relatively the given point.
797 * \param theObject The object to be mirrored.
798 * \param thePoint Point of symmetry.
799 * \return New GEOM_Object, containing the mirrored object.
801 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
804 * Replace the given object by its offset.
805 * \param theObject The base object for the offset.
806 * \param theOffset Offset value.
809 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
812 * Create new object as offset of the given one.
813 * \param theObject The base object for the offset.
814 * \param theOffset Offset value.
815 * \return New GEOM_Object, containing the offset object.
817 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
820 * Scale the given object by the factor.
821 * \param theObject The object to be scaled.
822 * \param thePoint Center point for scaling.
823 * \param theFactor Scaling factor value.
826 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
827 in double theFactor);
830 * Scale the given object by the factor, creating its copy before the scaling.
831 * \param theObject The object to be scaled.
832 * \param thePoint Center point for scaling.
833 * \param theFactor Scaling factor value.
834 * \return New GEOM_Object, containing the scaled shape.
836 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
837 in double theFactor);
840 * Scale the given object by different factors along coordinate axes.
841 * \param theObject The object to be scaled.
842 * \param thePoint Center point for scaling.
843 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
846 GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
847 in GEOM_Object thePoint,
848 in double theFactorX,
849 in double theFactorY,
850 in double theFactorZ);
853 * Scale the given object by different factors along coordinate axes,
854 * creating its copy before the scaling.
855 * \param theObject The object to be scaled.
856 * \param thePoint Center point for scaling.
857 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
858 * \return New GEOM_Object, containing the scaled shape.
860 GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
861 in GEOM_Object thePoint,
862 in double theFactorX,
863 in double theFactorY,
864 in double theFactorZ);
867 * Modify the Location of the given object by LCS.
868 * \param theObject The object to be displaced.
869 * \param theStartLCS Coordinate system to perform displacement from it.
870 * If \a theStartLCS is NULL, displacement
871 * will be performed from global CS.
872 * If \a theObject itself is used as \a theStartLCS,
873 * its location will be changed to \a theEndLCS.
874 * \param theEndLCS Coordinate system to perform displacement to it.
877 GEOM_Object PositionShape (in GEOM_Object theObject,
878 in GEOM_Object theStartLCS,
879 in GEOM_Object theEndLCS);
882 * Modify the Location of the given object by LCS,
883 * creating its copy before the setting.
884 * \param theObject The object to be displaced.
885 * \param theStartLCS Coordinate system to perform displacement from it.
886 * If \a theStartLCS is NULL, displacement
887 * will be performed from global CS.
888 * If \a theObject itself is used as \a theStartLCS,
889 * its location will be changed to \a theEndLCS.
890 * \param theEndLCS Coordinate system to perform displacement to it.
891 * \return New GEOM_Object, containing the displaced shape.
893 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
894 in GEOM_Object theStartLCS,
895 in GEOM_Object theEndLCS);
898 * Modify the Location of the given object by Path,
899 * \param theObject The object to be displaced.
900 * \param thePath Wire or Edge along that the object will be translated.
901 * \param theDistance progress of Path (0 = actual location, 1 = end of path location).
902 * \param theCopy is a true or false parameter. true is to create a copy, false to move the object.
903 * \param theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
904 * \return New GEOM_Object, containing the displaced shape.
907 GEOM_Object PositionAlongPath (in GEOM_Object theObject,
908 in GEOM_Object thePath,
909 in double theDistance,
911 in boolean theReverse);
914 * Recompute the shape from its arguments.
915 * \param theObject The object to be recomputed.
918 GEOM_Object RecomputeObject (in GEOM_Object theObject);
922 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
923 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
924 * Pipe (extrusion along contour), Revolution, Solid (from shell).
926 interface GEOM_I3DPrimOperations : GEOM_IOperations
929 * Create a box with specified dimensions along the coordinate axes
930 * and with edges, parallel to the coordinate axes.
931 * Center of the box will be at point (DX/2, DY/2, DZ/2).
932 * \param theDX Length of Box edges, parallel to OX axis.
933 * \param theDY Length of Box edges, parallel to OY axis.
934 * \param theDZ Length of Box edges, parallel to OZ axis.
935 * \return New GEOM_Object, containing the created box.
937 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
940 * Create a box with two specified opposite vertices,
941 * and with edges, parallel to the coordinate axes
942 * \param thePnt1 First of two opposite vertices.
943 * \param thePnt2 Second of two opposite vertices.
944 * \return New GEOM_Object, containing the created box.
946 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
949 * Create a face specified dimensions along OX-OY coordinate axes,
950 * with edges parallel to the coordinate axes.
951 * Center of the face will be at point (0, 0, 0).
952 * \param theH Height of the Face.
953 * \param theW Width of the Face.
954 * \param theOrientation Orientation belong axis OXY OYZ OZX
955 * \return New GEOM_Object, containing the created face.
957 GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
959 * Create a face by normale vector or edge and two specified sizes,
960 * vertical (H) and horisontal (W).
961 * \param theVec defines plane.
962 * \param theH vertical size (height).
963 * \param theW horisontal size (width).
964 * \return New GEOM_Object, containing the created face.
966 GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
968 * Create a Disk (circular face) with given center, normal vector and radius.
969 * \param thePnt disk center.
970 * \param theVec Vector, normal to the plane of the disk.
971 * \param theR Disk radius.
972 * \return New GEOM_Object, containing the created disk.
974 GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
975 in GEOM_Object theVec,
978 * Create a disk (circular face), passing through three given points
979 * \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
980 * \return New GEOM_Object, containing the created disk.
982 GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
983 in GEOM_Object thePnt2,
984 in GEOM_Object thePnt3);
987 * Create a disk specified dimensions along OX-OY coordinate axes,
988 * Center of the disk at point (0, 0, 0).
989 * \param theR of the Disk.
990 * \param theOrientation Orientation belong axis OXY OYZ OZX
991 * \return New GEOM_Object, containing the created disk.
993 GEOM_Object MakeDiskR (in double theR, in short theOrientation);
996 * Create a cylinder with given radius and height at
997 * the origin of coordinate system. Axis of the cylinder
998 * will be collinear to the OZ axis of the coordinate system.
999 * \param theR Cylinder radius.
1000 * \param theH Cylinder height.
1001 * \return New GEOM_Object, containing the created cylinder.
1003 GEOM_Object MakeCylinderRH (in double theR, in double theH);
1006 * Create a cylinder with given base point, axis, radius and height.
1007 * \param thePnt Central point of cylinder base.
1008 * \param theAxis Cylinder axis.
1009 * \param theR Cylinder radius.
1010 * \param theH Cylinder height.
1011 * \return New GEOM_Object, containing the created cylinder.
1013 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
1014 in GEOM_Object theAxis,
1019 * Create a cone with given height and radiuses at
1020 * the origin of coordinate system. Axis of the cone will
1021 * be collinear to the OZ axis of the coordinate system.
1022 * \param theR1 Radius of the first cone base.
1023 * \param theR2 Radius of the second cone base.
1024 * \note If both radiuses are non-zero, the cone will be truncated.
1025 * \note If the radiuses are equal, a cylinder will be created instead.
1026 * \param theH Cone height.
1027 * \return New GEOM_Object, containing the created cone.
1029 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
1032 * Create a cone with given base point, axis, height and radiuses.
1033 * \param thePnt Central point of the first cone base.
1034 * \param theAxis Cone axis.
1035 * \param theR1 Radius of the first cone base.
1036 * \param theR2 Radius of the second cone base.
1037 * \note If both radiuses are non-zero, the cone will be truncated.
1038 * \note If the radiuses are equal, a cylinder will be created instead.
1039 * \param theH Cone height.
1040 * \return New GEOM_Object, containing the created cone.
1042 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1043 in GEOM_Object theAxis,
1049 * Create a torus with given radiuses at the origin of coordinate system.
1050 * \param theRMajor Torus major radius.
1051 * \param theRMinor Torus minor radius.
1052 * \return New GEOM_Object, containing the created torus.
1054 GEOM_Object MakeTorusRR (in double theRMajor,
1055 in double theRMinor);
1058 * Create a torus with given center, normal vector and radiuses.
1059 * \param thePnt Torus central point.
1060 * \param theVec Torus axis of symmetry.
1061 * \param theRMajor Torus major radius.
1062 * \param theRMinor Torus minor radius.
1063 * \return New GEOM_Object, containing the created torus.
1065 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1066 in GEOM_Object theVec,
1067 in double theRMajor,
1068 in double theRMinor);
1071 * Create a sphere with given radius at the origin of coordinate system.
1072 * \param theR Sphere radius.
1073 * \return New GEOM_Object, containing the created sphere.
1075 GEOM_Object MakeSphereR (in double theR);
1078 * Create a sphere with given center and radius.
1079 * \param thePnt Sphere center.
1080 * \param theR Sphere radius.
1081 * \return New GEOM_Object, containing the created .
1083 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1086 * Create a shape by extrusion of the base shape along the vector,
1087 * i.e. all the space, transfixed by the base shape during its translation
1088 * along the vector on the given distance.
1089 * \param theBase Base shape to be extruded.
1090 * \param theVec Direction of extrusion.
1091 * \param theH Prism dimension along theVec.
1092 * \return New GEOM_Object, containing the created prism.
1094 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1095 in GEOM_Object theVec,
1097 /* The Same Prism but in 2 directions (forward&backward) */
1098 GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1099 in GEOM_Object theVec,
1103 * Create a shape by extrusion of the base shape along a vector, defined by two points.
1104 * \param theBase Base shape to be extruded.
1105 * \param thePoint1 First end of extrusion vector.
1106 * \param thePoint2 Second end of extrusion vector.
1107 * \return New GEOM_Object, containing the created prism.
1109 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1110 in GEOM_Object thePoint1,
1111 in GEOM_Object thePoint2);
1112 /* The same prism but in two directions forward&backward */
1113 GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1114 in GEOM_Object thePoint1,
1115 in GEOM_Object thePoint2);
1118 * Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1119 * \param theBase Base shape to be extruded.
1120 * \param DX, DY, DZ end of extrusion vector.
1121 * \return New GEOM_Object, containing the created prism.
1123 GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1124 in double theDX, in double theDY, in double theDZ);
1125 /* The same prism but in two directions forward&backward */
1126 GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1127 in double theDX, in double theDY, in double theDZ);
1130 * Create a shape by extrusion of the base shape along
1131 * the path shape. The path shape can be a wire or an edge.
1132 * \param theBase Base shape to be extruded.
1133 * \param thePath Path shape to extrude the base shape along it.
1134 * \return New GEOM_Object, containing the created pipe.
1136 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1139 * Create a shape by revolution of the base shape around the axis
1140 * on the given angle, i.e. all the space, transfixed by the base
1141 * shape during its rotation around the axis on the given angle.
1142 * \param theBase Base shape to be rotated.
1143 * \param theAxis Rotation axis.
1144 * \param theAngle Rotation angle in radians.
1145 * \return New GEOM_Object, containing the created revolution.
1147 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1148 in GEOM_Object theAxis,
1149 in double theAngle);
1150 /* The Same Revolution but in both ways forward&backward */
1151 GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1152 in GEOM_Object theAxis,
1153 in double theAngle);
1156 * Create a filling from the given compound of contours.
1157 * \param theMinDeg a minimal degree of BSpline surface to create
1158 * \param theMaxDeg a maximal degree of BSpline surface to create
1159 * \param theTol2D a 2d tolerance to be reached
1160 * \param theTol3D a 3d tolerance to be reached
1161 * \param theNbIter a number of iteration of approximation algorithm
1162 * \return New GEOM_Object, containing the created filling surface.
1164 GEOM_Object MakeFilling (in GEOM_Object theShape,
1165 in long theMinDeg, in long theMaxDeg,
1166 in double theTol2D, in double theTol3D,
1167 in long theNbIter, in boolean theApprox);
1170 * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1171 * \param theSeqSections - set of specified sections.
1172 * \param theModeSolid - mode defining building solid or shell
1173 * \param thePreci - precision 3D used for smoothing by default 1.e-6
1174 * \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1175 * \return New GEOM_Object, containing the created shell or solid.
1177 GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1178 in boolean theModeSolid,
1180 in boolean theRuled);
1183 * Create a shape by extrusion of the profile shape along
1184 * the path shape. The path shape can be a wire or an edge.
1185 * the several profiles can be specified in the several locations of path.
1186 * \param theSeqBases - list of Bases shape to be extruded.
1187 * \param theLocations - list of locations on the path corresponding
1188 * specified list of the Bases shapes. Number of locations
1189 * should be equal to number of bases or list of locations can be empty.
1190 * \param thePath - Path shape to extrude the base shape along it.
1191 * \param theWithContact - the mode defining that the section is translated to be in
1192 * contact with the spine.
1193 * \param - WithCorrection - defining that the section is rotated to be
1194 * orthogonal to the spine tangent in the correspondent point
1195 * \return New GEOM_Object, containing the created pipe.
1197 GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1198 in ListOfGO theLocations,
1199 in GEOM_Object thePath,
1200 in boolean theWithContact ,
1201 in boolean theWithCorrection );
1204 * Create a shape by extrusion of the profile shape along
1205 * the path shape. The path shape can be a shell or a face.
1206 * the several profiles can be specified in the several locations of path.
1207 * \param theSeqBases - list of Bases shape to be extruded.
1208 * \param theSeqSubBases - list of corresponding subshapes of section shapes.
1209 * \param theLocations - list of locations on the path corresponding
1210 * specified list of the Bases shapes. Number of locations
1211 * should be equal to number of bases.
1212 * \param thePath - Path shape to extrude the base shape along it.
1213 * \param theWithContact - the mode defining that the section is translated to be in
1214 * contact with the spine.
1215 * \param - WithCorrection - defining that the section is rotated to be
1216 * orthogonal to the spine tangent in the correspondent point
1217 * \return New GEOM_Object, containing the created pipe.
1219 GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1220 in ListOfGO theSeqSubBases,
1221 in ListOfGO theLocations,
1222 in GEOM_Object thePath,
1223 in boolean theWithContact ,
1224 in boolean theWithCorrection );
1227 * Create solids between given sections
1228 * \param theSeqBases - list of sections (shell or face).
1229 * \param theLocations - list of corresponding vertexes
1230 * \return New GEOM_Object, containing the created solids.
1232 GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1233 in ListOfGO theLocations);
1236 * Create a shape by extrusion of the base shape along
1237 * the path shape with constant bi-normal direction along the given vector.
1238 * The path shape can be a wire or an edge.
1239 * \param theBase Base shape to be extruded.
1240 * \param thePath Path shape to extrude the base shape along it.
1241 * \param theVec Vector defines a constant binormal direction to keep the
1242 * same angle beetween the Direction and the sections
1243 * along the sweep surface.
1244 * \return New GEOM_Object, containing the created pipe.
1246 GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1247 in GEOM_Object thePath,
1248 in GEOM_Object theVec);
1253 * GEOM_IShapesOperations: Interface for Shapes creation:
1254 * Edge from two points, Wire from edges, Face from wire,
1255 * Shell from faces, Solid from shells, Compound from shapes
1257 interface GEOM_IShapesOperations : GEOM_IOperations
1260 * Create a linear edge with specified ends.
1261 * \param thePnt1 Point for the first end of edge.
1262 * \param thePnt2 Point for the second end of edge.
1263 * \return New GEOM_Object, containing the created edge.
1265 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1268 * Create a wire from the set of edges and wires.
1269 * \param theEdgesAndWires List of edge and/or wires.
1270 * \param theTolerance Maximum distance between vertices, that will be merged.
1271 * Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1272 * \return New GEOM_Object, containing the created wire.
1274 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1275 in double theTolerance);
1278 * Create a face on the given wire.
1279 * \param theWire closed Wire or Edge to build the face on.
1280 * \param isPlanarWanted If TRUE, only planar face will be built.
1281 * If impossible, NULL object will be returned.
1282 * \return New GEOM_Object, containing the created face.
1284 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1287 * Create a face on the given wires set.
1288 * \param theWires List of closed wires or edges to build the face on.
1289 * \param isPlanarWanted If TRUE, only planar face will be built.
1290 * If impossible, NULL object will be returned.
1291 * \return New GEOM_Object, containing the created face.
1293 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1296 * Create a shell from the set of faces and shells.
1297 * \param theFacesAndShells List of faces and/or shells.
1298 * \return New GEOM_Object, containing the created shell.
1300 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1303 * Create a solid, bounded by the given shell.
1304 * \param theShell Bounding shell.
1305 * \return New GEOM_Object, containing the created solid.
1307 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1310 * Create a solid, bounded by the given shells.
1311 * \param theShells Bounding shells.
1312 * \return New GEOM_Object, containing the created solid.
1314 GEOM_Object MakeSolidShells (in ListOfGO theShells);
1317 * Create a compound of the given shapes.
1318 * \param theShapes List of shapes to put in compound.
1319 * \return New GEOM_Object, containing the created compound.
1321 GEOM_Object MakeCompound (in ListOfGO theShapes);
1324 * Replace coincident faces in theShape by one face.
1325 * \param theShape Initial shape.
1326 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1327 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1328 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
1330 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1333 * Find coincident faces in theShape for possible gluing.
1334 * \param theShape Initial shape.
1335 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1338 ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1341 * Replace coincident faces in theShape by one face
1342 * in compliance with given list of faces
1343 * \param theShape Initial shape.
1344 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1345 * \param theFaces List of faces for gluing.
1346 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1347 * \return New GEOM_Object, containing a copy of theShape without some faces.
1349 GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1350 in ListOfGO theFaces, in boolean doKeepNonSolids);
1353 * Explode a shape on subshapes of a given type.
1354 * \param theShape Shape to be exploded.
1355 * \param theShapeType Type of sub-shapes to be retrieved.
1356 * \param isSorted If this parameter is TRUE, sub-shapes will be
1357 * sorted by coordinates of their gravity centers.
1358 * \return List of sub-shapes of type theShapeType, contained in theShape.
1360 ListOfGO MakeExplode (in GEOM_Object theShape,
1361 in long theShapeType,
1362 in boolean isSorted);
1365 * Explode a shape on subshapes of a given type.
1366 * Does the same, as the above method, but returns IDs of sub-shapes,
1367 * not GEOM_Objects. It works faster.
1368 * \param theShape Shape to be exploded.
1369 * \param theShapeType Type of sub-shapes to be retrieved.
1370 * \param isSorted If this parameter is TRUE, sub-shapes will be
1371 * sorted by coordinates of their gravity centers.
1372 * \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1374 ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1375 in long theShapeType,
1376 in boolean isSorted);
1379 * Get a sub shape defined by its unique ID inside \a theMainShape
1380 * \note The sub shape GEOM_Objects can has ONLY ONE function.
1381 * Don't try to apply modification operations on them.
1383 GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1387 * Get global index of \a theSubShape in \a theMainShape.
1388 * \param theMainShape Main shape.
1389 * \param theSubShape Sub-shape of the main shape.
1390 * \return global index of \a theSubShape in \a theMainShape.
1392 long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1395 * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1396 * Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1397 * to generate automatic names for sub-shapes, when publishing them in a study.
1398 * \param theMainShape Main shape.
1399 * \param theSubShape Sub-shape of the main shape.
1400 * \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1402 long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1405 * \brief Get name of type of \a theShape.
1407 * Use wide type notation, taking into consideration both topology and geometry of the shape.
1408 * Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1409 * to generate automatic names for sub-shapes, when publishing them in a study.
1410 * \param theShape The shape to get a type of.
1411 * \return String, containing a type name of \a theShape.
1413 string GetShapeTypeString (in GEOM_Object theShape);
1416 * Count number of faces in the given shape.
1417 * \param theShape Shape to count faces in.
1418 * \return Number of faces in the given shape.
1420 long NumberOfFaces (in GEOM_Object theShape);
1423 * Count number of edges in the given shape.
1424 * \param theShape Shape to count edges in.
1425 * \return Number of edges in theShape.
1427 long NumberOfEdges (in GEOM_Object theShape);
1430 * Count number of subshapes of type \a theShapeType in the given shape.
1431 * \param theShape Shape to count subshapes in.
1432 * \param theShapeType The type of subshapes to count.
1433 * \return Number of subshapes of type \a theShapeType in \a theShape.
1435 long NumberOfSubShapes (in GEOM_Object theShape,
1436 in long theShapeType);
1439 * Reverses an orientation the given shape.
1440 * \param theShape Shape to be reversed.
1441 * \return The reversed copy of theShape.
1443 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1446 * Retrieve all free faces from the given shape.
1447 * Free face is a face, which is not shared between two shells of the shape.
1448 * \param theShape Shape to find free faces in.
1449 * \return List of IDs of all free faces, contained in theShape.
1451 ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1454 * Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1455 * \param theShape1 Shape to find sub-shapes in.
1456 * \param theShape2 Shape to find shared sub-shapes with.
1457 * \param theShapeType Type of sub-shapes to be retrieved.
1458 * \return List of sub-shapes of theShape1, shared with theShape2.
1460 ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1461 in GEOM_Object theShape2,
1462 in long theShapeType);
1465 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1466 * the specified plane by the certain way, defined through \a theState parameter.
1467 * \param theShape Shape to find sub-shapes of.
1468 * \param theShapeType Type of sub-shapes to be retrieved.
1469 * \param theAx1 Vector (or line, or linear edge), specifying normal
1470 * direction and location of the plane to find shapes on.
1471 * \param theState The state of the subshapes to find.
1472 * \return List of all found sub-shapes.
1474 ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1475 in long theShapeType,
1476 in GEOM_Object theAx1,
1477 in shape_state theState);
1479 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1480 * the specified plane by the certain way, defined through \a theState parameter.
1481 * \param theShape Shape to find sub-shapes of.
1482 * \param theShapeType Type of sub-shapes to be retrieved.
1483 * \param theAx1 Vector (or line, or linear edge), specifying normal
1484 * direction of the plane to find shapes on.
1485 * \param thePnt Point specifying location of the plane to find shapes on.
1486 * \param theState The state of the subshapes to find.
1487 * \return List of all found sub-shapes.
1489 ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1490 in long theShapeType,
1491 in GEOM_Object theAx1,
1492 in GEOM_Object thePnt,
1493 in shape_state theState);
1498 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1499 * the specified cylinder by the certain way, defined through \a theState parameter.
1500 * \param theShape Shape to find sub-shapes of.
1501 * \param theShapeType Type of sub-shapes to be retrieved.
1502 * \param theAxis Vector (or line, or linear edge), specifying
1503 * axis of the cylinder to find shapes on.
1504 * \param theRadius Radius of the cylinder to find shapes on.
1505 * \param theState The state of the subshapes to find.
1506 * \return List of all found sub-shapes.
1508 ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1509 in long theShapeType,
1510 in GEOM_Object theAxis,
1511 in double theRadius,
1512 in shape_state theState);
1515 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1516 * the specified sphere by the certain way, defined through \a theState parameter.
1517 * \param theShape Shape to find sub-shapes of.
1518 * \param theShapeType Type of sub-shapes to be retrieved.
1519 * \param theCenter Point, specifying center of the sphere to find shapes on.
1520 * \param theRadius Radius of the sphere to find shapes on.
1521 * \param theState The state of the subshapes to find.
1522 * \return List of all found sub-shapes.
1524 ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1525 in long theShapeType,
1526 in GEOM_Object theCenter,
1527 in double theRadius,
1528 in shape_state theState);
1531 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1532 * the specified quadrangle by the certain way, defined through \a theState parameter.
1533 * \param theShape Shape to find sub-shapes of.
1534 * \param theShapeType Type of sub-shapes to be retrieved.
1535 * \param theTopLeftPoint Top left quadrangle corner
1536 * \param theTopRigthPoint Top right quadrangle corner
1537 * \param theBottomLeftPoint Bottom left quadrangle corner
1538 * \param theBottomRigthPoint Bottom right quadrangle corner
1539 * \param theState The state of the subshapes to find.
1540 * \return List of all found sub-shapes.
1542 ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1543 in long theShapeType,
1544 in GEOM_Object theTopLeftPoint,
1545 in GEOM_Object theTopRigthPoint,
1546 in GEOM_Object theBottomLeftPoint,
1547 in GEOM_Object theBottomRigthPoint,
1548 in shape_state theState);
1551 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1552 * the specified plane by the certain way, defined through \a theState parameter.
1553 * \param theShape Shape to find sub-shapes of.
1554 * \param theShapeType Type of sub-shapes to be retrieved.
1555 * \param theAx1 Vector (or line, or linear edge), specifying normal
1556 * direction and location of the plane to find shapes on.
1557 * \param theState The state of the subshapes to find.
1558 * \return List of IDs of all found sub-shapes.
1560 ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1561 in long theShapeType,
1562 in GEOM_Object theAx1,
1563 in shape_state theState);
1566 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1567 * the specified plane by the certain way, defined through \a theState parameter.
1568 * \param theShape Shape to find sub-shapes of.
1569 * \param theShapeType Type of sub-shapes to be retrieved.
1570 * \param theAx1 Vector (or line, or linear edge), specifying normal
1571 * direction of the plane to find shapes on.
1572 * \param thePnt Point specifying location of the plane to find shapes on.
1573 * \param theState The state of the subshapes to find.
1574 * \return List of IDs of all found sub-shapes.
1576 ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1577 in long theShapeType,
1578 in GEOM_Object theAx1,
1579 in GEOM_Object thePnt,
1580 in shape_state theState);
1583 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1584 * the specified cylinder by the certain way, defined through \a theState parameter.
1585 * \param theShape Shape to find sub-shapes of.
1586 * \param theShapeType Type of sub-shapes to be retrieved.
1587 * \param theAxis Vector (or line, or linear edge), specifying
1588 * axis of the cylinder to find shapes on.
1589 * \param theRadius Radius of the cylinder to find shapes on.
1590 * \param theState The state of the subshapes to find.
1591 * \return List of IDs of all found sub-shapes.
1593 ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1594 in long theShapeType,
1595 in GEOM_Object theAxis,
1596 in double theRadius,
1597 in shape_state theState);
1600 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1601 * the specified sphere by the certain way, defined through \a theState parameter.
1602 * \param theShape Shape to find sub-shapes of.
1603 * \param theShapeType Type of sub-shapes to be retrieved.
1604 * \param theCenter Point, specifying center of the sphere to find shapes on.
1605 * \param theRadius Radius of the sphere to find shapes on.
1606 * \param theState The state of the subshapes to find.
1607 * \return List of IDs of all found sub-shapes.
1609 ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1610 in long theShapeType,
1611 in GEOM_Object theCenter,
1612 in double theRadius,
1613 in shape_state theState);
1616 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1617 * the specified quadrangle by the certain way, defined through \a theState parameter.
1618 * \param theShape Shape to find sub-shapes of.
1619 * \param theShapeType Type of sub-shapes to be retrieved.
1620 * \param theTopLeftPoint Top left quadrangle corner
1621 * \param theTopRigthPoint Top right quadrangle corner
1622 * \param theBottomLeftPoint Bottom left quadrangle corner
1623 * \param theBottomRigthPoint Bottom right quadrangle corner
1624 * \param theState The state of the subshapes to find.
1625 * \return List of IDs of all found sub-shapes.
1627 ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1628 in long theShapeType,
1629 in GEOM_Object theTopLeftPoint,
1630 in GEOM_Object theTopRigthPoint,
1631 in GEOM_Object theBottomLeftPoint,
1632 in GEOM_Object theBottomRigthPoint,
1633 in shape_state theState);
1636 * \brief Find subshapes complying with given status
1637 * \param theBox - the box to check state of subshapes against
1638 * \param theShape - the shape to explore
1639 * \param theShapeType - type of subshape of theShape
1640 * \param theState - required state
1641 * \return List of IDs of all found sub-shapes.
1643 ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1644 in GEOM_Object theShape,
1645 in long theShapeType,
1646 in shape_state theState);
1649 * \brief Find subshapes complying with given status
1650 * \param theBox - the box to check state of subshapes against
1651 * \param theShape - the shape to explore
1652 * \param theShapeType - type of subshape of theShape
1653 * \param theState - required state
1654 * \return List of all found sub-shapes.
1656 ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1657 in GEOM_Object theShape,
1658 in long theShapeType,
1659 in shape_state theState);
1662 * \brief Find subshapes complying with given status
1663 * \param theCheckShape - the shape to check state of subshapes against
1664 * \param theShape - the shape to explore
1665 * \param theShapeType - type of subshape of theShape
1666 * \param theState - required state
1667 * \return List of IDs of all found sub-shapes.
1669 ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1670 in GEOM_Object theShape,
1671 in short theShapeType,
1672 in shape_state theState);
1675 * \brief Find subshapes complying with given status
1676 * \param theCheckShape - the shape to check state of subshapes against
1677 * \param theShape - the shape to explore
1678 * \param theShapeType - type of subshape of theShape
1679 * \param theState - required state
1680 * \return List of all found sub-shapes.
1682 ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1683 in GEOM_Object theShape,
1684 in short theShapeType,
1685 in shape_state theState);
1688 * \brief Find subshapes complying with given status
1689 * \param theCheckShape - the shape to check state of subshapes against
1690 * \param theShape - the shape to explore
1691 * \param theShapeType - type of subshape of theShape
1692 * \param theState - required state
1693 * \return compound includes all found sub-shapes.
1695 GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1696 in GEOM_Object theShape,
1697 in short theShapeType,
1698 in shape_state theState);
1701 * Get sub-shape(s) of \a theShapeWhere, which are
1702 * coincident with \a theShapeWhat or could be a part of it.
1703 * \param theShapeWhere Shape to find sub-shapes of.
1704 * \param theShapeWhat Shape, specifying what to find.
1705 * \return Group of all found sub-shapes or a single found sub-shape.
1707 GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
1708 in GEOM_Object theShapeWhat);
1711 * Get sub-shape(s) of \a theShapeWhere, which are
1712 * coincident with \a theShapeWhat or could be a part of it.
1714 * Implementation of this method is based on a saved history of an operation,
1715 * produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
1716 * arguments (an argument shape or a sub-shape of an argument shape).
1717 * The operation could be the Partition or one of boolean operations,
1718 * performed on simple shapes (not on compounds).
1720 * \param theShapeWhere Shape to find sub-shapes of.
1721 * \param theShapeWhat Shape, specifying what to find.
1722 * \return Group of all found sub-shapes or a single found sub-shape.
1724 GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
1725 in GEOM_Object theShapeWhat);
1728 * Get sub-shape of theShapeWhere, which are
1729 * coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
1730 * \param theShapeWhere Shape to find sub-shapes of.
1731 * \param theShapeWhat Shape, specifying what to find.
1732 * \return found sub-shape.
1734 GEOM_Object GetSame (in GEOM_Object theShapeWhere,
1735 in GEOM_Object theShapeWhat);
1739 * GEOM_IBlocksOperations: Interface for Blocks construction
1740 * Face from points or edges, Block from faces,
1741 * Blocks multi-translation and multi-rotation
1743 interface GEOM_IBlocksOperations : GEOM_IOperations
1746 * Creation of blocks
1750 * Create a quadrangle face from four edges. Order of Edges is not
1751 * important. It is not necessary that edges share the same vertex.
1752 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
1753 * \return New GEOM_Object, containing the created face.
1755 GEOM_Object MakeQuad (in GEOM_Object theEdge1,
1756 in GEOM_Object theEdge2,
1757 in GEOM_Object theEdge3,
1758 in GEOM_Object theEdge4);
1761 * Create a quadrangle face on two edges.
1762 * The missing edges will be built by creating the shortest ones.
1763 * \param theEdge1,theEdge2 Two opposite edges for the face.
1764 * \return New GEOM_Object, containing the created face.
1766 GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
1767 in GEOM_Object theEdge2);
1770 * Create a quadrangle face with specified corners.
1771 * The missing edges will be built by creating the shortest ones.
1772 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
1773 * \return New GEOM_Object, containing the created face.
1775 GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
1776 in GEOM_Object thePnt2,
1777 in GEOM_Object thePnt3,
1778 in GEOM_Object thePnt4);
1781 * Create a hexahedral solid, bounded by the six given faces. Order of
1782 * faces is not important. It is not necessary that Faces share the same edge.
1783 * \param theFace1-theFace6 Faces for the hexahedral solid.
1784 * \return New GEOM_Object, containing the created solid.
1786 GEOM_Object MakeHexa (in GEOM_Object theFace1,
1787 in GEOM_Object theFace2,
1788 in GEOM_Object theFace3,
1789 in GEOM_Object theFace4,
1790 in GEOM_Object theFace5,
1791 in GEOM_Object theFace6);
1794 * Create a hexahedral solid between two given faces.
1795 * The missing faces will be built by creating the smallest ones.
1796 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
1797 * \return New GEOM_Object, containing the created solid.
1799 GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
1800 in GEOM_Object theFace2);
1803 * Extract elements of blocks and blocks compounds
1807 * Get a vertex, found in the given shape by its coordinates.
1808 * \param theShape Block or a compound of blocks.
1809 * \param theX,theY,theZ Coordinates of the sought vertex.
1810 * \param theEpsilon Maximum allowed distance between the resulting
1811 * vertex and point with the given coordinates.
1812 * \return New GEOM_Object, containing the found vertex.
1814 GEOM_Object GetPoint (in GEOM_Object theShape,
1818 in double theEpsilon);
1821 * Get an edge, found in the given shape by two given vertices.
1822 * \param theShape Block or a compound of blocks.
1823 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
1824 * \return New GEOM_Object, containing the found edge.
1826 GEOM_Object GetEdge (in GEOM_Object theShape,
1827 in GEOM_Object thePoint1,
1828 in GEOM_Object thePoint2);
1831 * Find an edge of the given shape, which has minimal distance to the given point.
1832 * \param theShape Block or a compound of blocks.
1833 * \param thePoint Point, close to the desired edge.
1834 * \return New GEOM_Object, containing the found edge.
1836 GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
1837 in GEOM_Object thePoint);
1840 * Returns a face, found in the given shape by four given corner vertices.
1841 * \param theShape Block or a compound of blocks.
1842 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
1843 * \return New GEOM_Object, containing the found face.
1845 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
1846 in GEOM_Object thePoint1,
1847 in GEOM_Object thePoint2,
1848 in GEOM_Object thePoint3,
1849 in GEOM_Object thePoint4);
1852 * Get a face of block, found in the given shape by two given edges.
1853 * \param theShape Block or a compound of blocks.
1854 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
1855 * \return New GEOM_Object, containing the found face.
1857 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
1858 in GEOM_Object theEdge1,
1859 in GEOM_Object theEdge2);
1862 * Find a face, opposite to the given one in the given block.
1863 * \param theBlock Must be a hexahedral solid.
1864 * \param theFace Face of \a theBlock, opposite to the desired face.
1865 * \return New GEOM_Object, containing the found face.
1867 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
1868 in GEOM_Object theFace);
1871 * Find a face of the given shape, which has minimal distance to the given point.
1872 * \param theShape Block or a compound of blocks.
1873 * \param thePoint Point, close to the desired face.
1874 * \return New GEOM_Object, containing the found face.
1876 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
1877 in GEOM_Object thePoint);
1880 * Find a face of block, whose outside normale has minimal angle with the given vector.
1881 * \param theShape Block or a compound of blocks.
1882 * \param theVector Vector, close to the normale of the desired face.
1883 * \return New GEOM_Object, containing the found face.
1885 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
1886 in GEOM_Object theVector);
1889 * Extract blocks from blocks compounds
1893 * Check, if the compound contains only specified blocks.
1894 * \param theCompound The compound to check.
1895 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1896 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1897 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1898 * \return TRUE, if the given compound contains only blocks.
1899 * \return theNbBlocks Number of specified blocks in theCompound.
1901 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1902 in long theMinNbFaces,
1903 in long theMaxNbFaces,
1904 out long theNbBlocks);
1907 * Enumeration of Blocks Compound defects.
1911 /* Each element of the compound should be a Block */
1914 /* An element is a potential block, but has degenerated and/or seam edge(s). */
1917 /* A connection between two Blocks should be an entire face or an entire edge */
1920 /* The compound should be connexe */
1923 /* The glue between two quadrangle faces should be applied */
1928 * Description of Blocks Compound defect: type and incriminated sub-shapes.
1933 ListOfLong incriminated;
1937 * Sequence of all Blocks Compound defects.
1939 typedef sequence<BCError> BCErrors;
1942 * Check, if the compound of blocks is given.
1943 * To be considered as a compound of blocks, the
1944 * given shape must satisfy the following conditions:
1945 * - Each element of the compound should be a Block (6 faces and 12 edges).
1946 * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1947 * - The compound should be connexe.
1948 * - The glue between two quadrangle faces should be applied.
1949 * \note Single block is also accepted as a valid compound of blocks.
1950 * \param theCompound The compound to check.
1951 * \return TRUE, if the given shape is a compound of blocks.
1952 * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1954 boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1955 out BCErrors theErrors);
1958 * Convert sequence of Blocks Compound errors, returned by
1959 * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1960 * \param theCompound The bad compound.
1961 * \param theErrors The sequence of \a theCompound errors.
1962 * \return String, describing all the errors in form, suitable for printing.
1964 string PrintBCErrors (in GEOM_Object theCompound,
1965 in BCErrors theErrors);
1968 * Remove all seam and degenerated edges from \a theShape.
1969 * Unite faces and edges, sharing one surface.
1970 * \param theShape The compound or single solid to remove irregular edges from.
1971 * \param theOptimumNbFaces If more than zero, unite faces only for those solids,
1972 * that have more than theOptimumNbFaces faces. If zero, unite faces always,
1973 * regardsless their quantity in the solid. If negative, do not unite faces at all.
1974 * For blocks repairing recommended value is 6.
1975 * \return Improved shape.
1977 GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
1978 in long theOptimumNbFaces);
1981 * Check, if the given shape is a blocks compound.
1982 * Fix all detected errors.
1983 * \note Single block can be also fixed by this method.
1984 * \param theCompound The compound to check and improve.
1985 * \return Improved compound.
1987 GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
1990 * Get all the blocks, contained in the given compound.
1991 * \param theCompound The compound to explode.
1992 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1993 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1994 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1995 * \return List of GEOM_Objects, containing the retrieved blocks.
1997 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1998 in long theMinNbFaces,
1999 in long theMaxNbFaces);
2002 * Find block, containing the given point inside its volume or on boundary.
2003 * \param theCompound Compound, to find block in.
2004 * \param thePoint Point, close to the desired block. If the point lays on
2005 * boundary between some blocks, we return block with nearest center.
2006 * \return New GEOM_Object, containing the found block.
2008 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2009 in GEOM_Object thePoint);
2012 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2013 * \param theCompound Compound, to find block in.
2014 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2015 * \return New GEOM_Object, containing the found block.
2017 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2018 in ListOfGO theParts);
2021 * Return all blocks, containing all the elements, passed as the parts.
2022 * \param theCompound Compound, to find blocks in.
2023 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2024 * \return List of GEOM_Objects, containing the found blocks.
2026 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2027 in ListOfGO theParts);
2030 * Operations on blocks with gluing of result
2034 * Multi-transformate block and glue the result.
2035 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2036 * \param theBlock Hexahedral solid to be multi-transformed.
2037 * \param theDirFace1 First direction face global index.
2038 * \param theDirFace2 Second direction face global index.
2039 * \param theNbTimes Quantity of transformations to be done.
2040 * \note Global index of sub-shape can be obtained, using method
2041 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2042 * \return New GEOM_Object, containing the result shape.
2044 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2045 in long theDirFace1,
2046 in long theDirFace2,
2047 in long theNbTimes);
2050 * Multi-transformate block and glue the result.
2051 * \param theBlock Hexahedral solid to be multi-transformed.
2052 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2053 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2054 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2055 * \return New GEOM_Object, containing the result shape.
2057 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2058 in long theDirFace1U,
2059 in long theDirFace2U,
2060 in long theNbTimesU,
2061 in long theDirFace1V,
2062 in long theDirFace2V,
2063 in long theNbTimesV);
2066 * Special operation - propagation
2070 * Build all possible propagation groups.
2071 * Propagation group is a set of all edges, opposite to one (main)
2072 * edge of this group directly or through other opposite edges.
2073 * Notion of Opposite Edge make sence only on quadrangle face.
2074 * \param theShape Shape to build propagation groups on.
2075 * \return List of GEOM_Objects, each of them is a propagation group.
2077 ListOfGO Propagate (in GEOM_Object theShape);
2081 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
2083 interface GEOM_IBooleanOperations : GEOM_IOperations
2086 * Perform one of boolean operations on two given shapes.
2087 * \param theShape1 First argument for boolean operation.
2088 * \param theShape2 Second argument for boolean operation.
2089 * \param theOperation Indicates the operation to be done:
2090 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2091 * \return New GEOM_Object, containing the result shape.
2093 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2094 in GEOM_Object theShape2,
2095 in long theOperation);
2098 * Perform partition operation.
2099 * \param theShapes Shapes to be intersected.
2100 * \param theTools Shapes to intersect theShapes.
2101 * \note Each compound from ListShapes and ListTools will be exploded in order
2102 * to avoid possible intersection between shapes from this compound.
2103 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2104 # \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
2105 # type <= Limit are kept in the result,
2106 # else - shapes with type > Limit are kept
2107 # also (if they exist)
2109 * After implementation new version of PartitionAlgo (October 2006)
2110 * other parameters are ignored by current functionality. They are kept
2111 * in this function only for supporting old versions.
2112 * Ignored parameters:
2113 * \param theKeepInside Shapes, outside which the results will be deleted.
2114 * Each shape from theKeepInside must belong to theShapes also.
2115 * \param theRemoveInside Shapes, inside which the results will be deleted.
2116 * Each shape from theRemoveInside must belong to theShapes also.
2117 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2118 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2120 * \return New GEOM_Object, containing the result shapes.
2122 GEOM_Object MakePartition (in ListOfGO theShapes,
2123 in ListOfGO theTools,
2124 in ListOfGO theKeepInside,
2125 in ListOfGO theRemoveInside,
2127 in boolean theRemoveWebs,
2128 in ListOfLong theMaterials,
2129 in short theKeepNonlimitShapes);
2132 * Perform partition operation.
2133 * This method may be usefull if it is needed to make a partition for
2134 * a compound containing nonintersected shapes. Performance will be better
2135 * since intersection between shapes from compound is not performed.
2137 * Description of all parameters as in previous method MakePartition()
2139 * \note Passed compounds (via ListShapes or via ListTools)
2140 * have to consist of nonintersecting shapes.
2142 * \return New GEOM_Object, containing the result shapes.
2144 GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO theShapes,
2145 in ListOfGO theTools,
2146 in ListOfGO theKeepInside,
2147 in ListOfGO theRemoveInside,
2149 in boolean theRemoveWebs,
2150 in ListOfLong theMaterials,
2151 in short theKeepNonlimitShapes);
2154 * Perform partition of the Shape with the Plane
2155 * \param theShape Shape to be intersected.
2156 * \param thePlane Tool shape, to intersect theShape.
2157 * \return New GEOM_Object, containing the result shape.
2159 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2160 in GEOM_Object thePlane);
2164 * GEOM_ICurvesOperations: Interface for curves creation.
2165 * Polyline, Circle, Spline (Bezier and Interpolation)
2167 interface GEOM_ICurvesOperations : GEOM_IOperations
2170 * Create a circle with given center, normal vector and radius.
2171 * \param thePnt Circle center.
2172 * \param theVec Vector, normal to the plane of the circle.
2173 * \param theR Circle radius.
2174 * \return New GEOM_Object, containing the created circle.
2176 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2177 in GEOM_Object theVec,
2180 * Create a circle, passing through three given points
2181 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2182 * \return New GEOM_Object, containing the created circle.
2184 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2185 in GEOM_Object thePnt2,
2186 in GEOM_Object thePnt3);
2188 * Create a circle with given center, with a radius equals the distance from center to Point1
2189 * and on a plane defined by all of three points.
2190 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2191 * \return New GEOM_Object, containing the created circle.
2193 GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2194 in GEOM_Object thePnt2,
2195 in GEOM_Object thePnt3);
2197 * Create an ellipse with given center, normal vector and radiuses.
2198 * \param thePnt Ellipse center.
2199 * \param theVec Vector, normal to the plane of the ellipse.
2200 * \param theRMajor Major ellipse radius.
2201 * \param theRMinor Minor ellipse radius.
2202 * \return New GEOM_Object, containing the created ellipse.
2204 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2205 in GEOM_Object theVec,
2206 in double theRMajor,
2207 in double theRMinor);
2210 * Create an ellipse with given center, normal vector, main axis vector and radiuses.
2211 * \param thePnt Ellipse center.
2212 * \param theVec Vector, normal to the plane of the ellipse.
2213 * \param theRMajor Major ellipse radius.
2214 * \param theRMinor Minor ellipse radius.
2215 * \param theVecMaj Vector, direction of the ellipse's main axis.
2216 * \return New GEOM_Object, containing the created ellipse.
2218 GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2219 in GEOM_Object theVec,
2220 in double theRMajor,
2221 in double theRMinor,
2222 in GEOM_Object theVecMaj);
2225 * Create an arc of circle, passing through three given points.
2226 * \param thePnt1 Start point of the arc.
2227 * \param thePnt2 Middle point of the arc.
2228 * \param thePnt3 End point of the arc.
2229 * \return New GEOM_Object, containing the created arc.
2231 GEOM_Object MakeArc (in GEOM_Object thePnt1,
2232 in GEOM_Object thePnt2,
2233 in GEOM_Object thePnt3);
2236 * Create an arc of circle of center C from one point to another
2237 * \param theCenter Center point of the arc.
2238 * \param thePnt1 Start point of the arc.
2239 * \param thePnt2 End point of the arc.
2240 * \param theSense Orientation of the arc
2241 * \return New GEOM_Object, containing the created arc.
2243 GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2244 in GEOM_Object thePnt1,
2245 in GEOM_Object thePnt2,
2246 in boolean theSense);
2249 * Create an arc of ellipse of center C and two points P1 P2.
2250 * \param theCenter Center point of the arc.
2251 * \param thePnt1 Major radius is distance from center to Pnt1.
2252 * \param thePnt2 define a plane and Minor radius as a shortest distance from Pnt2 to vector Center->Pnt1.
2253 * \return New GEOM_Object, containing the created arc.
2255 GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2256 in GEOM_Object thePnt1,
2257 in GEOM_Object thePnt2);
2261 * Create a polyline on the set of points.
2262 * \param thePoints Sequence of points for the polyline.
2263 * \return New GEOM_Object, containing the created polyline.
2265 GEOM_Object MakePolyline (in ListOfGO thePoints);
2268 * Create bezier curve on the set of points.
2269 * \param thePoints Sequence of points for the bezier curve.
2270 * \return New GEOM_Object, containing the created bezier curve.
2272 GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
2275 * Create B-Spline curve on the set of points.
2276 * \param thePoints Sequence of points for the B-Spline curve.
2277 * \param theIsClosed If TRUE, build a closed curve.
2278 * \return New GEOM_Object, containing the created B-Spline curve.
2280 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
2281 in boolean theIsClosed);
2284 * Create a sketcher (wire or face), following the textual description,
2285 * passed through \a theCommand argument. \n
2286 * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2287 * Format of the description string have to be the following:
2289 * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2292 * - x1, y1 are coordinates of the first sketcher point (zero by default),
2294 * - "R angle" : Set the direction by angle
2295 * - "D dx dy" : Set the direction by DX & DY
2298 * - "TT x y" : Create segment by point at X & Y
2299 * - "T dx dy" : Create segment by point with DX & DY
2300 * - "L length" : Create segment by direction & Length
2301 * - "IX x" : Create segment by direction & Intersect. X
2302 * - "IY y" : Create segment by direction & Intersect. Y
2305 * - "C radius length" : Create arc by direction, radius and length(in degree)
2308 * - "WW" : Close Wire (to finish)
2309 * - "WF" : Close Wire and build face (to finish)
2311 * \param theCommand String, defining the sketcher in local
2312 * coordinates of the working plane.
2313 * \param theWorkingPlane Nine double values, defining origin,
2314 * OZ and OX directions of the working plane.
2315 * \return New GEOM_Object, containing the created wire.
2317 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2320 * Create a 3D sketcher, following the numerical description,
2321 * passed through points created by \a theCoordinates argument. \n
2322 * Format of the description string have to be the following:
2324 * "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]"
2327 GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2330 * Create a sketcher (wire or face), following the textual description,
2331 * passed through \a theCommand argument. \n
2332 * For format of the description string see the previous method.\n
2333 * \param theCommand String, defining the sketcher in local
2334 * coordinates of the working plane.
2335 * \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2336 * \return New GEOM_Object, containing the created wire.
2338 GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2342 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2344 interface GEOM_ILocalOperations : GEOM_IOperations
2347 * Perform a fillet on all edges of the given shape.
2348 * \param theShape Shape, to perform fillet on.
2349 * \param theR Fillet radius.
2350 * \return New GEOM_Object, containing the result shape.
2352 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2356 * Perform a fillet on the specified edges of the given shape
2357 * \param theShape Shape, to perform fillet on.
2358 * \param theR Fillet radius.
2359 * \param theEdges Global indices of edges to perform fillet on.
2360 * \note Global index of sub-shape can be obtained, using method
2361 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2362 * \return New GEOM_Object, containing the result shape.
2364 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2366 in ListOfLong theEdges);
2367 GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2370 in ListOfLong theEdges);
2373 * Perform a fillet on all edges of the specified faces of the given shape.
2374 * \param theShape Shape, to perform fillet on.
2375 * \param theR Fillet radius.
2376 * \param theFaces Global indices of faces to perform fillet on.
2377 * \note Global index of sub-shape can be obtained, using method
2378 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2379 * \return New GEOM_Object, containing the result shape.
2381 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2383 in ListOfLong theFaces);
2385 GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2388 in ListOfLong theFaces);
2391 * Perform a fillet on face of the specified vertexes of the given shape.
2392 * \param theShape Shape, to perform fillet on.
2393 * \param theR Fillet radius.
2394 * \param theVertexes Global indices of vertexes to perform fillet on.
2395 * \note Global index of sub-shape can be obtained, using method
2396 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2397 * \return New GEOM_Object, containing the result shape.
2399 GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2401 in ListOfLong theVertexes);
2404 * Perform a fillet on edges of the specified vertexes of the given wire.
2405 * \param theShape Shape, to perform fillet on.
2406 * \param theR Fillet radius.
2407 * \param theVertexes Global indices of vertexes to perform fillet on.
2408 * \note Global index of sub-shape can be obtained, using method
2409 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2410 * \note The list of vertices coudl be empty, in this case fillet fill be done
2411 * at all vertices in given wire
2412 * \return New GEOM_Object, containing the result shape.
2414 GEOM_Object MakeFillet1D (in GEOM_Object theShape,
2416 in ListOfLong theVertexes);
2419 * Perform a symmetric chamfer on all edges of the given shape.
2420 * \param theShape Shape, to perform chamfer on.
2421 * \param theD Chamfer size along each face.
2422 * \return New GEOM_Object, containing the result shape.
2424 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2428 * Perform a chamfer on edges, common to the specified faces.
2429 * with distance D1 on the Face1
2430 * \param theShape Shape, to perform chamfer on.
2431 * \param theD1 Chamfer size along \a theFace1.
2432 * \param theD2 Chamfer size along \a theFace2.
2433 * \param theFace1,theFace2 Global indices of two faces of \a theShape.
2434 * \note Global index of sub-shape can be obtained, using method
2435 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2436 * \return New GEOM_Object, containing the result shape.
2438 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2439 in double theD1, in double theD2,
2440 in long theFace1, in long theFace2);
2442 * The Same but with params theD = Chamfer Lenght
2443 * and theAngle = Chamfer Angle (Angle in radians)
2445 GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2446 in double theD, in double theAngle,
2447 in long theFace1, in long theFace2);
2450 * Perform a chamfer on all edges of the specified faces.
2451 * with distance D1 on the first specified face (if several for one edge)
2452 * \param theShape Shape, to perform chamfer on.
2453 * \param theD1 Chamfer size along face from \a theFaces. If both faces,
2454 * connected to the edge, are in \a theFaces, \a theD1
2455 * will be get along face, which is nearer to \a theFaces beginning.
2456 * \param theD2 Chamfer size along another of two faces, connected to the edge.
2457 * \param theFaces Sequence of global indices of faces of \a theShape.
2458 * \note Global index of sub-shape can be obtained, using method
2459 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2460 * \return New GEOM_Object, containing the result shape.
2462 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2463 in double theD1, in double theD2,
2464 in ListOfLong theFaces);
2466 * The Same but with params theD = Chamfer Lenght
2467 * and theAngle = Chamfer Angle (Angle in radians)
2469 GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2470 in double theD, in double theAngle,
2471 in ListOfLong theFaces);
2474 * Perform a chamfer on edges,
2475 * with distance D1 on the first specified face (if several for one edge)
2476 * \param theShape Shape, to perform chamfer on.
2477 * \param theD1 theD2 Chamfer size
2478 * \param theEdges Sequence of edges of \a theShape.
2479 * \return New GEOM_Object, containing the result shape.
2481 GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2482 in double theD1, in double theD2,
2483 in ListOfLong theEdges);
2485 * The Same but with params theD = Chamfer Lenght
2486 * and theAngle = Chamfer Angle (Angle in radians)
2488 GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2489 in double theD, in double theAngle,
2490 in ListOfLong theEdges);
2493 * Perform an Archimde operation on the given shape with given parameters.
2494 * The object presenting the resulting face is returned
2495 * \param theShape Shape to be put in water.
2496 * \param theWeight Weight og the shape.
2497 * \param theWaterDensity Density of the water.
2498 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
2499 * \return New GEOM_Object, containing a section of \a theShape
2500 * by a plane, corresponding to water level.
2502 GEOM_Object MakeArchimede (in GEOM_Object theShape,
2503 in double theWeight,
2504 in double theWaterDensity,
2505 in double theMeshDeflection);
2508 * Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2509 * Present here only for compatibility.
2511 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2515 * GEOM_IHealingOperations: Interface for shape healing operations.
2516 * Shape Processing, SuppressFaces, etc.
2518 interface GEOM_IHealingOperations : GEOM_IOperations
2521 * Apply a sequence of Shape Healing operators to the given object.
2522 * \param theShapes Shape to be processed.
2523 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2524 * \param theParameters List of names of parameters
2525 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2526 * \param theValues List of values of parameters, in the same order
2527 * as parameters are listed in \a theParameters list.
2528 * \return New GEOM_Object, containing processed shape.
2530 GEOM_Object ProcessShape (in GEOM_Object theShapes,
2531 in string_array theOperators,
2532 in string_array theParameters,
2533 in string_array theValues);
2536 * Get default sequence of operators, their parameters and parameters' values
2537 * of Shape Process operation. In the current implementation the defaults are
2538 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2539 * \param theOperators Output. Default list of names of operators.
2540 * \param theParameters Output. Default list of names of parameters.
2541 * \param theValues Output. List of default values of parameters, in the same order
2542 * as parameters are listed in \a theParameters list.
2544 void GetShapeProcessParameters (out string_array theOperators,
2545 out string_array theParameters,
2546 out string_array theValues);
2548 * Get parameters and parameters' values for the given Shape Process operation.
2549 * In the current implementation the defaults are
2550 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2551 * \param theOperator Input. The operator's name.
2552 * \param theParameters Output. Default list of names of parameters.
2553 * \param theValues Output. List of default values of parameters, in the same order
2554 * as parameters are listed in \a theParameters list.
2556 void GetOperatorParameters (in string theOperator,
2557 out string_array theParameters,
2558 out string_array theValues);
2561 * Remove faces from the given object (shape).
2562 * \param theObject Shape to be processed.
2563 * \param theFaces Indices of faces to be removed, if EMPTY then the method
2564 * removes ALL faces of the given object.
2565 * \return New GEOM_Object, containing processed shape.
2567 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2570 * Close an open wire.
2571 * \param theObject Shape to be processed.
2572 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2573 * if -1, then theObject itself is a wire.
2574 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
2575 * If FALS : closure by creation of an edge between ends.
2576 * \return New GEOM_Object, containing processed shape.
2578 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2579 in boolean isCommonVertex);
2582 * Remove internal wires and edges from the given object (face).
2583 * \param theObject Shape to be processed.
2584 * \param theWires Indices of wires to be removed, if EMPTY then the method
2585 * removes ALL internal wires of the given object.
2586 * \return New GEOM_Object, containing processed shape.
2588 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2591 * Remove internal closed contours (holes) from the given object.
2592 * \param theObject Shape to be processed.
2593 * \param theWires Indices of wires to be removed, if EMPTY then the method
2594 * removes ALL internal holes of the given object
2595 * \return New GEOM_Object, containing processed shape.
2597 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2600 * Sewing of the given object.
2601 * \param theObject Shape to be processed.
2602 * \param theTolerance Required tolerance value.
2603 * \return New GEOM_Object, containing processed shape.
2605 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2608 * Addition of a point to a given edge object.
2609 * \param theObject Shape to be processed.
2610 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
2611 * if -1, then theObject itself is the edge.
2612 * \param theValue Value of parameter on edge or length parameter,
2613 * depending on \a isByParameter.
2614 * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2615 * if FALSE : \a theValue is treated as a length parameter [0..1]
2616 * \return New GEOM_Object, containing processed shape.
2618 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2619 in double theValue, in boolean isByParameter);
2622 * Get a list of wires (wrapped in GEOM_Object-s),
2623 * that constitute a free boundary of the given shape.
2624 * \param theObject Shape to get free boundary of.
2625 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
2626 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
2627 * \return FALSE, if an error(s) occured during the method execution.
2629 boolean GetFreeBoundary (in GEOM_Object theObject,
2630 out ListOfGO theClosedWires,
2631 out ListOfGO theOpenWires);
2634 * Change orientation of the given object.
2635 * \param theObject Shape to be processed.
2636 * \return New GEOM_Object, containing processed shape.
2638 GEOM_Object ChangeOrientation (in GEOM_Object theObject);
2639 GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
2644 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
2647 interface GEOM_IInsertOperations : GEOM_IOperations
2650 * Create a copy of the given object
2652 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
2655 * Export the given shape into a file with given name.
2656 * \param theObject Shape to be stored in the file.
2657 * \param theFileName Name of the file to store the given shape in.
2658 * \param theFormatName Specify format for the shape storage.
2659 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2661 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
2664 * Import a shape from the BRep or IGES or STEP file
2665 * (depends on given format) with given name.
2666 * \param theFileName The file, containing the shape.
2667 * \param theFormatName Specify format for the file reading.
2668 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2669 * If format 'IGES_SCALE' is used instead 'IGES' length unit will be
2670 * set to 'meter' and result model will be scaled.
2671 * \return New GEOM_Object, containing the imported shape.
2673 GEOM_Object Import (in string theFileName, in string theFormatName);
2676 * Get the supported import formats and corresponding patterns for File dialog.
2677 * \param theFormats Output. List of formats, available for import.
2678 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2679 * \return Returns available formats and patterns through the arguments.
2681 void ImportTranslators (out string_array theFormats,
2682 out string_array thePatterns);
2685 * Get the supported export formats and corresponding patterns for File dialog.
2686 * \param theFormats Output. List of formats, available for export.
2687 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2688 * \return Returns available formats and patterns through the arguments.
2690 void ExportTranslators (out string_array theFormats,
2691 out string_array thePatterns);
2694 * Load texture from file
2695 * \param theTextureFile texture file name
2696 * \return unique texture identifier
2698 long LoadTexture(in string theTextureFile);
2701 * Add texture to the study
2702 * \param theWidth texture width in pixels
2703 * \param theHeight texture height in pixels
2704 * \param theTexture texture byte array
2705 * \return unique texture identifier
2707 long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
2710 * Get previously loaded texture data
2711 * \param theID texture identifier
2712 * \param theWidth texture width in pixels
2713 * \param theHeight texture height in pixels
2714 * \return texture byte array
2716 SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
2719 * Get list of all avaiable texture IDs
2720 * \return list of all texture IDs avaiable for the current study
2722 ListOfLong GetAllTextures();
2726 * GEOM_IKindOfShape: namespace for shape_kind enumeration.
2728 interface GEOM_IKindOfShape
2738 SPHERE, // full sphere
2739 CYLINDER, // cylinder
2740 BOX, // box with faces, parallel to global coordinate planes
2741 ROTATED_BOX, // other box
2742 TORUS, // full torus
2744 POLYHEDRON, // solid, bounded by polygons
2745 SOLID, // other solid
2747 SPHERE2D, // spherical face (closed)
2748 CYLINDER2D, // cylindrical face with defined height
2749 TORUS2D, // toroidal face (closed)
2750 CONE2D, // conical face with defined height
2751 DISK_CIRCLE, // planar, bounded by circle
2752 DISK_ELLIPSE, // planar, bounded by ellipse
2753 POLYGON, // planar, bounded by segments
2754 PLANE, // infinite planar
2755 PLANAR, // other planar
2758 CIRCLE, // full circle
2759 ARC_CIRCLE, // arc of circle
2760 ELLIPSE, // full ellipse
2761 ARC_ELLIPSE, // arc of ellipse
2762 LINE, // infinite segment
2772 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
2773 * properties calculation (like Centre of Mass, Inertia, etc.).
2776 interface GEOM_IMeasureOperations : GEOM_IOperations
2779 * Get kind of theShape.
2780 * \param theShape Shape to get a kind of.
2781 * \param theIntegers Output. Integer and enumerated shape's parameters
2782 * (kind of surface, closed/unclosed, number of edges, etc.)
2783 * \param theDoubles Output. Double shape's parameters (coordinates, dimensions, etc.)
2784 * \note Concrete meaning of each value, returned via \a theIntegers
2785 * or \a theDoubles list depends on the kind of the shape.
2786 * \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
2788 //short KindOfShape (in GEOM_Object theShape,
2789 GEOM_IKindOfShape::shape_kind KindOfShape (in GEOM_Object theShape,
2790 out ListOfLong theIntegers,
2791 out ListOfDouble theDoubles);
2794 * Get position (LCS) of theShape.
2795 * \param theShape Shape to calculate position of.
2796 * \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
2797 * Origin of the LCS is situated at the shape's center of mass.
2798 * \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
2799 * \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
2800 * Axes of the LCS are obtained from shape's location or,
2801 * if the shape is a planar face, from position of its plane.
2802 * \return Returns position of the shape through the last nine arguments.
2804 void GetPosition (in GEOM_Object theShape,
2805 out double Ox, out double Oy, out double Oz,
2806 out double Zx, out double Zy, out double Zz,
2807 out double Xx, out double Xy, out double Xz);
2810 * Get summarized length of all wires,
2811 * area of surface and volume of the given shape.
2812 * \param theShape Shape to define properties of.
2813 * \param theLength Output. Summarized length of all wires of the given shape.
2814 * \param theSurfArea Output. Area of surface of the given shape.
2815 * \param theVolume Output. Volume of the given shape.
2816 * \return Returns shape properties through the last three arguments.
2818 void GetBasicProperties (in GEOM_Object theShape,
2819 out double theLength,
2820 out double theSurfArea,
2821 out double theVolume);
2824 * Get a point, situated at the centre of mass of theShape.
2825 * \param theShape Shape to define centre of mass of.
2826 * \return New GEOM_Object, containing the created point.
2828 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
2831 * Get a vector, representing the normal of theFace.
2832 * If the face is not planar, theOptionalPoint is obligatory.
2833 * \param theFace Shape (face) to define the normal of.
2834 * \param theOptionalPoint Shape (point) to define the normal at.
2835 * Can be NULL in case of planar face.
2836 * \return New GEOM_Object, containing the created normal vector.
2838 GEOM_Object GetNormal (in GEOM_Object theFace,
2839 in GEOM_Object theOptionalPoint);
2842 * Get inertia matrix and moments of inertia of theShape.
2843 * \param theShape Shape to calculate inertia of.
2844 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
2845 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
2846 * \return Returns inertia through the last twelve arguments.
2848 void GetInertia (in GEOM_Object theShape,
2849 out double I11, out double I12, out double I13,
2850 out double I21, out double I22, out double I23,
2851 out double I31, out double I32, out double I33,
2852 out double Ix , out double Iy , out double Iz);
2855 * Get parameters of bounding box of the given shape
2856 * \param theShape Shape to obtain bounding box of.
2857 * \param Xmin,Xmax Output. Limits of shape along OX axis.
2858 * \param Ymin,Ymax Output. Limits of shape along OY axis.
2859 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
2860 * \return Returns parameters of bounding box through the last six arguments.
2862 void GetBoundingBox (in GEOM_Object theShape,
2863 out double Xmin, out double Xmax,
2864 out double Ymin, out double Ymax,
2865 out double Zmin, out double Zmax);
2868 * Get min and max tolerances of sub-shapes of theShape
2869 * \param theShape Shape, to get tolerances of.
2870 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
2871 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
2872 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
2873 * \return Returns shape tolerances through the last six arguments.
2875 void GetTolerance (in GEOM_Object theShape,
2876 out double FaceMin, out double FaceMax,
2877 out double EdgeMin, out double EdgeMax,
2878 out double VertMin, out double VertMax);
2881 * Check a topology of the given shape.
2882 * \param theShape Shape to check validity of.
2883 * \param theDescription Output. Description of problems in the shape, if they are.
2884 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
2886 boolean CheckShape (in GEOM_Object theShape,
2887 out string theDescription);
2890 * Check a topology and a geometry of the given shape.
2891 * \param theShape Shape to check validity of.
2892 * \param theDescription Output. Description of problems in the shape, if they are.
2893 * \return TRUE, if the shape "seems to be valid".
2895 boolean CheckShapeWithGeometry (in GEOM_Object theShape,
2896 out string theDescription);
2899 * Obtain description of the given shape
2900 * \param theShape Shape to be described.
2901 * \return Description of the given shape.
2903 string WhatIs (in GEOM_Object theShape);
2906 * Get minimal distance between the given shapes.
2907 * \param theShape1,theShape2 Shapes to find minimal distance between.
2908 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
2909 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
2910 * \return Value of the minimal distance between the given shapes.
2912 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
2913 out double X1, out double Y1, out double Z1,
2914 out double X2, out double Y2, out double Z2);
2917 * Get angle between the given lines or linear edges.
2918 * \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
2919 * \return Value of the angle between the given shapes.
2921 double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
2924 * Get point coordinates
2926 void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
2929 * Get radius of curvature of curve in the point determinated by param
2930 * \param theShape - curve.
2931 * \param theParam - parameter on curve
2932 * \return Value of curvature.
2934 double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
2937 * Get radius of curvature of curve in the given point
2938 * \param theShape - curve.
2939 * \param thePoint - point
2940 * \return Value of curvature.
2942 double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2945 * Get max radius of curvature of surface in the point determinated by params
2946 * \param theShape - surface.
2947 * \param theUParam - U-parameter on surface
2948 * \param theVParam - V-parameter on surface
2949 * \return Value of curvature.
2951 double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2952 in double theVParam);
2955 * Get max radius of curvature of surface in the given point
2956 * \param theShape - surface.
2957 * \param thePoint - point
2958 * \return Value of curvature.
2960 double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2963 * Get min radius of curvature of surface in the point determinated by params
2964 * \param theShape - surface.
2965 * \param theUParam - U-parameter on surface
2966 * \param theVParam - V-parameter on surface
2967 * \return Value of curvature.
2969 double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2970 in double theVParam);
2973 * Get min radius of curvature of surface in the given point
2974 * \param theShape - surface.
2975 * \param thePoint - point
2976 * \return Value of curvature.
2978 double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2984 * GEOM_IGroupOperations: Interface for groups creation.
2986 interface GEOM_IGroupOperations : GEOM_IOperations
2989 * Creates a new group which will store sub shapes of theMainShape
2990 * \param theMainShape is a GEOM object on which the group is selected
2991 * \param theShapeType defines a shape type of the group
2992 * \return a newly created GEOM group
2994 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
2997 * Adds a sub object with ID theSubShapeId to the group
2998 * \param theGroup is a GEOM group to which the new sub shape is added
2999 * \param theSubShapeId is a sub shape ID in the main object.
3000 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
3002 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
3005 * Removes a sub object with ID \a theSubShapeId from the group
3006 * \param theGroup is a GEOM group from which the sub shape is removed.
3007 * \param theSubShapeId is a sub shape ID in the main object.
3008 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
3010 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
3013 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3014 * \param theGroup is a GEOM group to which the new sub shapes are added.
3015 * \param theSubShapes is a list of sub shapes to be added.
3017 void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3020 * Removes from the group all the given shapes. No errors, if some shapes are not included.
3021 * \param theGroup is a GEOM group from which the sub-shapes are removed.
3022 * \param theSubShapes is a list of sub-shapes to be removed.
3024 void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3027 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3028 * \param theGroup is a GEOM group to which the new sub shapes are added.
3029 * \param theSubShapes is a list of IDs of sub shapes to be added.
3031 void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3034 * Removes from the group all the given shapes. No errors, if some shapes are not included.
3035 * \param theGroup is a GEOM group from which the sub-shapes are removed.
3036 * \param theSubShapes is a list of IDs of sub-shapes to be removed.
3038 void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3041 * Returns a type of sub objects stored in the group
3042 * \param theGroup is a GEOM group which type is returned.
3044 long GetType (in GEOM_Object theGroup);
3047 * Returns a main shape associated with the group
3048 * \param theGroup is a GEOM group for which a main shape object is requested
3049 * \return a GEOM object which is a main shape for theGroup
3051 GEOM_Object GetMainShape (in GEOM_Object theGroup);
3054 * Returns a list of sub objects ID stored in the group
3055 * \param theGroup is a GEOM group for which a list of IDs is requested
3057 ListOfLong GetObjects (in GEOM_Object theGroup);
3062 * GEOM_Gen: Interface to access other GEOM interfaces.
3063 * Also contains some methods to access and manage GEOM objects.
3065 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
3068 * Undo/Redo Management
3071 void Undo (in long theStudyID);
3073 void Redo (in long theStudyID);
3076 * Publishing management
3077 * Adds in theStudy a object theObject under with a name theName,
3078 * if theFather is not NULL the object is placed under thFather's SObject.
3079 * Returns a SObject where theObject is placed
3081 SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
3082 in GEOM_Object theObject,
3084 in GEOM_Object theFather);
3087 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3088 * To be used from python scripts out of geompy.addToStudy (non-default usage)
3089 * \param theStudy the study, in which theObject is published already,
3090 * and in which the arguments will be published
3091 * \param theObject published GEOM object, arguments of which will be published
3092 * \param theArgs list of GEOM_Object, operation arguments to be published.
3093 * If this list is empty, all operation arguments will be published
3094 * \param theFindMethod method to search subshapes, corresponding to arguments and
3095 * their subshapes. Value from enumeration GEOM::find_shape_method.
3096 * \param theInheritFirstArg set properties of the first argument for \a theObject.
3097 * Do not publish subshapes in place of arguments, but only
3098 * in place of subshapes of the first argument,
3099 * because the whole shape corresponds to the first argument.
3100 * Mainly to be used after transformations, but it also can be
3101 * usefull after partition with one object shape, and some other
3102 * operations, where only the first argument has to be considered.
3103 * If theObject has only one argument shape, this flag is automatically
3104 * considered as True, not regarding really passed value.
3105 * \return list of published sub-shapes
3107 ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
3108 in GEOM_Object theObject,
3109 in ListOfGO theArgs,
3110 in find_shape_method theFindMethod,
3111 in boolean theInheritFirstArg);
3114 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3115 * To be used from GUI and from geompy.addToStudy.
3116 * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3117 * \param theSObject study object, referencing GEOM object, arguments of which will be published
3119 ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
3120 in SALOMEDS::SObject theSObject,
3121 in ListOfGO theArgs,
3122 in find_shape_method theFindMethod,
3123 in boolean theInheritFirstArg);
3126 * Methods to access interfaces for objects creation and transformation
3128 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3129 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
3130 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3131 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3132 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3133 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3134 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3135 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3136 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3137 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3138 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3139 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3142 * Objects Management
3146 * Removes the object from the GEOM component
3147 * \param theObject is a GEOM object to be removed
3149 void RemoveObject (in GEOM_Object theObject);
3152 * Returns an object defined by the study and its entry in the GEOM component
3153 * \param theStudyID is a SALOMEDS Study ID
3154 * \param theEntry is an entry of the requested GEOM object in the GEOM component
3155 * \note if the object has not previously been created a NULL GEOM object is returned
3157 GEOM_Object GetObject (in long theStudyID, in string theEntry);
3160 * Add a sub shape defined by indices in \a theIndices
3161 * (contains unique IDs of sub shapes inside theMainShape)
3162 * \note The sub shape GEOM_Objects can has ONLY ONE function.
3163 * Don't try to apply modification operations on them.
3164 * \note Internal method
3166 GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
3169 * GEOM object's IOR Management
3173 * Returns a GEOM Object defined by its IOR
3174 * \param theIOR a string containg an IOR of the requested GEOM object
3176 GEOM_Object GetIORFromString (in string theIOR);
3179 * Returns a string which contains an IOR of the GEOM object
3180 * \param theObject is a GEOM object which IOR is requested
3182 string GetStringFromIOR (in GEOM_Object theObject);
3185 * Returns a name with which a GEOM object was dumped into python script
3186 * \param theStudyEntry is an entry of the GEOM object in the study
3188 string GetDumpName (in string theStudyEntry);
3191 * Returns all names with which a GEOM objects was dumped
3192 * into python script to avoid the same names in SMESH script
3194 string_array GetAllDumpNames();
3197 * Publishes the named subshapes of given object in the study.
3198 * \param theStudy The study in which the object is published
3199 * \param theObject The object which named subshapes are published
3201 ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
3202 //in SObject theSObject,
3203 in Object theObject);
3206 * Returns a pointer to SALOME Notebook interface.
3207 * \param theStudyID is a SALOMEDS Study ID
3209 SALOME::Notebook GetNotebook(in long theStudyID);