2 // Author : Sergey RUIN
7 #include "SALOME_Exception.idl"
8 #include "SALOME_Component.idl"
9 #include "SALOMEDS.idl"
11 #include "SALOME_GenericObj.idl"
15 //-----------------------------------------------------------------//
16 // Topological types for shapes (like Open Cascade types) //
17 //-----------------------------------------------------------------//
19 enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
20 FACE, WIRE, EDGE, VERTEX, SHAPE } ;
22 typedef sequence<string> string_array;
23 typedef sequence<short> short_array;
24 typedef sequence<long> ListOfLong;
25 typedef sequence<double> ListOfDouble;
27 interface GEOM_Object;
29 typedef sequence<GEOM_Object> ListOfGO;
32 * GEOM_Object: interface of geometric object
34 interface GEOM_Object : SALOME::GenericObj
38 * GetEntry() -get an entry of the object in GEOM component.
43 * GetStudyID() - get ID of study, where the object is created.
48 * GetType() - get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
53 * GetShapeType - get a <VAR>shape_type<\VAR> of the object value.
55 shape_type GetShapeType();
58 * SetName() - set name of the object.
59 * \param theName is a name which will be associated with this object.
61 void SetName(in string theName);
64 * GetName() - get name of the object associated with this object.
69 * SetStudyEntry() - set a Study entry where this object was published.
71 void SetStudyEntry(in string theEntry);
74 * GetStudyEntry() - get a Study entry where this object was published.
76 string GetStudyEntry();
79 * GetDependency() - get a list of all GEOM objects on which were the arguments when this object was constructed and modifed.
80 * NOTE: This method is supposed to be used by GUI only.
82 ListOfGO GetDependency();
85 * GetLastDependency() - 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 * getShape() get the TopoDS_Shape, for colocated case only.
96 ######################################################################
97 * Internal methods (For sub shape identification)
98 ######################################################################
102 * GetShapeStream() - get geometric shape of the object as a byte stream
105 SALOMEDS::TMPFile GetShapeStream();
108 * IsMainShape() - returns True if this object is not a sub shape of another object.
110 boolean IsMainShape();
113 * GetSubShapeIndices() - get a list of ID's of sub shapes in the main shape.
114 * NOTE: Internal method, suppopsed to be used only by GEOM_Client
116 ListOfLong GetSubShapeIndices();
119 * GetMainShape() - get a main shape object to which this object is a sub shape
120 * NOTE: Internal method, suppopsed to be used only by GEOM_Client
122 GEOM_Object GetMainShape();
127 * GEOM_IOperations: basic methods of all geometric operations
129 interface GEOM_IOperations : SALOME::GenericObj
132 * IsDone() - to know, if the operation was successfully performed
137 * SetErrorCode() - set the operation error code
138 * \param theErrorID is a string describing the error occured
139 * NOTEL : This method is supposed to be used only by interfaces inheriting from IOperations.
141 void SetErrorCode(in string theErrorID);
144 * GetErrorCode() - get the operation error code
146 string GetErrorCode();
149 * GetStudyID() - get ID of study, where the operation is defined
154 * StartOperation () - opens a new transaction
156 void StartOperation();
159 * FinishOperation() - closes the previously opened trasaction
161 void FinishOperation();
164 * AbortOperation() - aborts the previously opened transaction
166 void AbortOperation();
170 * GEOM_IBasicOperations: interface for basic geometry creation
171 * (Point, Vector, Plane, Marker)
173 interface GEOM_IBasicOperations : GEOM_IOperations
176 * Create point by three coordinates.
177 * \param theX The X coordinate of the point.
178 * \param theY The Y coordinate of the point.
179 * \param theZ The Z coordinate of the point.
180 * \return New GEOM_Object, containing the created point.
182 GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
185 * Create a point, distant from the referenced point
186 * on the given distances along the coordinate axes.
187 * \param theReference The referenced point.
188 * \param theX Displacement from the referenced point along OX axis.
189 * \param theY Displacement from the referenced point along OY axis.
190 * \param theZ Displacement from the referenced point along OZ axis.
191 * \return New GEOM_Object, containing the created point.
193 GEOM_Object MakePointWithReference (in GEOM_Object theReference,
194 in double theX, in double theY, in double theZ);
197 * Create a point, corresponding to the given parameter on the given curve.
198 * \param theRefCurve The referenced curve.
199 * \param theParameter Value of parameter on the referenced curve.
200 * \return New GEOM_Object, containing the created point.
202 GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
203 in double theParameter);
206 * Create a vector with the given components.
207 * \param theDX X component of the vector.
208 * \param theDY Y component of the vector.
209 * \param theDZ Z component of the vector.
210 * \return New GEOM_Object, containing the created vector.
212 GEOM_Object MakeVectorDXDYDZ (in double theDX,
217 * Create a vector between two points.
218 * \param thePnt1 Start point for the vector.
219 * \param thePnt2 End point for the vector.
220 * \return New GEOM_Object, containing the created vector.
222 GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
225 * Create a line, passing through the given points
226 * \param thePnt1 First of two points, defining the line.
227 * \param thePnt2 Second of two points, defining the line.
228 * \return New GEOM_Object, containing the created line.
230 GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
233 * Create a plane, passing through the three given points
234 * \param thePnt1 First of three points, defining the plane.
235 * \param thePnt2 Second of three points, defining the plane.
236 * \param thePnt3 Fird of three points, defining the plane.
237 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
238 * \return New GEOM_Object, containing the created plane.
240 GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
241 in GEOM_Object thePnt2,
242 in GEOM_Object thePnt3,
243 in double theTrimSize);
246 * Create a plane, passing through the given point
247 * and normal to the given vector.
248 * \param thePnt Point, the plane has to pass through.
249 * \param theVec Vector, defining the plane normal direction.
250 * \param theTrimSize Half size of a side of quadrangle face, representing the plane.
251 * \return New GEOM_Object, containing the created plane.
253 GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
254 in GEOM_Object theVec,
255 in double theTrimSize);
258 * Create a plane, similar to the existing one, but with another size of representing face.
259 * \param theFace Referenced plane.
260 * \param theTrimSize New half size of a side of quadrangle face, representing the plane.
261 * \return New GEOM_Object, containing the created plane.
263 GEOM_Object MakePlaneFace (in GEOM_Object theFace,
264 in double theTrimSize);
267 * Create a local coordinate system.
268 * \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
269 * \param theXDX,theXDY,theXDZ Three components of OX direction
270 * \param theYDX,theYDY,theYDZ Three components of OY direction
271 * \return New GEOM_Object, containing the created coordinate system.
273 GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
274 in double theXDX, in double theXDY, in double theXDZ,
275 in double theYDX, in double theYDY, in double theYDZ);
278 interface GEOM_ITransformOperations : GEOM_IOperations
281 * Translate the given object along the vector, specified by its end points.
282 * \param theObject The object to be translated.
283 * \param thePoint1 Start point of translation vector.
284 * \param thePoint2 End point of translation vector.
287 GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
288 in GEOM_Object thePoint1,
289 in GEOM_Object thePoint2);
292 * Translate the given object along the vector, specified
293 * by its end points, creating its copy before the translation.
294 * \param theObject The object to be translated.
295 * \param thePoint1 Start point of translation vector.
296 * \param thePoint2 End point of translation vector.
297 * \return New GEOM_Object, containing the translated object.
299 GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
300 in GEOM_Object thePoint1,
301 in GEOM_Object thePoint2);
304 * Translate the given object along the vector, specified by its components.
305 * \param theObject The object to be translated.
306 * \param theDX,theDY,theDZ Components of translation vector.
309 GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
310 in double theDX, in double theDY, in double theDZ);
313 * Translate the given object along the vector, specified
314 * by its components, creating its copy before the translation.
315 * \param theObject The object to be translated.
316 * \param theDX,theDY,theDZ Components of translation vector.
317 * \return New GEOM_Object, containing the translated object.
319 GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
320 in double theDX, in double theDY, in double theDZ);
324 * Translate the given object along the given vector.
325 * \param theObject The object to be translated.
326 * \param theVector Translation vector, giving both direction and distance.
329 GEOM_Object TranslateVector (in GEOM_Object theObject,
330 in GEOM_Object theVector);
333 * Translate the given object along the given vector,
334 * creating its copy before the translation.
335 * \param theObject The object to be translated.
336 * \param theVector Translation vector, giving both direction and distance.
337 * \return New GEOM_Object, containing the translated object.
339 GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
340 in GEOM_Object theVector);
343 * Translate the given object along the given vector a given number times
344 * \param theObject The object to be translated.
345 * \param theVector Direction of the translation.
346 * \param theStep Distance to translate on.
347 * \param theNbTimes Quantity of translations to be done.
348 * \return New GEOM_Object, containing compound of all
349 * the shapes, obtained after each translation.
351 GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
352 in GEOM_Object theVector,
357 * Conseqently apply two specified translations to theObject specified number of times.
358 * \param theObject The object to be translated.
359 * \param theVector1 Direction of the first translation.
360 * \param theStep1 Step of the first translation.
361 * \param theNbTimes1 Quantity of translations to be done along theVector1.
362 * \param theVector2 Direction of the second translation.
363 * \param theStep2 Step of the second translation.
364 * \param theNbTimes2 Quantity of translations to be done along theVector2.
365 * \return New GEOM_Object, containing compound of all
366 * the shapes, obtained after each translation.
368 GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
369 in GEOM_Object theVector1,
372 in GEOM_Object theVector2,
374 in long theNbTimes2);
377 * Rotate the given object around the given axis on the given angle.
378 * \param theObject The object to be rotated.
379 * \param theAxis Rotation axis.
380 * \param theAngle Rotation angle in radians.
383 GEOM_Object Rotate (in GEOM_Object theObject,
384 in GEOM_Object theAxis,
388 * Rotate the given object around the given axis
389 * on the given angle, creating its copy before the rotatation.
390 * \param theObject The object to be rotated.
391 * \param theAxis Rotation axis.
392 * \param theAngle Rotation angle in radians.
393 * \return New GEOM_Object, containing the rotated object.
395 GEOM_Object RotateCopy (in GEOM_Object theObject,
396 in GEOM_Object theAxis,
400 * Rotate the given object around the given axis a given number times.
401 * Rotation angle will be 2*PI/theNbTimes.
402 * \param theObject The object to be rotated.
403 * \param theAxis The rotation axis.
404 * \param theNbTimes Quantity of rotations to be done.
405 * \return New GEOM_Object, containing compound of all the
406 * shapes, obtained after each rotation.
408 GEOM_Object MultiRotate1D (in GEOM_Object theObject,
409 in GEOM_Object theAxis,
413 * Rotate the given object around the
414 * given axis on the given angle a given number
415 * times and multi-translate each rotation result.
416 * Translation direction passes through center of gravity
417 * of rotated shape and its projection on the rotation axis.
418 * \param theObject The object to be rotated.
419 * \param theAxis Rotation axis.
420 * \param theAngle Rotation angle in graduces.
421 * \param theNbTimes1 Quantity of rotations to be done.
422 * \param theStep Translation distance.
423 * \param theNbTimes2 Quantity of translations to be done.
424 * \return New GEOM_Object, containing compound of all the
425 * shapes, obtained after each transformation.
427 GEOM_Object MultiRotate2D (in GEOM_Object theObject,
428 in GEOM_Object theAxis,
432 in long theNbTimes2);
435 * Replace the given object by an object,
436 * symmetrical to it relatively the given plane.
437 * \param theObject The object to be mirrored.
438 * \param thePlane Plane of symmetry.
440 GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
443 * Create an object, symmetrical
444 * to the given one relatively the given plane.
445 * \param theObject The object to be mirrored.
446 * \param thePlane Plane of symmetry.
447 * \return New GEOM_Object, containing the mirrored shape.
449 GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
452 * Replace the given object by an object,
453 * symmetrical to it relatively the given axis.
454 * \param theObject The object to be mirrored.
455 * \param theAxis Axis of symmetry.
458 GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
461 * Create an object, symmetrical
462 * to the given one relatively the given axis.
463 * \param theObject The object to be mirrored.
464 * \param theAxis Axis of symmetry.
465 * \return New GEOM_Object, containing the mirrored object.
467 GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
470 * Replace the given object by an object, symmetrical to it relatively the given point.
471 * \param theObject The object to be mirrored.
472 * \param thePoint Point of symmetry.
475 GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
478 * Create an object, symmetrical to the given one relatively the given point.
479 * \param theObject The object to be mirrored.
480 * \param thePoint Point of symmetry.
481 * \return New GEOM_Object, containing the mirrored object.
483 GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
486 * Replace the given object by its offset.
487 * \param theObject The base object for the offset.
488 * \param theOffset Offset value.
491 GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
494 * Create new object as offset of the given one.
495 * \param theObject The base object for the offset.
496 * \param theOffset Offset value.
497 * \return New GEOM_Object, containing the offset object.
499 GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
502 * Scale the given object by the factor.
503 * \param theObject The object to be scaled.
504 * \param thePoint Center point for scaling.
505 * \param theFactor Scaling factor value.
508 GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
509 in double theFactor);
512 * Scale the given object by the factor, creating its copy before the scaling.
513 * \param theObject The object to be scaled.
514 * \param thePoint Center point for scaling.
515 * \param theFactor Scaling factor value.
516 * \return New GEOM_Object, containing the scaled shape.
518 GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
519 in double theFactor);
522 * PositionShape() - Modify the Location of the given object by LCS
524 GEOM_Object PositionShape (in GEOM_Object theObject,
525 in GEOM_Object theStartLCS,
526 in GEOM_Object theEndLCS);
529 * PositionShapeCopy() - Modify the Location of the given object by LCS
530 * creating its copy before the setting
532 GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
533 in GEOM_Object theStartLCS,
534 in GEOM_Object theEndLCS);
538 * GEOM_I3DPrimOperations: Interface for 3D primitives creation
539 * Box, Cylinder, Cone, Sphere, Prism (extrusion),
540 * Pipe (extrusion along contour), Revolution, Solid (from shell).
542 interface GEOM_I3DPrimOperations : GEOM_IOperations
545 * Create a box with specified dimensions along the coordinate axes
546 * and with edges, parallel to the coordinate axes.
547 * Center of the box will be at point (DX/2, DY/2, DZ/2).
548 * \param theDX Length of Box edges, parallel to OX axis.
549 * \param theDY Length of Box edges, parallel to OY axis.
550 * \param theDZ Length of Box edges, parallel to OZ axis.
551 * \return New GEOM_Object, containing the created box.
553 GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
556 * Create a box with two specified opposite vertices,
557 * and with edges, parallel to the coordinate axes
558 * \param thePnt1 First of two opposite vertices.
559 * \param thePnt2 Second of two opposite vertices.
560 * \return New GEOM_Object, containing the created box.
562 GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
565 * Create a cylinder with given radius and height at
566 * the origin of coordinate system. Axis of the cylinder
567 * will be collinear to the OZ axis of the coordinate system.
568 * \param theR Cylinder radius.
569 * \param theH Cylinder height.
570 * \return New GEOM_Object, containing the created cylinder.
572 GEOM_Object MakeCylinderRH (in double theR, in double theH);
575 * Create a cylinder with given base point, axis, radius and height.
576 * \param thePnt Central point of cylinder base.
577 * \param theAxis Cylinder axis.
578 * \param theR Cylinder radius.
579 * \param theH Cylinder height.
580 * \return New GEOM_Object, containing the created cylinder.
582 GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
583 in GEOM_Object theAxis,
588 * Create a cone with given height and radiuses at
589 * the origin of coordinate system. Axis of the cone will
590 * be collinear to the OZ axis of the coordinate system.
591 * \param theR1 Radius of the first cone base.
592 * \param theR2 Radius of the second cone base.
593 * \note If both radiuses are non-zero, the cone will be truncated.
594 * \note If the radiuses are equal, a cylinder will be created instead.
595 * \param theH Cone height.
596 * \return New GEOM_Object, containing the created cone.
598 GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
601 * Create a cone with given base point, axis, height and radiuses.
602 * \param thePnt Central point of the first cone base.
603 * \param theAxis Cone axis.
604 * \param theR1 Radius of the first cone base.
605 * \param theR2 Radius of the second cone base.
606 * \note If both radiuses are non-zero, the cone will be truncated.
607 * \note If the radiuses are equal, a cylinder will be created instead.
608 * \param theH Cone height.
609 * \return New GEOM_Object, containing the created cone.
611 GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
612 in GEOM_Object theAxis,
618 * Create a torus with given radiuses at the origin of coordinate system.
619 * \param theRMajor Torus major radius.
620 * \param theRMinor Torus minor radius.
621 * \return New GEOM_Object, containing the created torus.
623 GEOM_Object MakeTorusRR (in double theRMajor,
624 in double theRMinor);
627 * Create a torus with given center, normal vector and radiuses.
628 * \param thePnt Torus central point.
629 * \param theVec Torus axis of symmetry.
630 * \param theRMajor Torus major radius.
631 * \param theRMinor Torus minor radius.
632 * \return New GEOM_Object, containing the created torus.
634 GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
635 in GEOM_Object theVec,
637 in double theRMinor);
640 * Create a sphere with given radius at the origin of coordinate system.
641 * \param theR Sphere radius.
642 * \return New GEOM_Object, containing the created sphere.
644 GEOM_Object MakeSphereR (in double theR);
647 * Create a sphere with given center and radius.
648 * \param thePnt Sphere center.
649 * \param theR Sphere radius.
650 * \return New GEOM_Object, containing the created .
652 GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
655 * Create a shape by extrusion of the base shape along the vector,
656 * i.e. all the space, transfixed by the base shape during its translation
657 * along the vector on the given distance.
658 * \param theBase Base shape to be extruded.
659 * \param theVec Direction of extrusion.
660 * \param theH Prism dimension along theVec.
661 * \return New GEOM_Object, containing the created prism.
663 GEOM_Object MakePrismVecH (in GEOM_Object theBase,
664 in GEOM_Object theVec,
668 * Create a shape by extrusion of the base shape along a vector, defined by two points.
669 * \param theBase Base shape to be extruded.
670 * \param thePoint1 First end of extrusion vector.
671 * \param thePoint2 Second end of extrusion vector.
672 * \return New GEOM_Object, containing the created prism.
674 GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
675 in GEOM_Object thePoint1,
676 in GEOM_Object thePoint2);
679 * Create a shape by extrusion of the base shape along
680 * the path shape. The path shape can be a wire or an edge.
681 * \param theBase Base shape to be extruded.
682 * \param thePath Path shape to extrude the base shape along it.
683 * \return New GEOM_Object, containing the created pipe.
685 GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
688 * Create a shape by revolution of the base shape around the axis
689 * on the given angle, i.e. all the space, transfixed by the base
690 * shape during its rotation around the axis on the given angle.
691 * \param theBase Base shape to be rotated.
692 * \param theAxis Rotation axis.
693 * \param theAngle Rotation angle in radians.
694 * \return New GEOM_Object, containing the created revolution.
696 GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
697 in GEOM_Object theAxis,
701 * Create a filling from the given compound of contours.
702 * \param theMinDeg a minimal degree
703 * \param theMaxDeg a maximal degree
704 * \param theTol2D a 2d tolerance
705 * \param theTol3D a 3d tolerance
706 * \param theNbIter a number of iteration
707 * \return New GEOM_Object, containing the created filling surface.
709 GEOM_Object MakeFilling (in GEOM_Object theShape,
710 in long theMinDeg, in long theMaxDeg,
711 in double theTol2D, in double theTol3D,
716 * GEOM_IShapesOperations: Interface for Shapes creation
717 * Edge from two points, Wire from edges, Face from wire,
718 * Shell from faces, Solid from shells, Compound from shapes
720 interface GEOM_IShapesOperations : GEOM_IOperations
723 * Create a linear edge with specified ends.
724 * \param thePnt1 Point for the first end of edge.
725 * \param thePnt2 Point for the second end of edge.
726 * \return New GEOM_Object, containing the created edge.
728 GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
731 * Create a wire from the set of edges and wires.
732 * \param theEdgesAndWires List of edge and/or wires.
733 * \return New GEOM_Object, containing the created wire.
735 GEOM_Object MakeWire (in ListOfGO theEdgesAndWires);
738 * Create a face on the given wire.
739 * \param theWire Wire to build the face on.
740 * \param isPlanarWanted If TRUE, only planar face will be built.
741 * If impossible, NULL object will be returned.
742 * \return New GEOM_Object, containing the created face.
744 GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
747 * Create a face on the given wires set.
748 * \param theWires List of wires to build the face on.
749 * \param isPlanarWanted If TRUE, only planar face will be built.
750 * If impossible, NULL object will be returned.
751 * \return New GEOM_Object, containing the created face.
753 GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
756 * Create a shell from the set of faces and shells.
757 * \param theFacesAndShells List of faces and/or shells.
758 * \return New GEOM_Object, containing the created shell.
760 GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
763 * Create a solid, bounded by the given shell.
764 * \param theShell Bounding shell.
765 * \return New GEOM_Object, containing the created solid.
767 GEOM_Object MakeSolidShell (in GEOM_Object theShell);
770 * Create a solid, bounded by the given shells.
771 * \param theShells Bounding shells.
772 * \return New GEOM_Object, containing the created solid.
774 GEOM_Object MakeSolidShells (in ListOfGO theShells);
777 * Create a compound of the given shapes.
778 * \param theShapes List of shapes to put in compound.
779 * \return New GEOM_Object, containing the created compound.
781 GEOM_Object MakeCompound (in ListOfGO theShapes);
784 * Replace coincident faces in theShape by one face.
785 * \param theShape Initial shape.
786 * \param theTolerance Maximum distance between faces, which can be considered as coincident.
787 * \return New GEOM_Object, containing a copy of theShape without coincident faces.
789 GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance);
792 * Explode a shape on subshapes of a given type.
793 * \param theShape Shape to be exploded.
794 * \param theShapeType Type of sub-shapes to be retrieved.
795 * \param isSorted If this parameter is TRUE, sub-shapes will be
796 * sorted by coordinates of their gravity centers.
797 * \return List of sub-shapes of type theShapeType, contained in theShape.
799 ListOfGO MakeExplode (in GEOM_Object theShape,
800 in long theShapeType,
801 in boolean isSorted);
804 * Count number of faces in the given shape.
805 * \param theShape Shape to count faces in.
806 * \return Number of faces in the given shape.
808 long NumberOfFaces (in GEOM_Object theShape);
811 * Count number of edges in the given shape.
812 * \param theShape Shape to count edges in.
813 * \return Number of edges in theShape.
815 long NumberOfEdges (in GEOM_Object theShape);
818 * Reverses an orientation the given shape.
819 * \param theShape Shape to be reversed.
820 * \return The reversed copy of theShape.
822 GEOM_Object ChangeOrientation (in GEOM_Object theShape);
828 * GEOM_IBlocksOperations: Interface for Blocks construction
829 * Face from points or edges, Block from faces,
830 * Blocks multi-translation and multi-rotation
832 interface GEOM_IBlocksOperations : GEOM_IOperations
839 * Create a quadrangle face with specified corners.
840 * The missing edges will be built by creating the shortest ones.
841 * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
842 * \return New GEOM_Object, containing the created face.
844 GEOM_Object MakeQuadFaceFourVertices (in GEOM_Object thePnt1,
845 in GEOM_Object thePnt2,
846 in GEOM_Object thePnt3,
847 in GEOM_Object thePnt4);
850 * Create a quadrangle face from four edges. Order of Edges is not
851 * important. It is not necessary that edges share the same vertex.
852 * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
853 * \return New GEOM_Object, containing the created face.
855 GEOM_Object MakeQuadFaceFourEdges (in GEOM_Object theEdge1,
856 in GEOM_Object theEdge2,
857 in GEOM_Object theEdge3,
858 in GEOM_Object theEdge4);
861 * Create a quadrangle face on two edges.
862 * The missing edges will be built by creating the shortest ones.
863 * \param theEdge1,theEdge2 Two opposite edges for the face.
864 * \return New GEOM_Object, containing the created face.
866 GEOM_Object MakeQuadFaceTwoEdges (in GEOM_Object theEdge1,
867 in GEOM_Object theEdge2);
870 * Create a hexahedral solid, bounded by the six given faces. Order of
871 * faces is not important. It is not necessary that Faces share the same edge.
872 * \param theFace1-theFace6 Faces for the hexahedral solid.
873 * \return New GEOM_Object, containing the created solid.
875 GEOM_Object MakeHexaSolidSixFaces (in GEOM_Object theFace1,
876 in GEOM_Object theFace2,
877 in GEOM_Object theFace3,
878 in GEOM_Object theFace4,
879 in GEOM_Object theFace5,
880 in GEOM_Object theFace6);
883 * Create a hexahedral solid between two given faces.
884 * The missing faces will be built by creating the smallest ones.
885 * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
886 * \return New GEOM_Object, containing the created solid.
888 GEOM_Object MakeHexaSolidTwoFaces (in GEOM_Object theFace1,
889 in GEOM_Object theFace2);
892 * Extract elements of blocks and blocks compounds
896 * Get an edge, found in the given shape by two given vertices.
897 * \param theShape Block or a compound of blocks.
898 * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
899 * \return New GEOM_Object, containing the found edge.
901 GEOM_Object GetEdge (in GEOM_Object theShape,
902 in GEOM_Object thePoint1,
903 in GEOM_Object thePoint2);
906 * Returns a face, found in the given shape by four given corner vertices.
907 * \param theShape Block or a compound of blocks.
908 * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
909 * \return New GEOM_Object, containing the found face.
911 GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
912 in GEOM_Object thePoint1,
913 in GEOM_Object thePoint2,
914 in GEOM_Object thePoint3,
915 in GEOM_Object thePoint4);
918 * Get a face of block, found in the given shape by two given edges.
919 * \param theShape Block or a compound of blocks.
920 * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
921 * \return New GEOM_Object, containing the found face.
923 GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
924 in GEOM_Object theEdge1,
925 in GEOM_Object theEdge2);
928 * Find a face, opposite to the given one in the given block.
929 * \param theBlock Must be a hexahedral solid.
930 * \param theFace Face of <VAR>theBlock</VAR>, opposite to the desired face.
931 * \return New GEOM_Object, containing the found face.
933 GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
934 in GEOM_Object theFace);
937 * Find a face of the given shape, which has minimal distance to the given point.
938 * \param theShape Block or a compound of blocks.
939 * \param thePoint Point, close to the desired face.
940 * \return New GEOM_Object, containing the found face.
942 GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
943 in GEOM_Object thePoint);
946 * Find a face of block, whose outside normale has minimal angle with the given vector.
947 * \param theShape Block or a compound of blocks.
948 * \param theVector Vector, close to the normale of the desired face.
949 * \return New GEOM_Object, containing the found face.
951 GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
952 in GEOM_Object theVector);
955 * Extract blocks from blocks compounds
959 * Check, if the compound contains only specified blocks.
960 * \param theCompound The compound to check.
961 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
962 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
963 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
964 * \return TRUE, if the given compound contains only blocks.
965 * \return theNbBlocks Number of specified blocks in theCompound.
967 boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
968 in long theMinNbFaces,
969 in long theMaxNbFaces,
970 out long theNbBlocks);
973 * Get all the blocks, contained in the given compound.
974 * \param theCompound The compound to explode.
975 * \param theMinNbFaces If solid has lower number of faces, it is not a block.
976 * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
977 * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
978 * \return List of GEOM_Objects, containing the retrieved blocks.
980 ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
981 in long theMinNbFaces,
982 in long theMaxNbFaces);
985 * Find block, containing the given point inside its volume or on boundary.
986 * \param theCompound Compound, to find block in.
987 * \param thePoint Point, close to the desired block. If the point lays on
988 * boundary between some blocks, we return block with nearest center.
989 * \return New GEOM_Object, containing the found block.
991 GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
992 in GEOM_Object thePoint);
995 * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
996 * \param theCompound Compound, to find block in.
997 * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
998 * \return New GEOM_Object, containing the found block.
1000 GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1001 in ListOfGO theParts);
1004 * Return all blocks, containing all the elements, passed as the parts.
1005 * \param theCompound Compound, to find blocks in.
1006 * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1007 * \return List of GEOM_Objects, containing the found blocks.
1009 ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1010 in ListOfGO theParts);
1013 * Operations on blocks with gluing of result
1017 * Multi-transformate block and glue the result.
1018 * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1019 * \param theBlock Hexahedral solid to be multi-transformed.
1020 * \param theDirFace1 First direction face global index.
1021 * \param theDirFace2 Second direction face global index.
1022 * \param theNbTimes Quantity of transformations to be done.
1023 * \note Global index of sub-shape can be obtained, using method <VAR>GEOM_ILocalOperations.GetSubShapeIndex()</VAR>.
1024 * \return New GEOM_Object, containing the result shape.
1026 GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
1027 in long theDirFace1,
1028 in long theDirFace2,
1029 in long theNbTimes);
1032 * Multi-transformate block and glue the result.
1033 * \param theBlock Hexahedral solid to be multi-transformed.
1034 * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
1035 * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
1036 * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
1037 * \return New GEOM_Object, containing the result shape.
1039 GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
1040 in long theDirFace1U,
1041 in long theDirFace2U,
1042 in long theNbTimesU,
1043 in long theDirFace1V,
1044 in long theDirFace2V,
1045 in long theNbTimesV);
1049 * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
1051 interface GEOM_IBooleanOperations : GEOM_IOperations
1054 * Perform one of boolean operations on two given shapes.
1055 * \param theShape1 First argument for boolean operation.
1056 * \param theShape2 Second argument for boolean operation.
1057 * \param theOperation Indicates the operation to be done:
1058 * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
1059 * \return New GEOM_Object, containing the result shape.
1061 GEOM_Object MakeBoolean (in GEOM_Object theShape1,
1062 in GEOM_Object theShape2,
1063 in long theOperation);
1066 * Perform partition operation.
1067 * \param theShapes Shapes to be intersected.
1068 * \param theTools Shapes to intersect theShapes.
1069 * \param theKeepInside Shapes, outside which the results will be deleted.
1070 * Each shape from theKeepInside must belong to theShapes also.
1071 * \param theRemoveInside Shapes, inside which the results will be deleted.
1072 * Each shape from theRemoveInside must belong to theShapes also.
1073 * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
1074 * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
1075 * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
1076 * \return New GEOM_Object, containing the result shapes.
1078 GEOM_Object MakePartition (in ListOfGO theShapes,
1079 in ListOfGO theTools,
1080 in ListOfGO theKeepInside,
1081 in ListOfGO theRemoveInside,
1083 in boolean theRemoveWebs,
1084 in ListOfLong theMaterials);
1087 * Perform partition of the Shape with the Plane
1088 * \param theShape Shape to be intersected.
1089 * \param thePlane Tool shape, to intersect theShape.
1090 * \return New GEOM_Object, containing the result shape.
1092 GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
1093 in GEOM_Object thePlane);
1097 * GEOM_ICurvesOperations: Interface for curves creation.
1098 * Polyline, Circle, Spline (Bezier and Interpolation)
1100 interface GEOM_ICurvesOperations : GEOM_IOperations
1103 * Create a circle with given center, normal vector and radius.
1104 * \param thePnt Circle center.
1105 * \param theVec Vector, normal to the plane of the circle.
1106 * \param theR Circle radius.
1107 * \return New GEOM_Object, containing the created circle.
1109 GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
1110 in GEOM_Object theVec,
1113 * Create a circle, passing through three given points
1114 * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1115 * \return New GEOM_Object, containing the created circle.
1117 GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
1118 in GEOM_Object thePnt2,
1119 in GEOM_Object thePnt3);
1122 * Create an ellipse with given center, normal vector and radiuses.
1123 * \param thePnt Ellipse center.
1124 * \param theVec Vector, normal to the plane of the ellipse.
1125 * \param theRMajor Major ellipse radius.
1126 * \param theRMinor Minor ellipse radius.
1127 * \return New GEOM_Object, containing the created ellipse.
1129 GEOM_Object MakeEllipse (in GEOM_Object thePnt,
1130 in GEOM_Object theVec,
1131 in double theRMajor,
1132 in double theRMinor);
1135 * Create an arc of circle, passing through three given points.
1136 * \param thePnt1 Start point of the arc.
1137 * \param thePnt2 Middle point of the arc.
1138 * \param thePnt3 End point of the arc.
1139 * \return New GEOM_Object, containing the created arc.
1141 GEOM_Object MakeArc (in GEOM_Object thePnt1,
1142 in GEOM_Object thePnt2,
1143 in GEOM_Object thePnt3);
1146 * Create a polyline on the set of points.
1147 * \param thePoints Sequence of points for the polyline.
1148 * \return New GEOM_Object, containing the created polyline.
1150 GEOM_Object MakePolyline (in ListOfGO thePoints);
1153 * Create bezier curve on the set of points.
1154 * \param thePoints Sequence of points for the bezier curve.
1155 * \return New GEOM_Object, containing the created bezier curve.
1157 GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
1160 * Create B-Spline curve on the set of points.
1161 * \param thePoints Sequence of points for the B-Spline curve.
1162 * \return New GEOM_Object, containing the created B-Spline curve.
1164 GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
1167 * Create a wire from a list containing many points.
1168 * \param theCommand String, defining the wire in local coordinates of <VAR>theWorkingPlane</VAR>.
1169 * \param theWorkingPlane Nine double values, defining origin, OZ and OX directions of the working plane.
1170 * \return New GEOM_Object, containing the created wire.
1172 GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
1176 * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
1178 interface GEOM_ILocalOperations : GEOM_IOperations
1181 * Perform a fillet on all edges of the given shape.
1182 * \param theShape Shape, to perform fillet on.
1183 * \param theR Fillet radius.
1184 * \return New GEOM_Object, containing the result shape.
1186 GEOM_Object MakeFilletAll (in GEOM_Object theShape,
1190 * Perform a fillet on the specified edges of the given shape
1191 * \param theShape Shape, to perform fillet on.
1192 * \param theR Fillet radius.
1193 * \param theEdges Global indices of edges to perform fillet on.
1194 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1195 * \return New GEOM_Object, containing the result shape.
1197 GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
1199 in ListOfLong theEdges);
1202 * Perform a fillet on all edges of the specified faces of the given shape.
1203 * \param theShape Shape, to perform fillet on.
1204 * \param theR Fillet radius.
1205 * \param theFaces Global indices of faces to perform fillet on.
1206 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1207 * \return New GEOM_Object, containing the result shape.
1209 GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
1211 in ListOfLong theFaces);
1214 * Perform a symmetric chamfer on all edges of the given shape.
1215 * \param theShape Shape, to perform chamfer on.
1216 * \param theD Chamfer size along each face.
1217 * \return New GEOM_Object, containing the result shape.
1219 GEOM_Object MakeChamferAll (in GEOM_Object theShape,
1223 * Perform a chamfer on edges, common to the specified faces.
1224 * with distance D1 on the Face1
1225 * \param theShape Shape, to perform chamfer on.
1226 * \param theD1 Chamfer size along <VAR>theFace1</VAR>.
1227 * \param theD2 Chamfer size along <VAR>theFace2</VAR>.
1228 * \param theFace1,theFace2 Global indices of two faces of <VAR>theShape</VAR>.
1229 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1230 * \return New GEOM_Object, containing the result shape.
1232 GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
1233 in double theD1, in double theD2,
1234 in long theFace1, in long theFace2);
1237 * Perform a chamfer on all edges of the specified faces.
1238 * with distance D1 on the first specified face (if several for one edge)
1239 * \param theShape Shape, to perform chamfer on.
1240 * \param theD1 Chamfer size along face from <VAR>theFaces</VAR>. If both faces,
1241 * connected to the edge, are in <VAR>theFaces</VAR>, <VAR>theD1</VAR>
1242 * will be get along face, which is nearer to <VAR>theFaces</VAR> beginning.
1243 * \param theD2 Chamfer size along another of two faces, connected to the edge.
1244 * \param theFaces Sequence of global indices of faces of <VAR>theShape</VAR>.
1245 * \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1246 * \return New GEOM_Object, containing the result shape.
1248 GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
1249 in double theD1, in double theD2,
1250 in ListOfLong theFaces);
1253 * Perform an Archimde operation on the given shape with given parameters.
1254 * The object presenting the resulting face is returned
1255 * \param theShape Shape to be put in water.
1256 * \param theWeight Weight og the shape.
1257 * \param theWaterDensity Density of the water.
1258 * \param theMeshDeflection Deflection od the mesh, using to compute the section.
1259 * \return New GEOM_Object, containing a section of <VAR>theShape</VAR> by a plane, corresponding to water level.
1261 GEOM_Object MakeArchimede (in GEOM_Object theShape,
1262 in double theWeight,
1263 in double theWaterDensity,
1264 in double theMeshDeflection);
1267 * Get global index of <VAR>theSubShape</VAR> in <VAR>theShape</VAR>.
1268 * \param theShape Main shape.
1269 * \param theSubShape Sub-shape of the main shape.
1270 * \return global index of <VAR>theSubShape</VAR> in <VAR>theShape</VAR>.
1272 long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
1276 * GEOM_IHealingOperations: Interface for shape healing operations.
1277 * Shape Processing, SuppressFaces, etc.
1279 interface GEOM_IHealingOperations : GEOM_IOperations
1282 * Apply a sequence of Shape Healing operators to the given object.
1283 * \param theShapes Shape to be processed.
1284 * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
1285 * \param theParameters List of names of parameters
1286 * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
1287 * \param theValues List of values of parameters, in the same order
1288 * as parameters are listed in <VAR>theParameters</VAR> list.
1289 * \return New GEOM_Object, containing processed shape.
1291 GEOM_Object ProcessShape (in GEOM_Object theShapes,
1292 in string_array theOperators,
1293 in string_array theParameters,
1294 in string_array theValues);
1297 * Get default sequence of operators, their parameters and parameters' values
1298 * of Shape Process operation. In the current implementation the defaults are
1299 * read from the file pointed by CSF_ShHealingDefaults environmental variable.
1300 * \param theOperators Output. Default list of names of operators.
1301 * \param theParameters Output. Default list of names of parameters.
1302 * \param theValues Output. List of default values of parameters, in the same order
1303 * as parameters are listed in <VAR>theParameters</VAR> list.
1305 void GetShapeProcessParameters (out string_array theOperators,
1306 out string_array theParameters,
1307 out string_array theValues);
1310 * Remove faces from the given object (shape).
1311 * \param theObject Shape to be processed.
1312 * \param theFaces Indices of faces to be removed, if EMPTY then the method
1313 * removes ALL faces of the given object.
1314 * \return New GEOM_Object, containing processed shape.
1316 GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
1319 * Close an open wire.
1320 * \param theObject Shape to be processed.
1321 * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
1322 * if -1, then theObject itself is a wire.
1323 * \param isCommonVertex If TRUE : closure by creation of a common vertex,
1324 * If FALS : closure by creation of an edge between ends.
1325 * \return New GEOM_Object, containing processed shape.
1327 GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
1328 in boolean isCommonVertex);
1331 * Remove internal wires and edges from the given object (face).
1332 * \param theObject Shape to be processed.
1333 * \param theWires Indices of wires to be removed, if EMPTY then the method
1334 * removes ALL internal wires of the given object.
1335 * \return New GEOM_Object, containing processed shape.
1337 GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
1340 * Remove internal closed contours (holes) from the given object.
1341 * \param theObject Shape to be processed.
1342 * \param theWires Indices of wires to be removed, if EMPTY then the method
1343 * removes ALL internal holes of the given object
1344 * \return New GEOM_Object, containing processed shape.
1346 GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
1349 * Sewing of the given object.
1350 * \param theObject Shape to be processed.
1351 * \param theTolerance Required tolerance value.
1352 * \return New GEOM_Object, containing processed shape.
1354 GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
1357 * Addition of a point to a given edge object.
1358 * \param theObject Shape to be processed.
1359 * \param theEdgeIndex Index of edge to be divided within theObject's shape,
1360 * if -1, then theObject itself is the edge.
1361 * \param theValue Value of parameter on edge or length parameter, depending on <VAR>isByParameter</VAR>.
1362 * \param isByParameter If TRUE : <VAR>theValue</VAR> is treated as a curve parameter [0..1],
1363 * if FALSE : <VAR>theValue</VAR> is treated as a length parameter [0..1]
1364 * \return New GEOM_Object, containing processed shape.
1366 GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
1367 in double theValue, in boolean isByParameter);
1370 * Get a list of wires (wrapped in GEOM_Object-s),
1371 * that constitute a free boundary of the given shape.
1372 * \param theObject Shape to get free boundary of.
1373 * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
1374 * \param theOpenWires Output. Open wires on the free boundary of the given shape.
1375 * \return FALSE, if an error(s) occured during the method execution.
1377 boolean GetFreeBoundary (in GEOM_Object theObject,
1378 out ListOfGO theClosedWires,
1379 out ListOfGO theOpenWires);
1383 * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
1386 interface GEOM_IInsertOperations : GEOM_IOperations
1389 * MakeCopy() - create a copy of the given object
1391 GEOM_Object MakeCopy (in GEOM_Object theOriginal);
1394 * Export the given shape into a file with given name.
1395 * \param theObject Shape to be stored in the file.
1396 * \param theFileName Name of the file to store the given shape in.
1397 * \param theFormatName Specify format for the shape storage.
1398 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1400 void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
1403 * Import a shape from the BRep or IGES or STEP file
1404 * (depends on given format) with given name.
1405 * \param theFileName The file, containing the shape.
1406 * \param theFormatName Specify format for the file reading.
1407 * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1408 * \return New GEOM_Object, containing the imported shape.
1410 GEOM_Object Import (in string theFileName, in string theFormatName);
1413 * Get the supported import formats and corresponding patterns for File dialog.
1414 * \param theFormats Output. List of formats, available for import.
1415 * \param thePatterns Output. List of file patterns, corresponding to available formats.
1416 * \return Returns available formats and patterns through the arguments.
1418 void ImportTranslators (out string_array theFormats,
1419 out string_array thePatterns);
1422 * Get the supported export formats and corresponding patterns for File dialog.
1423 * \param theFormats Output. List of formats, available for export.
1424 * \param thePatterns Output. List of file patterns, corresponding to available formats.
1425 * \return Returns available formats and patterns through the arguments.
1427 void ExportTranslators (out string_array theFormats,
1428 out string_array thePatterns);
1432 * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
1433 * properties calculation (like Centre of Mass, Inertia, etc.).
1436 interface GEOM_IMeasureOperations : GEOM_IOperations
1439 * Get summarized length of all wires,
1440 * area of surface and volume of the given shape.
1441 * \param theShape Shape to define properties of.
1442 * \param theLength Output. Summarized length of all wires of the given shape.
1443 * \param theSurfArea Output. Area of surface of the given shape.
1444 * \param theVolume Output. Volume of the given shape.
1445 * \return Returns shape properties through the last three arguments.
1447 void GetBasicProperties (in GEOM_Object theShape,
1448 out double theLength,
1449 out double theSurfArea,
1450 out double theVolume);
1453 * Get a point, situated at the centre of mass of theShape.
1454 * \param theShape Shape to define centre of mass of.
1455 * \return New GEOM_Object, containing the created point.
1457 GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
1460 * Get inertia matrix and moments of inertia of theShape.
1461 * \param theShape Shape to calculate inertia of.
1462 * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
1463 * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
1464 * \return Returns inertia through the last twelve arguments.
1466 void GetInertia (in GEOM_Object theShape,
1467 out double I11, out double I12, out double I13,
1468 out double I21, out double I22, out double I23,
1469 out double I31, out double I32, out double I33,
1470 out double Ix , out double Iy , out double Iz);
1473 * Get parameters of bounding box of the given shape
1474 * \param theShape Shape to obtain bounding box of.
1475 * \param Xmin,Xmax Output. Limits of shape along OX axis.
1476 * \param Ymin,Ymax Output. Limits of shape along OY axis.
1477 * \param Zmin,Zmax Output. Limits of shape along OZ axis.
1478 * \return Returns parameters of bounding box through the last six arguments.
1480 void GetBoundingBox (in GEOM_Object theShape,
1481 out double Xmin, out double Xmax,
1482 out double Ymin, out double Ymax,
1483 out double Zmin, out double Zmax);
1486 * Get min and max tolerances of sub-shapes of theShape
1487 * \param theShape Shape, to get tolerances of.
1488 * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
1489 * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
1490 * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
1491 * \return Returns shape tolerances through the last six arguments.
1493 void GetTolerance (in GEOM_Object theShape,
1494 out double FaceMin, out double FaceMax,
1495 out double EdgeMin, out double EdgeMax,
1496 out double VertMin, out double VertMax);
1499 * Check a topology of the given shape.
1500 * \param theShape Shape to check validity of.
1501 * \param theDescription Output. Description of problems in the shape, if they are.
1502 * \return TRUE, if the shape "seems to be valid" from the topological point of view.
1504 boolean CheckShape (in GEOM_Object theShape,
1505 out string theDescription);
1508 * Obtain description of the given shape
1509 * \param theShape Shape to be described.
1510 * \return Description of the given shape.
1512 string WhatIs (in GEOM_Object theShape);
1515 * Get minimal distance between the given shapes.
1516 * \param theShape1,theShape2 Shapes to find minimal distance between.
1517 * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
1518 * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
1519 * \return Value of the minimal distance between the given shapes.
1521 double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
1522 out double X1, out double Y1, out double Z1,
1523 out double X2, out double Y2, out double Z2);
1527 * Get point coordinates
1529 void PointCoordinates( in GEOM_Object theShape, out double X, out double Y, out double Z );
1534 * GEOM_IGroupOperations: Interface for groups creation.
1536 interface GEOM_IGroupOperations : GEOM_IOperations
1539 * CreateGroup() - creates a new group which will store sub shapes of theMainShape
1540 * \param theMainShape is a GEOM object on which the group is selected
1541 * \param theShapeType defines a shape type of the group
1542 * \return a newly created GEOM group
1544 GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
1547 * AddObject() - adds a sub object with ID theSubShapeId to the group
1548 * \param theGroup is a GEOM group to which the new sub shape is added
1549 * \param theSubShapeId is a sub shape ID in the main object. Use method GetSubShapeIndex of ILocalOperations to get an ID by the sub shape
1551 void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
1554 * RemoveObject() - removes a sub object with ID theSubShapeId from the group
1555 * \param theGroup is a GEOM group from which the new sub shape is removed
1556 * \param theSubShapeId is a sub shape ID in the main object. Use method GetSubShapeIndex of ILocalOperations to get an ID by the sub shape
1558 void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
1561 * GetType() - returns a type of sub objects stored in the group
1562 * \param theGroup is a GEOM group which type is returned.
1564 long GetType (in GEOM_Object theGroup);
1567 * GetMainShape() - returns a main shape associated with the group
1568 * \param theGroup is a GEOM group for which a main shape object is requested
1569 * \return a GEOM object which is a main shape for theGroup
1571 GEOM_Object GetMainShape(in GEOM_Object theGroup);
1574 * GetObjects() - returns a list of sub objects ID stored in the group
1575 * \param theGroup is a GEOM group for which a list of IDs is requested
1577 ListOfLong GetObjects(in GEOM_Object theGroup);
1582 * GEOM_Gen: Interface to access other GEOM interfaces.
1583 * Also contains some methods to access and manage GEOM objects.
1585 interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
1587 typedef sequence<GEOM_Object> ListOfGeomShapes;
1590 * Undo/Redo Management
1593 void Undo(in long theStudyID);
1595 void Redo(in long theStudyID);
1598 * Publishing manangement
1599 * Adds in theStudy a object theObject under with a name theName, if theFather is not NULL the object is placed under thFather's SObject.
1600 * Returns a SObject where theObject is placed
1602 SALOMEDS::SObject AddInStudy(in SALOMEDS::Study theStudy, in GEOM_Object theObject, in string theName, in GEOM_Object theFather);
1605 * Methods to access interfaces for objects creation and transformation
1607 GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1608 GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
1609 GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1610 GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1611 GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1612 GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1613 GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1614 GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1615 GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1616 GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1617 GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1618 GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
1621 * Objects Management
1625 * RemoveObject() - removes the object from the GEOM component
1626 * \param theObject is a GEOM object to be removed
1628 void RemoveObject (in GEOM_Object theObject);
1631 * GetObject() - returns an object defined by the study and its entry in the GEOM component
1632 * \param theStudyID is a SALOMEDS Study ID
1633 * \param theEntry is an entry of the requested GEOM object in the GEOM component
1634 * NOTE: if the object has not previously been created a NULL GEOM object is returned
1636 GEOM_Object GetObject (in long theStudyID, in string theEntry);
1639 * AddSubShape() - add a sub shape defined by indices in theIndices (contains unique IDs of sub shapes inside theMainShape)
1640 * NOTE: The sub shape GEOM_Objects can has ONLY ONE function. Don't try to apply modification operations on them.
1641 * NOTE: Internal method
1643 GEOM_Object AddSubShape(in GEOM_Object theMainShape, in ListOfLong theIndices);
1646 * GEOM object's IOR Management
1650 * GetIORFromString() - returns a GEOM Object defined by its IOR
1651 * \param theIOR a string containg an IOR of the requested GEOM object
1653 GEOM_Object GetIORFromString (in string theIOR);
1656 * GetStringFromIOR() - returns a string which contains an IOR of the GEOM object
1657 * \param theObject is a GEOM object which IOR is requested
1659 string GetStringFromIOR (in GEOM_Object theObject);