1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : GEOM_Gen.idl
23 // Author : Sergey RUIN
28 #include "SALOME_Exception.idl"
29 #include "SALOME_Component.idl"
30 #include "SALOMEDS.idl"
31 #include "SALOMEDS_Attributes.idl"
33 #include "SALOME_GenericObj.idl"
38 * Topological types of shapes (like Open Cascade types)
40 enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
41 FACE, WIRE, EDGE, VERTEX, SHAPE };
45 * State of shape relatively geometrical surface like plane, sphere or cylinder.
46 * Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
50 /*! Shape is on surface */
54 * Shape is in the direction defined by the normal and not on surface.
55 * For plane it means above the plane,
56 * For sphere and cylinder it means outside of volume, bounded by the surface.
61 * Shape is in the direction defined by the normal and on surface.
67 * Complementary to ONOUT.
68 * For plane it means below the plane,
69 * For sphere and cylinder it means inside the volume, bounded by the surface
70 * (beyond axis and surface for cylinder and beyond cented and surface for sphere).
75 * Complementary to OUT.
82 * Kind of method to find inside one main shape some subshapes,
83 * corresponding to other given shape (its argument)
84 * Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
86 enum find_shape_method
88 /*! Use GetInPlace functionality. Suits all cases, except transformations */
91 /*! To be used only for transformation result, to find subshapes of argument.
92 * Only this method can be used after transformation.
96 /*! To find only shared subshapes, not modified by the operation */
99 /*! Use GetShapesOnShape method (can work only on solids) */
100 FSM_GetShapesOnShape,
102 /*! Use GetInPlaceByHistory method (can work only after Partition) */
103 FSM_GetInPlaceByHistory
107 typedef sequence<string> string_array;
108 typedef sequence<short> short_array;
109 typedef sequence<long> ListOfLong;
110 typedef sequence<double> ListOfDouble;
112 interface GEOM_Object;
114 typedef sequence<GEOM_Object> ListOfGO;
117 * GEOM_Object: interface of geometric object
119 interface GEOM_Object : SALOME::GenericObj
123 * Get an entry of the object in GEOM component.
128 * Get ID of study, where the object is created.
133 * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
138 * Get a <VAR>shape_type</VAR> of the object value.
140 shape_type GetShapeType();
143 * Set name of the object.
144 * \param theName is a name which will be associated with this object.
146 void SetName (in string theName);
149 * Get name of the object associated with this object.
154 * Set color of the object.
155 * \param theColor is a color of the object.
157 void SetColor(in SALOMEDS::Color theColor);
160 * Get color of the object.
162 SALOMEDS::Color GetColor();
165 * Toggle auto color mode on the object.
166 * \param theAtoColor is a flag which toggles auto color mode.
168 void SetAutoColor(in boolean theAutoColor);
171 * Get flag of object's auto color mode.
173 boolean GetAutoColor();
176 * Set a Study entry where this object was published.
178 void SetStudyEntry (in string theEntry);
181 * Get a Study entry where this object was published.
183 string GetStudyEntry();
186 * Get a list of all GEOM objects on which were the arguments
187 * when this object was constructed and modified.
188 * \note This method is supposed to be used by GUI only.
190 ListOfGO GetDependency();
193 * Get a list of GEOM objects on which the last function that created or modified the object depends.
194 * \note This method is supposed to be used by GUI only.
196 ListOfGO GetLastDependency();
199 * Get the TopoDS_Shape, for colocated case only.
201 long long getShape();
204 ######################################################################
205 * Internal methods (For sub shape identification)
206 ######################################################################
210 * Get geometric shape of the object as a byte stream
212 SALOMEDS::TMPFile GetShapeStream();
215 * Returns True if this object is not a sub shape of another object.
217 boolean IsMainShape();
220 * Get a list of ID's of sub shapes in the main shape.
221 * \note Internal method, suppopsed to be used only by GEOM_Client
223 ListOfLong GetSubShapeIndices();
226 * Get a main shape object to which this object is a sub shape
227 * \note Internal method, suppopsed to be used only by GEOM_Client
229 GEOM_Object GetMainShape();
232 * Return true if geom object representes a shape.
233 * For example, method return false for GEOM_MARKER
238 * Set list of parameters
239 * \param theParameters is a string containing the notebook variables separated by ":" symbol,
240 * used for object creation
242 void SetParameters (in string theParameters);
245 * Return list of notebook variables used for object creation separated by ":" symbol
247 string GetParameters();
252 * GEOM_IOperations: basic methods of all geometric operations
254 interface GEOM_IOperations : SALOME::GenericObj
257 * To know, if the operation was successfully performed
262 * Set the operation error code
263 * \param theErrorID is a string describing the error occured
264 * \note This method is supposed to be used only by interfaces inheriting from IOperations.
266 void SetErrorCode (in string theErrorID);
269 * Get the operation error code
271 string GetErrorCode();
274 * Get ID of study, where the operation is defined
279 * Opens a new transaction
281 void StartOperation();
284 * Closes the previously opened trasaction
286 void FinishOperation();
289 * Aborts the previously opened transaction
291 void AbortOperation();
295 * GEOM_IBasicOperations: interface for basic geometry creation
296 * (Point, Vector, Plane, Marker)
298 interface GEOM_IBasicOperations : GEOM_IOperations
301 * Create point by three coordinates.
302 * \param theX The X coordinate of the point.
303 * \param theY The Y coordinate of the point.
304 * \param theZ The Z coordinate of the point.
305 * \return New GEOM_Object, containing the created point.
307 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
310 * Create a point, distant from the referenced point
311 * on the given distances along the coordinate axes.
312 * \param theReference The referenced point.
313 * \param theX Displacement from the referenced point along OX axis.
314 * \param theY Displacement from the referenced point along OY axis.
315 * \param theZ Displacement from the referenced point along OZ axis.
316 * \return New GEOM_Object, containing the created point.
318 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
319 in double theX, in double theY, in double theZ);
322 * Create a point, corresponding to the given parameter on the given curve.
323 * \param theRefCurve The referenced curve.
324 * \param theParameter Value of parameter on the referenced curve.
325 * \return New GEOM_Object, containing the created point.
327 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
328 in double theParameter);
331 * Create a point, corresponding to the given parameters on the
333 * \param theRefSurf The referenced surface.
334 * \param theUParameter Value of U-parameter on the referenced surface.
335 * \param theVParameter Value of V-parameter on the referenced surface.
336 * \return New GEOM_Object, containing the created point.
338 GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
339 in double theUParameter,
340 in double theVParameter);
343 * Create a point, on two lines intersection.
344 * \param theRefLine1, theRefLine2 The referenced lines.
345 * \return New GEOM_Object, containing the created point.
347 GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
348 in GEOM_Object theRefLine2);
351 * Create a vector, corresponding to tangent to the given parameter on the given curve.
352 * \param theRefCurve The referenced curve.
353 * \param theParameter Value of parameter on the referenced curve.This value should be have value
354 * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
355 * \last parameter of curve.
356 * \return New GEOM_Object, containing the created point.
358 GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
359 in double theParameter);
362 * Create a vector with the given components.
363 * \param theDX X component of the vector.
364 * \param theDY Y component of the vector.
365 * \param theDZ Z component of the vector.
366 * \return New GEOM_Object, containing the created vector.
368 GEOM_Object MakeVectorDXDYDZ (in double theDX,
373 * Create a vector between two points.
374 * \param thePnt1 Start point for the vector.
375 * \param thePnt2 End point for the vector.
376 * \return New GEOM_Object, containing the created vector.
378 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
381 * Create a line, passing through the given point
382 * and parrallel to the given direction
383 * \param thePnt Point. The resulting line will pass through it.
384 * \param theDir Direction. The resulting line will be parallel to it.
385 * \return New GEOM_Object, containing the created line.
387 GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
390 * Create a line, passing through the given points
391 * \param thePnt1 First of two points, defining the line.
392 * \param thePnt2 Second of two points, defining the line.
393 * \return New GEOM_Object, containing the created line.
395 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
398 * Create a line, given by two faces intersection.
399 * \param theFace1 First of two faces, defining the line.
400 * \param theFace2 Second of two faces, defining the line.
401 * \return New GEOM_Object, containing the created line.
403 GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
406 * Create a plane, passing through the three given points
407 * \param thePnt1 First of three points, defining the plane.
408 * \param thePnt2 Second of three points, defining the plane.
409 * \param thePnt3 Fird of three points, defining the plane.
410 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
411 * \return New GEOM_Object, containing the created plane.
413 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
414 in GEOM_Object thePnt2,
415 in GEOM_Object thePnt3,
416 in double theTrimSize);
419 * Create a plane, passing through the given point
420 * and normal to the given vector.
421 * \param thePnt Point, the plane has to pass through.
422 * \param theVec Vector, defining the plane normal direction.
423 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
424 * \return New GEOM_Object, containing the created plane.
426 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
427 in GEOM_Object theVec,
428 in double theTrimSize);
431 * Create a plane, similar to the existing one, but with another size of representing face.
432 * \param theFace Referenced plane or LCS(Marker).
433 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
434 * \return New GEOM_Object, containing the created plane.
436 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
437 in double theTrimSize);
440 * Create a plane, by two vectors.
441 * \param theVec1 Vector1, the plane has to pass through first point of this vector.
442 * \param theVec Vector2, defining the plane normal direction.
443 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
444 * \return New GEOM_Object, containing the created plane.
446 GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
447 in GEOM_Object theVec2,
448 in double theTrimSize);
451 * Create a plane, defined by local coordinate system.
452 * \param theLCS Referenced LCS(Marker).
453 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
454 * \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
455 * \return New GEOM_Object, containing the created plane.
457 GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
458 in double theTrimSize,
459 in double theOrientation);
462 * Create a local coordinate system.
463 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
464 * \param theXDX,theXDY,theXDZ Three components of OX direction
465 * \param theYDX,theYDY,theYDZ Three components of OY direction
466 * \return New GEOM_Object, containing the created coordinate system.
468 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
469 in double theXDX, in double theXDY, in double theXDZ,
470 in double theYDX, in double theYDY, in double theYDZ);
473 * Create a tangent plane to specified face in the point with specified parameters.
474 * Values of parameters should be between 0. and 1.0
475 * \param theFace - face for which tangent plane shuold be built.
476 * \param theParameterU - value of parameter by U
477 * \param theParameterV - value of parameter Vthe
478 * \param theTrimSize - defines sizes of created face
479 * \return New GEOM_Object, containing the face built on tangent plane.
481 GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
482 in double theParameterU,
483 in double theParameterV,
484 in double theTrimSize);
487 interface GEOM_ITransformOperations : GEOM_IOperations
490 * Translate the given object along the vector, specified by its end points.
491 * \param theObject The object to be translated.
492 * \param thePoint1 Start point of translation vector.
493 * \param thePoint2 End point of translation vector.
496 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
497 in GEOM_Object thePoint1,
498 in GEOM_Object thePoint2);
501 * Translate the given object along the vector, specified
502 * by its end points, creating its copy before the translation.
503 * \param theObject The object to be translated.
504 * \param thePoint1 Start point of translation vector.
505 * \param thePoint2 End point of translation vector.
506 * \return New GEOM_Object, containing the translated object.
508 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
509 in GEOM_Object thePoint1,
510 in GEOM_Object thePoint2);
513 * Translate the given object along the vector, specified by its components.
514 * \param theObject The object to be translated.
515 * \param theDX,theDY,theDZ Components of translation vector.
518 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
519 in double theDX, in double theDY, in double theDZ);
522 * Translate the given object along the vector, specified
523 * by its components, creating its copy before the translation.
524 * \param theObject The object to be translated.
525 * \param theDX,theDY,theDZ Components of translation vector.
526 * \return New GEOM_Object, containing the translated object.
528 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
529 in double theDX, in double theDY, in double theDZ);
533 * Translate the given object along the given vector.
534 * \param theObject The object to be translated.
535 * \param theVector Translation vector, giving both direction and distance.
538 GEOM_Object TranslateVector (in GEOM_Object theObject,
539 in GEOM_Object theVector);
542 * Translate the given object along the given vector,
543 * creating its copy before the translation.
544 * \param theObject The object to be translated.
545 * \param theVector Translation vector, giving both direction and distance.
546 * \return New GEOM_Object, containing the translated object.
548 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
549 in GEOM_Object theVector);
552 * Translate the given object along the given vector on given distance,
553 * creating its copy before the translation.
554 * \param theObject The object to be translated.
555 * \param theVector Translation vector, giving a direction.
556 * \param theDistance Translation distance, giving a distance.
557 * \param theCope Translation copy, creating its copy if true.
558 * \return New GEOM_Object, containing the translated object.
560 GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
561 in GEOM_Object theVector,
562 in double theDistance,
566 * Translate the given object along the given vector a given number times
567 * \param theObject The object to be translated.
568 * \param theVector Direction of the translation.
569 * \param theStep Distance to translate on.
570 * \param theNbTimes Quantity of translations to be done.
571 * \return New GEOM_Object, containing compound of all
572 * the shapes, obtained after each translation.
574 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
575 in GEOM_Object theVector,
580 * Conseqently apply two specified translations to theObject specified number of times.
581 * \param theObject The object to be translated.
582 * \param theVector1 Direction of the first translation.
583 * \param theStep1 Step of the first translation.
584 * \param theNbTimes1 Quantity of translations to be done along theVector1.
585 * \param theVector2 Direction of the second translation.
586 * \param theStep2 Step of the second translation.
587 * \param theNbTimes2 Quantity of translations to be done along theVector2.
588 * \return New GEOM_Object, containing compound of all
589 * the shapes, obtained after each translation.
591 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
592 in GEOM_Object theVector1,
595 in GEOM_Object theVector2,
597 in long theNbTimes2);
600 * Rotate given object around vector perpendicular to plane containing three points.
601 * \param theObject The object to be rotated.
602 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
603 * containing the three points.
604 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
607 GEOM_Object RotateThreePoints (in GEOM_Object theObject,
608 in GEOM_Object theCentPoint,
609 in GEOM_Object thePoint1,
610 in GEOM_Object thePoint2);
614 * Rotate given object around vector perpendicular to plane containing three points.
615 * Creating its copy before the rotatation.
616 * \param theObject The object to be rotated.
617 * \param theCentPoint central point - the axis is the vector perpendicular to the plane
618 * containing the three points.
619 * \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
620 * \return New GEOM_Object, containing the rotated object.
622 GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
623 in GEOM_Object theCentPoint,
624 in GEOM_Object thePoint1,
625 in GEOM_Object thePoint2);
628 * Rotate the given object around the given axis on the given angle.
629 * \param theObject The object to be rotated.
630 * \param theAxis Rotation axis.
631 * \param theAngle Rotation angle in radians.
634 GEOM_Object Rotate (in GEOM_Object theObject,
635 in GEOM_Object theAxis,
640 * Rotate the given object around the given axis
641 * on the given angle, creating its copy before the rotatation.
642 * \param theObject The object to be rotated.
643 * \param theAxis Rotation axis.
644 * \param theAngle Rotation angle in radians.
645 * \return New GEOM_Object, containing the rotated object.
647 GEOM_Object RotateCopy (in GEOM_Object theObject,
648 in GEOM_Object theAxis,
653 * Rotate the given object around the given axis a given number times.
654 * Rotation angle will be 2*PI/theNbTimes.
655 * \param theObject The object to be rotated.
656 * \param theAxis The rotation axis.
657 * \param theNbTimes Quantity of rotations to be done.
658 * \return New GEOM_Object, containing compound of all the
659 * shapes, obtained after each rotation.
661 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
662 in GEOM_Object theAxis,
666 * Rotate the given object around the
667 * given axis on the given angle a given number
668 * times and multi-translate each rotation result.
669 * Translation direction passes through center of gravity
670 * of rotated shape and its projection on the rotation axis.
671 * \param theObject The object to be rotated.
672 * \param theAxis Rotation axis.
673 * \param theAngle Rotation angle in graduces.
674 * \param theNbTimes1 Quantity of rotations to be done.
675 * \param theStep Translation distance.
676 * \param theNbTimes2 Quantity of translations to be done.
677 * \return New GEOM_Object, containing compound of all the
678 * shapes, obtained after each transformation.
680 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
681 in GEOM_Object theAxis,
685 in long theNbTimes2);
688 * Replace the given object by an object,
689 * symmetrical to it relatively the given plane.
690 * \param theObject The object to be mirrored.
691 * \param thePlane Plane of symmetry.
693 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
696 * Create an object, symmetrical
697 * to the given one relatively the given plane.
698 * \param theObject The object to be mirrored.
699 * \param thePlane Plane of symmetry.
700 * \return New GEOM_Object, containing the mirrored shape.
702 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
705 * Replace the given object by an object,
706 * symmetrical to it relatively the given axis.
707 * \param theObject The object to be mirrored.
708 * \param theAxis Axis of symmetry.
711 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
714 * Create an object, symmetrical
715 * to the given one relatively the given axis.
716 * \param theObject The object to be mirrored.
717 * \param theAxis Axis of symmetry.
718 * \return New GEOM_Object, containing the mirrored object.
720 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
723 * Replace the given object by an object, symmetrical to it relatively the given point.
724 * \param theObject The object to be mirrored.
725 * \param thePoint Point of symmetry.
728 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
731 * Create an object, symmetrical to the given one relatively the given point.
732 * \param theObject The object to be mirrored.
733 * \param thePoint Point of symmetry.
734 * \return New GEOM_Object, containing the mirrored object.
736 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
739 * Replace the given object by its offset.
740 * \param theObject The base object for the offset.
741 * \param theOffset Offset value.
744 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
747 * Create new object as offset of the given one.
748 * \param theObject The base object for the offset.
749 * \param theOffset Offset value.
750 * \return New GEOM_Object, containing the offset object.
752 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
755 * Scale the given object by the factor.
756 * \param theObject The object to be scaled.
757 * \param thePoint Center point for scaling.
758 * \param theFactor Scaling factor value.
761 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
762 in double theFactor);
765 * Scale the given object by the factor, creating its copy before the scaling.
766 * \param theObject The object to be scaled.
767 * \param thePoint Center point for scaling.
768 * \param theFactor Scaling factor value.
769 * \return New GEOM_Object, containing the scaled shape.
771 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
772 in double theFactor);
775 * Scale the given object by different factors along coordinate axes.
776 * \param theObject The object to be scaled.
777 * \param thePoint Center point for scaling.
778 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
781 GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
782 in GEOM_Object thePoint,
783 in double theFactorX,
784 in double theFactorY,
785 in double theFactorZ);
788 * Scale the given object by different factors along coordinate axes,
789 * creating its copy before the scaling.
790 * \param theObject The object to be scaled.
791 * \param thePoint Center point for scaling.
792 * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
793 * \return New GEOM_Object, containing the scaled shape.
795 GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
796 in GEOM_Object thePoint,
797 in double theFactorX,
798 in double theFactorY,
799 in double theFactorZ);
802 * Modify the Location of the given object by LCS.
803 * \param theObject The object to be displaced.
804 * \param theStartLCS Coordinate system to perform displacement from it.
805 * If \a theStartLCS is NULL, displacement
806 * will be performed from global CS.
807 * If \a theObject itself is used as \a theStartLCS,
808 * its location will be changed to \a theEndLCS.
809 * \param theEndLCS Coordinate system to perform displacement to it.
812 GEOM_Object PositionShape (in GEOM_Object theObject,
813 in GEOM_Object theStartLCS,
814 in GEOM_Object theEndLCS);
817 * Modify the Location of the given object by LCS,
818 * creating its copy before the setting.
819 * \param theObject The object to be displaced.
820 * \param theStartLCS Coordinate system to perform displacement from it.
821 * If \a theStartLCS is NULL, displacement
822 * will be performed from global CS.
823 * If \a theObject itself is used as \a theStartLCS,
824 * its location will be changed to \a theEndLCS.
825 * \param theEndLCS Coordinate system to perform displacement to it.
826 * \return New GEOM_Object, containing the displaced shape.
828 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
829 in GEOM_Object theStartLCS,
830 in GEOM_Object theEndLCS);
833 * Modify the Location of the given object by Path,
834 * \param theObject The object to be displaced.
835 * \param thePath Wire or Edge along that the object will be translated.
836 * \param theDistance progress of Path (0 = actual location, 1 = end of path location).
837 * \param theCopy is a true or false parameter. true is to create a copy, false to move the object.
838 * \param theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
839 * \return New GEOM_Object, containing the displaced shape.
842 GEOM_Object PositionAlongPath (in GEOM_Object theObject,
843 in GEOM_Object thePath,
844 in double theDistance,
846 in boolean theReverse);
849 * Recompute the shape from its arguments.
850 * \param theObject The object to be recomputed.
853 GEOM_Object RecomputeObject (in GEOM_Object theObject);
857 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
858 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
859 * Pipe (extrusion along contour), Revolution, Solid (from shell).
861 interface GEOM_I3DPrimOperations : GEOM_IOperations
864 * Create a box with specified dimensions along the coordinate axes
865 * and with edges, parallel to the coordinate axes.
866 * Center of the box will be at point (DX/2, DY/2, DZ/2).
867 * \param theDX Length of Box edges, parallel to OX axis.
868 * \param theDY Length of Box edges, parallel to OY axis.
869 * \param theDZ Length of Box edges, parallel to OZ axis.
870 * \return New GEOM_Object, containing the created box.
872 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
875 * Create a box with two specified opposite vertices,
876 * and with edges, parallel to the coordinate axes
877 * \param thePnt1 First of two opposite vertices.
878 * \param thePnt2 Second of two opposite vertices.
879 * \return New GEOM_Object, containing the created box.
881 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
884 * Create a face specified dimensions along OX-OY coordinate axes,
885 * with edges parallel to the coordinate axes.
886 * Center of the face will be at point (0, 0, 0).
887 * \param theH Height of the Face.
888 * \param theW Width of the Face.
889 * \param theOrientation Orientation belong axis OXY OYZ OZX
890 * \return New GEOM_Object, containing the created face.
892 GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
894 * Create a face by normale vector or edge and two specified sizes,
895 * vertical (H) and horisontal (W).
896 * \param theVec defines plane.
897 * \param theH vertical size (height).
898 * \param theW horisontal size (width).
899 * \return New GEOM_Object, containing the created face.
901 GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
903 * Create a Disk (circular face) with given center, normal vector and radius.
904 * \param thePnt disk center.
905 * \param theVec Vector, normal to the plane of the disk.
906 * \param theR Disk radius.
907 * \return New GEOM_Object, containing the created disk.
909 GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
910 in GEOM_Object theVec,
913 * Create a disk (circular face), passing through three given points
914 * \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
915 * \return New GEOM_Object, containing the created disk.
917 GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
918 in GEOM_Object thePnt2,
919 in GEOM_Object thePnt3);
922 * Create a disk specified dimensions along OX-OY coordinate axes,
923 * Center of the disk at point (0, 0, 0).
924 * \param theR of the Disk.
925 * \param theOrientation Orientation belong axis OXY OYZ OZX
926 * \return New GEOM_Object, containing the created disk.
928 GEOM_Object MakeDiskR (in double theR, in short theOrientation);
931 * Create a cylinder with given radius and height at
932 * the origin of coordinate system. Axis of the cylinder
933 * will be collinear to the OZ axis of the coordinate system.
934 * \param theR Cylinder radius.
935 * \param theH Cylinder height.
936 * \return New GEOM_Object, containing the created cylinder.
938 GEOM_Object MakeCylinderRH (in double theR, in double theH);
941 * Create a cylinder with given base point, axis, radius and height.
942 * \param thePnt Central point of cylinder base.
943 * \param theAxis Cylinder axis.
944 * \param theR Cylinder radius.
945 * \param theH Cylinder height.
946 * \return New GEOM_Object, containing the created cylinder.
948 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
949 in GEOM_Object theAxis,
954 * Create a cone with given height and radiuses at
955 * the origin of coordinate system. Axis of the cone will
956 * be collinear to the OZ axis of the coordinate system.
957 * \param theR1 Radius of the first cone base.
958 * \param theR2 Radius of the second cone base.
959 * \note If both radiuses are non-zero, the cone will be truncated.
960 * \note If the radiuses are equal, a cylinder will be created instead.
961 * \param theH Cone height.
962 * \return New GEOM_Object, containing the created cone.
964 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
967 * Create a cone with given base point, axis, height and radiuses.
968 * \param thePnt Central point of the first cone base.
969 * \param theAxis Cone axis.
970 * \param theR1 Radius of the first cone base.
971 * \param theR2 Radius of the second cone base.
972 * \note If both radiuses are non-zero, the cone will be truncated.
973 * \note If the radiuses are equal, a cylinder will be created instead.
974 * \param theH Cone height.
975 * \return New GEOM_Object, containing the created cone.
977 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
978 in GEOM_Object theAxis,
984 * Create a torus with given radiuses at the origin of coordinate system.
985 * \param theRMajor Torus major radius.
986 * \param theRMinor Torus minor radius.
987 * \return New GEOM_Object, containing the created torus.
989 GEOM_Object MakeTorusRR (in double theRMajor,
990 in double theRMinor);
993 * Create a torus with given center, normal vector and radiuses.
994 * \param thePnt Torus central point.
995 * \param theVec Torus axis of symmetry.
996 * \param theRMajor Torus major radius.
997 * \param theRMinor Torus minor radius.
998 * \return New GEOM_Object, containing the created torus.
1000 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1001 in GEOM_Object theVec,
1002 in double theRMajor,
1003 in double theRMinor);
1006 * Create a sphere with given radius at the origin of coordinate system.
1007 * \param theR Sphere radius.
1008 * \return New GEOM_Object, containing the created sphere.
1010 GEOM_Object MakeSphereR (in double theR);
1013 * Create a sphere with given center and radius.
1014 * \param thePnt Sphere center.
1015 * \param theR Sphere radius.
1016 * \return New GEOM_Object, containing the created .
1018 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1021 * Create a shape by extrusion of the base shape along the vector,
1022 * i.e. all the space, transfixed by the base shape during its translation
1023 * along the vector on the given distance.
1024 * \param theBase Base shape to be extruded.
1025 * \param theVec Direction of extrusion.
1026 * \param theH Prism dimension along theVec.
1027 * \return New GEOM_Object, containing the created prism.
1029 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1030 in GEOM_Object theVec,
1032 /* The Same Prism but in 2 directions (forward&backward) */
1033 GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1034 in GEOM_Object theVec,
1038 * Create a shape by extrusion of the base shape along a vector, defined by two points.
1039 * \param theBase Base shape to be extruded.
1040 * \param thePoint1 First end of extrusion vector.
1041 * \param thePoint2 Second end of extrusion vector.
1042 * \return New GEOM_Object, containing the created prism.
1044 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1045 in GEOM_Object thePoint1,
1046 in GEOM_Object thePoint2);
1047 /* The same prism but in two directions forward&backward */
1048 GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1049 in GEOM_Object thePoint1,
1050 in GEOM_Object thePoint2);
1053 * Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1054 * \param theBase Base shape to be extruded.
1055 * \param DX, DY, DZ end of extrusion vector.
1056 * \return New GEOM_Object, containing the created prism.
1058 GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1059 in double theDX, in double theDY, in double theDZ);
1060 /* The same prism but in two directions forward&backward */
1061 GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1062 in double theDX, in double theDY, in double theDZ);
1065 * Create a shape by extrusion of the base shape along
1066 * the path shape. The path shape can be a wire or an edge.
1067 * \param theBase Base shape to be extruded.
1068 * \param thePath Path shape to extrude the base shape along it.
1069 * \return New GEOM_Object, containing the created pipe.
1071 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1074 * Create a shape by revolution of the base shape around the axis
1075 * on the given angle, i.e. all the space, transfixed by the base
1076 * shape during its rotation around the axis on the given angle.
1077 * \param theBase Base shape to be rotated.
1078 * \param theAxis Rotation axis.
1079 * \param theAngle Rotation angle in radians.
1080 * \return New GEOM_Object, containing the created revolution.
1082 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1083 in GEOM_Object theAxis,
1084 in double theAngle);
1085 /* The Same Revolution but in both ways forward&backward */
1086 GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1087 in GEOM_Object theAxis,
1088 in double theAngle);
1091 * Create a filling from the given compound of contours.
1092 * \param theMinDeg a minimal degree of BSpline surface to create
1093 * \param theMaxDeg a maximal degree of BSpline surface to create
1094 * \param theTol2D a 2d tolerance to be reached
1095 * \param theTol3D a 3d tolerance to be reached
1096 * \param theNbIter a number of iteration of approximation algorithm
1097 * \return New GEOM_Object, containing the created filling surface.
1099 GEOM_Object MakeFilling (in GEOM_Object theShape,
1100 in long theMinDeg, in long theMaxDeg,
1101 in double theTol2D, in double theTol3D,
1102 in long theNbIter, in boolean theApprox);
1105 * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1106 * \param theSeqSections - set of specified sections.
1107 * \param theModeSolid - mode defining building solid or shell
1108 * \param thePreci - precision 3D used for smoothing by default 1.e-6
1109 * \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1110 * \return New GEOM_Object, containing the created shell or solid.
1112 GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1113 in boolean theModeSolid,
1115 in boolean theRuled);
1118 * Create a shape by extrusion of the profile shape along
1119 * the path shape. The path shape can be a wire or an edge.
1120 * the several profiles can be specified in the several locations of path.
1121 * \param theSeqBases - list of Bases shape to be extruded.
1122 * \param theLocations - list of locations on the path corresponding
1123 * specified list of the Bases shapes. Number of locations
1124 * should be equal to number of bases or list of locations can be empty.
1125 * \param thePath - Path shape to extrude the base shape along it.
1126 * \param theWithContact - the mode defining that the section is translated to be in
1127 * contact with the spine.
1128 * \param - WithCorrection - defining that the section is rotated to be
1129 * orthogonal to the spine tangent in the correspondent point
1130 * \return New GEOM_Object, containing the created pipe.
1132 GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1133 in ListOfGO theLocations,
1134 in GEOM_Object thePath,
1135 in boolean theWithContact ,
1136 in boolean theWithCorrection );
1139 * Create a shape by extrusion of the profile shape along
1140 * the path shape. The path shape can be a shell or a face.
1141 * the several profiles can be specified in the several locations of path.
1142 * \param theSeqBases - list of Bases shape to be extruded.
1143 * \param theSeqSubBases - list of corresponding subshapes of section shapes.
1144 * \param theLocations - list of locations on the path corresponding
1145 * specified list of the Bases shapes. Number of locations
1146 * should be equal to number of bases.
1147 * \param thePath - Path shape to extrude the base shape along it.
1148 * \param theWithContact - the mode defining that the section is translated to be in
1149 * contact with the spine.
1150 * \param - WithCorrection - defining that the section is rotated to be
1151 * orthogonal to the spine tangent in the correspondent point
1152 * \return New GEOM_Object, containing the created pipe.
1154 GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1155 in ListOfGO theSeqSubBases,
1156 in ListOfGO theLocations,
1157 in GEOM_Object thePath,
1158 in boolean theWithContact ,
1159 in boolean theWithCorrection );
1162 * Create solids between given sections
1163 * \param theSeqBases - list of sections (shell or face).
1164 * \param theLocations - list of corresponding vertexes
1165 * \return New GEOM_Object, containing the created solids.
1167 GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1168 in ListOfGO theLocations);
1171 * Create a shape by extrusion of the base shape along
1172 * the path shape with constant bi-normal direction along the given vector.
1173 * The path shape can be a wire or an edge.
1174 * \param theBase Base shape to be extruded.
1175 * \param thePath Path shape to extrude the base shape along it.
1176 * \param theVec Vector defines a constant binormal direction to keep the
1177 * same angle beetween the Direction and the sections
1178 * along the sweep surface.
1179 * \return New GEOM_Object, containing the created pipe.
1181 GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1182 in GEOM_Object thePath,
1183 in GEOM_Object theVec);
1188 * GEOM_IShapesOperations: Interface for Shapes creation:
1189 * Edge from two points, Wire from edges, Face from wire,
1190 * Shell from faces, Solid from shells, Compound from shapes
1192 interface GEOM_IShapesOperations : GEOM_IOperations
1195 * Create a linear edge with specified ends.
1196 * \param thePnt1 Point for the first end of edge.
1197 * \param thePnt2 Point for the second end of edge.
1198 * \return New GEOM_Object, containing the created edge.
1200 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1203 * Create a wire from the set of edges and wires.
1204 * \param theEdgesAndWires List of edge and/or wires.
1205 * \param theTolerance Maximum distance between vertices, that will be merged.
1206 * Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1207 * \return New GEOM_Object, containing the created wire.
1209 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1210 in double theTolerance);
1213 * Create a face on the given wire.
1214 * \param theWire closed Wire or Edge to build the face on.
1215 * \param isPlanarWanted If TRUE, only planar face will be built.
1216 * If impossible, NULL object will be returned.
1217 * \return New GEOM_Object, containing the created face.
1219 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1222 * Create a face on the given wires set.
1223 * \param theWires List of closed wires or edges to build the face on.
1224 * \param isPlanarWanted If TRUE, only planar face will be built.
1225 * If impossible, NULL object will be returned.
1226 * \return New GEOM_Object, containing the created face.
1228 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1231 * Create a shell from the set of faces and shells.
1232 * \param theFacesAndShells List of faces and/or shells.
1233 * \return New GEOM_Object, containing the created shell.
1235 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1238 * Create a solid, bounded by the given shell.
1239 * \param theShell Bounding shell.
1240 * \return New GEOM_Object, containing the created solid.
1242 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1245 * Create a solid, bounded by the given shells.
1246 * \param theShells Bounding shells.
1247 * \return New GEOM_Object, containing the created solid.
1249 GEOM_Object MakeSolidShells (in ListOfGO theShells);
1252 * Create a compound of the given shapes.
1253 * \param theShapes List of shapes to put in compound.
1254 * \return New GEOM_Object, containing the created compound.
1256 GEOM_Object MakeCompound (in ListOfGO theShapes);
1259 * Replace coincident faces in theShape by one face.
1260 * \param theShape Initial shape.
1261 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1262 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1263 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
1265 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1268 * Find coincident faces in theShape for possible gluing.
1269 * \param theShape Initial shape.
1270 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1273 ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1276 * Replace coincident faces in theShape by one face
1277 * in compliance with given list of faces
1278 * \param theShape Initial shape.
1279 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
1280 * \param theFaces List of faces for gluing.
1281 * \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1282 * \return New GEOM_Object, containing a copy of theShape without some faces.
1284 GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1285 in ListOfGO theFaces, in boolean doKeepNonSolids);
1288 * Explode a shape on subshapes of a given type.
1289 * \param theShape Shape to be exploded.
1290 * \param theShapeType Type of sub-shapes to be retrieved.
1291 * \param isSorted If this parameter is TRUE, sub-shapes will be
1292 * sorted by coordinates of their gravity centers.
1293 * \return List of sub-shapes of type theShapeType, contained in theShape.
1295 ListOfGO MakeExplode (in GEOM_Object theShape,
1296 in long theShapeType,
1297 in boolean isSorted);
1300 * Explode a shape on subshapes of a given type.
1301 * Does the same, as the above method, but returns IDs of sub-shapes,
1302 * not GEOM_Objects. It works faster.
1303 * \param theShape Shape to be exploded.
1304 * \param theShapeType Type of sub-shapes to be retrieved.
1305 * \param isSorted If this parameter is TRUE, sub-shapes will be
1306 * sorted by coordinates of their gravity centers.
1307 * \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1309 ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1310 in long theShapeType,
1311 in boolean isSorted);
1314 * Get a sub shape defined by its unique ID inside \a theMainShape
1315 * \note The sub shape GEOM_Objects can has ONLY ONE function.
1316 * Don't try to apply modification operations on them.
1318 GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1322 * Get global index of \a theSubShape in \a theMainShape.
1323 * \param theMainShape Main shape.
1324 * \param theSubShape Sub-shape of the main shape.
1325 * \return global index of \a theSubShape in \a theMainShape.
1327 long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1330 * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1331 * Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1332 * to generate automatic names for sub-shapes, when publishing them in a study.
1333 * \param theMainShape Main shape.
1334 * \param theSubShape Sub-shape of the main shape.
1335 * \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1337 long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1340 * \brief Get name of type of \a theShape.
1342 * Use wide type notation, taking into consideration both topology and geometry of the shape.
1343 * Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1344 * to generate automatic names for sub-shapes, when publishing them in a study.
1345 * \param theShape The shape to get a type of.
1346 * \return String, containing a type name of \a theShape.
1348 string GetShapeTypeString (in GEOM_Object theShape);
1351 * Count number of faces in the given shape.
1352 * \param theShape Shape to count faces in.
1353 * \return Number of faces in the given shape.
1355 long NumberOfFaces (in GEOM_Object theShape);
1358 * Count number of edges in the given shape.
1359 * \param theShape Shape to count edges in.
1360 * \return Number of edges in theShape.
1362 long NumberOfEdges (in GEOM_Object theShape);
1365 * Count number of subshapes of type \a theShapeType in the given shape.
1366 * \param theShape Shape to count subshapes in.
1367 * \param theShapeType The type of subshapes to count.
1368 * \return Number of subshapes of type \a theShapeType in \a theShape.
1370 long NumberOfSubShapes (in GEOM_Object theShape,
1371 in long theShapeType);
1374 * Reverses an orientation the given shape.
1375 * \param theShape Shape to be reversed.
1376 * \return The reversed copy of theShape.
1378 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1381 * Retrieve all free faces from the given shape.
1382 * Free face is a face, which is not shared between two shells of the shape.
1383 * \param theShape Shape to find free faces in.
1384 * \return List of IDs of all free faces, contained in theShape.
1386 ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1389 * Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1390 * \param theShape1 Shape to find sub-shapes in.
1391 * \param theShape2 Shape to find shared sub-shapes with.
1392 * \param theShapeType Type of sub-shapes to be retrieved.
1393 * \return List of sub-shapes of theShape1, shared with theShape2.
1395 ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1396 in GEOM_Object theShape2,
1397 in long theShapeType);
1400 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1401 * the specified plane by the certain way, defined through \a theState parameter.
1402 * \param theShape Shape to find sub-shapes of.
1403 * \param theShapeType Type of sub-shapes to be retrieved.
1404 * \param theAx1 Vector (or line, or linear edge), specifying normal
1405 * direction and location of the plane to find shapes on.
1406 * \param theState The state of the subshapes to find.
1407 * \return List of all found sub-shapes.
1409 ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1410 in long theShapeType,
1411 in GEOM_Object theAx1,
1412 in shape_state theState);
1414 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1415 * the specified plane by the certain way, defined through \a theState parameter.
1416 * \param theShape Shape to find sub-shapes of.
1417 * \param theShapeType Type of sub-shapes to be retrieved.
1418 * \param theAx1 Vector (or line, or linear edge), specifying normal
1419 * direction of the plane to find shapes on.
1420 * \param thePnt Point specifying location of the plane to find shapes on.
1421 * \param theState The state of the subshapes to find.
1422 * \return List of all found sub-shapes.
1424 ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1425 in long theShapeType,
1426 in GEOM_Object theAx1,
1427 in GEOM_Object thePnt,
1428 in shape_state theState);
1433 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1434 * the specified cylinder by the certain way, defined through \a theState parameter.
1435 * \param theShape Shape to find sub-shapes of.
1436 * \param theShapeType Type of sub-shapes to be retrieved.
1437 * \param theAxis Vector (or line, or linear edge), specifying
1438 * axis of the cylinder to find shapes on.
1439 * \param theRadius Radius of the cylinder to find shapes on.
1440 * \param theState The state of the subshapes to find.
1441 * \return List of all found sub-shapes.
1443 ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1444 in long theShapeType,
1445 in GEOM_Object theAxis,
1446 in double theRadius,
1447 in shape_state theState);
1450 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1451 * the specified sphere by the certain way, defined through \a theState parameter.
1452 * \param theShape Shape to find sub-shapes of.
1453 * \param theShapeType Type of sub-shapes to be retrieved.
1454 * \param theCenter Point, specifying center of the sphere to find shapes on.
1455 * \param theRadius Radius of the sphere to find shapes on.
1456 * \param theState The state of the subshapes to find.
1457 * \return List of all found sub-shapes.
1459 ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1460 in long theShapeType,
1461 in GEOM_Object theCenter,
1462 in double theRadius,
1463 in shape_state theState);
1466 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1467 * the specified quadrangle by the certain way, defined through \a theState parameter.
1468 * \param theShape Shape to find sub-shapes of.
1469 * \param theShapeType Type of sub-shapes to be retrieved.
1470 * \param theTopLeftPoint Top left quadrangle corner
1471 * \param theTopRigthPoint Top right quadrangle corner
1472 * \param theBottomLeftPoint Bottom left quadrangle corner
1473 * \param theBottomRigthPoint Bottom right quadrangle corner
1474 * \param theState The state of the subshapes to find.
1475 * \return List of all found sub-shapes.
1477 ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1478 in long theShapeType,
1479 in GEOM_Object theTopLeftPoint,
1480 in GEOM_Object theTopRigthPoint,
1481 in GEOM_Object theBottomLeftPoint,
1482 in GEOM_Object theBottomRigthPoint,
1483 in shape_state theState);
1486 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1487 * the specified plane by the certain way, defined through \a theState parameter.
1488 * \param theShape Shape to find sub-shapes of.
1489 * \param theShapeType Type of sub-shapes to be retrieved.
1490 * \param theAx1 Vector (or line, or linear edge), specifying normal
1491 * direction and location of the plane to find shapes on.
1492 * \param theState The state of the subshapes to find.
1493 * \return List of IDs of all found sub-shapes.
1495 ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1496 in long theShapeType,
1497 in GEOM_Object theAx1,
1498 in shape_state theState);
1501 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1502 * the specified plane by the certain way, defined through \a theState parameter.
1503 * \param theShape Shape to find sub-shapes of.
1504 * \param theShapeType Type of sub-shapes to be retrieved.
1505 * \param theAx1 Vector (or line, or linear edge), specifying normal
1506 * direction of the plane to find shapes on.
1507 * \param thePnt Point specifying location of the plane to find shapes on.
1508 * \param theState The state of the subshapes to find.
1509 * \return List of IDs of all found sub-shapes.
1511 ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1512 in long theShapeType,
1513 in GEOM_Object theAx1,
1514 in GEOM_Object thePnt,
1515 in shape_state theState);
1518 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1519 * the specified cylinder by the certain way, defined through \a theState parameter.
1520 * \param theShape Shape to find sub-shapes of.
1521 * \param theShapeType Type of sub-shapes to be retrieved.
1522 * \param theAxis Vector (or line, or linear edge), specifying
1523 * axis of the cylinder to find shapes on.
1524 * \param theRadius Radius of the cylinder to find shapes on.
1525 * \param theState The state of the subshapes to find.
1526 * \return List of IDs of all found sub-shapes.
1528 ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1529 in long theShapeType,
1530 in GEOM_Object theAxis,
1531 in double theRadius,
1532 in shape_state theState);
1535 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1536 * the specified sphere by the certain way, defined through \a theState parameter.
1537 * \param theShape Shape to find sub-shapes of.
1538 * \param theShapeType Type of sub-shapes to be retrieved.
1539 * \param theCenter Point, specifying center of the sphere to find shapes on.
1540 * \param theRadius Radius of the sphere to find shapes on.
1541 * \param theState The state of the subshapes to find.
1542 * \return List of IDs of all found sub-shapes.
1544 ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1545 in long theShapeType,
1546 in GEOM_Object theCenter,
1547 in double theRadius,
1548 in shape_state theState);
1551 * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1552 * the specified quadrangle 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 theTopLeftPoint Top left quadrangle corner
1556 * \param theTopRigthPoint Top right quadrangle corner
1557 * \param theBottomLeftPoint Bottom left quadrangle corner
1558 * \param theBottomRigthPoint Bottom right quadrangle corner
1559 * \param theState The state of the subshapes to find.
1560 * \return List of IDs of all found sub-shapes.
1562 ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1563 in long theShapeType,
1564 in GEOM_Object theTopLeftPoint,
1565 in GEOM_Object theTopRigthPoint,
1566 in GEOM_Object theBottomLeftPoint,
1567 in GEOM_Object theBottomRigthPoint,
1568 in shape_state theState);
1571 * \brief Find subshapes complying with given status
1572 * \param theBox - the box to check state of subshapes against
1573 * \param theShape - the shape to explore
1574 * \param theShapeType - type of subshape of theShape
1575 * \param theState - required state
1576 * \return List of IDs of all found sub-shapes.
1578 ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1579 in GEOM_Object theShape,
1580 in long theShapeType,
1581 in shape_state theState);
1584 * \brief Find subshapes complying with given status
1585 * \param theBox - the box to check state of subshapes against
1586 * \param theShape - the shape to explore
1587 * \param theShapeType - type of subshape of theShape
1588 * \param theState - required state
1589 * \return List of all found sub-shapes.
1591 ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1592 in GEOM_Object theShape,
1593 in long theShapeType,
1594 in shape_state theState);
1597 * \brief Find subshapes complying with given status
1598 * \param theCheckShape - the shape to check state of subshapes against
1599 * \param theShape - the shape to explore
1600 * \param theShapeType - type of subshape of theShape
1601 * \param theState - required state
1602 * \return List of IDs of all found sub-shapes.
1604 ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1605 in GEOM_Object theShape,
1606 in short theShapeType,
1607 in shape_state theState);
1610 * \brief Find subshapes complying with given status
1611 * \param theCheckShape - the shape to check state of subshapes against
1612 * \param theShape - the shape to explore
1613 * \param theShapeType - type of subshape of theShape
1614 * \param theState - required state
1615 * \return List of all found sub-shapes.
1617 ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1618 in GEOM_Object theShape,
1619 in short theShapeType,
1620 in shape_state theState);
1623 * \brief Find subshapes complying with given status
1624 * \param theCheckShape - the shape to check state of subshapes against
1625 * \param theShape - the shape to explore
1626 * \param theShapeType - type of subshape of theShape
1627 * \param theState - required state
1628 * \return compound includes all found sub-shapes.
1630 GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1631 in GEOM_Object theShape,
1632 in short theShapeType,
1633 in shape_state theState);
1636 * Get sub-shape(s) of \a theShapeWhere, which are
1637 * coincident with \a theShapeWhat or could be a part of it.
1638 * \param theShapeWhere Shape to find sub-shapes of.
1639 * \param theShapeWhat Shape, specifying what to find.
1640 * \return Group of all found sub-shapes or a single found sub-shape.
1642 GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
1643 in GEOM_Object theShapeWhat);
1646 * Get sub-shape(s) of \a theShapeWhere, which are
1647 * coincident with \a theShapeWhat or could be a part of it.
1649 * Implementation of this method is based on a saved history of an operation,
1650 * produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
1651 * arguments (an argument shape or a sub-shape of an argument shape).
1652 * The operation could be the Partition or one of boolean operations,
1653 * performed on simple shapes (not on compounds).
1655 * \param theShapeWhere Shape to find sub-shapes of.
1656 * \param theShapeWhat Shape, specifying what to find.
1657 * \return Group of all found sub-shapes or a single found sub-shape.
1659 GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
1660 in GEOM_Object theShapeWhat);
1663 * Get sub-shape of theShapeWhere, which are
1664 * coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
1665 * \param theShapeWhere Shape to find sub-shapes of.
1666 * \param theShapeWhat Shape, specifying what to find.
1667 * \return found sub-shape.
1669 GEOM_Object GetSame (in GEOM_Object theShapeWhere,
1670 in GEOM_Object theShapeWhat);
1674 * GEOM_IBlocksOperations: Interface for Blocks construction
1675 * Face from points or edges, Block from faces,
1676 * Blocks multi-translation and multi-rotation
1678 interface GEOM_IBlocksOperations : GEOM_IOperations
1681 * Creation of blocks
1685 * Create a quadrangle face from four edges. Order of Edges is not
1686 * important. It is not necessary that edges share the same vertex.
1687 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
1688 * \return New GEOM_Object, containing the created face.
1690 GEOM_Object MakeQuad (in GEOM_Object theEdge1,
1691 in GEOM_Object theEdge2,
1692 in GEOM_Object theEdge3,
1693 in GEOM_Object theEdge4);
1696 * Create a quadrangle face on two edges.
1697 * The missing edges will be built by creating the shortest ones.
1698 * \param theEdge1,theEdge2 Two opposite edges for the face.
1699 * \return New GEOM_Object, containing the created face.
1701 GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
1702 in GEOM_Object theEdge2);
1705 * Create a quadrangle face with specified corners.
1706 * The missing edges will be built by creating the shortest ones.
1707 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
1708 * \return New GEOM_Object, containing the created face.
1710 GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
1711 in GEOM_Object thePnt2,
1712 in GEOM_Object thePnt3,
1713 in GEOM_Object thePnt4);
1716 * Create a hexahedral solid, bounded by the six given faces. Order of
1717 * faces is not important. It is not necessary that Faces share the same edge.
1718 * \param theFace1-theFace6 Faces for the hexahedral solid.
1719 * \return New GEOM_Object, containing the created solid.
1721 GEOM_Object MakeHexa (in GEOM_Object theFace1,
1722 in GEOM_Object theFace2,
1723 in GEOM_Object theFace3,
1724 in GEOM_Object theFace4,
1725 in GEOM_Object theFace5,
1726 in GEOM_Object theFace6);
1729 * Create a hexahedral solid between two given faces.
1730 * The missing faces will be built by creating the smallest ones.
1731 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
1732 * \return New GEOM_Object, containing the created solid.
1734 GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
1735 in GEOM_Object theFace2);
1738 * Extract elements of blocks and blocks compounds
1742 * Get a vertex, found in the given shape by its coordinates.
1743 * \param theShape Block or a compound of blocks.
1744 * \param theX,theY,theZ Coordinates of the sought vertex.
1745 * \param theEpsilon Maximum allowed distance between the resulting
1746 * vertex and point with the given coordinates.
1747 * \return New GEOM_Object, containing the found vertex.
1749 GEOM_Object GetPoint (in GEOM_Object theShape,
1753 in double theEpsilon);
1756 * Get an edge, found in the given shape by two given vertices.
1757 * \param theShape Block or a compound of blocks.
1758 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
1759 * \return New GEOM_Object, containing the found edge.
1761 GEOM_Object GetEdge (in GEOM_Object theShape,
1762 in GEOM_Object thePoint1,
1763 in GEOM_Object thePoint2);
1766 * Find an edge of the given shape, which has minimal distance to the given point.
1767 * \param theShape Block or a compound of blocks.
1768 * \param thePoint Point, close to the desired edge.
1769 * \return New GEOM_Object, containing the found edge.
1771 GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
1772 in GEOM_Object thePoint);
1775 * Returns a face, found in the given shape by four given corner vertices.
1776 * \param theShape Block or a compound of blocks.
1777 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
1778 * \return New GEOM_Object, containing the found face.
1780 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
1781 in GEOM_Object thePoint1,
1782 in GEOM_Object thePoint2,
1783 in GEOM_Object thePoint3,
1784 in GEOM_Object thePoint4);
1787 * Get a face of block, found in the given shape by two given edges.
1788 * \param theShape Block or a compound of blocks.
1789 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
1790 * \return New GEOM_Object, containing the found face.
1792 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
1793 in GEOM_Object theEdge1,
1794 in GEOM_Object theEdge2);
1797 * Find a face, opposite to the given one in the given block.
1798 * \param theBlock Must be a hexahedral solid.
1799 * \param theFace Face of \a theBlock, opposite to the desired face.
1800 * \return New GEOM_Object, containing the found face.
1802 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
1803 in GEOM_Object theFace);
1806 * Find a face of the given shape, which has minimal distance to the given point.
1807 * \param theShape Block or a compound of blocks.
1808 * \param thePoint Point, close to the desired face.
1809 * \return New GEOM_Object, containing the found face.
1811 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
1812 in GEOM_Object thePoint);
1815 * Find a face of block, whose outside normale has minimal angle with the given vector.
1816 * \param theShape Block or a compound of blocks.
1817 * \param theVector Vector, close to the normale of the desired face.
1818 * \return New GEOM_Object, containing the found face.
1820 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
1821 in GEOM_Object theVector);
1824 * Extract blocks from blocks compounds
1828 * Check, if the compound contains only specified blocks.
1829 * \param theCompound The compound to check.
1830 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1831 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1832 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1833 * \return TRUE, if the given compound contains only blocks.
1834 * \return theNbBlocks Number of specified blocks in theCompound.
1836 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1837 in long theMinNbFaces,
1838 in long theMaxNbFaces,
1839 out long theNbBlocks);
1842 * Enumeration of Blocks Compound defects.
1846 /* Each element of the compound should be a Block */
1849 /* An element is a potential block, but has degenerated and/or seam edge(s). */
1852 /* A connection between two Blocks should be an entire face or an entire edge */
1855 /* The compound should be connexe */
1858 /* The glue between two quadrangle faces should be applied */
1863 * Description of Blocks Compound defect: type and incriminated sub-shapes.
1868 ListOfLong incriminated;
1872 * Sequence of all Blocks Compound defects.
1874 typedef sequence<BCError> BCErrors;
1877 * Check, if the compound of blocks is given.
1878 * To be considered as a compound of blocks, the
1879 * given shape must satisfy the following conditions:
1880 * - Each element of the compound should be a Block (6 faces and 12 edges).
1881 * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1882 * - The compound should be connexe.
1883 * - The glue between two quadrangle faces should be applied.
1884 * \note Single block is also accepted as a valid compound of blocks.
1885 * \param theCompound The compound to check.
1886 * \return TRUE, if the given shape is a compound of blocks.
1887 * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1889 boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1890 out BCErrors theErrors);
1893 * Convert sequence of Blocks Compound errors, returned by
1894 * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1895 * \param theCompound The bad compound.
1896 * \param theErrors The sequence of \a theCompound errors.
1897 * \return String, describing all the errors in form, suitable for printing.
1899 string PrintBCErrors (in GEOM_Object theCompound,
1900 in BCErrors theErrors);
1903 * Remove all seam and degenerated edges from \a theShape.
1904 * Unite faces and edges, sharing one surface.
1905 * \param theShape The compound or single solid to remove irregular edges from.
1906 * \param theOptimumNbFaces If more than zero, unite faces only for those solids,
1907 * that have more than theOptimumNbFaces faces. If zero, unite faces always,
1908 * regardsless their quantity in the solid. If negative, do not unite faces at all.
1909 * For blocks repairing recommended value is 6.
1910 * \return Improved shape.
1912 GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
1913 in long theOptimumNbFaces);
1916 * Check, if the given shape is a blocks compound.
1917 * Fix all detected errors.
1918 * \note Single block can be also fixed by this method.
1919 * \param theCompound The compound to check and improve.
1920 * \return Improved compound.
1922 GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
1925 * Get all the blocks, contained in the given compound.
1926 * \param theCompound The compound to explode.
1927 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1928 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1929 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1930 * \return List of GEOM_Objects, containing the retrieved blocks.
1932 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1933 in long theMinNbFaces,
1934 in long theMaxNbFaces);
1937 * Find block, containing the given point inside its volume or on boundary.
1938 * \param theCompound Compound, to find block in.
1939 * \param thePoint Point, close to the desired block. If the point lays on
1940 * boundary between some blocks, we return block with nearest center.
1941 * \return New GEOM_Object, containing the found block.
1943 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
1944 in GEOM_Object thePoint);
1947 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
1948 * \param theCompound Compound, to find block in.
1949 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
1950 * \return New GEOM_Object, containing the found block.
1952 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1953 in ListOfGO theParts);
1956 * Return all blocks, containing all the elements, passed as the parts.
1957 * \param theCompound Compound, to find blocks in.
1958 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1959 * \return List of GEOM_Objects, containing the found blocks.
1961 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1962 in ListOfGO theParts);
1965 * Operations on blocks with gluing of result
1969 * Multi-transformate block and glue the result.
1970 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1971 * \param theBlock Hexahedral solid to be multi-transformed.
1972 * \param theDirFace1 First direction face global index.
1973 * \param theDirFace2 Second direction face global index.
1974 * \param theNbTimes Quantity of transformations to be done.
1975 * \note Global index of sub-shape can be obtained, using method
1976 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
1977 * \return New GEOM_Object, containing the result shape.
1979 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
1980 in long theDirFace1,
1981 in long theDirFace2,
1982 in long theNbTimes);
1985 * Multi-transformate block and glue the result.
1986 * \param theBlock Hexahedral solid to be multi-transformed.
1987 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
1988 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
1989 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
1990 * \return New GEOM_Object, containing the result shape.
1992 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
1993 in long theDirFace1U,
1994 in long theDirFace2U,
1995 in long theNbTimesU,
1996 in long theDirFace1V,
1997 in long theDirFace2V,
1998 in long theNbTimesV);
2001 * Special operation - propagation
2005 * Build all possible propagation groups.
2006 * Propagation group is a set of all edges, opposite to one (main)
2007 * edge of this group directly or through other opposite edges.
2008 * Notion of Opposite Edge make sence only on quadrangle face.
2009 * \param theShape Shape to build propagation groups on.
2010 * \return List of GEOM_Objects, each of them is a propagation group.
2012 ListOfGO Propagate (in GEOM_Object theShape);
2016 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
2018 interface GEOM_IBooleanOperations : GEOM_IOperations
2021 * Perform one of boolean operations on two given shapes.
2022 * \param theShape1 First argument for boolean operation.
2023 * \param theShape2 Second argument for boolean operation.
2024 * \param theOperation Indicates the operation to be done:
2025 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2026 * \return New GEOM_Object, containing the result shape.
2028 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2029 in GEOM_Object theShape2,
2030 in long theOperation);
2033 * Perform partition operation.
2034 * \param theShapes Shapes to be intersected.
2035 * \param theTools Shapes to intersect theShapes.
2036 * \note Each compound from ListShapes and ListTools will be exploded in order
2037 * to avoid possible intersection between shapes from this compound.
2038 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2039 # \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
2040 # type <= Limit are kept in the result,
2041 # else - shapes with type > Limit are kept
2042 # also (if they exist)
2044 * After implementation new version of PartitionAlgo (October 2006)
2045 * other parameters are ignored by current functionality. They are kept
2046 * in this function only for supporting old versions.
2047 * Ignored parameters:
2048 * \param theKeepInside Shapes, outside which the results will be deleted.
2049 * Each shape from theKeepInside must belong to theShapes also.
2050 * \param theRemoveInside Shapes, inside which the results will be deleted.
2051 * Each shape from theRemoveInside must belong to theShapes also.
2052 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2053 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2055 * \return New GEOM_Object, containing the result shapes.
2057 GEOM_Object MakePartition (in ListOfGO theShapes,
2058 in ListOfGO theTools,
2059 in ListOfGO theKeepInside,
2060 in ListOfGO theRemoveInside,
2062 in boolean theRemoveWebs,
2063 in ListOfLong theMaterials,
2064 in short theKeepNonlimitShapes);
2067 * Perform partition operation.
2068 * This method may be usefull if it is needed to make a partition for
2069 * a compound containing nonintersected shapes. Performance will be better
2070 * since intersection between shapes from compound is not performed.
2072 * Description of all parameters as in previous method MakePartition()
2074 * \note Passed compounds (via ListShapes or via ListTools)
2075 * have to consist of nonintersecting shapes.
2077 * \return New GEOM_Object, containing the result shapes.
2079 GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO theShapes,
2080 in ListOfGO theTools,
2081 in ListOfGO theKeepInside,
2082 in ListOfGO theRemoveInside,
2084 in boolean theRemoveWebs,
2085 in ListOfLong theMaterials,
2086 in short theKeepNonlimitShapes);
2089 * Perform partition of the Shape with the Plane
2090 * \param theShape Shape to be intersected.
2091 * \param thePlane Tool shape, to intersect theShape.
2092 * \return New GEOM_Object, containing the result shape.
2094 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2095 in GEOM_Object thePlane);
2099 * GEOM_ICurvesOperations: Interface for curves creation.
2100 * Polyline, Circle, Spline (Bezier and Interpolation)
2102 interface GEOM_ICurvesOperations : GEOM_IOperations
2105 * Create a circle with given center, normal vector and radius.
2106 * \param thePnt Circle center.
2107 * \param theVec Vector, normal to the plane of the circle.
2108 * \param theR Circle radius.
2109 * \return New GEOM_Object, containing the created circle.
2111 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2112 in GEOM_Object theVec,
2115 * Create a circle, passing through three given points
2116 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2117 * \return New GEOM_Object, containing the created circle.
2119 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2120 in GEOM_Object thePnt2,
2121 in GEOM_Object thePnt3);
2123 * Create a circle with given center, with a radius equals the distance from center to Point1
2124 * and on a plane defined by all of three points.
2125 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2126 * \return New GEOM_Object, containing the created circle.
2128 GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2129 in GEOM_Object thePnt2,
2130 in GEOM_Object thePnt3);
2132 * Create an ellipse with given center, normal vector and radiuses.
2133 * \param thePnt Ellipse center.
2134 * \param theVec Vector, normal to the plane of the ellipse.
2135 * \param theRMajor Major ellipse radius.
2136 * \param theRMinor Minor ellipse radius.
2137 * \return New GEOM_Object, containing the created ellipse.
2139 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2140 in GEOM_Object theVec,
2141 in double theRMajor,
2142 in double theRMinor);
2145 * Create an ellipse with given center, normal vector, main axis vector and radiuses.
2146 * \param thePnt Ellipse center.
2147 * \param theVec Vector, normal to the plane of the ellipse.
2148 * \param theRMajor Major ellipse radius.
2149 * \param theRMinor Minor ellipse radius.
2150 * \param theVecMaj Vector, direction of the ellipse's main axis.
2151 * \return New GEOM_Object, containing the created ellipse.
2153 GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2154 in GEOM_Object theVec,
2155 in double theRMajor,
2156 in double theRMinor,
2157 in GEOM_Object theVecMaj);
2160 * Create an arc of circle, passing through three given points.
2161 * \param thePnt1 Start point of the arc.
2162 * \param thePnt2 Middle point of the arc.
2163 * \param thePnt3 End point of the arc.
2164 * \return New GEOM_Object, containing the created arc.
2166 GEOM_Object MakeArc (in GEOM_Object thePnt1,
2167 in GEOM_Object thePnt2,
2168 in GEOM_Object thePnt3);
2171 * Create an arc of circle of center C from one point to another
2172 * \param theCenter Center point of the arc.
2173 * \param thePnt1 Start point of the arc.
2174 * \param thePnt2 End point of the arc.
2175 * \param theSense Orientation of the arc
2176 * \return New GEOM_Object, containing the created arc.
2178 GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2179 in GEOM_Object thePnt1,
2180 in GEOM_Object thePnt2,
2181 in boolean theSense);
2184 * Create an arc of ellipse of center C and two points P1 P2.
2185 * \param theCenter Center point of the arc.
2186 * \param thePnt1 Major radius is distance from center to Pnt1.
2187 * \param thePnt2 define a plane and Minor radius as a shortest distance from Pnt2 to vector Center->Pnt1.
2188 * \return New GEOM_Object, containing the created arc.
2190 GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2191 in GEOM_Object thePnt1,
2192 in GEOM_Object thePnt2);
2196 * Create a polyline on the set of points.
2197 * \param thePoints Sequence of points for the polyline.
2198 * \return New GEOM_Object, containing the created polyline.
2200 GEOM_Object MakePolyline (in ListOfGO thePoints);
2203 * Create bezier curve on the set of points.
2204 * \param thePoints Sequence of points for the bezier curve.
2205 * \return New GEOM_Object, containing the created bezier curve.
2207 GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
2210 * Create B-Spline curve on the set of points.
2211 * \param thePoints Sequence of points for the B-Spline curve.
2212 * \return New GEOM_Object, containing the created B-Spline curve.
2214 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
2217 * Create a sketcher (wire or face), following the textual description,
2218 * passed through \a theCommand argument. \n
2219 * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2220 * Format of the description string have to be the following:
2222 * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2225 * - x1, y1 are coordinates of the first sketcher point (zero by default),
2227 * - "R angle" : Set the direction by angle
2228 * - "D dx dy" : Set the direction by DX & DY
2231 * - "TT x y" : Create segment by point at X & Y
2232 * - "T dx dy" : Create segment by point with DX & DY
2233 * - "L length" : Create segment by direction & Length
2234 * - "IX x" : Create segment by direction & Intersect. X
2235 * - "IY y" : Create segment by direction & Intersect. Y
2238 * - "C radius length" : Create arc by direction, radius and length(in degree)
2241 * - "WW" : Close Wire (to finish)
2242 * - "WF" : Close Wire and build face (to finish)
2244 * \param theCommand String, defining the sketcher in local
2245 * coordinates of the working plane.
2246 * \param theWorkingPlane Nine double values, defining origin,
2247 * OZ and OX directions of the working plane.
2248 * \return New GEOM_Object, containing the created wire.
2250 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2253 * Create a 3D sketcher, following the numerical description,
2254 * passed through points created by \a theCoordinates argument. \n
2255 * Format of the description string have to be the following:
2257 * "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]"
2260 GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2263 * Create a sketcher (wire or face), following the textual description,
2264 * passed through \a theCommand argument. \n
2265 * For format of the description string see the previous method.\n
2266 * \param theCommand String, defining the sketcher in local
2267 * coordinates of the working plane.
2268 * \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2269 * \return New GEOM_Object, containing the created wire.
2271 GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2275 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2277 interface GEOM_ILocalOperations : GEOM_IOperations
2280 * Perform a fillet on all edges of the given shape.
2281 * \param theShape Shape, to perform fillet on.
2282 * \param theR Fillet radius.
2283 * \return New GEOM_Object, containing the result shape.
2285 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2289 * Perform a fillet on the specified edges of the given shape
2290 * \param theShape Shape, to perform fillet on.
2291 * \param theR Fillet radius.
2292 * \param theEdges Global indices of edges to perform fillet on.
2293 * \note Global index of sub-shape can be obtained, using method
2294 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2295 * \return New GEOM_Object, containing the result shape.
2297 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2299 in ListOfLong theEdges);
2300 GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2303 in ListOfLong theEdges);
2306 * Perform a fillet on all edges of the specified faces of the given shape.
2307 * \param theShape Shape, to perform fillet on.
2308 * \param theR Fillet radius.
2309 * \param theFaces Global indices of faces to perform fillet on.
2310 * \note Global index of sub-shape can be obtained, using method
2311 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2312 * \return New GEOM_Object, containing the result shape.
2314 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2316 in ListOfLong theFaces);
2318 GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2321 in ListOfLong theFaces);
2324 * Perform a fillet on face of the specified vertexes of the given shape.
2325 * \param theShape Shape, to perform fillet on.
2326 * \param theR Fillet radius.
2327 * \param theVertexes Global indices of vertexes to perform fillet on.
2328 * \note Global index of sub-shape can be obtained, using method
2329 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2330 * \return New GEOM_Object, containing the result shape.
2332 GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2334 in ListOfLong theVertexes);
2337 * Perform a symmetric chamfer on all edges of the given shape.
2338 * \param theShape Shape, to perform chamfer on.
2339 * \param theD Chamfer size along each face.
2340 * \return New GEOM_Object, containing the result shape.
2342 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2346 * Perform a chamfer on edges, common to the specified faces.
2347 * with distance D1 on the Face1
2348 * \param theShape Shape, to perform chamfer on.
2349 * \param theD1 Chamfer size along \a theFace1.
2350 * \param theD2 Chamfer size along \a theFace2.
2351 * \param theFace1,theFace2 Global indices of two faces of \a theShape.
2352 * \note Global index of sub-shape can be obtained, using method
2353 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2354 * \return New GEOM_Object, containing the result shape.
2356 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2357 in double theD1, in double theD2,
2358 in long theFace1, in long theFace2);
2360 * The Same but with params theD = Chamfer Lenght
2361 * and theAngle = Chamfer Angle (Angle in radians)
2363 GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2364 in double theD, in double theAngle,
2365 in long theFace1, in long theFace2);
2368 * Perform a chamfer on all edges of the specified faces.
2369 * with distance D1 on the first specified face (if several for one edge)
2370 * \param theShape Shape, to perform chamfer on.
2371 * \param theD1 Chamfer size along face from \a theFaces. If both faces,
2372 * connected to the edge, are in \a theFaces, \a theD1
2373 * will be get along face, which is nearer to \a theFaces beginning.
2374 * \param theD2 Chamfer size along another of two faces, connected to the edge.
2375 * \param theFaces Sequence of global indices of faces of \a theShape.
2376 * \note Global index of sub-shape can be obtained, using method
2377 * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2378 * \return New GEOM_Object, containing the result shape.
2380 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2381 in double theD1, in double theD2,
2382 in ListOfLong theFaces);
2384 * The Same but with params theD = Chamfer Lenght
2385 * and theAngle = Chamfer Angle (Angle in radians)
2387 GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2388 in double theD, in double theAngle,
2389 in ListOfLong theFaces);
2392 * Perform a chamfer on edges,
2393 * with distance D1 on the first specified face (if several for one edge)
2394 * \param theShape Shape, to perform chamfer on.
2395 * \param theD1 theD2 Chamfer size
2396 * \param theEdges Sequence of edges of \a theShape.
2397 * \return New GEOM_Object, containing the result shape.
2399 GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2400 in double theD1, in double theD2,
2401 in ListOfLong theEdges);
2403 * The Same but with params theD = Chamfer Lenght
2404 * and theAngle = Chamfer Angle (Angle in radians)
2406 GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2407 in double theD, in double theAngle,
2408 in ListOfLong theEdges);
2411 * Perform an Archimde operation on the given shape with given parameters.
2412 * The object presenting the resulting face is returned
2413 * \param theShape Shape to be put in water.
2414 * \param theWeight Weight og the shape.
2415 * \param theWaterDensity Density of the water.
2416 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
2417 * \return New GEOM_Object, containing a section of \a theShape
2418 * by a plane, corresponding to water level.
2420 GEOM_Object MakeArchimede (in GEOM_Object theShape,
2421 in double theWeight,
2422 in double theWaterDensity,
2423 in double theMeshDeflection);
2426 * Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2427 * Present here only for compatibility.
2429 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2433 * GEOM_IHealingOperations: Interface for shape healing operations.
2434 * Shape Processing, SuppressFaces, etc.
2436 interface GEOM_IHealingOperations : GEOM_IOperations
2439 * Apply a sequence of Shape Healing operators to the given object.
2440 * \param theShapes Shape to be processed.
2441 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2442 * \param theParameters List of names of parameters
2443 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2444 * \param theValues List of values of parameters, in the same order
2445 * as parameters are listed in \a theParameters list.
2446 * \return New GEOM_Object, containing processed shape.
2448 GEOM_Object ProcessShape (in GEOM_Object theShapes,
2449 in string_array theOperators,
2450 in string_array theParameters,
2451 in string_array theValues);
2454 * Get default sequence of operators, their parameters and parameters' values
2455 * of Shape Process operation. In the current implementation the defaults are
2456 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2457 * \param theOperators Output. Default list of names of operators.
2458 * \param theParameters Output. Default list of names of parameters.
2459 * \param theValues Output. List of default values of parameters, in the same order
2460 * as parameters are listed in \a theParameters list.
2462 void GetShapeProcessParameters (out string_array theOperators,
2463 out string_array theParameters,
2464 out string_array theValues);
2466 * Get parameters and parameters' values for the given Shape Process operation.
2467 * In the current implementation the defaults are
2468 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
2469 * \param theOperator Input. The operator's name.
2470 * \param theParameters Output. Default list of names of parameters.
2471 * \param theValues Output. List of default values of parameters, in the same order
2472 * as parameters are listed in \a theParameters list.
2474 void GetOperatorParameters (in string theOperator,
2475 out string_array theParameters,
2476 out string_array theValues);
2479 * Remove faces from the given object (shape).
2480 * \param theObject Shape to be processed.
2481 * \param theFaces Indices of faces to be removed, if EMPTY then the method
2482 * removes ALL faces of the given object.
2483 * \return New GEOM_Object, containing processed shape.
2485 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2488 * Close an open wire.
2489 * \param theObject Shape to be processed.
2490 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2491 * if -1, then theObject itself is a wire.
2492 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
2493 * If FALS : closure by creation of an edge between ends.
2494 * \return New GEOM_Object, containing processed shape.
2496 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2497 in boolean isCommonVertex);
2500 * Remove internal wires and edges from the given object (face).
2501 * \param theObject Shape to be processed.
2502 * \param theWires Indices of wires to be removed, if EMPTY then the method
2503 * removes ALL internal wires of the given object.
2504 * \return New GEOM_Object, containing processed shape.
2506 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2509 * Remove internal closed contours (holes) from the given object.
2510 * \param theObject Shape to be processed.
2511 * \param theWires Indices of wires to be removed, if EMPTY then the method
2512 * removes ALL internal holes of the given object
2513 * \return New GEOM_Object, containing processed shape.
2515 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2518 * Sewing of the given object.
2519 * \param theObject Shape to be processed.
2520 * \param theTolerance Required tolerance value.
2521 * \return New GEOM_Object, containing processed shape.
2523 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2526 * Addition of a point to a given edge object.
2527 * \param theObject Shape to be processed.
2528 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
2529 * if -1, then theObject itself is the edge.
2530 * \param theValue Value of parameter on edge or length parameter,
2531 * depending on \a isByParameter.
2532 * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2533 * if FALSE : \a theValue is treated as a length parameter [0..1]
2534 * \return New GEOM_Object, containing processed shape.
2536 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2537 in double theValue, in boolean isByParameter);
2540 * Get a list of wires (wrapped in GEOM_Object-s),
2541 * that constitute a free boundary of the given shape.
2542 * \param theObject Shape to get free boundary of.
2543 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
2544 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
2545 * \return FALSE, if an error(s) occured during the method execution.
2547 boolean GetFreeBoundary (in GEOM_Object theObject,
2548 out ListOfGO theClosedWires,
2549 out ListOfGO theOpenWires);
2552 * Change orientation of the given object.
2553 * \param theObject Shape to be processed.
2554 * \return New GEOM_Object, containing processed shape.
2556 GEOM_Object ChangeOrientation (in GEOM_Object theObject);
2557 GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
2562 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
2565 interface GEOM_IInsertOperations : GEOM_IOperations
2568 * Create a copy of the given object
2570 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
2573 * Export the given shape into a file with given name.
2574 * \param theObject Shape to be stored in the file.
2575 * \param theFileName Name of the file to store the given shape in.
2576 * \param theFormatName Specify format for the shape storage.
2577 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2579 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
2582 * Import a shape from the BRep or IGES or STEP file
2583 * (depends on given format) with given name.
2584 * \param theFileName The file, containing the shape.
2585 * \param theFormatName Specify format for the file reading.
2586 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2587 * If format 'IGES_SCALE' is used instead 'IGES' length unit will be
2588 * set to 'meter' and result model will be scaled.
2589 * \return New GEOM_Object, containing the imported shape.
2591 GEOM_Object Import (in string theFileName, in string theFormatName);
2594 * Get the supported import formats and corresponding patterns for File dialog.
2595 * \param theFormats Output. List of formats, available for import.
2596 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2597 * \return Returns available formats and patterns through the arguments.
2599 void ImportTranslators (out string_array theFormats,
2600 out string_array thePatterns);
2603 * Get the supported export formats and corresponding patterns for File dialog.
2604 * \param theFormats Output. List of formats, available for export.
2605 * \param thePatterns Output. List of file patterns, corresponding to available formats.
2606 * \return Returns available formats and patterns through the arguments.
2608 void ExportTranslators (out string_array theFormats,
2609 out string_array thePatterns);
2613 * GEOM_IKindOfShape: namespace for shape_kind enumeration.
2615 interface GEOM_IKindOfShape
2625 SPHERE, // full sphere
2626 CYLINDER, // cylinder
2627 BOX, // box with faces, parallel to global coordinate planes
2628 ROTATED_BOX, // other box
2629 TORUS, // full torus
2631 POLYHEDRON, // solid, bounded by polygons
2632 SOLID, // other solid
2634 SPHERE2D, // spherical face (closed)
2635 CYLINDER2D, // cylindrical face with defined height
2636 TORUS2D, // toroidal face (closed)
2637 CONE2D, // conical face with defined height
2638 DISK_CIRCLE, // planar, bounded by circle
2639 DISK_ELLIPSE, // planar, bounded by ellipse
2640 POLYGON, // planar, bounded by segments
2641 PLANE, // infinite planar
2642 PLANAR, // other planar
2645 CIRCLE, // full circle
2646 ARC_CIRCLE, // arc of circle
2647 ELLIPSE, // full ellipse
2648 ARC_ELLIPSE, // arc of ellipse
2649 LINE, // infinite segment
2659 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
2660 * properties calculation (like Centre of Mass, Inertia, etc.).
2663 interface GEOM_IMeasureOperations : GEOM_IOperations
2666 * Get kind of theShape.
2667 * \param theShape Shape to get a kind of.
2668 * \param theIntegers Output. Integer and enumerated shape's parameters
2669 * (kind of surface, closed/unclosed, number of edges, etc.)
2670 * \param theDoubles Output. Double shape's parameters (coordinates, dimensions, etc.)
2671 * \note Concrete meaning of each value, returned via \a theIntegers
2672 * or \a theDoubles list depends on the kind of the shape.
2673 * \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
2675 //short KindOfShape (in GEOM_Object theShape,
2676 GEOM_IKindOfShape::shape_kind KindOfShape (in GEOM_Object theShape,
2677 out ListOfLong theIntegers,
2678 out ListOfDouble theDoubles);
2681 * Get position (LCS) of theShape.
2682 * \param theShape Shape to calculate position of.
2683 * \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
2684 * Origin of the LCS is situated at the shape's center of mass.
2685 * \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
2686 * \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
2687 * Axes of the LCS are obtained from shape's location or,
2688 * if the shape is a planar face, from position of its plane.
2689 * \return Returns position of the shape through the last nine arguments.
2691 void GetPosition (in GEOM_Object theShape,
2692 out double Ox, out double Oy, out double Oz,
2693 out double Zx, out double Zy, out double Zz,
2694 out double Xx, out double Xy, out double Xz);
2697 * Get summarized length of all wires,
2698 * area of surface and volume of the given shape.
2699 * \param theShape Shape to define properties of.
2700 * \param theLength Output. Summarized length of all wires of the given shape.
2701 * \param theSurfArea Output. Area of surface of the given shape.
2702 * \param theVolume Output. Volume of the given shape.
2703 * \return Returns shape properties through the last three arguments.
2705 void GetBasicProperties (in GEOM_Object theShape,
2706 out double theLength,
2707 out double theSurfArea,
2708 out double theVolume);
2711 * Get a point, situated at the centre of mass of theShape.
2712 * \param theShape Shape to define centre of mass of.
2713 * \return New GEOM_Object, containing the created point.
2715 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
2718 * Get a vector, representing the normal of theFace.
2719 * If the face is not planar, theOptionalPoint is obligatory.
2720 * \param theFace Shape (face) to define the normal of.
2721 * \param theOptionalPoint Shape (point) to define the normal at.
2722 * Can be NULL in case of planar face.
2723 * \return New GEOM_Object, containing the created normal vector.
2725 GEOM_Object GetNormal (in GEOM_Object theFace,
2726 in GEOM_Object theOptionalPoint);
2729 * Get inertia matrix and moments of inertia of theShape.
2730 * \param theShape Shape to calculate inertia of.
2731 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
2732 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
2733 * \return Returns inertia through the last twelve arguments.
2735 void GetInertia (in GEOM_Object theShape,
2736 out double I11, out double I12, out double I13,
2737 out double I21, out double I22, out double I23,
2738 out double I31, out double I32, out double I33,
2739 out double Ix , out double Iy , out double Iz);
2742 * Get parameters of bounding box of the given shape
2743 * \param theShape Shape to obtain bounding box of.
2744 * \param Xmin,Xmax Output. Limits of shape along OX axis.
2745 * \param Ymin,Ymax Output. Limits of shape along OY axis.
2746 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
2747 * \return Returns parameters of bounding box through the last six arguments.
2749 void GetBoundingBox (in GEOM_Object theShape,
2750 out double Xmin, out double Xmax,
2751 out double Ymin, out double Ymax,
2752 out double Zmin, out double Zmax);
2755 * Get min and max tolerances of sub-shapes of theShape
2756 * \param theShape Shape, to get tolerances of.
2757 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
2758 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
2759 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
2760 * \return Returns shape tolerances through the last six arguments.
2762 void GetTolerance (in GEOM_Object theShape,
2763 out double FaceMin, out double FaceMax,
2764 out double EdgeMin, out double EdgeMax,
2765 out double VertMin, out double VertMax);
2768 * Check a topology of the given shape.
2769 * \param theShape Shape to check validity of.
2770 * \param theDescription Output. Description of problems in the shape, if they are.
2771 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
2773 boolean CheckShape (in GEOM_Object theShape,
2774 out string theDescription);
2777 * Check a topology and a geometry of the given shape.
2778 * \param theShape Shape to check validity of.
2779 * \param theDescription Output. Description of problems in the shape, if they are.
2780 * \return TRUE, if the shape "seems to be valid".
2782 boolean CheckShapeWithGeometry (in GEOM_Object theShape,
2783 out string theDescription);
2786 * Obtain description of the given shape
2787 * \param theShape Shape to be described.
2788 * \return Description of the given shape.
2790 string WhatIs (in GEOM_Object theShape);
2793 * Get minimal distance between the given shapes.
2794 * \param theShape1,theShape2 Shapes to find minimal distance between.
2795 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
2796 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
2797 * \return Value of the minimal distance between the given shapes.
2799 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
2800 out double X1, out double Y1, out double Z1,
2801 out double X2, out double Y2, out double Z2);
2804 * Get angle between the given lines or linear edges.
2805 * \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
2806 * \return Value of the angle between the given shapes.
2808 double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
2811 * Get point coordinates
2813 void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
2816 * Get radius of curvature of curve in the point determinated by param
2817 * \param theShape - curve.
2818 * \param theParam - parameter on curve
2819 * \return Value of curvature.
2821 double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
2824 * Get radius of curvature of curve in the given point
2825 * \param theShape - curve.
2826 * \param thePoint - point
2827 * \return Value of curvature.
2829 double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2832 * Get max radius of curvature of surface in the point determinated by params
2833 * \param theShape - surface.
2834 * \param theUParam - U-parameter on surface
2835 * \param theVParam - V-parameter on surface
2836 * \return Value of curvature.
2838 double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2839 in double theVParam);
2842 * Get max radius of curvature of surface in the given point
2843 * \param theShape - surface.
2844 * \param thePoint - point
2845 * \return Value of curvature.
2847 double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2850 * Get min radius of curvature of surface in the point determinated by params
2851 * \param theShape - surface.
2852 * \param theUParam - U-parameter on surface
2853 * \param theVParam - V-parameter on surface
2854 * \return Value of curvature.
2856 double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2857 in double theVParam);
2860 * Get min radius of curvature of surface in the given point
2861 * \param theShape - surface.
2862 * \param thePoint - point
2863 * \return Value of curvature.
2865 double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2871 * GEOM_IGroupOperations: Interface for groups creation.
2873 interface GEOM_IGroupOperations : GEOM_IOperations
2876 * Creates a new group which will store sub shapes of theMainShape
2877 * \param theMainShape is a GEOM object on which the group is selected
2878 * \param theShapeType defines a shape type of the group
2879 * \return a newly created GEOM group
2881 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
2884 * Adds a sub object with ID theSubShapeId to the group
2885 * \param theGroup is a GEOM group to which the new sub shape is added
2886 * \param theSubShapeId is a sub shape ID in the main object.
2887 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2889 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
2892 * Removes a sub object with ID \a theSubShapeId from the group
2893 * \param theGroup is a GEOM group from which the sub shape is removed.
2894 * \param theSubShapeId is a sub shape ID in the main object.
2895 * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2897 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
2900 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2901 * \param theGroup is a GEOM group to which the new sub shapes are added.
2902 * \param theSubShapes is a list of sub shapes to be added.
2904 void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2907 * Removes from the group all the given shapes. No errors, if some shapes are not included.
2908 * \param theGroup is a GEOM group from which the sub-shapes are removed.
2909 * \param theSubShapes is a list of sub-shapes to be removed.
2911 void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2914 * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2915 * \param theGroup is a GEOM group to which the new sub shapes are added.
2916 * \param theSubShapes is a list of IDs of sub shapes to be added.
2918 void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2921 * Removes from the group all the given shapes. No errors, if some shapes are not included.
2922 * \param theGroup is a GEOM group from which the sub-shapes are removed.
2923 * \param theSubShapes is a list of IDs of sub-shapes to be removed.
2925 void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2928 * Returns a type of sub objects stored in the group
2929 * \param theGroup is a GEOM group which type is returned.
2931 long GetType (in GEOM_Object theGroup);
2934 * Returns a main shape associated with the group
2935 * \param theGroup is a GEOM group for which a main shape object is requested
2936 * \return a GEOM object which is a main shape for theGroup
2938 GEOM_Object GetMainShape (in GEOM_Object theGroup);
2941 * Returns a list of sub objects ID stored in the group
2942 * \param theGroup is a GEOM group for which a list of IDs is requested
2944 ListOfLong GetObjects (in GEOM_Object theGroup);
2949 * GEOM_Gen: Interface to access other GEOM interfaces.
2950 * Also contains some methods to access and manage GEOM objects.
2952 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
2955 * Undo/Redo Management
2958 void Undo (in long theStudyID);
2960 void Redo (in long theStudyID);
2963 * Publishing management
2964 * Adds in theStudy a object theObject under with a name theName,
2965 * if theFather is not NULL the object is placed under thFather's SObject.
2966 * Returns a SObject where theObject is placed
2968 SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
2969 in GEOM_Object theObject,
2971 in GEOM_Object theFather);
2974 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
2975 * To be used from python scripts out of geompy.addToStudy (non-default usage)
2976 * \param theStudy the study, in which theObject is published already,
2977 * and in which the arguments will be published
2978 * \param theObject published GEOM object, arguments of which will be published
2979 * \param theArgs list of GEOM_Object, operation arguments to be published.
2980 * If this list is empty, all operation arguments will be published
2981 * \param theFindMethod method to search subshapes, corresponding to arguments and
2982 * their subshapes. Value from enumeration GEOM::find_shape_method.
2983 * \param theInheritFirstArg set properties of the first argument for \a theObject.
2984 * Do not publish subshapes in place of arguments, but only
2985 * in place of subshapes of the first argument,
2986 * because the whole shape corresponds to the first argument.
2987 * Mainly to be used after transformations, but it also can be
2988 * usefull after partition with one object shape, and some other
2989 * operations, where only the first argument has to be considered.
2990 * If theObject has only one argument shape, this flag is automatically
2991 * considered as True, not regarding really passed value.
2992 * \return True in case of success, False otherwise.
2994 ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
2995 in GEOM_Object theObject,
2996 in ListOfGO theArgs,
2997 in find_shape_method theFindMethod,
2998 in boolean theInheritFirstArg);
3001 * Publish sub-shapes, standing for arguments and sub-shapes of arguments
3002 * To be used from GUI and from geompy.addToStudy.
3003 * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3004 * \param theSObject study object, referencing GEOM object, arguments of which will be published
3006 ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
3007 in SALOMEDS::SObject theSObject,
3008 in ListOfGO theArgs,
3009 in find_shape_method theFindMethod,
3010 in boolean theInheritFirstArg);
3013 * Methods to access interfaces for objects creation and transformation
3015 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3016 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
3017 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3018 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3019 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3020 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3021 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3022 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3023 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3024 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3025 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3026 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3029 * Objects Management
3033 * Removes the object from the GEOM component
3034 * \param theObject is a GEOM object to be removed
3036 void RemoveObject (in GEOM_Object theObject);
3039 * Returns an object defined by the study and its entry in the GEOM component
3040 * \param theStudyID is a SALOMEDS Study ID
3041 * \param theEntry is an entry of the requested GEOM object in the GEOM component
3042 * \note if the object has not previously been created a NULL GEOM object is returned
3044 GEOM_Object GetObject (in long theStudyID, in string theEntry);
3047 * Add a sub shape defined by indices in \a theIndices
3048 * (contains unique IDs of sub shapes inside theMainShape)
3049 * \note The sub shape GEOM_Objects can has ONLY ONE function.
3050 * Don't try to apply modification operations on them.
3051 * \note Internal method
3053 GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
3056 * GEOM object's IOR Management
3060 * Returns a GEOM Object defined by its IOR
3061 * \param theIOR a string containg an IOR of the requested GEOM object
3063 GEOM_Object GetIORFromString (in string theIOR);
3066 * Returns a string which contains an IOR of the GEOM object
3067 * \param theObject is a GEOM object which IOR is requested
3069 string GetStringFromIOR (in GEOM_Object theObject);
3072 * Returns a name with which a GEOM object was dumped into python script
3073 * \param theStudyEntry is an entry of the GEOM object in the study
3075 string GetDumpName (in string theStudyEntry);
3078 * Returns all names with which a GEOM objects was dumped
3079 * into python script to avoid the same names in SMESH script
3081 string_array GetAllDumpNames();
3084 * Publishes the named subshapes of given object in the study.
3085 * \param theStudy The study in which the object is published
3086 * \param theObject The object which named subshapes are published
3088 ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
3089 //in SObject theSObject,
3090 in Object theObject);