+ };
+
+ /*!
+ * GEOM_IShapesOperations: Interface for Shapes creation:
+ * Edge from two points, Wire from edges, Face from wire,
+ * Shell from faces, Solid from shells, Compound from shapes
+ */
+ interface GEOM_IShapesOperations : GEOM_IOperations
+ {
+ /*!
+ * Create a linear edge with specified ends.
+ * \param thePnt1 Point for the first end of edge.
+ * \param thePnt2 Point for the second end of edge.
+ * \return New GEOM_Object, containing the created edge.
+ */
+ GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
+
+ /*!
+ * Create a wire from the set of edges and wires.
+ * \param theEdgesAndWires List of edge and/or wires.
+ * \return New GEOM_Object, containing the created wire.
+ */
+ GEOM_Object MakeWire (in ListOfGO theEdgesAndWires);
+
+ /*!
+ * Create a face on the given wire.
+ * \param theWire closed Wire or Edge to build the face on.
+ * \param isPlanarWanted If TRUE, only planar face will be built.
+ * If impossible, NULL object will be returned.
+ * \return New GEOM_Object, containing the created face.
+ */
+ GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
+
+ /*!
+ * Create a face on the given wires set.
+ * \param theWires List of closed wires or edges to build the face on.
+ * \param isPlanarWanted If TRUE, only planar face will be built.
+ * If impossible, NULL object will be returned.
+ * \return New GEOM_Object, containing the created face.
+ */
+ GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
+
+ /*!
+ * Create a shell from the set of faces and shells.
+ * \param theFacesAndShells List of faces and/or shells.
+ * \return New GEOM_Object, containing the created shell.
+ */
+ GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
+
+ /*!
+ * Create a solid, bounded by the given shell.
+ * \param theShell Bounding shell.
+ * \return New GEOM_Object, containing the created solid.
+ */
+ GEOM_Object MakeSolidShell (in GEOM_Object theShell);
+
+ /*!
+ * Create a solid, bounded by the given shells.
+ * \param theShells Bounding shells.
+ * \return New GEOM_Object, containing the created solid.
+ */
+ GEOM_Object MakeSolidShells (in ListOfGO theShells);
+
+ /*!
+ * Create a compound of the given shapes.
+ * \param theShapes List of shapes to put in compound.
+ * \return New GEOM_Object, containing the created compound.
+ */
+ GEOM_Object MakeCompound (in ListOfGO theShapes);
+
+ /*!
+ * Replace coincident faces in theShape by one face.
+ * \param theShape Initial shape.
+ * \param theTolerance Maximum distance between faces, which can be considered as coincident.
+ * \return New GEOM_Object, containing a copy of theShape without coincident faces.
+ */
+ GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance);
+
+ /*!
+ * Explode a shape on subshapes of a given type.
+ * \param theShape Shape to be exploded.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param isSorted If this parameter is TRUE, sub-shapes will be
+ * sorted by coordinates of their gravity centers.
+ * \return List of sub-shapes of type theShapeType, contained in theShape.
+ */
+ ListOfGO MakeExplode (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
+
+ /*!
+ * Explode a shape on subshapes of a given type.
+ * Does the same, as the above method, but returns IDs of sub-shapes,
+ * not GEOM_Objects. It works faster.
+ * \param theShape Shape to be exploded.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param isSorted If this parameter is TRUE, sub-shapes will be
+ * sorted by coordinates of their gravity centers.
+ * \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
+ */
+ ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in boolean isSorted);
+
+ /*!
+ * Get a sub shape defined by its unique ID inside \a theMainShape
+ * \note The sub shape GEOM_Objects can has ONLY ONE function.
+ * Don't try to apply modification operations on them.
+ */
+ GEOM_Object GetSubShape (in GEOM_Object theMainShape,
+ in long theID);
+
+ /*!
+ * Get global index of \a theSubShape in \a theMainShape.
+ * \param theMainShape Main shape.
+ * \param theSubShape Sub-shape of the main shape.
+ * \return global index of \a theSubShape in \a theMainShape.
+ */
+ long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
+
+ /*!
+ * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
+ * Together with method <VAR>GetShapeTypeString()</VAR> it can be used
+ * to generate automatic names for sub-shapes, when publishing them in a study.
+ * \param theMainShape Main shape.
+ * \param theSubShape Sub-shape of the main shape.
+ * \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
+ */
+ long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
+
+ /*!
+ * \brief Get name of type of \a theShape.
+ *
+ * Use wide type notation, taking into consideration both topology and geometry of the shape.
+ * Together with method <VAR>GetTopologyIndex()</VAR> it can be used
+ * to generate automatic names for sub-shapes, when publishing them in a study.
+ * \param theShape The shape to get a type of.
+ * \return String, containing a type name of \a theShape.
+ */
+ string GetShapeTypeString (in GEOM_Object theShape);
+
+ /*!
+ * Count number of faces in the given shape.
+ * \param theShape Shape to count faces in.
+ * \return Number of faces in the given shape.
+ */
+ long NumberOfFaces (in GEOM_Object theShape);
+
+ /*!
+ * Count number of edges in the given shape.
+ * \param theShape Shape to count edges in.
+ * \return Number of edges in theShape.
+ */
+ long NumberOfEdges (in GEOM_Object theShape);
+
+ /*!
+ * Reverses an orientation the given shape.
+ * \param theShape Shape to be reversed.
+ * \return The reversed copy of theShape.
+ */
+ GEOM_Object ChangeOrientation (in GEOM_Object theShape);
+
+ /*!
+ * Retrieve all free faces from the given shape.
+ * Free face is a face, which is not shared between two shells of the shape.
+ * \param theShape Shape to find free faces in.
+ * \return List of IDs of all free faces, contained in theShape.
+ */
+ ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
+
+ /*!
+ * Get all sub-shapes of theShape1 of the given type, shared with theShape2.
+ * \param theShape1 Shape to find sub-shapes in.
+ * \param theShape2 Shape to find shared sub-shapes with.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \return List of sub-shapes of theShape1, shared with theShape2.
+ */
+ ListOfGO GetSharedShapes (in GEOM_Object theShape1,
+ in GEOM_Object theShape2,
+ in long theShapeType);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified plane by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAx1 Vector (or line, or linear edge), specifying normal
+ * direction and location of the plane to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAx1,
+ in shape_state theState);
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified plane by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAx1 Vector (or line, or linear edge), specifying normal
+ * direction of the plane to find shapes on.
+ * \param thePnt Point specifying location of the plane to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAx1,
+ in GEOM_Object thePnt,
+ in shape_state theState);
+
+
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified cylinder by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAxis Vector (or line, or linear edge), specifying
+ * axis of the cylinder to find shapes on.
+ * \param theRadius Radius of the cylinder to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAxis,
+ in double theRadius,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified sphere by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theCenter Point, specifying center of the sphere to find shapes on.
+ * \param theRadius Radius of the sphere to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theCenter,
+ in double theRadius,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified quadrangle by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theTopLeftPoint Top left quadrangle corner
+ * \param theTopRigthPoint Top right quadrangle corner
+ * \param theBottomLeftPoint Bottom left quadrangle corner
+ * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theState The state of the subshapes to find.
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theTopLeftPoint,
+ in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theBottomLeftPoint,
+ in GEOM_Object theBottomRigthPoint,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified plane by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAx1 Vector (or line, or linear edge), specifying normal
+ * direction and location of the plane to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAx1,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified plane by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAx1 Vector (or line, or linear edge), specifying normal
+ * direction of the plane to find shapes on.
+ * \param thePnt Point specifying location of the plane to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAx1,
+ in GEOM_Object thePnt,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified cylinder by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theAxis Vector (or line, or linear edge), specifying
+ * axis of the cylinder to find shapes on.
+ * \param theRadius Radius of the cylinder to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theAxis,
+ in double theRadius,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified sphere by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theCenter Point, specifying center of the sphere to find shapes on.
+ * \param theRadius Radius of the sphere to find shapes on.
+ * \param theState The state of the subshapes to find.
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theCenter,
+ in double theRadius,
+ in shape_state theState);
+
+ /*!
+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+ * the specified quadrangle by the certain way, defined through \a theState parameter.
+ * \param theShape Shape to find sub-shapes of.
+ * \param theShapeType Type of sub-shapes to be retrieved.
+ * \param theTopLeftPoint Top left quadrangle corner
+ * \param theTopRigthPoint Top right quadrangle corner
+ * \param theBottomLeftPoint Bottom left quadrangle corner
+ * \param theBottomRigthPoint Bottom right quadrangle corner
+ * \param theState The state of the subshapes to find.
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
+ in long theShapeType,
+ in GEOM_Object theTopLeftPoint,
+ in GEOM_Object theTopRigthPoint,
+ in GEOM_Object theBottomLeftPoint,
+ in GEOM_Object theBottomRigthPoint,
+ in shape_state theState);
+
+ /*!
+ * \brief Find subshapes complying with given status
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \return List of IDs of all found sub-shapes.
+ */
+ ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
+ in GEOM_Object theShape,
+ in long theShapeType,
+ in shape_state theState);
+
+ /*!
+ * \brief Find subshapes complying with given status
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \return List of all found sub-shapes.
+ */
+ ListOfGO GetShapesOnBox (in GEOM_Object theBox,
+ in GEOM_Object theShape,
+ in long theShapeType,
+ in shape_state theState);
+
+ /*!
+ * Get sub-shape(s) of theShapeWhere, which are
+ * coincident with \a theShapeWhat or could be a part of it.
+ * \param theShapeWhere Shape to find sub-shapes of.
+ * \param theShapeWhat Shape, specifying what to find.
+ * \return Group of all found sub-shapes or a single found sub-shape.
+ */
+ GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
+ in GEOM_Object theShapeWhat);
+
+ /*!
+ * Get sub-shape of theShapeWhere, which are
+ * coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
+ * \param theShapeWhere Shape to find sub-shapes of.
+ * \param theShapeWhat Shape, specifying what to find.
+ * \return found sub-shape.
+ */
+ GEOM_Object GetSame (in GEOM_Object theShapeWhere,
+ in GEOM_Object theShapeWhat);
+ };
+
+ /*!
+ * GEOM_IBlocksOperations: Interface for Blocks construction
+ * Face from points or edges, Block from faces,
+ * Blocks multi-translation and multi-rotation
+ */
+ interface GEOM_IBlocksOperations : GEOM_IOperations
+ {
+ /*!
+ * Creation of blocks
+ */
+
+ /*!
+ * Create a quadrangle face from four edges. Order of Edges is not
+ * important. It is not necessary that edges share the same vertex.
+ * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
+ * \return New GEOM_Object, containing the created face.
+ */
+ GEOM_Object MakeQuad (in GEOM_Object theEdge1,
+ in GEOM_Object theEdge2,
+ in GEOM_Object theEdge3,
+ in GEOM_Object theEdge4);
+
+ /*!
+ * Create a quadrangle face on two edges.
+ * The missing edges will be built by creating the shortest ones.
+ * \param theEdge1,theEdge2 Two opposite edges for the face.
+ * \return New GEOM_Object, containing the created face.
+ */
+ GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
+ in GEOM_Object theEdge2);
+
+ /*!
+ * Create a quadrangle face with specified corners.
+ * The missing edges will be built by creating the shortest ones.
+ * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
+ * \return New GEOM_Object, containing the created face.
+ */
+ GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2,
+ in GEOM_Object thePnt3,
+ in GEOM_Object thePnt4);
+
+ /*!
+ * Create a hexahedral solid, bounded by the six given faces. Order of
+ * faces is not important. It is not necessary that Faces share the same edge.
+ * \param theFace1-theFace6 Faces for the hexahedral solid.
+ * \return New GEOM_Object, containing the created solid.
+ */
+ GEOM_Object MakeHexa (in GEOM_Object theFace1,
+ in GEOM_Object theFace2,
+ in GEOM_Object theFace3,
+ in GEOM_Object theFace4,
+ in GEOM_Object theFace5,
+ in GEOM_Object theFace6);
+
+ /*!
+ * Create a hexahedral solid between two given faces.
+ * The missing faces will be built by creating the smallest ones.
+ * \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
+ * \return New GEOM_Object, containing the created solid.
+ */
+ GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
+ in GEOM_Object theFace2);
+
+ /*!
+ * Extract elements of blocks and blocks compounds
+ */
+
+ /*!
+ * Get a vertex, found in the given shape by its coordinates.
+ * \param theShape Block or a compound of blocks.
+ * \param theX,theY,theZ Coordinates of the sought vertex.
+ * \param theEpsilon Maximum allowed distance between the resulting
+ * vertex and point with the given coordinates.
+ * \return New GEOM_Object, containing the found vertex.
+ */
+ GEOM_Object GetPoint (in GEOM_Object theShape,
+ in double theX,
+ in double theY,
+ in double theZ,
+ in double theEpsilon);
+
+ /*!
+ * Get an edge, found in the given shape by two given vertices.
+ * \param theShape Block or a compound of blocks.
+ * \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
+ * \return New GEOM_Object, containing the found edge.
+ */
+ GEOM_Object GetEdge (in GEOM_Object theShape,
+ in GEOM_Object thePoint1,
+ in GEOM_Object thePoint2);
+
+ /*!
+ * Find an edge of the given shape, which has minimal distance to the given point.
+ * \param theShape Block or a compound of blocks.
+ * \param thePoint Point, close to the desired edge.
+ * \return New GEOM_Object, containing the found edge.
+ */
+ GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
+ in GEOM_Object thePoint);
+
+ /*!
+ * Returns a face, found in the given shape by four given corner vertices.
+ * \param theShape Block or a compound of blocks.
+ * \param thePoint1-thePoint4 Points, close to the corners of the desired face.
+ * \return New GEOM_Object, containing the found face.
+ */
+ GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
+ in GEOM_Object thePoint1,
+ in GEOM_Object thePoint2,
+ in GEOM_Object thePoint3,
+ in GEOM_Object thePoint4);
+
+ /*!
+ * Get a face of block, found in the given shape by two given edges.
+ * \param theShape Block or a compound of blocks.
+ * \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
+ * \return New GEOM_Object, containing the found face.
+ */
+ GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
+ in GEOM_Object theEdge1,
+ in GEOM_Object theEdge2);
+
+ /*!
+ * Find a face, opposite to the given one in the given block.
+ * \param theBlock Must be a hexahedral solid.
+ * \param theFace Face of \a theBlock, opposite to the desired face.
+ * \return New GEOM_Object, containing the found face.
+ */
+ GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
+ in GEOM_Object theFace);
+
+ /*!
+ * Find a face of the given shape, which has minimal distance to the given point.
+ * \param theShape Block or a compound of blocks.
+ * \param thePoint Point, close to the desired face.
+ * \return New GEOM_Object, containing the found face.
+ */
+ GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
+ in GEOM_Object thePoint);
+
+ /*!
+ * Find a face of block, whose outside normale has minimal angle with the given vector.
+ * \param theShape Block or a compound of blocks.
+ * \param theVector Vector, close to the normale of the desired face.
+ * \return New GEOM_Object, containing the found face.
+ */
+ GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
+ in GEOM_Object theVector);
+
+ /*!
+ * Extract blocks from blocks compounds
+ */
+
+ /*!
+ * Check, if the compound contains only specified blocks.
+ * \param theCompound The compound to check.
+ * \param theMinNbFaces If solid has lower number of faces, it is not a block.
+ * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
+ * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
+ * \return TRUE, if the given compound contains only blocks.
+ * \return theNbBlocks Number of specified blocks in theCompound.
+ */
+ boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
+ in long theMinNbFaces,
+ in long theMaxNbFaces,
+ out long theNbBlocks);
+
+ /*!
+ * Enumeration of Blocks Compound defects.
+ */
+ enum BCErrorType
+ {
+ /* Each element of the compound should be a Block */
+ NOT_BLOCK,
+
+ /* An element is a potential block, but has degenerated and/or seam edge(s). */
+ EXTRA_EDGE,
+
+ /* A connection between two Blocks should be an entire face or an entire edge */
+ INVALID_CONNECTION,
+
+ /* The compound should be connexe */
+ NOT_CONNECTED,
+
+ /* The glue between two quadrangle faces should be applied */
+ NOT_GLUED
+ };
+
+ /*!
+ * Description of Blocks Compound defect: type and incriminated sub-shapes.
+ */
+ struct BCError
+ {
+ BCErrorType error;
+ ListOfLong incriminated;
+ };
+
+ /*!
+ * Sequence of all Blocks Compound defects.
+ */
+ typedef sequence<BCError> BCErrors;
+
+ /*!
+ * Check, if the compound of blocks is given.
+ * To be considered as a compound of blocks, the
+ * given shape must satisfy the following conditions:
+ * - Each element of the compound should be a Block (6 faces and 12 edges).
+ * - A connection between two Blocks should be an entire quadrangle face or an entire edge.
+ * - The compound should be connexe.
+ * - The glue between two quadrangle faces should be applied.
+ * \note Single block is also accepted as a valid compound of blocks.
+ * \param theCompound The compound to check.
+ * \return TRUE, if the given shape is a compound of blocks.
+ * \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
+ */
+ boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
+ out BCErrors theErrors);
+
+ /*!
+ * Convert sequence of Blocks Compound errors, returned by
+ * <VAR>CheckCompoundOfBlocks()</VAR>, into string.
+ * \param theCompound The bad compound.
+ * \param theErrors The sequence of \a theCompound errors.
+ * \return String, describing all the errors in form, suitable for printing.
+ */
+ string PrintBCErrors (in GEOM_Object theCompound,
+ in BCErrors theErrors);
+
+ /*!
+ * Remove all seam and degenerated edges from \a theShape.
+ * Unite faces and edges, sharing one surface.
+ * \param theShape The compound or single solid to remove irregular edges from.
+ * \return Improved shape.
+ */
+ GEOM_Object RemoveExtraEdges (in GEOM_Object theShape);
+
+ /*!
+ * Check, if the given shape is a blocks compound.
+ * Fix all detected errors.
+ * \note Single block can be also fixed by this method.
+ * \param theCompound The compound to check and improve.
+ * \return Improved compound.
+ */
+ GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
+
+ /*!
+ * Get all the blocks, contained in the given compound.
+ * \param theCompound The compound to explode.
+ * \param theMinNbFaces If solid has lower number of faces, it is not a block.
+ * \param theMaxNbFaces If solid has higher number of faces, it is not a block.
+ * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
+ * \return List of GEOM_Objects, containing the retrieved blocks.
+ */
+ ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
+ in long theMinNbFaces,
+ in long theMaxNbFaces);
+
+ /*!
+ * Find block, containing the given point inside its volume or on boundary.
+ * \param theCompound Compound, to find block in.
+ * \param thePoint Point, close to the desired block. If the point lays on
+ * boundary between some blocks, we return block with nearest center.
+ * \return New GEOM_Object, containing the found block.
+ */
+ GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
+ in GEOM_Object thePoint);
+
+ /*!
+ * Find block, containing all the elements, passed as the parts, or maximum quantity of them.
+ * \param theCompound Compound, to find block in.
+ * \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
+ * \return New GEOM_Object, containing the found block.
+ */
+ GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
+ in ListOfGO theParts);
+
+ /*!
+ * Return all blocks, containing all the elements, passed as the parts.
+ * \param theCompound Compound, to find blocks in.
+ * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
+ * \return List of GEOM_Objects, containing the found blocks.
+ */
+ ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
+ in ListOfGO theParts);
+
+ /*!
+ * Operations on blocks with gluing of result
+ */
+
+ /*!
+ * Multi-transformate block and glue the result.
+ * Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
+ * \param theBlock Hexahedral solid to be multi-transformed.
+ * \param theDirFace1 First direction face global index.
+ * \param theDirFace2 Second direction face global index.
+ * \param theNbTimes Quantity of transformations to be done.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
+ in long theDirFace1,
+ in long theDirFace2,
+ in long theNbTimes);
+
+ /*!
+ * Multi-transformate block and glue the result.
+ * \param theBlock Hexahedral solid to be multi-transformed.
+ * \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
+ * \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
+ * \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
+ in long theDirFace1U,
+ in long theDirFace2U,
+ in long theNbTimesU,
+ in long theDirFace1V,
+ in long theDirFace2V,
+ in long theNbTimesV);
+
+ /*!
+ * Special operation - propagation
+ */
+
+ /*!
+ * Build all possible propagation groups.
+ * Propagation group is a set of all edges, opposite to one (main)
+ * edge of this group directly or through other opposite edges.
+ * Notion of Opposite Edge make sence only on quadrangle face.
+ * \param theShape Shape to build propagation groups on.
+ * \return List of GEOM_Objects, each of them is a propagation group.
+ */
+ ListOfGO Propagate (in GEOM_Object theShape);
+ };
+
+ /*!
+ * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
+ */
+ interface GEOM_IBooleanOperations : GEOM_IOperations
+ {
+ /*!
+ * Perform one of boolean operations on two given shapes.
+ * \param theShape1 First argument for boolean operation.
+ * \param theShape2 Second argument for boolean operation.
+ * \param theOperation Indicates the operation to be done:
+ * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeBoolean (in GEOM_Object theShape1,
+ in GEOM_Object theShape2,
+ in long theOperation);
+
+ /*!
+ * Perform partition operation.
+ * \param theShapes Shapes to be intersected.
+ * \param theTools Shapes to intersect theShapes.
+ * \note Each compound from ListShapes and ListTools will be exploded in order
+ * to avoid possible intersection between shapes from this compound.
+ * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
+ *
+ * After implementation new version of PartitionAlgo (October 2006)
+ * other parameters are ignored by current functionality. They are kept
+ * in this function only for supporting old versions.
+ * Ignored parameters:
+ * \param theKeepInside Shapes, outside which the results will be deleted.
+ * Each shape from theKeepInside must belong to theShapes also.
+ * \param theRemoveInside Shapes, inside which the results will be deleted.
+ * Each shape from theRemoveInside must belong to theShapes also.
+ * \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
+ * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+ *
+ * \return New GEOM_Object, containing the result shapes.
+ */
+ GEOM_Object MakePartition (in ListOfGO theShapes,
+ in ListOfGO theTools,
+ in ListOfGO theKeepInside,
+ in ListOfGO theRemoveInside,
+ in short theLimit,
+ in boolean theRemoveWebs,
+ in ListOfLong theMaterials);
+
+ /*!
+ * Perform partition operation.
+ * This method may be usefull if it is needed to make a partition for
+ * a compound containing nonintersected shapes. Performance will be better
+ * since intersection between shapes from compound is not performed.
+ *
+ * Description of all parameters as in previous method MakePartition()
+ *
+ * \note Passed compounds (via ListShapes or via ListTools)
+ * have to consist of nonintersecting shapes.
+ *
+ * \return New GEOM_Object, containing the result shapes.
+ */
+ GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO theShapes,
+ in ListOfGO theTools,
+ in ListOfGO theKeepInside,
+ in ListOfGO theRemoveInside,
+ in short theLimit,
+ in boolean theRemoveWebs,
+ in ListOfLong theMaterials);
+
+ /*!
+ * Perform partition of the Shape with the Plane
+ * \param theShape Shape to be intersected.
+ * \param thePlane Tool shape, to intersect theShape.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
+ in GEOM_Object thePlane);
+ };
+
+ /*!
+ * GEOM_ICurvesOperations: Interface for curves creation.
+ * Polyline, Circle, Spline (Bezier and Interpolation)
+ */
+ interface GEOM_ICurvesOperations : GEOM_IOperations
+ {
+ /*!
+ * Create a circle with given center, normal vector and radius.
+ * \param thePnt Circle center.
+ * \param theVec Vector, normal to the plane of the circle.
+ * \param theR Circle radius.
+ * \return New GEOM_Object, containing the created circle.
+ */
+ GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
+ in GEOM_Object theVec,
+ in double theR);
+ /*!
+ * Create a circle, passing through three given points
+ * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
+ * \return New GEOM_Object, containing the created circle.
+ */
+ GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2,
+ in GEOM_Object thePnt3);
+
+ /*!
+ * Create an ellipse with given center, normal vector and radiuses.
+ * \param thePnt Ellipse center.
+ * \param theVec Vector, normal to the plane of the ellipse.
+ * \param theRMajor Major ellipse radius.
+ * \param theRMinor Minor ellipse radius.
+ * \return New GEOM_Object, containing the created ellipse.
+ */
+ GEOM_Object MakeEllipse (in GEOM_Object thePnt,
+ in GEOM_Object theVec,
+ in double theRMajor,
+ in double theRMinor);
+
+ /*!
+ * Create an arc of circle, passing through three given points.
+ * \param thePnt1 Start point of the arc.
+ * \param thePnt2 Middle point of the arc.
+ * \param thePnt3 End point of the arc.
+ * \return New GEOM_Object, containing the created arc.
+ */
+ GEOM_Object MakeArc (in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2,
+ in GEOM_Object thePnt3);
+
+ /*!
+ * Create a polyline on the set of points.
+ * \param thePoints Sequence of points for the polyline.
+ * \return New GEOM_Object, containing the created polyline.
+ */
+ GEOM_Object MakePolyline (in ListOfGO thePoints);
+
+ /*!
+ * Create bezier curve on the set of points.
+ * \param thePoints Sequence of points for the bezier curve.
+ * \return New GEOM_Object, containing the created bezier curve.
+ */
+ GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
+
+ /*!
+ * Create B-Spline curve on the set of points.
+ * \param thePoints Sequence of points for the B-Spline curve.
+ * \return New GEOM_Object, containing the created B-Spline curve.
+ */
+ GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
+
+ /*!
+ * Create a sketcher (wire or face), following the textual description,
+ * passed through \a theCommand argument. \n
+ * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
+ * Format of the description string have to be the following:
+ *
+ * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
+ *
+ * Where:
+ * - x1, y1 are coordinates of the first sketcher point (zero by default),
+ * - CMD is one of
+ * - "R angle" : Set the direction by angle
+ * - "D dx dy" : Set the direction by DX & DY
+ * .
+ * \n
+ * - "TT x y" : Create segment by point at X & Y
+ * - "T dx dy" : Create segment by point with DX & DY
+ * - "L length" : Create segment by direction & Length
+ * - "IX x" : Create segment by direction & Intersect. X
+ * - "IY y" : Create segment by direction & Intersect. Y
+ * .
+ * \n
+ * - "C radius length" : Create arc by direction, radius and length(in degree)
+ * .
+ * \n
+ * - "WW" : Close Wire (to finish)
+ * - "WF" : Close Wire and build face (to finish)
+ *
+ * \param theCommand String, defining the sketcher in local
+ * coordinates of the working plane.
+ * \param theWorkingPlane Nine double values, defining origin,
+ * OZ and OX directions of the working plane.
+ * \return New GEOM_Object, containing the created wire.
+ */
+ GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
+
+ /*!
+ * Create a sketcher (wire or face), following the textual description,
+ * passed through \a theCommand argument. \n
+ * For format of the description string see the previous method.\n
+ * \param theCommand String, defining the sketcher in local
+ * coordinates of the working plane.
+ * \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
+ * \return New GEOM_Object, containing the created wire.
+ */
+ GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
+ };
+
+ /*!
+ * GEOM_ILocalOperations: Interface for fillet and chamfer creation.
+ */
+ interface GEOM_ILocalOperations : GEOM_IOperations
+ {
+ /*!
+ * Perform a fillet on all edges of the given shape.
+ * \param theShape Shape, to perform fillet on.
+ * \param theR Fillet radius.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFilletAll (in GEOM_Object theShape,
+ in double theR);
+
+ /*!
+ * Perform a fillet on the specified edges of the given shape
+ * \param theShape Shape, to perform fillet on.
+ * \param theR Fillet radius.
+ * \param theEdges Global indices of edges to perform fillet on.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
+ in double theR,
+ in ListOfLong theEdges);
+
+ /*!
+ * Perform a fillet on all edges of the specified faces of the given shape.
+ * \param theShape Shape, to perform fillet on.
+ * \param theR Fillet radius.
+ * \param theFaces Global indices of faces to perform fillet on.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
+ in double theR,
+ in ListOfLong theFaces);
+
+ /*!
+ * Perform a symmetric chamfer on all edges of the given shape.
+ * \param theShape Shape, to perform chamfer on.
+ * \param theD Chamfer size along each face.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeChamferAll (in GEOM_Object theShape,
+ in double theD);
+
+ /*!
+ * Perform a chamfer on edges, common to the specified faces.
+ * with distance D1 on the Face1
+ * \param theShape Shape, to perform chamfer on.
+ * \param theD1 Chamfer size along \a theFace1.
+ * \param theD2 Chamfer size along \a theFace2.
+ * \param theFace1,theFace2 Global indices of two faces of \a theShape.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
+ in double theD1, in double theD2,
+ in long theFace1, in long theFace2);
+
+ /*!
+ * Perform a chamfer on all edges of the specified faces.
+ * with distance D1 on the first specified face (if several for one edge)
+ * \param theShape Shape, to perform chamfer on.
+ * \param theD1 Chamfer size along face from \a theFaces. If both faces,
+ * connected to the edge, are in \a theFaces, \a theD1
+ * will be get along face, which is nearer to \a theFaces beginning.
+ * \param theD2 Chamfer size along another of two faces, connected to the edge.
+ * \param theFaces Sequence of global indices of faces of \a theShape.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
+ in double theD1, in double theD2,
+ in ListOfLong theFaces);
+
+ /*!
+ * Perform an Archimde operation on the given shape with given parameters.
+ * The object presenting the resulting face is returned
+ * \param theShape Shape to be put in water.
+ * \param theWeight Weight og the shape.
+ * \param theWaterDensity Density of the water.
+ * \param theMeshDeflection Deflection od the mesh, using to compute the section.
+ * \return New GEOM_Object, containing a section of \a theShape
+ * by a plane, corresponding to water level.
+ */
+ GEOM_Object MakeArchimede (in GEOM_Object theShape,
+ in double theWeight,
+ in double theWaterDensity,
+ in double theMeshDeflection);
+
+ /*!
+ * Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * Present here only for compatibility.
+ */
+ long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
+ };
+
+ /*!
+ * GEOM_IHealingOperations: Interface for shape healing operations.
+ * Shape Processing, SuppressFaces, etc.
+ */
+ interface GEOM_IHealingOperations : GEOM_IOperations
+ {
+ /*!
+ * Apply a sequence of Shape Healing operators to the given object.
+ * \param theShapes Shape to be processed.
+ * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
+ * \param theParameters List of names of parameters
+ * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
+ * \param theValues List of values of parameters, in the same order
+ * as parameters are listed in \a theParameters list.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object ProcessShape (in GEOM_Object theShapes,
+ in string_array theOperators,
+ in string_array theParameters,
+ in string_array theValues);
+
+ /*!
+ * Get default sequence of operators, their parameters and parameters' values
+ * of Shape Process operation. In the current implementation the defaults are
+ * read from the file pointed by CSF_ShHealingDefaults environmental variable.
+ * \param theOperators Output. Default list of names of operators.
+ * \param theParameters Output. Default list of names of parameters.
+ * \param theValues Output. List of default values of parameters, in the same order
+ * as parameters are listed in \a theParameters list.
+ */
+ void GetShapeProcessParameters (out string_array theOperators,
+ out string_array theParameters,
+ out string_array theValues);
+ /*!
+ * Get parameters and parameters' values for the given Shape Process operation.
+ * In the current implementation the defaults are
+ * read from the file pointed by CSF_ShHealingDefaults environmental variable.
+ * \param theOperator Input. The operator's name.
+ * \param theParameters Output. Default list of names of parameters.
+ * \param theValues Output. List of default values of parameters, in the same order
+ * as parameters are listed in \a theParameters list.
+ */
+ void GetOperatorParameters (in string theOperator,
+ out string_array theParameters,
+ out string_array theValues);
+
+ /*!
+ * Remove faces from the given object (shape).
+ * \param theObject Shape to be processed.
+ * \param theFaces Indices of faces to be removed, if EMPTY then the method
+ * removes ALL faces of the given object.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
+
+ /*!
+ * Close an open wire.
+ * \param theObject Shape to be processed.
+ * \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
+ * if -1, then theObject itself is a wire.
+ * \param isCommonVertex If TRUE : closure by creation of a common vertex,
+ * If FALS : closure by creation of an edge between ends.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
+ in boolean isCommonVertex);
+
+ /*!
+ * Remove internal wires and edges from the given object (face).
+ * \param theObject Shape to be processed.
+ * \param theWires Indices of wires to be removed, if EMPTY then the method
+ * removes ALL internal wires of the given object.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
+
+ /*!
+ * Remove internal closed contours (holes) from the given object.
+ * \param theObject Shape to be processed.
+ * \param theWires Indices of wires to be removed, if EMPTY then the method
+ * removes ALL internal holes of the given object
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
+
+ /*!
+ * Sewing of the given object.
+ * \param theObject Shape to be processed.
+ * \param theTolerance Required tolerance value.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
+
+ /*!
+ * Addition of a point to a given edge object.
+ * \param theObject Shape to be processed.
+ * \param theEdgeIndex Index of edge to be divided within theObject's shape,
+ * if -1, then theObject itself is the edge.
+ * \param theValue Value of parameter on edge or length parameter,
+ * depending on \a isByParameter.
+ * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
+ * if FALSE : \a theValue is treated as a length parameter [0..1]
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
+ in double theValue, in boolean isByParameter);
+
+ /*!
+ * Get a list of wires (wrapped in GEOM_Object-s),
+ * that constitute a free boundary of the given shape.
+ * \param theObject Shape to get free boundary of.
+ * \param theClosedWires Output. Closed wires on the free boundary of the given shape.
+ * \param theOpenWires Output. Open wires on the free boundary of the given shape.
+ * \return FALSE, if an error(s) occured during the method execution.
+ */
+ boolean GetFreeBoundary (in GEOM_Object theObject,
+ out ListOfGO theClosedWires,
+ out ListOfGO theOpenWires);
+
+ /*!
+ * Change orientation of the given object.
+ * \param theObject Shape to be processed.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object ChangeOrientation (in GEOM_Object theObject);
+ GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
+
+ };
+
+ /*!
+ * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
+ *
+ */
+ interface GEOM_IInsertOperations : GEOM_IOperations
+ {
+ /*!
+ * Create a copy of the given object
+ */
+ GEOM_Object MakeCopy (in GEOM_Object theOriginal);
+
+ /*!
+ * Export the given shape into a file with given name.
+ * \param theObject Shape to be stored in the file.
+ * \param theFileName Name of the file to store the given shape in.
+ * \param theFormatName Specify format for the shape storage.
+ * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
+ */
+ void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
+
+ /*!
+ * Import a shape from the BRep or IGES or STEP file
+ * (depends on given format) with given name.
+ * \param theFileName The file, containing the shape.
+ * \param theFormatName Specify format for the file reading.
+ * Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
+ * \return New GEOM_Object, containing the imported shape.
+ */
+ GEOM_Object Import (in string theFileName, in string theFormatName);
+
+ /*!
+ * Get the supported import formats and corresponding patterns for File dialog.
+ * \param theFormats Output. List of formats, available for import.
+ * \param thePatterns Output. List of file patterns, corresponding to available formats.
+ * \return Returns available formats and patterns through the arguments.
+ */
+ void ImportTranslators (out string_array theFormats,
+ out string_array thePatterns);
+
+ /*!
+ * Get the supported export formats and corresponding patterns for File dialog.
+ * \param theFormats Output. List of formats, available for export.
+ * \param thePatterns Output. List of file patterns, corresponding to available formats.
+ * \return Returns available formats and patterns through the arguments.
+ */
+ void ExportTranslators (out string_array theFormats,
+ out string_array thePatterns);
+ };
+
+ /*!
+ * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
+ * properties calculation (like Centre of Mass, Inertia, etc.).
+ *
+ */
+ interface GEOM_IMeasureOperations : GEOM_IOperations
+ {
+ /*!
+ * Get position (LCS) of theShape.
+ * \param theShape Shape to calculate position of.
+ * \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
+ * Origin of the LCS is situated at the shape's center of mass.
+ * \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
+ * \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
+ * Axes of the LCS are obtained from shape's location or,
+ * if the shape is a planar face, from position of its plane.
+ * \return Returns position of the shape through the last nine arguments.
+ */
+ void GetPosition (in GEOM_Object theShape,
+ out double Ox, out double Oy, out double Oz,
+ out double Zx, out double Zy, out double Zz,
+ out double Xx, out double Xy, out double Xz);
+
+ /*!
+ * Get summarized length of all wires,
+ * area of surface and volume of the given shape.
+ * \param theShape Shape to define properties of.
+ * \param theLength Output. Summarized length of all wires of the given shape.
+ * \param theSurfArea Output. Area of surface of the given shape.
+ * \param theVolume Output. Volume of the given shape.
+ * \return Returns shape properties through the last three arguments.
+ */
+ void GetBasicProperties (in GEOM_Object theShape,
+ out double theLength,
+ out double theSurfArea,
+ out double theVolume);
+
+ /*!
+ * Get a point, situated at the centre of mass of theShape.
+ * \param theShape Shape to define centre of mass of.
+ * \return New GEOM_Object, containing the created point.
+ */
+ GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
+
+ /*!
+ * Get inertia matrix and moments of inertia of theShape.
+ * \param theShape Shape to calculate inertia of.
+ * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
+ * \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
+ * \return Returns inertia through the last twelve arguments.
+ */
+ void GetInertia (in GEOM_Object theShape,
+ out double I11, out double I12, out double I13,
+ out double I21, out double I22, out double I23,
+ out double I31, out double I32, out double I33,
+ out double Ix , out double Iy , out double Iz);
+
+ /*!
+ * Get parameters of bounding box of the given shape
+ * \param theShape Shape to obtain bounding box of.
+ * \param Xmin,Xmax Output. Limits of shape along OX axis.
+ * \param Ymin,Ymax Output. Limits of shape along OY axis.
+ * \param Zmin,Zmax Output. Limits of shape along OZ axis.
+ * \return Returns parameters of bounding box through the last six arguments.
+ */
+ void GetBoundingBox (in GEOM_Object theShape,
+ out double Xmin, out double Xmax,
+ out double Ymin, out double Ymax,
+ out double Zmin, out double Zmax);
+
+ /*!
+ * Get min and max tolerances of sub-shapes of theShape
+ * \param theShape Shape, to get tolerances of.
+ * \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
+ * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
+ * \param VertMin,VertMax Output. Min and max tolerances of the vertices.
+ * \return Returns shape tolerances through the last six arguments.
+ */
+ void GetTolerance (in GEOM_Object theShape,
+ out double FaceMin, out double FaceMax,
+ out double EdgeMin, out double EdgeMax,
+ out double VertMin, out double VertMax);
+
+ /*!
+ * Check a topology of the given shape.
+ * \param theShape Shape to check validity of.
+ * \param theDescription Output. Description of problems in the shape, if they are.
+ * \return TRUE, if the shape "seems to be valid" from the topological point of view.
+ */
+ boolean CheckShape (in GEOM_Object theShape,
+ out string theDescription);
+
+ /*!
+ * Check a topology and a geometry of the given shape.
+ * \param theShape Shape to check validity of.
+ * \param theDescription Output. Description of problems in the shape, if they are.
+ * \return TRUE, if the shape "seems to be valid".
+ */
+ boolean CheckShapeWithGeometry (in GEOM_Object theShape,
+ out string theDescription);
+
+ /*!
+ * Obtain description of the given shape
+ * \param theShape Shape to be described.
+ * \return Description of the given shape.
+ */
+ string WhatIs (in GEOM_Object theShape);
+
+ /*!
+ * Get minimal distance between the given shapes.
+ * \param theShape1,theShape2 Shapes to find minimal distance between.
+ * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
+ * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
+ * \return Value of the minimal distance between the given shapes.
+ */
+ double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
+ out double X1, out double Y1, out double Z1,
+ out double X2, out double Y2, out double Z2);
+
+
+ /*!
+ * Get point coordinates
+ */
+ void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
+ };
+
+
+ /*!
+ * GEOM_IGroupOperations: Interface for groups creation.
+ */
+ interface GEOM_IGroupOperations : GEOM_IOperations
+ {
+ /*!
+ * Creates a new group which will store sub shapes of theMainShape
+ * \param theMainShape is a GEOM object on which the group is selected
+ * \param theShapeType defines a shape type of the group
+ * \return a newly created GEOM group
+ */
+ GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
+
+ /*!
+ * Adds a sub object with ID theSubShapeId to the group
+ * \param theGroup is a GEOM group to which the new sub shape is added
+ * \param theSubShapeId is a sub shape ID in the main object.
+ * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
+ */
+ void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
+
+ /*!
+ * Removes a sub object with ID \a theSubShapeId from the group
+ * \param theGroup is a GEOM group from which the sub shape is removed.
+ * \param theSubShapeId is a sub shape ID in the main object.
+ * \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
+ */
+ void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
+
+ /*!
+ * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
+ * \param theGroup is a GEOM group to which the new sub shapes are added.
+ * \param theSubShapes is a list of sub shapes to be added.
+ */
+ void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
+
+ /*!
+ * Removes from the group all the given shapes. No errors, if some shapes are not included.
+ * \param theGroup is a GEOM group from which the sub-shapes are removed.
+ * \param theSubShapes is a list of sub-shapes to be removed.
+ */
+ void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
+
+ /*!
+ * Adds to the group all the given shapes. No errors, if some shapes are alredy included.
+ * \param theGroup is a GEOM group to which the new sub shapes are added.
+ * \param theSubShapes is a list of IDs of sub shapes to be added.
+ */
+ void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
+
+ /*!
+ * Removes from the group all the given shapes. No errors, if some shapes are not included.
+ * \param theGroup is a GEOM group from which the sub-shapes are removed.
+ * \param theSubShapes is a list of IDs of sub-shapes to be removed.
+ */
+ void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
+
+ /*!
+ * Returns a type of sub objects stored in the group
+ * \param theGroup is a GEOM group which type is returned.
+ */
+ long GetType (in GEOM_Object theGroup);
+
+ /*!
+ * Returns a main shape associated with the group
+ * \param theGroup is a GEOM group for which a main shape object is requested
+ * \return a GEOM object which is a main shape for theGroup
+ */
+ GEOM_Object GetMainShape (in GEOM_Object theGroup);
+
+ /*!
+ * Returns a list of sub objects ID stored in the group
+ * \param theGroup is a GEOM group for which a list of IDs is requested
+ */
+ ListOfLong GetObjects (in GEOM_Object theGroup);
+ };
+
+
+ /*!
+ * GEOM_Gen: Interface to access other GEOM interfaces.
+ * Also contains some methods to access and manage GEOM objects.
+ */
+ interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
+ {
+ /*!
+ * Undo/Redo Management
+ */
+
+ void Undo (in long theStudyID);
+
+ void Redo (in long theStudyID);
+
+ /*!
+ * Publishing manangement
+ * Adds in theStudy a object theObject under with a name theName,
+ * if theFather is not NULL the object is placed under thFather's SObject.
+ * Returns a SObject where theObject is placed
+ */
+ SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
+ in GEOM_Object theObject,
+ in string theName,
+ in GEOM_Object theFather);
+
+ /*!
+ * Methods to access interfaces for objects creation and transformation
+ */
+ GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+ GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
+
+ /*!
+ * Objects Management
+ */
+
+ /*!
+ * Removes the object from the GEOM component
+ * \param theObject is a GEOM object to be removed
+ */
+ void RemoveObject (in GEOM_Object theObject);
+
+ /*!
+ * Returns an object defined by the study and its entry in the GEOM component
+ * \param theStudyID is a SALOMEDS Study ID
+ * \param theEntry is an entry of the requested GEOM object in the GEOM component
+ * \note if the object has not previously been created a NULL GEOM object is returned
+ */
+ GEOM_Object GetObject (in long theStudyID, in string theEntry);
+
+ /*!
+ * Add a sub shape defined by indices in \a theIndices
+ * (contains unique IDs of sub shapes inside theMainShape)
+ * \note The sub shape GEOM_Objects can has ONLY ONE function.
+ * Don't try to apply modification operations on them.
+ * \note Internal method
+ */
+ GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
+
+ /*!
+ * GEOM object's IOR Management
+ */
+
+ /*!
+ * Returns a GEOM Object defined by its IOR
+ * \param theIOR a string containg an IOR of the requested GEOM object
+ */
+ GEOM_Object GetIORFromString (in string theIOR);
+
+ /*!
+ * Returns a string which contains an IOR of the GEOM object
+ * \param theObject is a GEOM object which IOR is requested
+ */
+ string GetStringFromIOR (in GEOM_Object theObject);
+
+ /*!
+ * Returns a name with which a GEOM object was dumped into python script
+ * \param theStudyEntry is an entry of the GEOM object in the study
+ */
+ string GetDumpName (in string theStudyEntry);