+ // # Extract elements of blocks and blocks compounds
+
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Find a vertex of the given shape, which has minimal distance to the given point.
+ * \param theShape Any shape.
+ * \param thePoint Point, close to the desired vertex.
+ * \return New GEOM_Object, containing the found vertex.
+ */
+ GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
+ in GEOM_Object thePoint);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Returns a face, found in the given shape by four given corner vertices.
+ * \param theShape Block or a compound of blocks.
+ * \param thePoint1,thePoint2,thePoint3,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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Find a face of block, whose outside normale has minimal angle with the given vector.
+ * \param theBlock 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);
+
+ /*!
+ * \brief Find all sub-shapes of type \a theShapeType of the given shape,
+ * which have minimal distance to the given point.
+ * \param theShape Any shape.
+ * \param thePoint Point, close to the desired shape.
+ * \param theShapeType Defines what kind of sub-shapes is searched.
+ * \param theTolerance The tolerance for distances comparison. All shapes
+ * with distances to the given point in interval
+ * [minimal_distance, minimal_distance + theTolerance] will be gathered.
+ * \return New GEOM_Object, containing a group of all found shapes.
+ */
+ GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
+ in GEOM_Object thePoint,
+ in long theShapeType,
+ in double theTolerance);
+
+ // # Extract blocks from blocks compounds
+
+
+ /*!
+ * \brief 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.
+ * \param theNbBlocks Number of specified blocks in theCompound.
+ * \return TRUE, if the given compound contains only blocks.
+ */
+ boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
+ in long theMinNbFaces,
+ in long theMaxNbFaces,
+ out long theNbBlocks);
+
+ /*!
+ * \brief 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
+ };
+
+ /*!
+ * \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
+ */
+ struct BCError
+ {
+ BCErrorType error;
+ ListOfLong incriminated;
+ };
+
+ /*!
+ * \brief Sequence of all Blocks Compound defects.
+ */
+ typedef sequence<BCError> BCErrors;
+
+ /*!
+ * \brief 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.
+ * \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
+ * \return TRUE, if the given shape is a compound of blocks.
+ */
+ boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
+ out BCErrors theErrors);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Retrieve all non blocks solids and faces from a shape.
+ *
+ * \param theShape The shape to explore.
+ * \param theNonQuads Output parameter. Group of all non quadrangular faces.
+ *
+ * \return Group of all non block solids (= not 6 faces, or with 6
+ * faces, but with the presence of non-quadrangular faces).
+ */
+ GEOM_Object GetNonBlocks (in GEOM_Object theShape, out GEOM_Object theNonQuads);
+
+ /*!
+ * \brief 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.
+ * \param theOptimumNbFaces If more than zero, unite faces only for those solids,
+ * that have more than theOptimumNbFaces faces. If zero, unite faces always,
+ * regardsless their quantity in the solid. If negative, do not unite faces at all.
+ * For blocks repairing recommended value is 6.
+ * \return Improved shape.
+ */
+ GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
+ in long theOptimumNbFaces);
+
+ /*!
+ * \brief Performs union faces of \a theShape.
+ *
+ * Unite faces sharing one surface.
+ * \param theShape The compound or single solid that contains faces to perform union.
+ * \return Improved shape.
+ */
+ GEOM_Object UnionFaces (in GEOM_Object theShape);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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_Object, containing the retrieved blocks.
+ */
+ ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
+ in long theMinNbFaces,
+ in long theMaxNbFaces);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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_Object, containing the found blocks.
+ */
+ ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
+ in ListOfGO theParts);
+
+ // # Operations on blocks with gluing of result
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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
+
+
+ /*!
+ * \brief 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_Object, each of them is a propagation group.
+ */
+ ListOfGO Propagate (in GEOM_Object theShape);
+ };
+
+ // # GEOM_IBooleanOperations
+ /*!
+ * \brief Interface for boolean operations (Cut, Fuse, Common)
+ */
+ interface GEOM_IBooleanOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Perform fusion boolean operation on list of objects.
+ * \param theShapes Shapes to be fused.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFuseList (in ListOfGO theShapes);
+
+ /*!
+ * \brief Perform common boolean operation on list of objects.
+ * \param theShapes Shapes for common operation.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeCommonList (in ListOfGO theShapes);
+
+ /*!
+ * \brief Perform cutting of list of objects from theMainShape.
+ * \param theMainShape the object for cut operation.
+ * \param theShapes Shapes to be cut from theMainShape (tools).
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeCutList (in GEOM_Object theMainShape,
+ in ListOfGO theShapes);
+
+ /*!
+ * \brief 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).
+ * \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
+ * target type (equal to Limit) are kept in the result,
+ * else standalone shapes of lower dimension
+ * are kept also (if they exist).
+ *
+ * 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,
+ in short theKeepNonlimitShapes);
+
+ /*!
+ * \brief 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,
+ in short theKeepNonlimitShapes);
+
+ /*!
+ * \brief 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:
+ /*!
+ * \brief Interface for curves creation.
+ *
+ * Polyline, Circle, Spline (Bezier and Interpolation)
+ */
+ interface GEOM_ICurvesOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief 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);
+ /*!
+ * \brief 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);
+ /*!
+ * \brief Create a circle with given center, with a radius equals the distance from center to Point1
+ * and on a plane defined by all of three points.
+ * \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
+ * \return New GEOM_Object, containing the created circle.
+ */
+ GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2,
+ in GEOM_Object thePnt3);
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Create an ellipse with given center, normal vector, main axis 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.
+ * \param theVecMaj Vector, direction of the ellipse's main axis.
+ * \return New GEOM_Object, containing the created ellipse.
+ */
+ GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
+ in GEOM_Object theVec,
+ in double theRMajor,
+ in double theRMinor,
+ in GEOM_Object theVecMaj);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Create an arc of circle of center C from one point to another
+ * \param theCenter Center point of the arc.
+ * \param thePnt1 Start point of the arc.
+ * \param thePnt2 End point of the arc.
+ * \param theSense Orientation of the arc
+ * \return New GEOM_Object, containing the created arc.
+ */
+ GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
+ in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2,
+ in boolean theSense);
+
+ /*!
+ * \brief Create an arc of ellipse of center C and two points P1 P2.
+ * \param theCenter Center point of the arc.
+ * \param thePnt1 Major radius is distance from center to Pnt1.
+ * \param thePnt2 define a plane and Minor radius as a shortest
+ * distance from Pnt2 to vector Center->Pnt1.
+ * \return New GEOM_Object, containing the created arc.
+ */
+ GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
+ in GEOM_Object thePnt1,
+ in GEOM_Object thePnt2);
+
+
+ /*!
+ * \brief Create a polyline on the set of points.
+ * \param thePoints Sequence of points for the polyline.
+ * \param theIsClosed If TRUE, build a closed wire.
+ * \return New GEOM_Object, containing the created polyline.
+ */
+ GEOM_Object MakePolyline (in ListOfGO thePoints,
+ in boolean theIsClosed);
+
+ /*!
+ * \brief Create bezier curve on the set of points.
+ * \param thePoints Sequence of points for the bezier curve.
+ * \param theIsClosed If TRUE, build a closed curve.
+ * \return New GEOM_Object, containing the created bezier curve.
+ */
+ GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
+ in boolean theIsClosed);
+
+ /*!
+ * \brief Create B-Spline curve on the set of points.
+ * \param thePoints Sequence of points for the B-Spline curve.
+ * \param theIsClosed If TRUE, build a closed curve.
+ * \param theDoReordering If TRUE, the algo does not follow the order of
+ * \a thePoints but searches for the closest vertex.
+ * \return New GEOM_Object, containing the created B-Spline curve.
+ */
+ GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
+ in boolean theIsClosed,
+ in boolean theDoReordering);
+
+ /*!
+ * \brief Create B-Spline curve on the set of points.
+ * \param thePoints Sequence of points for the B-Spline curve.
+ * \param theFirstVec Vector object, defining the curve direction at its first point.
+ * \param theLastVec Vector object, defining the curve direction at its last point.
+ * \return New GEOM_Object, containing the created B-Spline curve.
+ */
+ GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO thePoints,
+ in GEOM_Object theFirstVec,
+ in GEOM_Object theLastVec);
+
+ /*!
+ * \brief Creates a curve using the parametric definition of the basic points.
+ * \param thexExpr parametric equation of the coordinates X.
+ * \param theyExpr parametric equation of the coordinates Y.
+ * \param thezExpr parametric equation of the coordinates Z.
+ * \param theParamMin the minimal value of the parameter.
+ * \param theParamMax the maximum value of the parameter.
+ * \param theParamStep the step of the parameter.
+ * \param theCurveType the type of the curve.
+ * \return New GEOM_Object, containing the created curve.
+ */
+ GEOM_Object MakeCurveParametric(in string thexExpr,
+ in string theyExpr,
+ in string thezExpr,
+ in double theParamMin,
+ in double theParamMax,
+ in double theParamStep,
+ in curve_type theCurveType);
+
+ /*!
+ * \brief Creates a curve using the parametric definition of the basic points.
+ * \param thexExpr parametric equation of the coordinates X.
+ * \param theyExpr parametric equation of the coordinates Y.
+ * \param thezExpr parametric equation of the coordinates Z.
+ * \param theParamMin the minimal value of the parameter.
+ * \param theParamMax the maximum value of the parameter.
+ * \param theParamNbStep the number of steps of the parameter discretization.
+ * \param theCurveType the type of the curve.
+ * \return New GEOM_Object, containing the created curve.
+ */
+ GEOM_Object MakeCurveParametricNew(in string thexExpr,
+ in string theyExpr,
+ in string thezExpr,
+ in double theParamMin,
+ in double theParamMax,
+ in long theParamNbStep,
+ in curve_type theCurveType);
+
+ /*!
+ * \brief Create a sketcher (wire or face), following the textual description,
+ * passed through \a theCommand argument.
+ *
+ * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
+ * Format of the description string has 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 or face.
+ */
+ GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
+
+ /*!
+ * \brief Create a sketcher (wire or face), following the textual description,
+ * passed through \a theCommand argument.
+ *
+ * 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 or face.
+ */
+ GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
+
+ /*!
+ * \brief Create a 3D sketcher, following the textual description,
+ * passed through \a theCommand argument.
+ *
+ * Format of the description string has to be the following:
+ *
+ * "3DSketcher:CMD[:CMD[:CMD...]]"
+ *
+ * Where CMD is one of
+ * - "TT x y z" : Create segment by point at X & Y or set the first point
+ * - "T dx dy dz" : Create segment by point with DX & DY
+ * .
+ * \n
+ * - "OXY angleX angle2 length" : Create segment by two angles and length
+ * - "OYZ angleY angle2 length" : Create segment by two angles and length
+ * - "OXZ angleX angle2 length" : Create segment by two angles and length
+ * .
+ * \n
+ * - "WW" : Close Wire (to finish)
+ *
+ * \param theCommand String, defining the sketcher in local
+ * coordinates of the working plane.
+ * \return New GEOM_Object, containing the created wire.
+ */
+ GEOM_Object Make3DSketcherCommand (in string theCommand);
+
+ /*!
+ * \brief Create a 3D sketcher, made of a straight segments, joining points
+ * with coordinates passed through \a theCoordinates argument.
+ *
+ * Order of coordinates has to be the following:
+ * x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
+ *
+ * \param theCoordinates List of double values.
+ * \return New GEOM_Object, containing the created wire.
+ */
+ GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
+ };
+
+ // # GEOM_ILocalOperations:
+ /*!
+ * \brief Interface for fillet and chamfer creation.
+ */
+ interface GEOM_ILocalOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+ GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
+ in double theR1,
+ in double theR2,
+ in ListOfLong theEdges);
+
+ /*!
+ * \brief 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);
+
+ GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
+ in double theR1,
+ in double theR2,
+ in ListOfLong theFaces);
+
+ /*!
+ * \brief Perform a fillet on a face or a shell at the specified vertexes.
+ * \param theShape Shape, to perform fillet on.
+ * \param theR Fillet radius.
+ * \param theVertexes Global indices of vertexes 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 MakeFillet2D (in GEOM_Object theShape,
+ in double theR,
+ in ListOfLong theVertexes);
+
+ /*!
+ * \brief Perform a fillet on edges of the specified vertexes of the given wire.
+ * \param theShape Shape, to perform fillet on.
+ * \param theR Fillet radius.
+ * \param theVertexes Global indices of vertexes to perform fillet on.
+ * \note Global index of sub-shape can be obtained, using method
+ * <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ * \note The list of vertices coudl be empty, in this case fillet fill be done
+ * at all vertices in given wire
+ * \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
+ * by the length of the edges, nearest to the fillet vertex.
+ * But sometimes the next edge is C1 continuous with the one, nearest to
+ * the fillet point, and such two (or more) edges can be united to allow
+ * bigger radius. Set this flag to TRUE to allow collinear edges union,
+ * thus ignoring the secant vertex (vertices).
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeFillet1D (in GEOM_Object theShape,
+ in double theR,
+ in ListOfLong theVertexes,
+ in boolean doIgnoreSecantVertices);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+ /*!
+ * \brief The Same but with params theD = Chamfer Lenght
+ * and theAngle = Chamfer Angle (Angle in radians)
+ */
+ GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
+ in double theD, in double theAngle,
+ in long theFace1, in long theFace2);
+
+ /*!
+ * \brief 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);
+ /*!
+ * The Same but with params theD = Chamfer Lenght
+ * and theAngle = Chamfer Angle (Angle in radians)
+ */
+ GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
+ in double theD, in double theAngle,
+ in ListOfLong theFaces);
+
+ /*!
+ * \brief Perform a chamfer on edges,
+ * with distance D1 on the first specified face (if several for one edge)
+ * \param theShape Shape, to perform chamfer on.
+ * \param theD1,theD2 Chamfer size
+ * \param theEdges Sequence of edges of \a theShape.
+ * \return New GEOM_Object, containing the result shape.
+ */
+ GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
+ in double theD1, in double theD2,
+ in ListOfLong theEdges);
+ /*!
+ * The Same but with params theD = Chamfer Lenght
+ * and theAngle = Chamfer Angle (Angle in radians)
+ */
+ GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
+ in double theD, in double theAngle,
+ in ListOfLong theEdges);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+ *
+ * Present here only for compatibility.
+ */
+ long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
+ };
+
+ // # GEOM_IHealingOperations:
+ /*!
+ * \brief Interface for shape healing operations
+ *
+ * Shape Processing, SuppressFaces, etc.
+ */
+ interface GEOM_IHealingOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * Sewing of the given object. Allows non-manifold sewing.
+ * \param theObject Shape to be processed.
+ * \param theTolerance Required tolerance value.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object SewAllowNonManifold(in GEOM_Object theObject, in double theTolerance);
+
+ /*!
+ * Rebuild the topology of theCompound of solids by removing
+ * of the faces that are shared by several solids.
+ * \param theCompound Shape to be processed.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object RemoveInternalFaces (in GEOM_Object theCompound);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
+ * \param theWire Wire to minimize the number of C1 continuous edges in.
+ * \param theVertices A list of vertices to suppress. If the list
+ * is empty, all vertices in a wire will be assumed.
+ * \return New GEOM_Object with modified wire.
+ */
+ GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
+ in ListOfGO theVertices);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Try to limit tolerance of the given object by value \a theTolerance.
+ * \param theObject Shape to be processed.
+ * \param theTolerance Required tolerance value.
+ * \return New GEOM_Object, containing processed shape.
+ */
+ GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
+
+ };
+
+ // # GEOM_IInsertOperations:
+ /*!
+ * \brief Interface for shape insert operations (like copy, import).
+ *
+ */
+ interface GEOM_IInsertOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief Create a copy of the given object
+ */
+ GEOM_Object MakeCopy (in GEOM_Object theOriginal);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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.
+ * If format 'IGES_SCALE' is used instead of 'IGES' or
+ * format 'STEP_SCALE' is used instead of 'STEP',
+ * file length unit will be ignored (set to 'meter') and result model will be scaled.
+ * \return New GEOM_Object, containing the imported shape.
+ */
+ GEOM_Object ImportFile (in string theFileName, in string theFormatName);
+
+ /*!
+ * \brief Read a value of parameter from a file, containing a shape.
+ * \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.
+ * \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
+ * to obtain length units, in which the file is written.
+ * \return Value of requested parameter in form of text string.
+ */
+ string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Read a shape from the binary stream, containing its bounding representation (BRep).
+ * \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
+ * \param theStream The BRep binary stream.
+ * \return New GEOM_Object, containing the shape, read from theStream.
+ */
+ GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream);
+
+ /*!
+ * \brief Load texture from file
+ * \param theTextureFile texture file name
+ * \return unique texture identifier
+ */
+ long LoadTexture(in string theTextureFile);
+
+ /*!
+ * \brief Add texture to the study
+ * \param theWidth texture width in pixels
+ * \param theHeight texture height in pixels
+ * \param theTexture texture byte array
+ * \return unique texture identifier
+ */
+ long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
+
+ /*!
+ * \brief Get previously loaded texture data
+ * \param theID texture identifier
+ * \param theWidth texture width in pixels
+ * \param theHeight texture height in pixels
+ * \return texture byte array
+ */
+ SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
+
+ /*!
+ * \brief Get list of all avaiable texture IDs
+ * \return list of all texture IDs avaiable for the current study
+ */
+ ListOfLong GetAllTextures();
+ };
+
+ // # GEOM_IKindOfShape:
+ /*!
+ * \brief Interface for shape_kind enumeration.
+ */
+ interface GEOM_IKindOfShape
+ {
+ enum shape_kind {
+ NO_SHAPE,
+ //COMPOSITEs
+ COMPOUND,
+ COMPSOLID,
+ SHELL,
+ WIRE,
+ // SOLIDs
+ /*! full sphere */
+ SPHERE,
+ /*! cylinder */
+ CYLINDER,
+ /*! box with faces, parallel to global coordinate planes */
+ BOX,
+ /*! other box */
+ ROTATED_BOX,
+ /*! full torus */
+ TORUS,
+ /*! cone */
+ CONE,
+ /*! solid, bounded by polygons */
+ POLYHEDRON,
+ /*! other solid */
+ SOLID,
+ // FACEs
+ /*! spherical face (closed) */
+ SPHERE2D,
+ /*! cylindrical face with defined height */
+ CYLINDER2D,
+ /*! toroidal face (closed) */
+ TORUS2D,
+ /*! conical face with defined height */
+ CONE2D,
+ /*! planar, bounded by circle */
+ DISK_CIRCLE,
+ /*! planar, bounded by ellipse */
+ DISK_ELLIPSE,
+ /*! planar, bounded by segments */
+ POLYGON,
+ /*! infinite planar */
+ PLANE,
+ /*! other planar */
+ PLANAR,
+ /*! other face */
+ FACE,
+ // EDGEs
+ /*! full circle */
+ CIRCLE,
+ /*! arc of circle */
+ ARC_CIRCLE,
+ /*! full ellipse */
+ ELLIPSE,
+ /*! arc of ellipse */
+ ARC_ELLIPSE,
+ /*! infinite segment */
+ LINE,
+ /*! segment */
+ SEGMENT,
+ /*! other edge */
+ EDGE,
+ // VERTEX
+ VERTEX,
+ // ADVANCED shapes
+ /*! all advanced shapes (temporary implementation) */
+ ADVANCED
+ };
+ };
+
+ // # GEOM_IMeasureOperations:
+ /*!
+ * \brief Interface for measurement (distance, whatis) and
+ * properties calculation (like Centre of Mass, Inertia, etc.).
+ *
+ */
+ interface GEOM_IMeasureOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief Get kind of theShape.
+ * \param theShape Shape to get a kind of.
+ * \param theIntegers Output. Integer and enumerated shape's parameters
+ * (kind of surface, closed/unclosed, number of edges, etc.)
+ * \param theDoubles Output. Double shape's parameters (coordinates, dimensions, etc.)
+ * \note Concrete meaning of each value, returned via \a theIntegers
+ * or \a theDoubles list depends on the kind of the shape.
+ * \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
+ */
+ //short KindOfShape (in GEOM_Object theShape,
+ GEOM_IKindOfShape::shape_kind KindOfShape (in GEOM_Object theShape,
+ out ListOfLong theIntegers,
+ out ListOfDouble theDoubles);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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 the vertex by index for 1D objects depends the edge/wire orientation
+ * \param theShape Shape (wire or edge) to find the vertex on it
+ * \param theIndex Index of vertex sub-shape
+ * \return New GEOM_Object, vertex.
+ */
+ GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
+
+ /*!
+ * \brief Get a vector, representing the normal of theFace.
+ * If the face is not planar, theOptionalPoint is obligatory.
+ * \param theFace Shape (face) to define the normal of.
+ * \param theOptionalPoint Shape (point) to define the normal at.
+ * Can be NULL in case of planar face.
+ * \return New GEOM_Object, containing the created normal vector.
+ */
+ GEOM_Object GetNormal (in GEOM_Object theFace,
+ in GEOM_Object theOptionalPoint);
+
+ /*!
+ * \brief Get inertia matrix and moments of inertia of theShape.
+ * \param theShape Shape to calculate inertia of.
+ * \param I11,I12,I13,I21,I22,I23,I31,I32,I33 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);
+
+ /*!
+ * \brief Get parameters of bounding box of the given shape
+ * \param theShape Shape to obtain bounding box of.
+ * \param precise TRUE for precise computation; FALSE for fast one.
+ * \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,
+ in boolean precise,
+ out double Xmin, out double Xmax,
+ out double Ymin, out double Ymax,
+ out double Zmin, out double Zmax);
+
+ /*!
+ * \brief Get bounding box of the given shape
+ * \param theShape Shape to obtain bounding box of.
+ * \param precise TRUE for precise computation; FALSE for fast one.
+ * \return New GEOM_Object, containing the created bounding box.
+ */
+ GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
+ in boolean precise);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Check a topology of the given shape on self-intersections presence.
+ * \param theShape Shape to check validity of.
+ * \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
+ * \return TRUE, if the shape does not have any self-intersections.
+ */
+ boolean CheckSelfIntersections (in GEOM_Object theShape,
+ out ListOfLong theIntersections);
+
+ /*!
+ * \brief Check if the given shape can be an argument for MakeSolid operation
+ * \param theShape Shape to be described.
+ * \return Empty string if a solid can be made on this shape, error code otherwise.
+ */
+ string IsGoodForSolid (in GEOM_Object theShape);
+
+ /*!
+ * O\brief btain description of the given shape
+ * \param theShape Shape to be described.
+ * \return Description of the given shape.
+ */
+ string WhatIs (in GEOM_Object theShape);
+
+ /*!
+ * \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
+ * the shape theShape.
+ * \param theShape Shape to check.
+ * \param coords list of coordinates.
+ * \param tolerance tolerance.
+ * \return list of boolean.
+ */
+ ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Get closest points of the given shapes.
+ * \param theShape1,theShape2 Shapes to find closest points of.
+ * \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
+ * \return The number of found solutions (-1 in case of infinite number of solutions).
+ */
+ long ClosestPoints (in GEOM_Object theShape1,
+ in GEOM_Object theShape2,
+ out ListOfDouble theCoords);
+
+ /*!
+ * \brief Get angle between the given lines or linear edges.
+ * \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
+ * \return Value of the angle between the given shapes.
+ */
+ double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
+
+ /*!
+ * \brief Get angle between the given vectors.
+ * \param theShape1,theShape2 Vectors to find angle between.
+ * \return Value of the angle between the given vectors.
+ */
+ double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
+
+ /*!
+ * \brief Get point coordinates
+ */
+ void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
+
+ /*!
+ * \brief Get radius of curvature of curve in the point determinated by param
+ * \param theShape - curve.
+ * \param theParam - parameter on curve
+ * \return Value of curvature.
+ */
+ double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
+
+ /*!
+ * \brief Get radius of curvature of curve in the given point
+ * \param theShape - curve.
+ * \param thePoint - point
+ * \return Value of curvature.
+ */
+ double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
+
+ /*!
+ * \brief Get max radius of curvature of surface in the point determinated by params
+ * \param theShape - surface.
+ * \param theUParam - U-parameter on surface
+ * \param theVParam - V-parameter on surface
+ * \return Value of curvature.
+ */
+ double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
+ in double theVParam);
+
+ /*!
+ * \brief Get max radius of curvature of surface in the given point
+ * \param theShape - surface.
+ * \param thePoint - point
+ * \return Value of curvature.
+ */
+ double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
+
+ /*!
+ * \brief Get min radius of curvature of surface in the point determinated by params
+ * \param theShape - surface.
+ * \param theUParam - U-parameter on surface
+ * \param theVParam - V-parameter on surface
+ * \return Value of curvature.
+ */
+ double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
+ in double theVParam);
+
+ /*!
+ * \brief Get min radius of curvature of surface in the given point
+ * \param theShape - surface.
+ * \param thePoint - point
+ * \return Value of curvature.
+ */
+ double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
+
+ };
+
+ // # GEOM_IGroupOperations:
+ /*!
+ * \brief Interface for groups creation.
+ */
+ interface GEOM_IGroupOperations : GEOM_IOperations
+ {
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief Union of two groups.
+ * New group is created. It will contain all entities
+ * which are present in groups theGroup1 and theGroup2.
+ * \param theGroup1, theGroup2 are the initial GEOM groups
+ * to create the united group from.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object UnionGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
+
+ /*!
+ * \brief Intersection of two groups.
+ * New group is created. It will contain only those entities
+ * which are present in both groups theGroup1 and theGroup2.
+ * \param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object IntersectGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
+
+ /*!
+ * \brief Cut of two groups.
+ * New group is created. It will contain entities which are
+ * present in group theGroup1 but are not present in group theGroup2.
+ * \param theGroup1 is a GEOM group to include elements of.
+ * \param theGroup2 is a GEOM group to exclude elements of.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object CutGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
+
+ /*!
+ * \brief Union of list of groups.
+ * New group is created. It will contain all entities that are
+ * present in groups listed in theGList.
+ * \param theGList is a list of GEOM groups to create the united group from.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object UnionListOfGroups (in ListOfGO theGList);
+
+ /*!
+ * \brief Intersection of list of groups.
+ * New group is created. It will contain only entities
+ * which are simultaneously present in the groups listed in theGList.
+ * \param theGList is a list of GEOM groups to get common part of.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object IntersectListOfGroups (in ListOfGO theGList);
+
+ /*!
+ * \brief Cut of lists of groups.
+ * New group is created. It will contain only entities
+ * which are present in groups listed in theGList1 but
+ * are not present in groups from theGList2.
+ * \param theGList1 is a list of GEOM groups to include elements of.
+ * \param theGList2 is a list of GEOM groups to exclude elements of.
+ * \return a newly created GEOM group.
+ */
+ GEOM_Object CutListOfGroups (in ListOfGO theGList1,
+ in ListOfGO theGList2);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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);
+
+ /*!
+ * \brief 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_IAdvancedOperations:
+ /*!
+ * \brief Interface for advanced modeling functions.
+ */
+ interface GEOM_IAdvancedOperations : GEOM_IOperations
+ {
+ // T-Shape WITHOUT Thickness reduction
+
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length). A chamfer is created
+ * on the junction of the pipes.
+ *
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theH Height of the chamfer.
+ * \param theW Width of the chamfer.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theH, in double theW, in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A chamfer is created on the junction of the pipes.
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theH Height of the chamfer.
+ * \param theW Width of the chamfer.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theH, in double theW, in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A fillet is created on the junction of the pipes.
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theRF Radius of curvature of fillet.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRF, in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A fillet is created on the junction of the pipes.
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ * \param theRF Radius of curvature of fillet.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRF, in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+
+ // T-Shape WITH Thickness reduction
+
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTRWithPosition
+ (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length). A chamfer is created
+ * on the junction of the pipes.
+ *
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theH Height of the chamfer.
+ * \param theW Width of the chamfer.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTRChamfer
+ (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in double theH, in double theW, in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A chamfer is created on the junction of the pipes.
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theH Height of the chamfer.
+ * \param theW Width of the chamfer.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTRChamferWithPosition
+ (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in double theH, in double theW, in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A fillet is created on the junction of the pipes.
+ * Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theRF Radius of curvature of fillet.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTRFillet
+ (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in double theRF, in boolean theHexMesh);
+ /*!
+ * \brief Create a T-shape object with specified caracteristics for the main and
+ * the incident pipes (radius, width, half-length).
+ *
+ * A fillet is created on the junction of the pipes.
+ * The extremities of the main pipe are located on junctions points P1 and P2.
+ * The extremity of the incident pipe is located on junction point P3.
+ * \param theR1 Internal radius of main pipe
+ * \param theW1 Width of main pipe
+ * \param theL1 Half-length of main pipe
+ * \param theR2 Internal radius of incident pipe (R2 < R1)
+ * \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ * \param theL2 Half-length of incident pipe
+ *
+ * \param theRL Internal radius of left thickness reduction
+ * \param theWL Width of left thickness reduction
+ * \param theLtransL Length of left transition part
+ * \param theLthinL Length of left thin part
+ *
+ * \param theRR Internal radius of right thickness reduction
+ * \param theWR Width of right thickness reduction
+ * \param theLtransR Length of right transition part
+ * \param theLthinR Length of right thin part
+ *
+ * \param theRI Internal radius of incident thickness reduction
+ * \param theWI Width of incident thickness reduction
+ * \param theLtransI Length of incident transition part
+ * \param theLthinI Length of incident thin part
+ *
+ * \param theRF Radius of curvature of fillet.
+ * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+ * \param theP1 1st junction point of main pipe
+ * \param theP2 2nd junction point of main pipe
+ * \param theP3 Junction point of incident pipe
+ * \return List of GEOM_Object, containing the created shape and propagation groups.
+ */
+ ListOfGO MakePipeTShapeTRFilletWithPosition
+ (in double theR1, in double theW1, in double theL1,
+ in double theR2, in double theW2, in double theL2,
+ in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+ in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+ in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+ in double theRF, in boolean theHexMesh,
+ in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+
+ /*!
+ * This function allows to create a disk already divided into blocks. It
+ * can be use to create divided pipes for later meshing in hexaedra.
+ * \param theR Radius of the disk
+ * \param theRatio Relative size of the central square diagonal against the disk diameter
+ * \param theOrientation Plane on which the disk will be built
+ * \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+ * \return New GEOM_Object, containing the created shape.
+ */
+ GEOM_Object MakeDividedDisk (in double theR,
+ in double theRatio,
+ in short theOrientation,
+ in pattern thePattern);
+
+ /*!
+ * \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
+ * \param thePnt disk center.
+ * \param theVec Vector, normal to the plane of the disk.
+ * \param theR Disk radius.
+ * \param theRatio Relative size of the central square diagonal against the disk diameter
+ * \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+ * \return New GEOM_Object, containing the created disk.
+ */
+ GEOM_Object MakeDividedDiskPntVecR ( in GEOM_Object thePnt,
+ in GEOM_Object theVec,
+ in double theR,
+ in double theRatio,
+ in pattern thePattern);
+
+ /*!
+ * Builds a cylinder prepared for hexa meshes
+ * \param theR Radius of the cylinder
+ * \param theH Height of the cylinder
+ * \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+ * \return New GEOM_Object, containing the created shape.
+ */
+ GEOM_Object MakeDividedCylinder (in double theR,
+ in double theH,
+ in pattern thePattern );
+ /*!
+ *
+ * Create a smoothing surface from a set of points
+ * \param thelPoints list of points
+ * \return New GEOM_Object, containing the created shape.
+ */
+ GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints);
+
+ /*@@ insert new functions before this line @@ do not remove this line @@*/
+ };
+
+ // # GEOM_Gen:
+ /*!
+ * \brief Interface to access other GEOM interfaces.
+ *
+ * Also contains some methods to access and manage GEOM_Object.
+ */
+ interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
+ {
+ /*!
+ * \brief Undo/Redo Management
+ */
+
+ void Undo (in long theStudyID);
+
+ void Redo (in long theStudyID);
+
+ /*!
+ * \brief Publishing management
+ *
+ * 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);
+
+ /*!
+ * \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
+ *
+ * To be used from python scripts out of geompy.addToStudy (non-default usage)
+ * \param theStudy the study, in which theObject is published already,
+ * and in which the arguments will be published
+ * \param theObject published GEOM_Object, arguments of which will be published
+ * \param theArgs list of GEOM_Object, operation arguments to be published.
+ * If this list is empty, all operation arguments will be published
+ * \param theFindMethod method to search sub-shapes, corresponding to arguments and
+ * their sub-shapes. Value from enumeration GEOM::find_shape_method.
+ * \param theInheritFirstArg set properties of the first argument for \a theObject.
+ * Do not publish sub-shapes in place of arguments, but only
+ * in place of sub-shapes of the first argument,
+ * because the whole shape corresponds to the first argument.
+ * Mainly to be used after transformations, but it also can be
+ * usefull after partition with one object shape, and some other
+ * operations, where only the first argument has to be considered.
+ * If theObject has only one argument shape, this flag is automatically
+ * considered as True, not regarding really passed value.
+ * \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
+ * and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
+ * \return list of published sub-shapes
+ */
+ ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
+ in GEOM_Object theObject,
+ in ListOfGO theArgs,
+ in find_shape_method theFindMethod,
+ in boolean theInheritFirstArg,
+ in boolean theAddPrefix);
+
+ /*!
+ * \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
+ *
+ * To be used from python scripts out of geompy.addToStudy (non-default usage)
+ * \param theStudy the study, in which theObject is published already,
+ * and in which the arguments will be published
+ * \param theObject published GEOM_Object, arguments of which will be published
+ * \param theArgs list of GEOM_Object, operation arguments to be published.
+ * If this list is empty, all operation arguments will be published
+ * \param theFindMethod method to search sub-shapes, corresponding to arguments and
+ * their sub-shapes. Value from enumeration GEOM::find_shape_method.
+ * \param theInheritFirstArg set properties of the first argument for \a theObject.
+ * Do not publish sub-shapes in place of arguments, but only
+ * in place of sub-shapes of the first argument,
+ * because the whole shape corresponds to the first argument.
+ * Mainly to be used after transformations, but it also can be
+ * usefull after partition with one object shape, and some other
+ * operations, where only the first argument has to be considered.
+ * If theObject has only one argument shape, this flag is automatically
+ * considered as True, not regarding really passed value.
+ * \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
+ * and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
+ * \return list of published sub-shapes
+ */
+ ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study theStudy,
+ in GEOM_Object theObject,
+ in ListOfGO theArgs,
+ in find_shape_method theFindMethod,
+ in boolean theInheritFirstArg,
+ in boolean theAddPrefix);
+
+ /*!
+ * \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
+ *
+ * To be used from GUI and from geompy.addToStudy.
+ * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
+ * \param theStudy the study, in which theObject is published already,
+ * and in which the arguments will be published
+ * \param theSObject study object, referencing GEOM_Object, arguments of which will be published
+ * \param theArgs list of GEOM_Object, operation arguments to be published.
+ * If this list is empty, all operation arguments will be published
+ * \param theFindMethod method to search sub-shapes, corresponding to arguments and
+ * their sub-shapes. Value from enumeration GEOM::find_shape_method.
+ * \param theInheritFirstArg set properties of the first argument for \a theObject.
+ * Do not publish sub-shapes in place of arguments, but only
+ * in place of sub-shapes of the first argument,
+ * because the whole shape corresponds to the first argument.
+ * Mainly to be used after transformations, but it also can be
+ * usefull after partition with one object shape, and some other
+ * operations, where only the first argument has to be considered.
+ * If theObject has only one argument shape, this flag is automatically
+ * considered as True, not regarding really passed value.
+ * \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
+ * and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
+ */
+ ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy,
+ in SALOMEDS::SObject theSObject,
+ in ListOfGO theArgs,
+ in find_shape_method theFindMethod,
+ in boolean theInheritFirstArg,
+ in boolean theAddPrefix);
+
+ // # Methods to access interfaces for objects creation and transformation