2 // Author : Sergey RUIN
7 #include "SALOME_Exception.idl"
8 #include "SALOME_Component.idl"
9 #include "SALOMEDS.idl"
11 #include "SALOME_GenericObj.idl"
16 * Topological types of shapes (like Open Cascade types)
18 enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
19 FACE, WIRE, EDGE, VERTEX, SHAPE };
21 typedef sequence<string> string_array;
22 typedef sequence<short> short_array;
23 typedef sequence<long> ListOfLong;
24 typedef sequence<double> ListOfDouble;
26 interface GEOM_Object;
28 typedef sequence<GEOM_Object> ListOfGO;
31 * GEOM_Object: interface of geometric object
33 interface GEOM_Object : SALOME::GenericObj
37 * Get an entry of the object in GEOM component.
42 * Get ID of study, where the object is created.
47 * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
52 * Get a <VAR>shape_type</VAR> of the object value.
54 shape_type GetShapeType();
57 * Set name of the object.
58 * \param theName is a name which will be associated with this object.
60 void SetName (in string theName);
63 * Get name of the object associated with this object.
68 * Set a Study entry where this object was published.
70 void SetStudyEntry (in string theEntry);
73 * Get a Study entry where this object was published.
75 string GetStudyEntry();
78 * Get a list of all GEOM objects on which were the arguments
79 * when this object was constructed and modified.
80 * \note This method is supposed to be used by GUI only.
82 ListOfGO GetDependency();
85 * Get a list of GEOM objects on which the last function that created or modified the object depends.
86 * \note This method is supposed to be used by GUI only.
88 ListOfGO GetLastDependency();
91 * Get the TopoDS_Shape, for colocated case only.
96 ######################################################################
97 * Internal methods (For sub shape identification)
98 ######################################################################
102 * Get geometric shape of the object as a byte stream
104 SALOMEDS::TMPFile GetShapeStream();
107 * Returns True if this object is not a sub shape of another object.
109 boolean IsMainShape();
112 * Get a list of ID's of sub shapes in the main shape.
113 * \note Internal method, suppopsed to be used only by GEOM_Client
115 ListOfLong GetSubShapeIndices();
118 * Get a main shape object to which this object is a sub shape
119 * \note Internal method, suppopsed to be used only by GEOM_Client
121 GEOM_Object GetMainShape();
124 * Return true if geom object representes a shape.
125 * For example, method return false for GEOM_MARKER
132 * GEOM_IOperations: basic methods of all geometric operations
134 interface GEOM_IOperations : SALOME::GenericObj
137 * To know, if the operation was successfully performed
142 * Set the operation error code
143 * \param theErrorID is a string describing the error occured
144 * \note This method is supposed to be used only by interfaces inheriting from IOperations.
146 void SetErrorCode (in string theErrorID);
149 * Get the operation error code
151 string GetErrorCode();
154 * Get ID of study, where the operation is defined
159 * Opens a new transaction
161 void StartOperation();
164 * Closes the previously opened trasaction
166 void FinishOperation();
169 * Aborts the previously opened transaction
171 void AbortOperation();
175 * GEOM_IBasicOperations: interface for basic geometry creation
176 * (Point, Vector, Plane, Marker)
178 interface GEOM_IBasicOperations : GEOM_IOperations
181 * Create point by three coordinates.
182 * \param theX The X coordinate of the point.
183 * \param theY The Y coordinate of the point.
184 * \param theZ The Z coordinate of the point.
185 * \return New GEOM_Object, containing the created point.
187 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
190 * Create a point, distant from the referenced point
191 * on the given distances along the coordinate axes.
192 * \param theReference The referenced point.
193 * \param theX Displacement from the referenced point along OX axis.
194 * \param theY Displacement from the referenced point along OY axis.
195 * \param theZ Displacement from the referenced point along OZ axis.
196 * \return New GEOM_Object, containing the created point.
198 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
199 in double theX, in double theY, in double theZ);
202 * Create a point, corresponding to the given parameter on the given curve.
203 * \param theRefCurve The referenced curve.
204 * \param theParameter Value of parameter on the referenced curve.
205 * \return New GEOM_Object, containing the created point.
207 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
208 in double theParameter);
211 * Create a vector with the given components.
212 * \param theDX X component of the vector.
213 * \param theDY Y component of the vector.
214 * \param theDZ Z component of the vector.
215 * \return New GEOM_Object, containing the created vector.
217 GEOM_Object MakeVectorDXDYDZ (in double theDX,
222 * Create a vector between two points.
223 * \param thePnt1 Start point for the vector.
224 * \param thePnt2 End point for the vector.
225 * \return New GEOM_Object, containing the created vector.
227 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
230 * Create a line, passing through the given point
231 * and parrallel to the given direction
232 * \param thePnt Point. The resulting line will pass through it.
233 * \param theDir Direction. The resulting line will be parallel to it.
234 * \return New GEOM_Object, containing the created line.
236 GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
239 * Create a line, passing through the given points
240 * \param thePnt1 First of two points, defining the line.
241 * \param thePnt2 Second of two points, defining the line.
242 * \return New GEOM_Object, containing the created line.
244 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
247 * Create a plane, passing through the three given points
248 * \param thePnt1 First of three points, defining the plane.
249 * \param thePnt2 Second of three points, defining the plane.
250 * \param thePnt3 Fird of three points, defining the plane.
251 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
252 * \return New GEOM_Object, containing the created plane.
254 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
255 in GEOM_Object thePnt2,
256 in GEOM_Object thePnt3,
257 in double theTrimSize);
260 * Create a plane, passing through the given point
261 * and normal to the given vector.
262 * \param thePnt Point, the plane has to pass through.
263 * \param theVec Vector, defining the plane normal direction.
264 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
265 * \return New GEOM_Object, containing the created plane.
267 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
268 in GEOM_Object theVec,
269 in double theTrimSize);
272 * Create a plane, similar to the existing one, but with another size of representing face.
273 * \param theFace Referenced plane.
274 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
275 * \return New GEOM_Object, containing the created plane.
277 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
278 in double theTrimSize);
281 * Create a local coordinate system.
282 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
283 * \param theXDX,theXDY,theXDZ Three components of OX direction
284 * \param theYDX,theYDY,theYDZ Three components of OY direction
285 * \return New GEOM_Object, containing the created coordinate system.
287 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
288 in double theXDX, in double theXDY, in double theXDZ,
289 in double theYDX, in double theYDY, in double theYDZ);
292 interface GEOM_ITransformOperations : GEOM_IOperations
295 * Translate the given object along the vector, specified by its end points.
296 * \param theObject The object to be translated.
297 * \param thePoint1 Start point of translation vector.
298 * \param thePoint2 End point of translation vector.
301 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
302 in GEOM_Object thePoint1,
303 in GEOM_Object thePoint2);
306 * Translate the given object along the vector, specified
307 * by its end points, creating its copy before the translation.
308 * \param theObject The object to be translated.
309 * \param thePoint1 Start point of translation vector.
310 * \param thePoint2 End point of translation vector.
311 * \return New GEOM_Object, containing the translated object.
313 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
314 in GEOM_Object thePoint1,
315 in GEOM_Object thePoint2);
318 * Translate the given object along the vector, specified by its components.
319 * \param theObject The object to be translated.
320 * \param theDX,theDY,theDZ Components of translation vector.
323 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
324 in double theDX, in double theDY, in double theDZ);
327 * Translate the given object along the vector, specified
328 * by its components, creating its copy before the translation.
329 * \param theObject The object to be translated.
330 * \param theDX,theDY,theDZ Components of translation vector.
331 * \return New GEOM_Object, containing the translated object.
333 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
334 in double theDX, in double theDY, in double theDZ);
338 * Translate the given object along the given vector.
339 * \param theObject The object to be translated.
340 * \param theVector Translation vector, giving both direction and distance.
343 GEOM_Object TranslateVector (in GEOM_Object theObject,
344 in GEOM_Object theVector);
347 * Translate the given object along the given vector,
348 * creating its copy before the translation.
349 * \param theObject The object to be translated.
350 * \param theVector Translation vector, giving both direction and distance.
351 * \return New GEOM_Object, containing the translated object.
353 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
354 in GEOM_Object theVector);
357 * Translate the given object along the given vector a given number times
358 * \param theObject The object to be translated.
359 * \param theVector Direction of the translation.
360 * \param theStep Distance to translate on.
361 * \param theNbTimes Quantity of translations to be done.
362 * \return New GEOM_Object, containing compound of all
363 * the shapes, obtained after each translation.
365 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
366 in GEOM_Object theVector,
371 * Conseqently apply two specified translations to theObject specified number of times.
372 * \param theObject The object to be translated.
373 * \param theVector1 Direction of the first translation.
374 * \param theStep1 Step of the first translation.
375 * \param theNbTimes1 Quantity of translations to be done along theVector1.
376 * \param theVector2 Direction of the second translation.
377 * \param theStep2 Step of the second translation.
378 * \param theNbTimes2 Quantity of translations to be done along theVector2.
379 * \return New GEOM_Object, containing compound of all
380 * the shapes, obtained after each translation.
382 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
383 in GEOM_Object theVector1,
386 in GEOM_Object theVector2,
388 in long theNbTimes2);
391 * Rotate the given object around the given axis on the given angle.
392 * \param theObject The object to be rotated.
393 * \param theAxis Rotation axis.
394 * \param theAngle Rotation angle in radians.
397 GEOM_Object Rotate (in GEOM_Object theObject,
398 in GEOM_Object theAxis,
402 * Rotate the given object around the given axis
403 * on the given angle, creating its copy before the rotatation.
404 * \param theObject The object to be rotated.
405 * \param theAxis Rotation axis.
406 * \param theAngle Rotation angle in radians.
407 * \return New GEOM_Object, containing the rotated object.
409 GEOM_Object RotateCopy (in GEOM_Object theObject,
410 in GEOM_Object theAxis,
414 * Rotate the given object around the given axis a given number times.
415 * Rotation angle will be 2*PI/theNbTimes.
416 * \param theObject The object to be rotated.
417 * \param theAxis The rotation axis.
418 * \param theNbTimes Quantity of rotations to be done.
419 * \return New GEOM_Object, containing compound of all the
420 * shapes, obtained after each rotation.
422 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
423 in GEOM_Object theAxis,
427 * Rotate the given object around the
428 * given axis on the given angle a given number
429 * times and multi-translate each rotation result.
430 * Translation direction passes through center of gravity
431 * of rotated shape and its projection on the rotation axis.
432 * \param theObject The object to be rotated.
433 * \param theAxis Rotation axis.
434 * \param theAngle Rotation angle in graduces.
435 * \param theNbTimes1 Quantity of rotations to be done.
436 * \param theStep Translation distance.
437 * \param theNbTimes2 Quantity of translations to be done.
438 * \return New GEOM_Object, containing compound of all the
439 * shapes, obtained after each transformation.
441 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
442 in GEOM_Object theAxis,
446 in long theNbTimes2);
449 * Replace the given object by an object,
450 * symmetrical to it relatively the given plane.
451 * \param theObject The object to be mirrored.
452 * \param thePlane Plane of symmetry.
454 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
457 * Create an object, symmetrical
458 * to the given one relatively the given plane.
459 * \param theObject The object to be mirrored.
460 * \param thePlane Plane of symmetry.
461 * \return New GEOM_Object, containing the mirrored shape.
463 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
466 * Replace the given object by an object,
467 * symmetrical to it relatively the given axis.
468 * \param theObject The object to be mirrored.
469 * \param theAxis Axis of symmetry.
472 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
475 * Create an object, symmetrical
476 * to the given one relatively the given axis.
477 * \param theObject The object to be mirrored.
478 * \param theAxis Axis of symmetry.
479 * \return New GEOM_Object, containing the mirrored object.
481 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
484 * Replace the given object by an object, symmetrical to it relatively the given point.
485 * \param theObject The object to be mirrored.
486 * \param thePoint Point of symmetry.
489 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
492 * Create an object, symmetrical to the given one relatively the given point.
493 * \param theObject The object to be mirrored.
494 * \param thePoint Point of symmetry.
495 * \return New GEOM_Object, containing the mirrored object.
497 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
500 * Replace the given object by its offset.
501 * \param theObject The base object for the offset.
502 * \param theOffset Offset value.
505 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
508 * Create new object as offset of the given one.
509 * \param theObject The base object for the offset.
510 * \param theOffset Offset value.
511 * \return New GEOM_Object, containing the offset object.
513 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
516 * Scale the given object by the factor.
517 * \param theObject The object to be scaled.
518 * \param thePoint Center point for scaling.
519 * \param theFactor Scaling factor value.
522 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
523 in double theFactor);
526 * Scale the given object by the factor, creating its copy before the scaling.
527 * \param theObject The object to be scaled.
528 * \param thePoint Center point for scaling.
529 * \param theFactor Scaling factor value.
530 * \return New GEOM_Object, containing the scaled shape.
532 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
533 in double theFactor);
536 * Modify the Location of the given object by LCS
538 GEOM_Object PositionShape (in GEOM_Object theObject,
539 in GEOM_Object theStartLCS,
540 in GEOM_Object theEndLCS);
543 * Modify the Location of the given object by LCS
544 * creating its copy before the setting
546 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
547 in GEOM_Object theStartLCS,
548 in GEOM_Object theEndLCS);
552 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
553 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
554 * Pipe (extrusion along contour), Revolution, Solid (from shell).
556 interface GEOM_I3DPrimOperations : GEOM_IOperations
559 * Create a box with specified dimensions along the coordinate axes
560 * and with edges, parallel to the coordinate axes.
561 * Center of the box will be at point (DX/2, DY/2, DZ/2).
562 * \param theDX Length of Box edges, parallel to OX axis.
563 * \param theDY Length of Box edges, parallel to OY axis.
564 * \param theDZ Length of Box edges, parallel to OZ axis.
565 * \return New GEOM_Object, containing the created box.
567 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
570 * Create a box with two specified opposite vertices,
571 * and with edges, parallel to the coordinate axes
572 * \param thePnt1 First of two opposite vertices.
573 * \param thePnt2 Second of two opposite vertices.
574 * \return New GEOM_Object, containing the created box.
576 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
579 * Create a cylinder with given radius and height at
580 * the origin of coordinate system. Axis of the cylinder
581 * will be collinear to the OZ axis of the coordinate system.
582 * \param theR Cylinder radius.
583 * \param theH Cylinder height.
584 * \return New GEOM_Object, containing the created cylinder.
586 GEOM_Object MakeCylinderRH (in double theR, in double theH);
589 * Create a cylinder with given base point, axis, radius and height.
590 * \param thePnt Central point of cylinder base.
591 * \param theAxis Cylinder axis.
592 * \param theR Cylinder radius.
593 * \param theH Cylinder height.
594 * \return New GEOM_Object, containing the created cylinder.
596 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
597 in GEOM_Object theAxis,
602 * Create a cone with given height and radiuses at
603 * the origin of coordinate system. Axis of the cone will
604 * be collinear to the OZ axis of the coordinate system.
605 * \param theR1 Radius of the first cone base.
606 * \param theR2 Radius of the second cone base.
607 * \note If both radiuses are non-zero, the cone will be truncated.
608 * \note If the radiuses are equal, a cylinder will be created instead.
609 * \param theH Cone height.
610 * \return New GEOM_Object, containing the created cone.
612 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
615 * Create a cone with given base point, axis, height and radiuses.
616 * \param thePnt Central point of the first cone base.
617 * \param theAxis Cone axis.
618 * \param theR1 Radius of the first cone base.
619 * \param theR2 Radius of the second cone base.
620 * \note If both radiuses are non-zero, the cone will be truncated.
621 * \note If the radiuses are equal, a cylinder will be created instead.
622 * \param theH Cone height.
623 * \return New GEOM_Object, containing the created cone.
625 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
626 in GEOM_Object theAxis,
632 * Create a torus with given radiuses at the origin of coordinate system.
633 * \param theRMajor Torus major radius.
634 * \param theRMinor Torus minor radius.
635 * \return New GEOM_Object, containing the created torus.
637 GEOM_Object MakeTorusRR (in double theRMajor,
638 in double theRMinor);
641 * Create a torus with given center, normal vector and radiuses.
642 * \param thePnt Torus central point.
643 * \param theVec Torus axis of symmetry.
644 * \param theRMajor Torus major radius.
645 * \param theRMinor Torus minor radius.
646 * \return New GEOM_Object, containing the created torus.
648 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
649 in GEOM_Object theVec,
651 in double theRMinor);
654 * Create a sphere with given radius at the origin of coordinate system.
655 * \param theR Sphere radius.
656 * \return New GEOM_Object, containing the created sphere.
658 GEOM_Object MakeSphereR (in double theR);
661 * Create a sphere with given center and radius.
662 * \param thePnt Sphere center.
663 * \param theR Sphere radius.
664 * \return New GEOM_Object, containing the created .
666 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
669 * Create a shape by extrusion of the base shape along the vector,
670 * i.e. all the space, transfixed by the base shape during its translation
671 * along the vector on the given distance.
672 * \param theBase Base shape to be extruded.
673 * \param theVec Direction of extrusion.
674 * \param theH Prism dimension along theVec.
675 * \return New GEOM_Object, containing the created prism.
677 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
678 in GEOM_Object theVec,
682 * Create a shape by extrusion of the base shape along a vector, defined by two points.
683 * \param theBase Base shape to be extruded.
684 * \param thePoint1 First end of extrusion vector.
685 * \param thePoint2 Second end of extrusion vector.
686 * \return New GEOM_Object, containing the created prism.
688 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
689 in GEOM_Object thePoint1,
690 in GEOM_Object thePoint2);
693 * Create a shape by extrusion of the base shape along
694 * the path shape. The path shape can be a wire or an edge.
695 * \param theBase Base shape to be extruded.
696 * \param thePath Path shape to extrude the base shape along it.
697 * \return New GEOM_Object, containing the created pipe.
699 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
702 * Create a shape by revolution of the base shape around the axis
703 * on the given angle, i.e. all the space, transfixed by the base
704 * shape during its rotation around the axis on the given angle.
705 * \param theBase Base shape to be rotated.
706 * \param theAxis Rotation axis.
707 * \param theAngle Rotation angle in radians.
708 * \return New GEOM_Object, containing the created revolution.
710 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
711 in GEOM_Object theAxis,
715 * Create a filling from the given compound of contours.
716 * \param theMinDeg a minimal degree
717 * \param theMaxDeg a maximal degree
718 * \param theTol2D a 2d tolerance
719 * \param theTol3D a 3d tolerance
720 * \param theNbIter a number of iteration
721 * \return New GEOM_Object, containing the created filling surface.
723 GEOM_Object MakeFilling (in GEOM_Object theShape,
724 in long theMinDeg, in long theMaxDeg,
725 in double theTol2D, in double theTol3D,
730 * GEOM_IShapesOperations: Interface for Shapes creation:
731 * Edge from two points, Wire from edges, Face from wire,
732 * Shell from faces, Solid from shells, Compound from shapes
734 interface GEOM_IShapesOperations : GEOM_IOperations
737 * Create a linear edge with specified ends.
738 * \param thePnt1 Point for the first end of edge.
739 * \param thePnt2 Point for the second end of edge.
740 * \return New GEOM_Object, containing the created edge.
742 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
745 * Create a wire from the set of edges and wires.
746 * \param theEdgesAndWires List of edge and/or wires.
747 * \return New GEOM_Object, containing the created wire.
749 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires);
752 * Create a face on the given wire.
753 * \param theWire Wire to build the face on.
754 * \param isPlanarWanted If TRUE, only planar face will be built.
755 * If impossible, NULL object will be returned.
756 * \return New GEOM_Object, containing the created face.
758 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
761 * Create a face on the given wires set.
762 * \param theWires List of wires to build the face on.
763 * \param isPlanarWanted If TRUE, only planar face will be built.
764 * If impossible, NULL object will be returned.
765 * \return New GEOM_Object, containing the created face.
767 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
770 * Create a shell from the set of faces and shells.
771 * \param theFacesAndShells List of faces and/or shells.
772 * \return New GEOM_Object, containing the created shell.
774 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
777 * Create a solid, bounded by the given shell.
778 * \param theShell Bounding shell.
779 * \return New GEOM_Object, containing the created solid.
781 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
784 * Create a solid, bounded by the given shells.
785 * \param theShells Bounding shells.
786 * \return New GEOM_Object, containing the created solid.
788 GEOM_Object MakeSolidShells (in ListOfGO theShells);
791 * Create a compound of the given shapes.
792 * \param theShapes List of shapes to put in compound.
793 * \return New GEOM_Object, containing the created compound.
795 GEOM_Object MakeCompound (in ListOfGO theShapes);
798 * Replace coincident faces in theShape by one face.
799 * \param theShape Initial shape.
800 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
801 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
803 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance);
806 * Explode a shape on subshapes of a given type.
807 * \param theShape Shape to be exploded.
808 * \param theShapeType Type of sub-shapes to be retrieved.
809 * \param isSorted If this parameter is TRUE, sub-shapes will be
810 * sorted by coordinates of their gravity centers.
811 * \return List of sub-shapes of type theShapeType, contained in theShape.
813 ListOfGO MakeExplode (in GEOM_Object theShape,
814 in long theShapeType,
815 in boolean isSorted);
818 * Get a sub shape defined by its unique ID inside \a theMainShape
819 * \note The sub shape GEOM_Objects can has ONLY ONE function.
820 * Don't try to apply modification operations on them.
822 GEOM_Object GetSubShape (in GEOM_Object theMainShape,
826 * Count number of faces in the given shape.
827 * \param theShape Shape to count faces in.
828 * \return Number of faces in the given shape.
830 long NumberOfFaces (in GEOM_Object theShape);
833 * Count number of edges in the given shape.
834 * \param theShape Shape to count edges in.
835 * \return Number of edges in theShape.
837 long NumberOfEdges (in GEOM_Object theShape);
840 * Reverses an orientation the given shape.
841 * \param theShape Shape to be reversed.
842 * \return The reversed copy of theShape.
844 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
848 * GEOM_IBlocksOperations: Interface for Blocks construction
849 * Face from points or edges, Block from faces,
850 * Blocks multi-translation and multi-rotation
852 interface GEOM_IBlocksOperations : GEOM_IOperations
859 * Create a quadrangle face from four edges. Order of Edges is not
860 * important. It is not necessary that edges share the same vertex.
861 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
862 * \return New GEOM_Object, containing the created face.
864 GEOM_Object MakeQuad (in GEOM_Object theEdge1,
865 in GEOM_Object theEdge2,
866 in GEOM_Object theEdge3,
867 in GEOM_Object theEdge4);
870 * Create a quadrangle face on two edges.
871 * The missing edges will be built by creating the shortest ones.
872 * \param theEdge1,theEdge2 Two opposite edges for the face.
873 * \return New GEOM_Object, containing the created face.
875 GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
876 in GEOM_Object theEdge2);
879 * Create a quadrangle face with specified corners.
880 * The missing edges will be built by creating the shortest ones.
881 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
882 * \return New GEOM_Object, containing the created face.
884 GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
885 in GEOM_Object thePnt2,
886 in GEOM_Object thePnt3,
887 in GEOM_Object thePnt4);
890 * Create a hexahedral solid, bounded by the six given faces. Order of
891 * faces is not important. It is not necessary that Faces share the same edge.
892 * \param theFace1-theFace6 Faces for the hexahedral solid.
893 * \return New GEOM_Object, containing the created solid.
895 GEOM_Object MakeHexa (in GEOM_Object theFace1,
896 in GEOM_Object theFace2,
897 in GEOM_Object theFace3,
898 in GEOM_Object theFace4,
899 in GEOM_Object theFace5,
900 in GEOM_Object theFace6);
903 * Create a hexahedral solid between two given faces.
904 * The missing faces will be built by creating the smallest ones.
905 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
906 * \return New GEOM_Object, containing the created solid.
908 GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
909 in GEOM_Object theFace2);
912 * Extract elements of blocks and blocks compounds
916 * Get a vertex, found in the given shape by its coordinates.
917 * \param theShape Block or a compound of blocks.
918 * \param theX,theY,theZ Coordinates of the sought vertex.
919 * \param theEpsilon Maximum allowed distance between the resulting
920 * vertex and point with the given coordinates.
921 * \return New GEOM_Object, containing the found vertex.
923 GEOM_Object GetPoint (in GEOM_Object theShape,
927 in double theEpsilon);
930 * Get an edge, found in the given shape by two given vertices.
931 * \param theShape Block or a compound of blocks.
932 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
933 * \return New GEOM_Object, containing the found edge.
935 GEOM_Object GetEdge (in GEOM_Object theShape,
936 in GEOM_Object thePoint1,
937 in GEOM_Object thePoint2);
940 * Find an edge of the given shape, which has minimal distance to the given point.
941 * \param theShape Block or a compound of blocks.
942 * \param thePoint Point, close to the desired edge.
943 * \return New GEOM_Object, containing the found edge.
945 GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
946 in GEOM_Object thePoint);
949 * Returns a face, found in the given shape by four given corner vertices.
950 * \param theShape Block or a compound of blocks.
951 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
952 * \return New GEOM_Object, containing the found face.
954 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
955 in GEOM_Object thePoint1,
956 in GEOM_Object thePoint2,
957 in GEOM_Object thePoint3,
958 in GEOM_Object thePoint4);
961 * Get a face of block, found in the given shape by two given edges.
962 * \param theShape Block or a compound of blocks.
963 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
964 * \return New GEOM_Object, containing the found face.
966 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
967 in GEOM_Object theEdge1,
968 in GEOM_Object theEdge2);
971 * Find a face, opposite to the given one in the given block.
972 * \param theBlock Must be a hexahedral solid.
973 * \param theFace Face of \a theBlock, opposite to the desired face.
974 * \return New GEOM_Object, containing the found face.
976 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
977 in GEOM_Object theFace);
980 * Find a face of the given shape, which has minimal distance to the given point.
981 * \param theShape Block or a compound of blocks.
982 * \param thePoint Point, close to the desired face.
983 * \return New GEOM_Object, containing the found face.
985 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
986 in GEOM_Object thePoint);
989 * Find a face of block, whose outside normale has minimal angle with the given vector.
990 * \param theShape Block or a compound of blocks.
991 * \param theVector Vector, close to the normale of the desired face.
992 * \return New GEOM_Object, containing the found face.
994 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
995 in GEOM_Object theVector);
998 * Extract blocks from blocks compounds
1002 * Check, if the compound contains only specified blocks.
1003 * \param theCompound The compound to check.
1004 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1005 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1006 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1007 * \return TRUE, if the given compound contains only blocks.
1008 * \return theNbBlocks Number of specified blocks in theCompound.
1010 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1011 in long theMinNbFaces,
1012 in long theMaxNbFaces,
1013 out long theNbBlocks);
1016 * Enumeration of Blocks Compound defects.
1020 NOT_BLOCK, /* Each element of the compound should be a Block */
1021 INVALID_CONNECTION, /* A connection between two Blocks should be an entire face or an entire edge */
1022 NOT_CONNECTED, /* The compound should be connexe */
1023 NOT_GLUED /* The glue between two quadrangle faces should be applied */
1027 * Description of Blocks Compound defect: type and incriminated sub-shapes.
1032 ListOfLong incriminated;
1036 * Sequence of all Blocks Compound defects.
1038 typedef sequence<BCError> BCErrors;
1041 * Check, if the compound of blocks is given.
1042 * To be considered as a compound of blocks, the
1043 * given shape must satisfy the following conditions:
1044 * - Each element of the compound should be a Block (6 faces and 12 edges).
1045 * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1046 * - The compound should be connexe.
1047 * - The glue between two quadrangle faces should be applied.
1048 * \param theCompound The compound to check.
1049 * \return TRUE, if the given shape is a compound of blocks.
1050 * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1052 boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1053 out BCErrors theErrors);
1056 * Convert sequence of Blocks Compound errors, returned by
1057 * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1058 * \param theCompound The bad compound.
1059 * \param theErrors The sequence of \a theCompound errors.
1060 * \return String, describing all the errors in form, suitable for printing.
1062 string PrintBCErrors (in GEOM_Object theCompound,
1063 in BCErrors theErrors);
1066 * Get all the blocks, contained in the given compound.
1067 * \param theCompound The compound to explode.
1068 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
1069 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1070 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1071 * \return List of GEOM_Objects, containing the retrieved blocks.
1073 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1074 in long theMinNbFaces,
1075 in long theMaxNbFaces);
1078 * Find block, containing the given point inside its volume or on boundary.
1079 * \param theCompound Compound, to find block in.
1080 * \param thePoint Point, close to the desired block. If the point lays on
1081 * boundary between some blocks, we return block with nearest center.
1082 * \return New GEOM_Object, containing the found block.
1084 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
1085 in GEOM_Object thePoint);
1088 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
1089 * \param theCompound Compound, to find block in.
1090 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
1091 * \return New GEOM_Object, containing the found block.
1093 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1094 in ListOfGO theParts);
1097 * Return all blocks, containing all the elements, passed as the parts.
1098 * \param theCompound Compound, to find blocks in.
1099 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1100 * \return List of GEOM_Objects, containing the found blocks.
1102 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1103 in ListOfGO theParts);
1106 * Operations on blocks with gluing of result
1110 * Multi-transformate block and glue the result.
1111 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1112 * \param theBlock Hexahedral solid to be multi-transformed.
1113 * \param theDirFace1 First direction face global index.
1114 * \param theDirFace2 Second direction face global index.
1115 * \param theNbTimes Quantity of transformations to be done.
1116 * \note Global index of sub-shape can be obtained, using method
1117 * <VAR>GEOM_ILocalOperations.GetSubShapeIndex()</VAR>.
1118 * \return New GEOM_Object, containing the result shape.
1120 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
1121 in long theDirFace1,
1122 in long theDirFace2,
1123 in long theNbTimes);
1126 * Multi-transformate block and glue the result.
1127 * \param theBlock Hexahedral solid to be multi-transformed.
1128 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
1129 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
1130 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
1131 * \return New GEOM_Object, containing the result shape.
1133 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
1134 in long theDirFace1U,
1135 in long theDirFace2U,
1136 in long theNbTimesU,
1137 in long theDirFace1V,
1138 in long theDirFace2V,
1139 in long theNbTimesV);
1143 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
1145 interface GEOM_IBooleanOperations : GEOM_IOperations
1148 * Perform one of boolean operations on two given shapes.
1149 * \param theShape1 First argument for boolean operation.
1150 * \param theShape2 Second argument for boolean operation.
1151 * \param theOperation Indicates the operation to be done:
1152 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
1153 * \return New GEOM_Object, containing the result shape.
1155 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
1156 in GEOM_Object theShape2,
1157 in long theOperation);
1160 * Perform partition operation.
1161 * \param theShapes Shapes to be intersected.
1162 * \param theTools Shapes to intersect theShapes.
1163 * \param theKeepInside Shapes, outside which the results will be deleted.
1164 * Each shape from theKeepInside must belong to theShapes also.
1165 * \param theRemoveInside Shapes, inside which the results will be deleted.
1166 * Each shape from theRemoveInside must belong to theShapes also.
1167 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
1168 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
1169 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
1170 * \return New GEOM_Object, containing the result shapes.
1172 GEOM_Object MakePartition (in ListOfGO theShapes,
1173 in ListOfGO theTools,
1174 in ListOfGO theKeepInside,
1175 in ListOfGO theRemoveInside,
1177 in boolean theRemoveWebs,
1178 in ListOfLong theMaterials);
1181 * Perform partition of the Shape with the Plane
1182 * \param theShape Shape to be intersected.
1183 * \param thePlane Tool shape, to intersect theShape.
1184 * \return New GEOM_Object, containing the result shape.
1186 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
1187 in GEOM_Object thePlane);
1191 * GEOM_ICurvesOperations: Interface for curves creation.
1192 * Polyline, Circle, Spline (Bezier and Interpolation)
1194 interface GEOM_ICurvesOperations : GEOM_IOperations
1197 * Create a circle with given center, normal vector and radius.
1198 * \param thePnt Circle center.
1199 * \param theVec Vector, normal to the plane of the circle.
1200 * \param theR Circle radius.
1201 * \return New GEOM_Object, containing the created circle.
1203 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
1204 in GEOM_Object theVec,
1207 * Create a circle, passing through three given points
1208 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1209 * \return New GEOM_Object, containing the created circle.
1211 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
1212 in GEOM_Object thePnt2,
1213 in GEOM_Object thePnt3);
1216 * Create an ellipse with given center, normal vector and radiuses.
1217 * \param thePnt Ellipse center.
1218 * \param theVec Vector, normal to the plane of the ellipse.
1219 * \param theRMajor Major ellipse radius.
1220 * \param theRMinor Minor ellipse radius.
1221 * \return New GEOM_Object, containing the created ellipse.
1223 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
1224 in GEOM_Object theVec,
1225 in double theRMajor,
1226 in double theRMinor);
1229 * Create an arc of circle, passing through three given points.
1230 * \param thePnt1 Start point of the arc.
1231 * \param thePnt2 Middle point of the arc.
1232 * \param thePnt3 End point of the arc.
1233 * \return New GEOM_Object, containing the created arc.
1235 GEOM_Object MakeArc (in GEOM_Object thePnt1,
1236 in GEOM_Object thePnt2,
1237 in GEOM_Object thePnt3);
1240 * Create a polyline on the set of points.
1241 * \param thePoints Sequence of points for the polyline.
1242 * \return New GEOM_Object, containing the created polyline.
1244 GEOM_Object MakePolyline (in ListOfGO thePoints);
1247 * Create bezier curve on the set of points.
1248 * \param thePoints Sequence of points for the bezier curve.
1249 * \return New GEOM_Object, containing the created bezier curve.
1251 GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
1254 * Create B-Spline curve on the set of points.
1255 * \param thePoints Sequence of points for the B-Spline curve.
1256 * \return New GEOM_Object, containing the created B-Spline curve.
1258 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
1261 * Create a sketcher (wire or face), following the textual description,
1262 * passed through \a theCommand argument. \n
1263 * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
1264 * Format of the description string have to be the following:
1266 * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1269 * - x1, y1 are coordinates of the first sketcher point (zero by default),
1271 * - "R angle" : Set the direction by angle
1272 * - "D dx dy" : Set the direction by DX & DY
1275 * - "TT x y" : Create segment by point at X & Y
1276 * - "T dx dy" : Create segment by point with DX & DY
1277 * - "L length" : Create segment by direction & Length
1278 * - "IX x" : Create segment by direction & Intersect. X
1279 * - "IY y" : Create segment by direction & Intersect. Y
1282 * - "C radius length" : Create arc by direction, radius and length(in degree)
1285 * - "WW" : Close Wire (to finish)
1286 * - "WF" : Close Wire and build face (to finish)
1288 * \param theCommand String, defining the sketcher in local
1289 * coordinates of the working plane.
1290 * \param theWorkingPlane Nine double values, defining origin,
1291 * OZ and OX directions of the working plane.
1292 * \return New GEOM_Object, containing the created wire.
1294 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
1298 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
1300 interface GEOM_ILocalOperations : GEOM_IOperations
1303 * Perform a fillet on all edges of the given shape.
1304 * \param theShape Shape, to perform fillet on.
1305 * \param theR Fillet radius.
1306 * \return New GEOM_Object, containing the result shape.
1308 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
1312 * Perform a fillet on the specified edges of the given shape
1313 * \param theShape Shape, to perform fillet on.
1314 * \param theR Fillet radius.
1315 * \param theEdges Global indices of edges to perform fillet on.
1316 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1317 * \return New GEOM_Object, containing the result shape.
1319 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
1321 in ListOfLong theEdges);
1324 * Perform a fillet on all edges of the specified faces of the given shape.
1325 * \param theShape Shape, to perform fillet on.
1326 * \param theR Fillet radius.
1327 * \param theFaces Global indices of faces to perform fillet on.
1328 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1329 * \return New GEOM_Object, containing the result shape.
1331 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
1333 in ListOfLong theFaces);
1336 * Perform a symmetric chamfer on all edges of the given shape.
1337 * \param theShape Shape, to perform chamfer on.
1338 * \param theD Chamfer size along each face.
1339 * \return New GEOM_Object, containing the result shape.
1341 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
1345 * Perform a chamfer on edges, common to the specified faces.
1346 * with distance D1 on the Face1
1347 * \param theShape Shape, to perform chamfer on.
1348 * \param theD1 Chamfer size along \a theFace1.
1349 * \param theD2 Chamfer size along \a theFace2.
1350 * \param theFace1,theFace2 Global indices of two faces of \a theShape.
1351 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1352 * \return New GEOM_Object, containing the result shape.
1354 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
1355 in double theD1, in double theD2,
1356 in long theFace1, in long theFace2);
1359 * Perform a chamfer on all edges of the specified faces.
1360 * with distance D1 on the first specified face (if several for one edge)
1361 * \param theShape Shape, to perform chamfer on.
1362 * \param theD1 Chamfer size along face from \a theFaces. If both faces,
1363 * connected to the edge, are in \a theFaces, \a theD1
1364 * will be get along face, which is nearer to \a theFaces beginning.
1365 * \param theD2 Chamfer size along another of two faces, connected to the edge.
1366 * \param theFaces Sequence of global indices of faces of \a theShape.
1367 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1368 * \return New GEOM_Object, containing the result shape.
1370 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
1371 in double theD1, in double theD2,
1372 in ListOfLong theFaces);
1375 * Perform an Archimde operation on the given shape with given parameters.
1376 * The object presenting the resulting face is returned
1377 * \param theShape Shape to be put in water.
1378 * \param theWeight Weight og the shape.
1379 * \param theWaterDensity Density of the water.
1380 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
1381 * \return New GEOM_Object, containing a section of \a theShape
1382 * by a plane, corresponding to water level.
1384 GEOM_Object MakeArchimede (in GEOM_Object theShape,
1385 in double theWeight,
1386 in double theWaterDensity,
1387 in double theMeshDeflection);
1390 * Get global index of \a theSubShape in \a theShape.
1391 * \param theShape Main shape.
1392 * \param theSubShape Sub-shape of the main shape.
1393 * \return global index of \a theSubShape in \a theShape.
1395 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
1399 * GEOM_IHealingOperations: Interface for shape healing operations.
1400 * Shape Processing, SuppressFaces, etc.
1402 interface GEOM_IHealingOperations : GEOM_IOperations
1405 * Apply a sequence of Shape Healing operators to the given object.
1406 * \param theShapes Shape to be processed.
1407 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
1408 * \param theParameters List of names of parameters
1409 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
1410 * \param theValues List of values of parameters, in the same order
1411 * as parameters are listed in \a theParameters list.
1412 * \return New GEOM_Object, containing processed shape.
1414 GEOM_Object ProcessShape (in GEOM_Object theShapes,
1415 in string_array theOperators,
1416 in string_array theParameters,
1417 in string_array theValues);
1420 * Get default sequence of operators, their parameters and parameters' values
1421 * of Shape Process operation. In the current implementation the defaults are
1422 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
1423 * \param theOperators Output. Default list of names of operators.
1424 * \param theParameters Output. Default list of names of parameters.
1425 * \param theValues Output. List of default values of parameters, in the same order
1426 * as parameters are listed in \a theParameters list.
1428 void GetShapeProcessParameters (out string_array theOperators,
1429 out string_array theParameters,
1430 out string_array theValues);
1433 * Remove faces from the given object (shape).
1434 * \param theObject Shape to be processed.
1435 * \param theFaces Indices of faces to be removed, if EMPTY then the method
1436 * removes ALL faces of the given object.
1437 * \return New GEOM_Object, containing processed shape.
1439 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
1442 * Close an open wire.
1443 * \param theObject Shape to be processed.
1444 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
1445 * if -1, then theObject itself is a wire.
1446 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
1447 * If FALS : closure by creation of an edge between ends.
1448 * \return New GEOM_Object, containing processed shape.
1450 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
1451 in boolean isCommonVertex);
1454 * Remove internal wires and edges from the given object (face).
1455 * \param theObject Shape to be processed.
1456 * \param theWires Indices of wires to be removed, if EMPTY then the method
1457 * removes ALL internal wires of the given object.
1458 * \return New GEOM_Object, containing processed shape.
1460 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
1463 * Remove internal closed contours (holes) from the given object.
1464 * \param theObject Shape to be processed.
1465 * \param theWires Indices of wires to be removed, if EMPTY then the method
1466 * removes ALL internal holes of the given object
1467 * \return New GEOM_Object, containing processed shape.
1469 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
1472 * Sewing of the given object.
1473 * \param theObject Shape to be processed.
1474 * \param theTolerance Required tolerance value.
1475 * \return New GEOM_Object, containing processed shape.
1477 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
1480 * Addition of a point to a given edge object.
1481 * \param theObject Shape to be processed.
1482 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
1483 * if -1, then theObject itself is the edge.
1484 * \param theValue Value of parameter on edge or length parameter,
1485 * depending on \a isByParameter.
1486 * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
1487 * if FALSE : \a theValue is treated as a length parameter [0..1]
1488 * \return New GEOM_Object, containing processed shape.
1490 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
1491 in double theValue, in boolean isByParameter);
1494 * Get a list of wires (wrapped in GEOM_Object-s),
1495 * that constitute a free boundary of the given shape.
1496 * \param theObject Shape to get free boundary of.
1497 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
1498 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
1499 * \return FALSE, if an error(s) occured during the method execution.
1501 boolean GetFreeBoundary (in GEOM_Object theObject,
1502 out ListOfGO theClosedWires,
1503 out ListOfGO theOpenWires);
1507 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
1510 interface GEOM_IInsertOperations : GEOM_IOperations
1513 * Create a copy of the given object
1515 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
1518 * Export the given shape into a file with given name.
1519 * \param theObject Shape to be stored in the file.
1520 * \param theFileName Name of the file to store the given shape in.
1521 * \param theFormatName Specify format for the shape storage.
1522 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1524 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
1527 * Import a shape from the BRep or IGES or STEP file
1528 * (depends on given format) with given name.
1529 * \param theFileName The file, containing the shape.
1530 * \param theFormatName Specify format for the file reading.
1531 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1532 * \return New GEOM_Object, containing the imported shape.
1534 GEOM_Object Import (in string theFileName, in string theFormatName);
1537 * Get the supported import formats and corresponding patterns for File dialog.
1538 * \param theFormats Output. List of formats, available for import.
1539 * \param thePatterns Output. List of file patterns, corresponding to available formats.
1540 * \return Returns available formats and patterns through the arguments.
1542 void ImportTranslators (out string_array theFormats,
1543 out string_array thePatterns);
1546 * Get the supported export formats and corresponding patterns for File dialog.
1547 * \param theFormats Output. List of formats, available for export.
1548 * \param thePatterns Output. List of file patterns, corresponding to available formats.
1549 * \return Returns available formats and patterns through the arguments.
1551 void ExportTranslators (out string_array theFormats,
1552 out string_array thePatterns);
1556 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
1557 * properties calculation (like Centre of Mass, Inertia, etc.).
1560 interface GEOM_IMeasureOperations : GEOM_IOperations
1563 * Get summarized length of all wires,
1564 * area of surface and volume of the given shape.
1565 * \param theShape Shape to define properties of.
1566 * \param theLength Output. Summarized length of all wires of the given shape.
1567 * \param theSurfArea Output. Area of surface of the given shape.
1568 * \param theVolume Output. Volume of the given shape.
1569 * \return Returns shape properties through the last three arguments.
1571 void GetBasicProperties (in GEOM_Object theShape,
1572 out double theLength,
1573 out double theSurfArea,
1574 out double theVolume);
1577 * Get a point, situated at the centre of mass of theShape.
1578 * \param theShape Shape to define centre of mass of.
1579 * \return New GEOM_Object, containing the created point.
1581 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
1584 * Get inertia matrix and moments of inertia of theShape.
1585 * \param theShape Shape to calculate inertia of.
1586 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
1587 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
1588 * \return Returns inertia through the last twelve arguments.
1590 void GetInertia (in GEOM_Object theShape,
1591 out double I11, out double I12, out double I13,
1592 out double I21, out double I22, out double I23,
1593 out double I31, out double I32, out double I33,
1594 out double Ix , out double Iy , out double Iz);
1597 * Get parameters of bounding box of the given shape
1598 * \param theShape Shape to obtain bounding box of.
1599 * \param Xmin,Xmax Output. Limits of shape along OX axis.
1600 * \param Ymin,Ymax Output. Limits of shape along OY axis.
1601 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
1602 * \return Returns parameters of bounding box through the last six arguments.
1604 void GetBoundingBox (in GEOM_Object theShape,
1605 out double Xmin, out double Xmax,
1606 out double Ymin, out double Ymax,
1607 out double Zmin, out double Zmax);
1610 * Get min and max tolerances of sub-shapes of theShape
1611 * \param theShape Shape, to get tolerances of.
1612 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
1613 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
1614 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
1615 * \return Returns shape tolerances through the last six arguments.
1617 void GetTolerance (in GEOM_Object theShape,
1618 out double FaceMin, out double FaceMax,
1619 out double EdgeMin, out double EdgeMax,
1620 out double VertMin, out double VertMax);
1623 * Check a topology of the given shape.
1624 * \param theShape Shape to check validity of.
1625 * \param theDescription Output. Description of problems in the shape, if they are.
1626 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
1628 boolean CheckShape (in GEOM_Object theShape,
1629 out string theDescription);
1632 * Obtain description of the given shape
1633 * \param theShape Shape to be described.
1634 * \return Description of the given shape.
1636 string WhatIs (in GEOM_Object theShape);
1639 * Get minimal distance between the given shapes.
1640 * \param theShape1,theShape2 Shapes to find minimal distance between.
1641 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
1642 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
1643 * \return Value of the minimal distance between the given shapes.
1645 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
1646 out double X1, out double Y1, out double Z1,
1647 out double X2, out double Y2, out double Z2);
1651 * Get point coordinates
1653 void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
1658 * GEOM_IGroupOperations: Interface for groups creation.
1660 interface GEOM_IGroupOperations : GEOM_IOperations
1663 * Creates a new group which will store sub shapes of theMainShape
1664 * \param theMainShape is a GEOM object on which the group is selected
1665 * \param theShapeType defines a shape type of the group
1666 * \return a newly created GEOM group
1668 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
1671 * Adds a sub object with ID theSubShapeId to the group
1672 * \param theGroup is a GEOM group to which the new sub shape is added
1673 * \param theSubShapeId is a sub shape ID in the main object.
1674 * \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
1676 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
1679 * Removes a sub object with ID \a theSubShapeId from the group
1680 * \param theGroup is a GEOM group from which the new sub shape is removed
1681 * \param theSubShapeId is a sub shape ID in the main object.
1682 * \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
1684 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
1687 * Returns a type of sub objects stored in the group
1688 * \param theGroup is a GEOM group which type is returned.
1690 long GetType (in GEOM_Object theGroup);
1693 * Returns a main shape associated with the group
1694 * \param theGroup is a GEOM group for which a main shape object is requested
1695 * \return a GEOM object which is a main shape for theGroup
1697 GEOM_Object GetMainShape (in GEOM_Object theGroup);
1700 * Returns a list of sub objects ID stored in the group
1701 * \param theGroup is a GEOM group for which a list of IDs is requested
1703 ListOfLong GetObjects (in GEOM_Object theGroup);
1708 * GEOM_Gen: Interface to access other GEOM interfaces.
1709 * Also contains some methods to access and manage GEOM objects.
1711 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
1714 * Undo/Redo Management
1717 void Undo (in long theStudyID);
1719 void Redo (in long theStudyID);
1722 * Publishing manangement
1723 * Adds in theStudy a object theObject under with a name theName,
1724 * if theFather is not NULL the object is placed under thFather's SObject.
1725 * Returns a SObject where theObject is placed
1727 SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
1728 in GEOM_Object theObject,
1730 in GEOM_Object theFather);
1733 * Methods to access interfaces for objects creation and transformation
1735 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1736 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
1737 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1738 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1739 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1740 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1741 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1742 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1743 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1744 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1745 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1746 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1749 * Objects Management
1753 * Removes the object from the GEOM component
1754 * \param theObject is a GEOM object to be removed
1756 void RemoveObject (in GEOM_Object theObject);
1759 * Returns an object defined by the study and its entry in the GEOM component
1760 * \param theStudyID is a SALOMEDS Study ID
1761 * \param theEntry is an entry of the requested GEOM object in the GEOM component
1762 * \note if the object has not previously been created a NULL GEOM object is returned
1764 GEOM_Object GetObject (in long theStudyID, in string theEntry);
1767 * Add a sub shape defined by indices in \a theIndices
1768 * (contains unique IDs of sub shapes inside theMainShape)
1769 * \note The sub shape GEOM_Objects can has ONLY ONE function.
1770 * Don't try to apply modification operations on them.
1771 * \note Internal method
1773 GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
1776 * GEOM object's IOR Management
1780 * Returns a GEOM Object defined by its IOR
1781 * \param theIOR a string containg an IOR of the requested GEOM object
1783 GEOM_Object GetIORFromString (in string theIOR);
1786 * Returns a string which contains an IOR of the GEOM object
1787 * \param theObject is a GEOM object which IOR is requested
1789 string GetStringFromIOR (in GEOM_Object theObject);