geom/idl/GEOM_Gen.idl

4973 lines
213 KiB
Plaintext
Raw Normal View History

2015-02-10 14:25:19 +05:00
// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
2005-12-05 21:23:52 +05:00
//
2012-08-09 13:58:02 +06:00
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2005-12-05 21:23:52 +05:00
//
2012-08-09 13:58:02 +06:00
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
2014-02-18 12:44:41 +06:00
// version 2.1 of the License, or (at your option) any later version.
2009-02-13 17:16:39 +05:00
//
2012-08-09 13:58:02 +06:00
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
2009-02-13 17:16:39 +05:00
//
2012-08-09 13:58:02 +06:00
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2009-02-13 17:16:39 +05:00
//
2012-08-09 13:58:02 +06:00
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2005-12-05 21:23:52 +05:00
//
2003-07-09 21:01:54 +06:00
// File : GEOM_Gen.idl
2004-12-01 15:39:14 +05:00
// Author : Sergey RUIN
2012-08-09 13:58:02 +06:00
2003-05-12 20:51:31 +06:00
#ifndef __GEOM_GEN__
#define __GEOM_GEN__
#include "SALOME_Exception.idl"
#include "SALOME_Component.idl"
#include "SALOMEDS.idl"
#include "SALOMEDS_Attributes.idl"
2004-12-01 15:39:14 +05:00
#include "SALOME_GenericObj.idl"
2003-05-12 20:51:31 +06:00
module GEOM
{
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Topological types of shapes (like Open Cascade types)
2004-12-01 15:39:14 +05:00
*/
2012-08-09 13:58:02 +06:00
enum shape_type
{
/*! A collection of arbitrary shapes */
2012-08-09 13:58:02 +06:00
COMPOUND,
/*! A collection of solids */
COMPSOLID,
/*! A part of 3D space bound by a shell */
SOLID,
/*! A collection of faces connected by some edges of their wire boundaries */
SHELL,
/*! Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a closed wire */
2012-08-09 13:58:02 +06:00
FACE,
/*! A sequence of edges connected by their vertices */
2012-08-09 13:58:02 +06:00
WIRE,
/*! Edge, a shape corresponding to a curve, and bound by a vertex at each extremity */
EDGE,
/*! A zero-dimensional shape corresponding to a point in geometry */
VERTEX,
/*! Arbitrary shape in a Compound (used for processing of Compounds in some operations) */
SHAPE,
/*! Flat (top-level) contents of a Compound (used for processing of Compounds in some operations) */
FLAT
};
2004-12-01 15:39:14 +05:00
2012-08-09 13:58:02 +06:00
/*!
* \brief Marker type
*/
enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_X, MT_O, MT_O_POINT, MT_O_PLUS,
MT_O_STAR, MT_O_X, MT_RING1, MT_RING2, MT_RING3, MT_BALL, MT_USER };
2012-08-09 13:58:02 +06:00
/*!
* /brief Marker size
*/
enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
/*!
2012-08-09 13:58:02 +06:00
* \brief State of shape relatively geometrical surface like plane, sphere or cylinder.
*
* Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
*/
enum shape_state
{
/*! Shape is on surface */
ST_ON,
/*!
* Shape is in the direction defined by the normal and not on surface.
* For plane it means above the plane,
* For sphere and cylinder it means outside of volume, bounded by the surface.
*/
ST_OUT,
2012-08-09 13:58:02 +06:00
/*!
* Shape is in the direction defined by the normal and on surface.
* ONOUT = ON || OUT
*/
ST_ONOUT,
/*!
* Complementary to ONOUT.
* For plane it means below the plane,
* For sphere and cylinder it means inside the volume, bounded by the surface
* (beyond axis and surface for cylinder and beyond cented and surface for sphere).
*/
ST_IN,
/*!
* Complementary to OUT.
* ONIN = ON || IN
*/
ST_ONIN
};
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Kind of method to find inside one main shape some sub-shapes,
2009-02-13 17:16:39 +05:00
* corresponding to other given shape (its argument)
2012-08-09 13:58:02 +06:00
*
2014-11-27 18:09:06 +05:00
* Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO(),
* TransferNames()
2009-02-13 17:16:39 +05:00
*/
enum find_shape_method
{
/*! Use GetInPlace functionality. Suits all cases, except transformations */
FSM_GetInPlace,
2012-08-09 13:58:02 +06:00
/*! To be used only for transformation result, to find sub-shapes of argument.
2009-02-13 17:16:39 +05:00
* Only this method can be used after transformation.
*/
FSM_Transformed,
2012-08-09 13:58:02 +06:00
/*! To find only shared sub-shapes, not modified by the operation */
2009-02-13 17:16:39 +05:00
FSM_GetSame,
/*! Use GetShapesOnShape method (can work only on solids) */
FSM_GetShapesOnShape,
/*! Use GetInPlaceByHistory method (can work only after Partition) */
2012-08-09 13:58:02 +06:00
FSM_GetInPlaceByHistory,
/*! To be used only for multi-transformation result.
* Only this method can be used after multi-transformation.
*/
2014-11-27 18:09:06 +05:00
FSM_MultiTransformed,
/*! Use old GetInPlace functionality. */
FSM_GetInPlace_Old
2012-08-09 13:58:02 +06:00
};
/*!
* \brief Kind of method to perform filling operation
*
* Is used in functions GEOM_I3DPrimOperations.MakeFilling()
*/
enum filling_oper_method
{
/*! Default (standard behaviour) */
FOM_Default,
/*! Use edges orientation - orientation of edges is used: if the edge is
* reversed, the curve from this edge is reversed before using it in
* the filling algorithm.
*/
FOM_UseOri,
/*! Auto-correct edges orientation - changes the orientation of the curves
* using minimization of sum of distances between the end points of the edges.
*/
FOM_AutoCorrect
};
/*!
* \brief Kind of the curves.
*
* Used in the functions GEOM_ICurvesOperations.MakeCurveParametric(), GEOM_ICurvesOperations.MakeCurveParametricNew(),
* GEOM_ICurvesOperations.MakePolyline2D, GEOM_ICurvesOperations.MakePolyline2DOnPlane.
2012-08-09 13:58:02 +06:00
*/
enum curve_type {
/*! Polyline curve */
Polyline,
/*! Bezier curve */
Bezier,
/*! Interpolation, curve */
Interpolation
};
/*!
* \brief Type of field data
*/
enum field_data_type {
FDT_Bool,
FDT_Int,
FDT_Double,
FDT_String
};
/**
* This enumeration represents the level of checking shape on
* self-interference. It defines which interferferences will be checked.
*/
enum si_check_level
{
SI_V_V, // only V/V interferences
SI_V_E, // V/V and V/E interferences
SI_E_E, // V/V, V/E and E/E interferences
SI_V_F, // V/V, V/E, E/E and V/F interferences
SI_E_F, // V/V, V/E, E/E, V/F and E/F interferences
SI_ALL // all interferences
};
/*!
* \brief Object creation parameters
*
* Is returned by GEOM_Object::GetCreationInformation()
*/
struct Parameter
{
string name;
string value;
};
typedef sequence<Parameter> Parameters;
struct CreationInformation
{
string operationName;
Parameters params;
};
/*!
* \brief Reporting on shape healing
*/
struct ModifInfo
{
string name; // what changed
long count; // how many times
};
typedef sequence<ModifInfo> ModifStatistics;
2009-02-13 17:16:39 +05:00
typedef sequence<string> string_array;
typedef sequence<short> short_array;
typedef sequence<boolean> ListOfBool;
typedef sequence<long> ListOfLong;
typedef sequence<double> ListOfDouble;
typedef sequence<ListOfDouble> ListOfListOfDouble;
2004-12-01 15:39:14 +05:00
interface GEOM_Object;
interface GEOM_BaseObject;
interface GEOM_Field;
interface GEOM_FieldStep;
2004-12-01 15:39:14 +05:00
typedef sequence<GEOM_Object> ListOfGO;
typedef sequence<GEOM_BaseObject> ListOfGBO;
typedef sequence<GEOM_Field> ListOfFields;
typedef sequence<SALOMEDS::SObject> object_list;
2004-12-01 15:39:14 +05:00
//# GEOM_BaseObject
2004-12-01 15:39:14 +05:00
/*!
* \brief A common root of objects in GEOM module
2004-12-01 15:39:14 +05:00
*/
interface GEOM_BaseObject : SALOME::GenericObj
2004-12-01 15:39:14 +05:00
{
/*!
* \brief Set name of the object.
*
* \param theName is a name which will be associated with this object.
*/
void SetName (in string theName);
/*!
* \brief Get name of the object associated with this object.
*/
string GetName();
2004-12-01 15:39:14 +05:00
/*!
2012-12-13 14:40:36 +06:00
* \brief Get internal (unique) entry of the object in the GEOM component's data tree.
* \note This is not an entry of the data object in SALOME study.
* This is internal function of GEOM component, though it can be used outside it for
appropriate reason (e.g. for unique identification of geometry object).
2004-12-01 15:39:14 +05:00
*/
string GetEntry();
/*!
2012-08-09 13:58:02 +06:00
* \brief Get ID of study, where the object is created.
2004-12-01 15:39:14 +05:00
*/
long GetStudyID();
/*!
2012-08-09 13:58:02 +06:00
* \brief Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
2004-12-01 15:39:14 +05:00
*/
long GetType();
/*!
* \brief Get value of a modification counter of the object
*/
long GetTick();
/*!
* \brief Set a Study entry where this object was published.
*/
void SetStudyEntry (in string theEntry);
/*!
* \brief Get a Study entry where this object was published.
*/
string GetStudyEntry();
/*!
* \brief Get a list of all GEOM_Object on which were the arguments
* when this object was constructed and modified.
* \note This method is supposed to be used by GUI only.
*/
ListOfGBO GetDependency();
/*!
* \brief Get a list of GEOM_Object on which the last function that created or modified the object depends.
* \note This method is supposed to be used by GUI only.
*/
ListOfGBO GetLastDependency();
/*
* \brief Return true if geom object representes a shape.
*
* For example, method return false for GEOM_MARKER
*/
boolean IsShape();
/*
* \brief Return true if passed object is identical to this object
*
* \param other object being compared with this one
*/
boolean IsSame(in GEOM_BaseObject other);
/*!
* Set list of parameters
* \param theParameters is a string containing the notebook variables separated by ":" symbol,
* used for object creation
*/
void SetParameters (in string theParameters);
/*!
* \brief Return list of notebook variables used for object creation separated by ":" symbol
*/
string GetParameters();
/*!
* \brief Return name of operation and values of parameters used for object creation
*/
CreationInformation GetCreationInformation();
};
//# GEOM_Object
/*!
* \brief Interface of geometric object
*/
interface GEOM_Object : GEOM_BaseObject
{
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get a <VAR>shape_type</VAR> of the object value.
2004-12-01 15:39:14 +05:00
*/
shape_type GetShapeType();
/*!
2012-08-09 13:58:02 +06:00
* \brief Get the topology type of the object value.
*
* In contrast to the shape type, this function returns type of the most
* top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
* sub-shape there.
* \sa GetShapeType()
*/
shape_type GetTopologyType();
/*!
* \brief Get a minimal type of the top-level shapes contained in the object.
*
* This function is useful for the compounds only; for simple shapes it
* exactly the same value as GetShapeType().
* Note, that compounds are procesed recursively.
*
* \sa GetShapeType(), GetTopologyType(), GetMaxShapeType()
*/
shape_type GetMinShapeType();
/*!
* \brief Get a maximal type of the top-level shapes contained in the object.
*
* This function is useful for the compounds only; for simple shapes it
* exactly the same value as GetShapeType().
* Note, that compounds are procesed recursively.
*
* \sa GetShapeType(), GetTopologyType(), GetMinShapeType()
*/
shape_type GetMaxShapeType();
2014-12-12 16:19:02 +05:00
/*!
* \brief Returns a name of a sub-shape if the sub-shape is published in the study
* \param subID - sub-shape ID
* \return string - the found name or an empty string if the sub-shape does not
* exits or is not published in the study
*
* \note Only sub-shapes directly retrieved (using e.g. ExtractSubShapes() or
* via group creation) can be found. Also, as sub-shape can be published in the study
* many times, only the first found name is returned.
*/
string GetSubShapeName(in long subID);
/*!
2012-08-09 13:58:02 +06:00
* \brief Set color of the object.
*
* \param theColor is a color of the object.
*/
void SetColor(in SALOMEDS::Color theColor);
/*!
* Get color of the object.
*/
SALOMEDS::Color GetColor();
/*!
* Toggle auto color mode on the object.
2012-08-09 13:58:02 +06:00
* \param theAutoColor is a flag which toggles auto color mode.
*/
void SetAutoColor(in boolean theAutoColor);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get flag of object's auto color mode.
*/
boolean GetAutoColor();
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Set standard point marker for the object
* \param theType standard marker type
* \param theSize marker relative size
*/
void SetMarkerStd(in marker_type theType, in marker_size theSize );
/*!
* \brief Set custom point marker for the object.
*
* The texture can be added by LoadTexture() or AddTexture() functions.
* \param theTextureId texture ID
*/
void SetMarkerTexture(in long theTextureId);
/*!
* \brief Get type of the point marker assigned to the object
* \return current marker type (MT_NONE if no marker is set)
*/
marker_type GetMarkerType();
/*!
* \brief Get size of the point marker assigned to the object
* \return current marker relative size (MS_NONE if no marker is set)
*/
marker_size GetMarkerSize();
/*!
* \brief Get texture idenifier of the point marker assigned to the object
* \return marker texture ID (0 if no marker set)
*/
long GetMarkerTexture();
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get the TopoDS_Shape, for colocated case only.
2004-12-01 15:39:14 +05:00
*/
long long getShape();
2004-12-01 15:39:14 +05:00
2012-08-09 13:58:02 +06:00
// ######################################################################
// # Internal methods (For sub-shape identification)
// ######################################################################
2004-12-01 15:39:14 +05:00
/*!
2012-10-08 17:16:36 +06:00
* \brief Get geometric shape of the object as a byte stream in BRep format
* \note GEOM_IInsertOperations::RestoreShape() method can be used to restore shape from a BRep stream.
2004-12-01 15:39:14 +05:00
*/
SALOMEDS::TMPFile GetShapeStream();
/*
2012-08-09 13:58:02 +06:00
* \brief Returns True if this object is not a sub-shape of another object.
2004-12-01 15:39:14 +05:00
*/
boolean IsMainShape();
/*
2012-08-09 13:58:02 +06:00
* \brief Get a list of ID's of sub-shapes in the main shape.
2004-12-01 15:39:14 +05:00
* \note Internal method, suppopsed to be used only by GEOM_Client
*/
ListOfLong GetSubShapeIndices();
/*
2012-08-09 13:58:02 +06:00
* \brief Get a main shape object to which this object is a sub-shape
2004-12-01 15:39:14 +05:00
* \note Internal method, suppopsed to be used only by GEOM_Client
*/
GEOM_Object GetMainShape();
};
//# GEOM_Field
/*!
* \brief Interface of the field
*/
interface GEOM_Field : GEOM_BaseObject
{
/*!
* \brief Returns the shape the field lies on
2004-12-01 15:39:14 +05:00
*/
GEOM_Object GetShape();
2009-02-13 17:16:39 +05:00
/*!
* \brief Returns type of field data
2012-08-09 13:58:02 +06:00
*/
field_data_type GetDataType();
2012-08-09 13:58:02 +06:00
/*!
* \brief Returns dimension of the shape the field lies on
* 0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
2009-02-13 17:16:39 +05:00
*/
short GetDimension();
2012-08-09 13:58:02 +06:00
2009-02-13 17:16:39 +05:00
/*!
* \brief Returns names of components
2009-02-13 17:16:39 +05:00
*/
string_array GetComponents();
/*!
* \brief Removes a component. Component number counts from one.
*/
//void RemoveComponent(in long number);
/*!
* \brief Adds a time step to the field
*/
GEOM_FieldStep AddStep(in long stepID, in long stamp);
/*!
* \brief Remove a time step from the field
*/
void RemoveStep(in long stepID);
/*!
* \brief Returns number of time steps in the field
*/
long CountSteps();
/*!
* \brief Returns a list of time step IDs in the field
*/
ListOfLong GetSteps();
/*!
* \brief Returns a time step by its ID
*/
GEOM_FieldStep GetStep(in long stepID);
/*!
* \brief Returns a size of data array that is to be passed to
* GEOM_FieldStep.SetValues( dataArray ). This size depends on the
* number of sub-shapes of field dimension and the number of components
*/
long GetArraySize();
};
// # GEOM_FieldStep:
/*!
* \brief Interface of the field time step
*/
interface GEOM_FieldStep : GEOM_BaseObject
{
/*!
* \brief Changes the time of the field step
*/
void SetStamp(in long stamp);
/*!
* \brief Returns the time of the field step
*/
long GetStamp();
/*!
* \brief Returns the number of the field step
*/
long GetID();
/*!
* \brief Returns the field the step belongs to
*/
GEOM_Field GetField();
};
// # GEOM_BoolFieldStep:
/*!
* \brief Interface of the boolean field time step
*/
interface GEOM_BoolFieldStep : GEOM_FieldStep
{
/*!
* \brief Changes values of the field step. Returns false if number of values is wrong
*/
boolean SetValues(in short_array boolValues);
/*!
* \brief Returns values of the field step
*/
short_array GetValues();
};
// # GEOM_IntFieldStep:
/*!
* \brief Interface of the integer field time step
*/
interface GEOM_IntFieldStep : GEOM_FieldStep
{
/*!
* \brief Changes values of the field step. Returns false if number of values is wrong
*/
boolean SetValues(in ListOfLong intValues);
/*!
* \brief Returns values of the field step
*/
ListOfLong GetValues();
};
// # GEOM_DoubleFieldStep:
/*!
* \brief Interface of the double field time step
*/
interface GEOM_DoubleFieldStep : GEOM_FieldStep
{
/*!
* \brief Changes values of the field step. Returns false if number of values is wrong
*/
boolean SetValues(in ListOfDouble doubleValues);
/*!
* \brief Returns values of the field step
*/
ListOfDouble GetValues();
};
// # GEOM_StringFieldStep:
/*!
* \brief Interface of the string field time step
*/
interface GEOM_StringFieldStep : GEOM_FieldStep
{
/*!
* \brief Changes values of the field step. Returns false if number of values is wrong
*/
boolean SetValues(in string_array strValues);
/*!
* \brief Returns values of the field step
*/
string_array GetValues();
2004-12-01 15:39:14 +05:00
};
// # GEOM_IOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Basic methods of all geometric operations
2004-12-01 15:39:14 +05:00
*/
interface GEOM_IOperations : SALOME::GenericObj
{
/*!
2012-08-09 13:58:02 +06:00
* \brief To know, if the operation was successfully performed
2004-12-01 15:39:14 +05:00
*/
boolean IsDone();
/*!
2012-08-09 13:58:02 +06:00
* \brief Set the operation error code
2004-12-01 15:39:14 +05:00
* \param theErrorID is a string describing the error occured
* \note This method is supposed to be used only by interfaces inheriting from IOperations.
*/
void SetErrorCode (in string theErrorID);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get the operation error code
2004-12-01 15:39:14 +05:00
*/
string GetErrorCode();
/*!
2012-08-09 13:58:02 +06:00
* \brief Get ID of study, where the operation is defined
2004-12-01 15:39:14 +05:00
*/
long GetStudyID();
/*!
2012-08-09 13:58:02 +06:00
* \brief Opens a new transaction
2004-12-01 15:39:14 +05:00
*/
void StartOperation();
/*!
2012-08-09 13:58:02 +06:00
* \brief Closes the previously opened trasaction
2004-12-01 15:39:14 +05:00
*/
void FinishOperation();
/*!
2012-08-09 13:58:02 +06:00
* \brief Aborts the previously opened transaction
2004-12-01 15:39:14 +05:00
*/
void AbortOperation();
};
2012-08-09 13:58:02 +06:00
//# GEOM_IBasicOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for basic geometry creation
*
2004-12-01 15:39:14 +05:00
* (Point, Vector, Plane, Marker)
*/
interface GEOM_IBasicOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Create point by three coordinates.
2004-12-01 15:39:14 +05:00
* \param theX The X coordinate of the point.
* \param theY The Y coordinate of the point.
* \param theZ The Z coordinate of the point.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a point, distant from the referenced point
2004-12-01 15:39:14 +05:00
* on the given distances along the coordinate axes.
* \param theReference The referenced point.
* \param theX Displacement from the referenced point along OX axis.
* \param theY Displacement from the referenced point along OY axis.
* \param theZ Displacement from the referenced point along OZ axis.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointWithReference (in GEOM_Object theReference,
2012-08-09 13:58:02 +06:00
in double theX, in double theY, in double theZ);
2004-12-01 15:39:14 +05:00
/*!
* Create a point, corresponding to the given parameter on the given curve.
* \param theRefCurve The referenced curve.
* \param theParameter Value of parameter on the referenced curve.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
2012-08-09 13:58:02 +06:00
in double theParameter);
/*!
* \brief Create a point, corresponding to the given length on the given curve.
* \param theRefCurve The referenced curve.
* \param theLength Length on the referenced curve. It can be negative.
* \param theStartPoint Any vertex close to one of edge's
* ends to select start point among them.
* If NULL, fist vertex is used.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnCurveByLength (in GEOM_Object theRefCurve,
in double theLength,
in GEOM_Object theStartPoint);
2004-12-01 15:39:14 +05:00
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a point on the given curve, projecting given point
* \param theRefCurve The referenced curve.
* \param theXParameter X co-ordinate of point to project on curve
* \param theYParameter Y co-ordinate of point to project on curve
* \param theZParameter Z co-ordinate of point to project on curve
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
in double theXParameter,
in double theYParameter,
in double theZParameter);
/*!
* \brief Create a point, corresponding to the given parameters on the
2009-02-13 17:16:39 +05:00
* given surface.
* \param theRefSurf The referenced surface.
* \param theUParameter Value of U-parameter on the referenced surface.
* \param theVParameter Value of V-parameter on the referenced surface.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
2012-08-09 13:58:02 +06:00
in double theUParameter,
in double theVParameter);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a point on the given surface, projecting given point
* \param theRefSurf The referenced surface.
* \param theXParameter X co-ordinate of point to project on curve
* \param theYParameter Y co-ordinate of point to project on curve
* \param theZParameter Z co-ordinate of point to project on curve
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
in double theXParameter,
in double theYParameter,
in double theZParameter);
2012-10-08 17:16:36 +06:00
/*!
* \brief Create a point, which lays on the given face.
* The point will lay in arbitrary place of the face.
* The only condition on it is a non-zero distance to the face boundary.
* Such point can be used to uniquely identify the face inside any
* shape in case, when the shape does not contain overlapped faces.
* \param theFace The referenced face.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnFace (in GEOM_Object theFace);
2012-08-09 13:58:02 +06:00
/*!
* \brief Create a point, on two lines intersection.
* \param theRefLine1, theRefLine2 The referenced lines.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
2012-08-09 13:58:02 +06:00
in GEOM_Object theRefLine2);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a vector, corresponding to tangent to the given parameter on the given curve.
* \param theRefCurve The referenced curve.
* \param theParameter Value of parameter on the referenced curve.This value should be have value
2012-08-09 13:58:02 +06:00
* between 0. and 1.. Value of 0. corresponds first parameter of curve; value
* 1. corresponds last parameter of curve.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
2012-08-09 13:58:02 +06:00
in double theParameter);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a vector with the given components.
2004-12-01 15:39:14 +05:00
* \param theDX X component of the vector.
* \param theDY Y component of the vector.
* \param theDZ Z component of the vector.
* \return New GEOM_Object, containing the created vector.
*/
GEOM_Object MakeVectorDXDYDZ (in double theDX,
2012-08-09 13:58:02 +06:00
in double theDY,
in double theDZ);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a vector between two points.
2004-12-01 15:39:14 +05:00
* \param thePnt1 Start point for the vector.
* \param thePnt2 End point for the vector.
* \return New GEOM_Object, containing the created vector.
*/
GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
/*!
2012-08-09 13:58:02 +06:00
* C\brief reate a line, passing through the given point
2004-12-01 15:39:14 +05:00
* and parrallel to the given direction
* \param thePnt Point. The resulting line will pass through it.
* \param theDir Direction. The resulting line will be parallel to it.
* \return New GEOM_Object, containing the created line.
*/
GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a line, passing through the given points
2004-12-01 15:39:14 +05:00
* \param thePnt1 First of two points, defining the line.
* \param thePnt2 Second of two points, defining the line.
* \return New GEOM_Object, containing the created line.
*/
GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a line, given by two faces intersection.
* \param theFace1 First of two faces, defining the line.
* \param theFace2 Second of two faces, defining the line.
* \return New GEOM_Object, containing the created line.
*/
GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a plane, passing through the three given points
2004-12-01 15:39:14 +05:00
* \param thePnt1 First of three points, defining the plane.
* \param thePnt2 Second of three points, defining the plane.
* \param thePnt3 Fird of three points, defining the plane.
* \param theTrimSize Half size of a side of quadrangle face, representing the plane.
* \return New GEOM_Object, containing the created plane.
*/
GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3,
in double theTrimSize);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a plane, passing through the given point
2004-12-01 15:39:14 +05:00
* and normal to the given vector.
* \param thePnt Point, the plane has to pass through.
* \param theVec Vector, defining the plane normal direction.
* \param theTrimSize Half size of a side of quadrangle face, representing the plane.
* \return New GEOM_Object, containing the created plane.
*/
GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theTrimSize);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a plane, similar to the existing one, but with another size of representing face.
* \param theFace Referenced plane or LCS(Marker).
2004-12-01 15:39:14 +05:00
* \param theTrimSize New half size of a side of quadrangle face, representing the plane.
* \return New GEOM_Object, containing the created plane.
*/
GEOM_Object MakePlaneFace (in GEOM_Object theFace,
2012-08-09 13:58:02 +06:00
in double theTrimSize);
/*!
* \brief Create a plane, by two vectors.
* \param theVec1 Vector1, the plane has to pass through first point of this vector.
* \param theVec2 Vector2, defining the plane normal direction.
* \param theTrimSize Half size of a side of quadrangle face, representing the plane.
* \return New GEOM_Object, containing the created plane.
*/
GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
in GEOM_Object theVec2,
in double theTrimSize);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a plane, defined by local coordinate system.
* \param theLCS Referenced LCS(Marker).
* \param theTrimSize Half size of a side of quadrangle face, representing the plane.
* \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
* \return New GEOM_Object, containing the created plane.
*/
GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
in double theTrimSize,
in double theOrientation);
/*!
* \brief Create a local coordinate system.
2004-12-01 15:39:14 +05:00
* \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
* \param theXDX,theXDY,theXDZ Three components of OX direction
* \param theYDX,theYDY,theYDZ Three components of OY direction
* \return New GEOM_Object, containing the created coordinate system.
*/
GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
2012-08-09 13:58:02 +06:00
in double theXDX, in double theXDY, in double theXDZ,
in double theYDX, in double theYDY, in double theYDZ);
/*!
* \brief Create a local coordinate system from shape.
* \param theShape The initial shape to detect the coordinate system.
* \return New GEOM_Object, containing the created coordinate system.
*/
GEOM_Object MakeMarkerFromShape (in GEOM_Object theShape);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a local coordinate system from point and two vectors (DX, DY).
* \param theOrigin Point of coordinate system origin.
* \param theXVec Vector of X direction.
* \param theYVec Vector of Y direction.
* \return New GEOM_Object, containing the created coordinate system.
*/
GEOM_Object MakeMarkerPntTwoVec (in GEOM_Object theOrigin,
in GEOM_Object theXVec, in GEOM_Object theYVec);
/*!
* \brief Create a tangent plane to specified face in the point with specified parameters.
*
* Values of parameters should be between 0. and 1.0
2009-02-13 17:16:39 +05:00
* \param theFace - face for which tangent plane shuold be built.
* \param theParameterU - value of parameter by U
* \param theParameterV - value of parameter Vthe
* \param theTrimSize - defines sizes of created face
* \return New GEOM_Object, containing the face built on tangent plane.
*/
GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
2012-08-09 13:58:02 +06:00
in double theParameterU,
in double theParameterV,
in double theTrimSize);
2004-12-01 15:39:14 +05:00
};
2012-12-13 14:40:36 +06:00
/*!
* \brief Interface for shapes transforming.
*
* Translation, rotation, scaling, mirroring, offset, projection, recomputing.
*/
2004-12-01 15:39:14 +05:00
interface GEOM_ITransformOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the vector, specified by its end points.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be translated.
* \param thePoint1 Start point of translation vector.
* \param thePoint2 End point of translation vector.
* \return theObject.
*/
GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the vector, specified
2004-12-01 15:39:14 +05:00
* by its end points, creating its copy before the translation.
* \param theObject The object to be translated.
* \param thePoint1 Start point of translation vector.
* \param thePoint2 End point of translation vector.
* \return New GEOM_Object, containing the translated object.
*/
GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
2004-12-01 15:39:14 +05:00
in GEOM_Object thePoint2);
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the vector, specified by its components.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be translated.
* \param theDX,theDY,theDZ Components of translation vector.
* \return theObject.
*/
GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in double theDX, in double theDY, in double theDZ);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the vector, specified
2004-12-01 15:39:14 +05:00
* by its components, creating its copy before the translation.
* \param theObject The object to be translated.
* \param theDX,theDY,theDZ Components of translation vector.
* \return New GEOM_Object, containing the translated object.
*/
GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in double theDX, in double theDY, in double theDZ);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the given vector.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be translated.
* \param theVector Translation vector, giving both direction and distance.
* \return theObject.
*/
GEOM_Object TranslateVector (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the given vector,
2004-12-01 15:39:14 +05:00
* creating its copy before the translation.
* \param theObject The object to be translated.
* \param theVector Translation vector, giving both direction and distance.
* \return New GEOM_Object, containing the translated object.
*/
GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector);
2004-12-01 15:39:14 +05:00
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the given vector on given distance,
2009-02-13 17:16:39 +05:00
* creating its copy before the translation.
* \param theObject The object to be translated.
* \param theVector Translation vector, giving a direction.
* \param theDistance Translation distance, giving a distance.
2012-08-09 13:58:02 +06:00
* \param theCopy Translation copy, creating its copy if true.
2009-02-13 17:16:39 +05:00
* \return New GEOM_Object, containing the translated object.
*/
GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector,
in double theDistance,
in boolean theCopy);
2009-02-13 17:16:39 +05:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Translate the given object along the given vector a given number times
2004-12-01 15:39:14 +05:00
* \param theObject The object to be translated.
2013-02-12 17:35:16 +06:00
* \param theVector Direction of the translation. DX if None.
2004-12-01 15:39:14 +05:00
* \param theStep Distance to translate on.
* \param theNbTimes Quantity of translations to be done.
* \return New GEOM_Object, containing compound of all
* the shapes, obtained after each translation.
*/
GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector,
in double theStep,
in long theNbTimes);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Conseqently apply two specified translations to theObject specified number of times.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be translated.
2013-02-12 17:35:16 +06:00
* \param theVector1 Direction of the first translation. DX if None.
2004-12-01 15:39:14 +05:00
* \param theStep1 Step of the first translation.
* \param theNbTimes1 Quantity of translations to be done along theVector1.
2013-02-12 17:35:16 +06:00
* \param theVector2 Direction of the second translation. DY if None.
2004-12-01 15:39:14 +05:00
* \param theStep2 Step of the second translation.
* \param theNbTimes2 Quantity of translations to be done along theVector2.
* \return New GEOM_Object, containing compound of all
* the shapes, obtained after each translation.
*/
GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector1,
in double theStep1,
in long theNbTimes1,
in GEOM_Object theVector2,
in double theStep2,
in long theNbTimes2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Rotate given object around vector perpendicular to plane containing three points.
* \param theObject The object to be rotated.
* \param theCentPoint central point - the axis is the vector perpendicular to the plane
2012-08-09 13:58:02 +06:00
* containing the three points.
* \param thePoint1,thePoint2 - in a perpendicular plan of the axis.
* \return theObject.
*/
GEOM_Object RotateThreePoints (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theCentPoint,
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
/*!
2012-08-09 13:58:02 +06:00
* \brief Rotate given object around vector perpendicular to plane containing three points.
*
* Creating its copy before the rotatation.
* \param theObject The object to be rotated.
* \param theCentPoint central point - the axis is the vector perpendicular to the plane
* containing the three points.
2012-08-09 13:58:02 +06:00
* \param thePoint1,thePoint2 - in a perpendicular plan of the axis.
* \return New GEOM_Object, containing the rotated object.
*/
GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theCentPoint,
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Rotate the given object around the given axis on the given angle.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be rotated.
* \param theAxis Rotation axis.
* \param theAngle Rotation angle in radians.
* \return theObject.
*/
GEOM_Object Rotate (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theAngle);
2004-12-01 15:39:14 +05:00
2004-12-01 15:39:14 +05:00
/*!
* Rotate the given object around the given axis
* on the given angle, creating its copy before the rotatation.
* \param theObject The object to be rotated.
* \param theAxis Rotation axis.
* \param theAngle Rotation angle in radians.
* \return New GEOM_Object, containing the rotated object.
*/
GEOM_Object RotateCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theAngle);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Rotate the given object around the given axis a given number times.
*
2013-02-12 17:35:16 +06:00
* Rotation angle will be 2*PI/theNbObjects.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be rotated.
2013-02-12 17:35:16 +06:00
* \param theAxis The rotation axis. DZ if None.
* \param theNbObjects Quantity of rotations to be done.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each rotation.
*/
GEOM_Object MultiRotate1D (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
2013-02-12 17:35:16 +06:00
in long theNbObjects);
/*!
* \brief Rotate the given object around the given axis
* a given number times on the given angle.
*
* \param theObject The object to be rotated.
* \param theAxis The rotation axis. DZ if None.
* \param theAngleStep Rotation angle in radians.
* \param theNbSteps Quantity of rotations to be done.
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each rotation.
*/
GEOM_Object MultiRotate1DByStep (in GEOM_Object theObject,
in GEOM_Object theAxis,
in double theAngleStep,
in long theNbSteps);
/*!
* \brief Rotate the given object around the given axis
* a given number times and multi-translate each rotation result.
*
* Rotation angle will be 2*PI/theNbObjects.
* Translation direction passes through center of gravity
* of rotated shape and its projection on the rotation axis.
* \param theObject The object to be rotated.
* \param theAxis Rotation axis. DZ if None.
* \param theNbObjects Quantity of rotations to be done.
* \param theRadialStep Translation distance.
* \param theNbSteps Quantity of translations to be done.
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each transformation.
*/
GEOM_Object MultiRotate2DNbTimes (in GEOM_Object theObject,
in GEOM_Object theAxis,
in long theNbObjects,
in double theRadialStep,
in long theNbSteps);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Rotate the given object around the
2004-12-01 15:39:14 +05:00
* given axis on the given angle a given number
* times and multi-translate each rotation result.
2012-08-09 13:58:02 +06:00
*
2004-12-01 15:39:14 +05:00
* Translation direction passes through center of gravity
* of rotated shape and its projection on the rotation axis.
* \param theObject The object to be rotated.
2013-02-12 17:35:16 +06:00
* \param theAxis Rotation axis. DZ if None.
* \param theAngleStep Rotation angle in radians.
* \param theNbSteps1 Quantity of rotations to be done.
* \param theRadialStep Translation distance.
* \param theNbSteps2 Quantity of translations to be done.
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each transformation.
*/
GEOM_Object MultiRotate2DByStep (in GEOM_Object theObject,
in GEOM_Object theAxis,
in double theAngleStep,
in long theNbSteps1,
in double theRadialStep,
in long theNbSteps2);
/*!
* \brief Rotate the given object around the
* given axis on the given angle a given number
* times and multi-translate each rotation result.
*
* Translation direction passes through center of gravity
* of rotated shape and its projection on the rotation axis.
* \param theObject The object to be rotated.
* \param theAxis Rotation axis. DZ if None.
* \param theAngleStep Rotation angle in degrees.
* \param theNbSteps1 Quantity of rotations to be done.
* \param theRadialStep Translation distance.
* \param theNbSteps2 Quantity of translations to be done.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each transformation.
*/
GEOM_Object MultiRotate2D (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
2013-02-12 17:35:16 +06:00
in double theAngleStep,
in long theNbSteps1,
in double theRadialStep,
in long theNbSteps2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Replace the given object by an object,
2004-12-01 15:39:14 +05:00
* symmetrical to it relatively the given plane.
* \param theObject The object to be mirrored.
* \param thePlane Plane of symmetry.
*/
GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an object, symmetrical
2004-12-01 15:39:14 +05:00
* to the given one relatively the given plane.
* \param theObject The object to be mirrored.
* \param thePlane Plane of symmetry.
* \return New GEOM_Object, containing the mirrored shape.
*/
GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
/*!
2012-08-09 13:58:02 +06:00
* \brief Replace the given object by an object,
2004-12-01 15:39:14 +05:00
* symmetrical to it relatively the given axis.
* \param theObject The object to be mirrored.
* \param theAxis Axis of symmetry.
* \return theObject.
*/
GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an object, symmetrical
2004-12-01 15:39:14 +05:00
* to the given one relatively the given axis.
* \param theObject The object to be mirrored.
* \param theAxis Axis of symmetry.
* \return New GEOM_Object, containing the mirrored object.
*/
GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
/*!
2012-08-09 13:58:02 +06:00
* \brief Replace the given object by an object, symmetrical to it relatively the given point.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be mirrored.
* \param thePoint Point of symmetry.
* \return theObject.
*/
GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an object, symmetrical to the given one relatively the given point.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be mirrored.
* \param thePoint Point of symmetry.
* \return New GEOM_Object, containing the mirrored object.
*/
GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
/*!
2012-08-09 13:58:02 +06:00
* \brief Replace the given object by its offset.
2004-12-01 15:39:14 +05:00
* \param theObject The base object for the offset.
* \param theOffset Offset value.
* \return theObject.
*/
GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create new object as offset of the given one.
2004-12-01 15:39:14 +05:00
* \param theObject The base object for the offset.
* \param theOffset Offset value.
* \return New GEOM_Object, containing the offset object.
*/
GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create new object as projection of the given one on a 2D surface.
* \param theSource The source object for the projection. It can be a point, edge or wire.
* \param theTarget The target object. It can be planar or cylindrical face.
* \return New GEOM_Object, containing the projection.
*/
GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget);
/*!
* \brief Create a projection projection of the given point on a wire or
* an edge.
*
* If there are no solutions or there are 2 or more solutions It throws an
* exception.
* \param thePoint the point to be projected.
* \param theWire the wire. The edge is accepted as well.
* \param thePointOnEdge the projection point.
* \param theEdgeInWireIndex the index of an edge in a wire.
* \return the parameter of projection point on edge.
*/
double ProjectPointOnWire (in GEOM_Object thePoint,
in GEOM_Object theWire,
out GEOM_Object thePointOnEdge,
out long theEdgeInWireIndex);
2012-08-09 13:58:02 +06:00
/*!
* \brief Scale the given object by the factor.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be scaled.
* \param thePoint Center point for scaling.
* \param theFactor Scaling factor value.
* \return theObject.
*/
GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
2012-08-09 13:58:02 +06:00
in double theFactor);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Scale the given object by the factor, creating its copy before the scaling.
2004-12-01 15:39:14 +05:00
* \param theObject The object to be scaled.
* \param thePoint Center point for scaling.
* \param theFactor Scaling factor value.
* \return New GEOM_Object, containing the scaled shape.
*/
GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
2012-08-09 13:58:02 +06:00
in double theFactor);
2004-12-01 15:39:14 +05:00
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Scale the given object by different factors along coordinate axes.
2009-02-13 17:16:39 +05:00
* \param theObject The object to be scaled.
* \param thePoint Center point for scaling.
* \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
* \return theObject.
*/
GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
in GEOM_Object thePoint,
in double theFactorX,
in double theFactorY,
in double theFactorZ);
/*!
2012-08-09 13:58:02 +06:00
* \brief Scale the given object by different factors along coordinate axes,
2009-02-13 17:16:39 +05:00
* creating its copy before the scaling.
* \param theObject The object to be scaled.
* \param thePoint Center point for scaling.
* \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
* \return New GEOM_Object, containing the scaled shape.
*/
GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
in GEOM_Object thePoint,
in double theFactorX,
in double theFactorY,
in double theFactorZ);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Modify the Location of the given object by LCS.
* \param theObject The object to be displaced.
* \param theStartLCS Coordinate system to perform displacement from it.
* If \a theStartLCS is NULL, displacement
* will be performed from global CS.
* If \a theObject itself is used as \a theStartLCS,
* its location will be changed to \a theEndLCS.
* \param theEndLCS Coordinate system to perform displacement to it.
* \return theObject.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object PositionShape (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theStartLCS,
in GEOM_Object theEndLCS);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Modify the Location of the given object by LCS,
* creating its copy before the setting.
* \param theObject The object to be displaced.
* \param theStartLCS Coordinate system to perform displacement from it.
* If \a theStartLCS is NULL, displacement
* will be performed from global CS.
* If \a theObject itself is used as \a theStartLCS,
* its location will be changed to \a theEndLCS.
* \param theEndLCS Coordinate system to perform displacement to it.
* \return New GEOM_Object, containing the displaced shape.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object theStartLCS,
in GEOM_Object theEndLCS);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Modify the Location of the given object by Path,
2009-02-13 17:16:39 +05:00
* \param theObject The object to be displaced.
* \param thePath Wire or Edge along that the object will be translated.
2012-08-09 13:58:02 +06:00
* \param theDistance progress of Path (0 = actual location, 1 = end of path location).
* \param theCopy is a true or false parameter. true is to create a copy, false to move the object.
2012-12-13 14:40:36 +06:00
* \param theReverse is a true or false parameter. True is to reverse
* direction, false is to move normal direction.
2009-02-13 17:16:39 +05:00
* \return New GEOM_Object, containing the displaced shape.
*/
GEOM_Object PositionAlongPath (in GEOM_Object theObject,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePath,
in double theDistance,
in boolean theCopy,
in boolean theReverse);
2009-02-13 17:16:39 +05:00
2012-08-09 13:58:02 +06:00
/*!
* \brief Recompute the shape from its arguments.
2009-02-13 17:16:39 +05:00
* \param theObject The object to be recomputed.
* \return theObject.
*/
GEOM_Object RecomputeObject (in GEOM_Object theObject);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for 3D primitives creation
*
2004-12-01 15:39:14 +05:00
* Box, Cylinder, Cone, Sphere, Prism (extrusion),
* Pipe (extrusion along contour), Revolution, Solid (from shell).
*/
interface GEOM_I3DPrimOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a box with specified dimensions along the coordinate axes
2004-12-01 15:39:14 +05:00
* and with edges, parallel to the coordinate axes.
2012-08-09 13:58:02 +06:00
*
2004-12-01 15:39:14 +05:00
* Center of the box will be at point (DX/2, DY/2, DZ/2).
* \param theDX Length of Box edges, parallel to OX axis.
* \param theDY Length of Box edges, parallel to OY axis.
* \param theDZ Length of Box edges, parallel to OZ axis.
* \return New GEOM_Object, containing the created box.
*/
GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a box with two specified opposite vertices,
2004-12-01 15:39:14 +05:00
* and with edges, parallel to the coordinate axes
* \param thePnt1 First of two opposite vertices.
* \param thePnt2 Second of two opposite vertices.
* \return New GEOM_Object, containing the created box.
*/
GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a face specified dimensions along OX-OY coordinate axes,
2009-02-13 17:16:39 +05:00
* with edges parallel to the coordinate axes.
2012-08-09 13:58:02 +06:00
*
2009-02-13 17:16:39 +05:00
* Center of the face will be at point (0, 0, 0).
* \param theH Height of the Face.
* \param theW Width of the Face.
* \param theOrientation Orientation belong axis OXY OYZ OZX
* \return New GEOM_Object, containing the created face.
*/
GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a face by normale vector or edge and two specified sizes,
2009-02-13 17:16:39 +05:00
* vertical (H) and horisontal (W).
2012-08-09 13:58:02 +06:00
* \param theObj defines plane.
2009-02-13 17:16:39 +05:00
* \param theH vertical size (height).
2012-08-09 13:58:02 +06:00
* \param theW horisontal size (width).
2009-02-13 17:16:39 +05:00
* \return New GEOM_Object, containing the created face.
*/
GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a Disk (circular face) with given center, normal vector and radius.
2009-02-13 17:16:39 +05:00
* \param thePnt disk center.
* \param theVec Vector, normal to the plane of the disk.
* \param theR Disk radius.
* \return New GEOM_Object, containing the created disk.
*/
GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theR);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a disk (circular face), passing through three given points
2009-02-13 17:16:39 +05:00
* \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
* \return New GEOM_Object, containing the created disk.
*/
GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a disk specified dimensions along OX-OY coordinate axes.
*
2009-02-13 17:16:39 +05:00
* Center of the disk at point (0, 0, 0).
* \param theR of the Disk.
* \param theOrientation Orientation belong axis OXY OYZ OZX
* \return New GEOM_Object, containing the created disk.
*/
GEOM_Object MakeDiskR (in double theR, in short theOrientation);
2012-08-09 13:58:02 +06:00
2004-12-01 15:39:14 +05:00
/*!
* \brief Create a cylinder with given radius and height at
* the origin of coordinate system.
*
* Axis of the cylinder will be collinear to the OZ axis of the coordinate system.
* \param theR Cylinder radius.
* \param theH Cylinder height.
* \return New GEOM_Object, containing the created cylinder.
*/
GEOM_Object MakeCylinderRH (in double theR, in double theH);
/*!
* \brief Create a portion of cylinder with given radius, height and angle at
2012-08-09 13:58:02 +06:00
* the origin of coordinate system.
*
* Axis of the cylinder will be collinear to the OZ axis of the coordinate system.
2004-12-01 15:39:14 +05:00
* \param theR Cylinder radius.
* \param theH Cylinder height.
* \param theA Cylinder angle.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created cylinder.
*/
GEOM_Object MakeCylinderRHA (in double theR, in double theH, in double theA);
2004-12-01 15:39:14 +05:00
/*!
* \brief Create a cylinder with given base point, axis, radius and height.
2004-12-01 15:39:14 +05:00
* \param thePnt Central point of cylinder base.
* \param theAxis Cylinder axis.
* \param theR Cylinder radius.
* \param theH Cylinder height.
* \return New GEOM_Object, containing the created cylinder.
*/
GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
in GEOM_Object theAxis,
in double theR,
in double theH);
/*!
* \brief Create a portion of cylinder with given base point, axis, radius, height and angle.
* \param thePnt Central point of cylinder base.
* \param theAxis Cylinder axis.
* \param theR Cylinder radius.
* \param theH Cylinder height.
* \param theA Cylinder angle.
* \return New GEOM_Object, containing the created cylinder.
*/
GEOM_Object MakeCylinderPntVecRHA (in GEOM_Object thePnt,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theR,
in double theH,
in double theA);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a cone with given height and radiuses at
* the origin of coordinate system.
*
* Axis of the cone will be collinear to the OZ axis of the coordinate system.
2004-12-01 15:39:14 +05:00
* \param theR1 Radius of the first cone base.
* \param theR2 Radius of the second cone base.
* \note If both radiuses are non-zero, the cone will be truncated.
* \note If the radiuses are equal, a cylinder will be created instead.
* \param theH Cone height.
* \return New GEOM_Object, containing the created cone.
*/
GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a cone with given base point, axis, height and radiuses.
2004-12-01 15:39:14 +05:00
* \param thePnt Central point of the first cone base.
* \param theAxis Cone axis.
* \param theR1 Radius of the first cone base.
* \param theR2 Radius of the second cone base.
* \note If both radiuses are non-zero, the cone will be truncated.
* \note If the radiuses are equal, a cylinder will be created instead.
* \param theH Cone height.
* \return New GEOM_Object, containing the created cone.
*/
GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theR1,
in double theR2,
in double theH);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a torus with given radiuses at the origin of coordinate system.
2004-12-01 15:39:14 +05:00
* \param theRMajor Torus major radius.
* \param theRMinor Torus minor radius.
* \return New GEOM_Object, containing the created torus.
*/
GEOM_Object MakeTorusRR (in double theRMajor,
2012-08-09 13:58:02 +06:00
in double theRMinor);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a torus with given center, normal vector and radiuses.
2004-12-01 15:39:14 +05:00
* \param thePnt Torus central point.
* \param theVec Torus axis of symmetry.
* \param theRMajor Torus major radius.
* \param theRMinor Torus minor radius.
* \return New GEOM_Object, containing the created torus.
*/
GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theRMajor,
in double theRMinor);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a sphere with given radius at the origin of coordinate system.
2004-12-01 15:39:14 +05:00
* \param theR Sphere radius.
* \return New GEOM_Object, containing the created sphere.
*/
GEOM_Object MakeSphereR (in double theR);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a sphere with given center and radius.
2004-12-01 15:39:14 +05:00
* \param thePnt Sphere center.
* \param theR Sphere radius.
* \return New GEOM_Object, containing the created .
*/
GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the base shape along the vector
*
* All the space, transfixed by the base shape during its translation
2004-12-01 15:39:14 +05:00
* along the vector on the given distance.
* \param theBase Base shape to be extruded.
* \param theVec Direction of extrusion.
* \param theH Prism dimension along theVec.
* \return New GEOM_Object, containing the created prism.
*/
GEOM_Object MakePrismVecH (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theH);
/* \brief The Same Prism but in 2 directions (forward&backward) */
GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theH);
/* \brief The Same as MakePrismVecH but with scaling */
GEOM_Object MakePrismVecHWithScaling (in GEOM_Object theBase,
in GEOM_Object theVec,
in double theH,
in double theScaleFactor);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the base shape along a vector, defined by two points.
2004-12-01 15:39:14 +05:00
* \param theBase Base shape to be extruded.
* \param thePoint1 First end of extrusion vector.
* \param thePoint2 Second end of extrusion vector.
* \return New GEOM_Object, containing the created prism.
*/
GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
/* \brief The same prism but in two directions forward&backward */
GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
/* \brief The Same as MakePrismTwoPnt but with scaling */
GEOM_Object MakePrismTwoPntWithScaling (in GEOM_Object theBase,
in GEOM_Object thePoint1,
in GEOM_Object thePoint2,
in double theScaleFactor);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
2009-02-13 17:16:39 +05:00
* \param theBase Base shape to be extruded.
2012-08-09 13:58:02 +06:00
* \param theDX, theDY, theDZ end of extrusion vector.
2009-02-13 17:16:39 +05:00
* \return New GEOM_Object, containing the created prism.
*/
GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in double theDX, in double theDY, in double theDZ);
/* \brief The same prism but in two directions forward&backward */
2009-02-13 17:16:39 +05:00
GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
in double theDX, in double theDY, in double theDZ);
2012-08-09 13:58:02 +06:00
/* \brief The Same as MakePrismDXDYDZ but with scaling */
GEOM_Object MakePrismDXDYDZWithScaling (in GEOM_Object theBase,
in double theDX, in double theDY, in double theDZ,
in double theScaleFactor);
/*!
* \brief Add / Remove material to / from a solid by extrusion of the base shape on the given distance.
* \param theInitShape Initial shape on which to perform the feature.It has to be a solid or
* a compound made of a single solid
* \param theBase Edge or wire defining the base shape to be extruded.
* \param theHeight Prism dimension along the normal of the face.
* \param theAngle Draft angel in degrees
* \param theFuse If true material is added else material is removed
* \return New GEOM_Object, containing the modified shape
*/
GEOM_Object MakeDraftPrism (in GEOM_Object theInitShape,
in GEOM_Object theBase,
in double theHeight,
in double theAngle,
in boolean theFuse);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the base shape along
2004-12-01 15:39:14 +05:00
* the path shape. The path shape can be a wire or an edge.
* \param theBase Base shape to be extruded.
* \param thePath Path shape to extrude the base shape along it.
* \return New GEOM_Object, containing the created pipe.
*/
GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by revolution of the base shape around the axis
* on the given angle.
*
* All the space, transfixed by the base
2004-12-01 15:39:14 +05:00
* shape during its rotation around the axis on the given angle.
* \param theBase Base shape to be rotated.
* \param theAxis Rotation axis.
* \param theAngle Rotation angle in radians.
* \return New GEOM_Object, containing the created revolution.
*/
GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theAngle);
/* The Same Revolution but in both ways forward&backward */
GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
2012-08-09 13:58:02 +06:00
in GEOM_Object theAxis,
in double theAngle);
2004-12-01 15:39:14 +05:00
/*!
* \brief Create a face from a given set of contours.
* \param theContours either a list or a compound of edges/wires.
* \param theMinDeg a minimal degree of BSpline surface to create.
* \param theMaxDeg a maximal degree of BSpline surface to create.
* \param theTol2D a 2d tolerance to be reached.
* \param theTol3D a 3d tolerance to be reached.
* \param theNbIter a number of iteration of approximation algorithm.
2012-08-09 13:58:02 +06:00
* \param theMethod Kind of method to perform filling operation.
* \param theApprox Boolean indicating if result should be approximated.
* \return New GEOM_Object (face), containing the created filling surface.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object MakeFilling (in ListOfGO theContours,
2012-08-09 13:58:02 +06:00
in long theMinDeg, in long theMaxDeg,
in double theTol2D, in double theTol3D,
in long theNbIter,
in filling_oper_method theMethod,
in boolean theApprox);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
* \param theSeqSections - set of specified sections.
* \param theModeSolid - mode defining building solid or shell
* \param thePreci - precision 3D used for smoothing by default 1.e-6
* \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
* \return New GEOM_Object, containing the created shell or solid.
*/
GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
2012-08-09 13:58:02 +06:00
in boolean theModeSolid,
in double thePreci,
in boolean theRuled);
2012-08-09 13:58:02 +06:00
/*!
* \brief Create a shape by extrusion of the profile shape along
* the path shape.
*
* The path shape can be a wire or an edge.
* the several profiles can be specified in the several locations of path.
* \param theSeqBases - list of Bases shape to be extruded.
* \param theLocations - list of locations on the path corresponding
* specified list of the Bases shapes. Number of locations
* should be equal to number of bases or list of locations can be empty.
* \param thePath - Path shape to extrude the base shape along it.
* \param theWithContact - the mode defining that the section is translated to be in
* contact with the spine.
2012-08-09 13:58:02 +06:00
* \param theWithCorrection - defining that the section is rotated to be
* orthogonal to the spine tangent in the correspondent point
* \return New GEOM_Object, containing the created pipe.
*/
GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
2012-08-09 13:58:02 +06:00
in ListOfGO theLocations,
in GEOM_Object thePath,
in boolean theWithContact ,
in boolean theWithCorrection );
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the profile shape along
* the path shape.
*
* The path shape can be a shell or a face.
* the several profiles can be specified in the several locations of path.
* \param theSeqBases - list of Bases shape to be extruded.
2012-08-09 13:58:02 +06:00
* \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
* \param theLocations - list of locations on the path corresponding
* specified list of the Bases shapes. Number of locations
* should be equal to number of bases.
* \param thePath - Path shape to extrude the base shape along it.
* \param theWithContact - the mode defining that the section is translated to be in
* contact with the spine.
2012-08-09 13:58:02 +06:00
* \param theWithCorrection - defining that the section is rotated to be
* orthogonal to the spine tangent in the correspondent point
* \return New GEOM_Object, containing the created pipe.
*/
GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
2012-08-09 13:58:02 +06:00
in ListOfGO theSeqSubBases,
in ListOfGO theLocations,
in GEOM_Object thePath,
in boolean theWithContact ,
in boolean theWithCorrection );
/*!
2012-08-09 13:58:02 +06:00
* \brief Create solids between given sections
* \param theSeqBases - list of sections (shell or face).
* \param theLocations - list of corresponding vertexes
* \return New GEOM_Object, containing the created solids.
*/
GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
2012-08-09 13:58:02 +06:00
in ListOfGO theLocations);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shape by extrusion of the base shape along
* the path shape with constant bi-normal direction along the given vector.
*
2009-02-13 17:16:39 +05:00
* The path shape can be a wire or an edge.
* \param theBase Base shape to be extruded.
* \param thePath Path shape to extrude the base shape along it.
* \param theVec Vector defines a constant binormal direction to keep the
* same angle beetween the Direction and the sections
* along the sweep surface.
* \return New GEOM_Object, containing the created pipe.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
in GEOM_Object thePath,
in GEOM_Object theVec);
2009-02-13 17:16:39 +05:00
2013-02-28 20:00:05 +06:00
/*!
* \brief Make a thick solid from a surface shape (face or shell)
* \param theObject Surface from which the thick solid is made
* \param theThickness Value of the thickness
* \param isCopy To make a copy of \a theObject ot to modify \a theObject.
2013-02-28 20:00:05 +06:00
* \return New GEOM_Object, containing the created pipe if isCopy = true
* or the modified object if isCopy = false
*/
GEOM_Object MakeThickening (in GEOM_Object theObject,
in double theThickness,
in boolean isCopy);
2012-12-13 14:40:36 +06:00
/*!
* \brief Build a middle path of a pipe-like shape.
*
* The path shape can be a wire or an edge.
* \param theShape It can be closed or unclosed pipe-like shell
* or a pipe-like solid.
* \param theBase1, theBase2 Two bases of the supposed pipe. This
* should be wires or faces of \a theShape.
* \note It is not assumed that exact or approximate copy of \a theShape
* can be obtained by applying existing Pipe operation on the
* resulting "Path" wire taking \a theBase1 as the base - it is not
* always possible; though in some particular cases it might work
* it is not guaranteed. Thus, RestorePath function should not be
* considered as an exact reverse operation of the Pipe.
* \return New GEOM_Object, containing an edge or wire that represent
* source pipe's "path".
*/
GEOM_Object RestorePath (in GEOM_Object theShape,
in GEOM_Object theBase1,
in GEOM_Object theBase2);
/*!
* \brief Build a middle path of a pipe-like shape.
*
* The path shape can be a wire or an edge.
* \param theShape It can be closed or unclosed pipe-like shell
* or a pipe-like solid.
* \param theBase1, theBase2 Two bases of the supposed pipe. This
* should be lists of edges of \a theShape.
* \note It is not assumed that exact or approximate copy of \a theShape
* can be obtained by applying existing Pipe operation on the
* resulting "Path" wire taking \a theBase1 as the base - it is not
* always possible; though in some particular cases it might work
* it is not guaranteed. Thus, RestorePath function should not be
* considered as an exact reverse operation of the Pipe.
* \return New GEOM_Object, containing an edge or wire that represent
* source pipe's "path".
*/
GEOM_Object RestorePathEdges (in GEOM_Object theShape,
in ListOfGO theBase1,
in ListOfGO theBase2);
2004-12-01 15:39:14 +05:00
};
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for Shapes creation:
*
2004-12-01 15:39:14 +05:00
* Edge from two points, Wire from edges, Face from wire,
* Shell from faces, Solid from shells, Compound from shapes
*/
interface GEOM_IShapesOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a linear edge with specified ends.
2004-12-01 15:39:14 +05:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an edge on another edge, corresponding to the given length on the given edge.
* \param theRefCurve The referenced edge.
* \param theLength Length on the referenced edge. It can be
* negative for extrapolation on base curve.
* \param theStartPoint Any vertex close to one of edge's
* ends to select start point among them.
* If NULL, fist vertex is used.
* \return New GEOM_Object, containing the created edge.
*/
GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
in double theLength,
in GEOM_Object theStartPoint);
/*!
* \brief Create an edge from specified wire.
* \param theWire source Wire.
* \param theLinearTolerance linear tolerance value
* \param theAngularTolerance angular tolerance value
* \return New GEOM_Object, containing the created edge.
*/
GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
in double theLinearTolerance,
in double theAngularTolerance);
/*!
* \brief Create a wire from the set of edges and wires.
2004-12-01 15:39:14 +05:00
* \param theEdgesAndWires List of edge and/or wires.
2012-08-09 13:58:02 +06:00
* \param theTolerance Maximum distance between vertices, that will be merged.
* Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created wire.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
in double theTolerance);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a face on the given wire.
* \param theWire closed Wire or Edge to build the face on.
2004-12-01 15:39:14 +05:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a face on the given wires set.
* \param theWires List of closed wires or edges to build the face on.
2004-12-01 15:39:14 +05:00
* \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);
/**
* \brief Create a face based on surface of theFace limited by theWire.
* \param theFace the face whose surface is used to create a new face.
* \param theWire closed Wire build the face.
* \return New GEOM_Object, containing the created face.
*/
GEOM_Object MakeFaceFromSurface(in GEOM_Object theFace,
in GEOM_Object theWire);
/*!
* \brief Create a face from a set of edges with the given constraints.
* \param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
* - edges should form a closed wire;
* - for each edge, constraint face is optional: if a constraint face is missing
* for some edge, this means that there no constraint associated with this edge.
* \return New GEOM_Object, containing the created face.
*/
GEOM_Object MakeFaceWithConstraints(in ListOfGO theConstraints);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a shell from the set of faces and shells.
2004-12-01 15:39:14 +05:00
* \param theFacesAndShells List of faces and/or shells.
* \return New GEOM_Object, containing the created shell.
*/
GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a solid, bounded by the given shell.
2004-12-01 15:39:14 +05:00
* \param theShell Bounding shell.
* \return New GEOM_Object, containing the created solid.
*/
GEOM_Object MakeSolidShell (in GEOM_Object theShell);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a solid, bounded by the given shells.
2004-12-01 15:39:14 +05:00
* \param theShells Bounding shells.
* \return New GEOM_Object, containing the created solid.
*/
GEOM_Object MakeSolidShells (in ListOfGO theShells);
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a compound of the given shapes.
2004-12-01 15:39:14 +05:00
* \param theShapes List of shapes to put in compound.
* \return New GEOM_Object, containing the created compound.
*/
GEOM_Object MakeCompound (in ListOfGO theShapes);
/*!
* \brief Make a solid (or solids) from connected set of faces and/or shells.
* \param theFacesOrShells List of faces and/or shells.
* \param isIntersect If TRUE, forces performing intersections between arguments.
*
* \return New GEOM_Object, containing the created solid (or compound of solids).
*/
GEOM_Object MakeSolidFromConnectedFaces (in ListOfGO theFacesOrShells, in boolean isIntersect);
2004-12-01 15:39:14 +05:00
/*!
* \brief Replace coincident faces in \a theShapes by one face.
* \param theShapes Initial shapes.
2004-12-01 15:39:14 +05:00
* \param theTolerance Maximum distance between faces, which can be considered as coincident.
* \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
* \return New GEOM_Object containing copies of theShapes without coincident faces.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object MakeGlueFaces (in ListOfGO theShapes, in double theTolerance, in boolean doKeepNonSolids);
/*!
* Find coincident faces in theShapes for possible gluing.
* \param theShapes Initial shapes.
* \param theTolerance Maximum distance between faces, which can be considered as coincident.
* \return ListOfGO
*/
ListOfGO GetGlueFaces (in ListOfGO theShapes, in double theTolerance);
/*!
* \brief Replace coincident faces in \a theShapes by one face
* in compliance with given list of faces
* \param theShapes Initial shapes.
* \param theTolerance Maximum distance between faces, which can be considered as coincident.
* \param theFaces List of faces for gluing.
* \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
2012-08-09 13:58:02 +06:00
* \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
* will be glued, otherwise only the edges,
* belonging to <VAR>theFaces</VAR>.
* \return New GEOM_Object containing copies of theShapes without coincident faces.
*/
GEOM_Object MakeGlueFacesByList (in ListOfGO theShapes, in double theTolerance,
in ListOfGO theFaces, in boolean doKeepNonSolids,
2012-08-09 13:58:02 +06:00
in boolean doGlueAllEdges);
/*!
* \brief Replace coincident edges in \a theShapes by one edge.
* \param theShapes Initial shapes.
2012-08-09 13:58:02 +06:00
* \param theTolerance Maximum distance between edges, which can be considered as coincident.
* \return New GEOM_Object containing copies of theShapes without coincident edges.
2012-08-09 13:58:02 +06:00
*/
GEOM_Object MakeGlueEdges (in ListOfGO theShapes, in double theTolerance);
2012-08-09 13:58:02 +06:00
/*!
* Find coincident edges in \a theShapes for possible gluing.
* \param theShapes Initial shapes.
2012-08-09 13:58:02 +06:00
* \param theTolerance Maximum distance between edges, which can be considered as coincident.
* \return ListOfGO
*/
ListOfGO GetGlueEdges (in ListOfGO theShapes, in double theTolerance);
2012-08-09 13:58:02 +06:00
/*!
* \brief Replace coincident edges in \a theShapes by one edge
* in compliance with given list of edges
* \param theShapes Initial shapes.
2012-08-09 13:58:02 +06:00
* \param theTolerance Maximum distance between edges, which can be considered as coincident.
* \param theEdges List of edges for gluing.
* \return New GEOM_Object containing copies of theShapes without some edges.
2012-08-09 13:58:02 +06:00
*/
GEOM_Object MakeGlueEdgesByList (in ListOfGO theShapes,
in double theTolerance,
2012-08-09 13:58:02 +06:00
in ListOfGO theEdges);
/*!
* \brief Get all sub-shapes and groups of \a theShape,
* that were created already by any other methods.
* \param theShape Any shape.
* \param theGroupsOnly If this parameter is TRUE, only groups will be
* returned, else all found sub-shapes and groups.
* \return List of existing sub-objects of \a theShape.
*/
ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
in boolean theGroupsOnly);
/*!
* \brief Deprecated method.
*
* Use MakeAllSubShapes() instead.
*/
ListOfGO MakeExplode (in GEOM_Object theShape,
in long theShapeType,
in boolean isSorted);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Explode a shape on sub-shapes of a given type.
*
* If the shape itself has the given type, it is also returned.
2004-12-01 15:39:14 +05:00
* \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.
*/
2012-08-09 13:58:02 +06:00
ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
in long theShapeType,
in boolean isSorted);
2004-12-01 15:39:14 +05:00
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Extract all sub-shapes of the given type from
* the given shape, excluding the shape itself.
2005-01-20 11:24:17 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \return List of sub-shapes of type theShapeType, contained in theShape.
*/
ListOfGO ExtractSubShapes (in GEOM_Object theShape,
in long theShapeType,
in boolean isSorted);
/*!
* \brief Deprecated method. Use GetAllSubShapesIDs() instead.
2005-01-20 11:24:17 +05:00
*/
ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in boolean isSorted);
2005-01-20 11:24:17 +05:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Explode a shape on sub-shapes of a given type.
*
* Does the same, as MakeAllSubShapes, but returns IDs of
* sub-shapes, not GEOM_Object. 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 GetAllSubShapesIDs (in GEOM_Object theShape,
in long theShapeType,
in boolean isSorted);
/*!
* \brief Get a sub-shape defined by its unique ID inside \a theMainShape
* \param theMainShape Main shape.
* \param theID Unique ID of sub-shape inside \a theMainShape.
* \return GEOM_Object, corresponding to found sub-shape.
* \note The sub-shape GEOM_Object can has ONLY ONE function.
* Don't try to apply modification operations (without copy) on them.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object GetSubShape (in GEOM_Object theMainShape,
2012-08-09 13:58:02 +06:00
in long theID);
/*!
* \brief Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
* \param theMainShape Main shape.
* \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
* \return List of GEOM_Object, corresponding to found sub-shapes.
* \note The sub-shape GEOM_Object can has ONLY ONE function.
* Don't try to apply modification operations (without copy) on them.
*/
ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
in ListOfLong theIndices);
2004-12-01 15:39:14 +05:00
/*!
* 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);
2013-02-12 17:35:16 +06:00
/*!
* Get global indices of \a theSubShapes in \a theMainShape.
* \param theMainShape Main shape.
* \param theSubShapes List of sub-shapes of the main shape.
* \return list of global indices of \a theSubShapes in \a theMainShape.
*/
ListOfLong GetSubShapesIndices (in GEOM_Object theMainShape, in ListOfGO theSubShapes);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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);
/*!
* \brief Check if the object is a sub-object of another GEOM object.
*
* \param theSubObject Checked sub-object (or its parent object, in case if
* \a theSubObjectIndex is non-zero).
* \param theSubObjectIndex When non-zero, specifies a sub-shape index that
* identifies a sub-object within its parent specified via \a theSubObject.
* \param theObject An object that is checked for ownership (or its parent object,
* in case if \a theObjectIndex is non-zero).
* \param theObjectIndex When non-zero, specifies a sub-shape index that
* identifies an object within its parent specified via \a theObject.
* \return TRUE, if the given object contains sub-object.
*/
boolean IsSubShapeBelongsTo( in GEOM_Object theSubObject,
in long theSubObjectIndex,
in GEOM_Object theObject,
in long theObjectIndex);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Count number of faces in the given shape.
2004-12-01 15:39:14 +05:00
* \param theShape Shape to count faces in.
* \return Number of faces in the given shape.
*/
long NumberOfFaces (in GEOM_Object theShape);
/*!
2012-08-09 13:58:02 +06:00
* \brief Count number of edges in the given shape.
2004-12-01 15:39:14 +05:00
* \param theShape Shape to count edges in.
* \return Number of edges in theShape.
*/
long NumberOfEdges (in GEOM_Object theShape);
2012-08-09 13:58:02 +06:00
/*!
* \brief Count number of sub-shapes of type \a theShapeType in the given shape.
* \param theShape Shape to count sub-shapes in.
* \param theShapeType The type of sub-shapes to count.
* \return Number of sub-shapes of type \a theShapeType in \a theShape.
*/
long NumberOfSubShapes (in GEOM_Object theShape,
in long theShapeType);
2004-12-01 15:39:14 +05:00
/*!
* 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);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Retrieve all free faces from the given shape.
*
2005-01-20 11:24:17 +05:00
* 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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2.
2005-01-20 11:24:17 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape2,
in long theShapeType);
/*!
* \brief Get sub-shapes, shared by input shapes.
2012-08-09 13:58:02 +06:00
* \param theShapes Shapes to find common sub-shapes of.
* \param theShapeType Type of sub-shapes to be retrieved.
* \param theMultiShare Specifies what type of shares should be checked:
* - \c TRUE: search sub-shapes from 1st input shape shared with all other input shapes;
* - \c FALSE: causes to search sub-shapes shared between couples of input shapes.
* \note If \a theShapes contains single compound, the shares between all possible couples of
* its top-level shapes are returned; otherwise, only shares between 1st input shape
* and all rest input shapes are returned.
*
* \return List of all found sub-shapes.
2012-08-09 13:58:02 +06:00
*/
ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
in long theShapeType,
in boolean theMultiShare);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2005-01-20 11:24:17 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
2005-01-20 11:24:17 +05:00
*/
ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAx1,
in shape_state theState);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAx1,
in GEOM_Object thePnt,
in shape_state theState);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2005-01-20 11:24:17 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
2005-01-20 11:24:17 +05:00
*/
ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAxis,
in double theRadius,
in shape_state theState);
/*!
* \brief 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 thePnt Point specifying location of the bottom of the cylinder.
* \param theRadius Radius of the cylinder to find shapes on.
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theAxis,
in GEOM_Object thePnt,
in double theRadius,
in shape_state theState);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2005-01-20 11:24:17 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theCenter,
in double theRadius,
in shape_state theState);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes 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);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAx1,
in shape_state theState);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2009-02-13 17:16:39 +05:00
* \param thePnt Point specifying location of the plane to find shapes on.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAx1,
in GEOM_Object thePnt,
in shape_state theState);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theAxis,
in double theRadius,
in shape_state theState);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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 thePnt Point specifying location of the bottom of the cylinder.
* \param theRadius Radius of the cylinder to find shapes on.
* \param theState The state of the sub-shapes to find.
* \return List of IDs all found sub-shapes.
*/
ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
in long theShapeType,
in GEOM_Object theAxis,
in GEOM_Object thePnt,
in double theRadius,
in shape_state theState);
/*!
* \brief 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.
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes to find.
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in long theShapeType,
in GEOM_Object theCenter,
in double theRadius,
in shape_state theState);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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
2012-08-09 13:58:02 +06:00
* \param theState The state of the sub-shapes 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);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find sub-shapes complying with given status
* \param theBox - the box to check state of sub-shapes against
* \param theShape - the shape to explore
2012-08-09 13:58:02 +06:00
* \param theShapeType - type of sub-shape of theShape
* \param theState - required state
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape,
in long theShapeType,
in shape_state theState);
/*!
2012-08-09 13:58:02 +06:00
* \brief Find sub-shapes complying with given status
* \param theBox - the box to check state of sub-shapes against
* \param theShape - the shape to explore
2012-08-09 13:58:02 +06:00
* \param theShapeType - type of sub-shape of theShape
* \param theState - required state
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnBox (in GEOM_Object theBox,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape,
in long theShapeType,
in shape_state theState);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find sub-shapes complying with given status
* \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2009-02-13 17:16:39 +05:00
* \param theShape - the shape to explore
2012-08-09 13:58:02 +06:00
* \param theShapeType - type of sub-shape of theShape
2009-02-13 17:16:39 +05:00
* \param theState - required state
* \return List of IDs of all found sub-shapes.
*/
ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape,
in short theShapeType,
in shape_state theState);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find sub-shapes complying with given status
* \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2009-02-13 17:16:39 +05:00
* \param theShape - the shape to explore
2012-08-09 13:58:02 +06:00
* \param theShapeType - type of sub-shape of theShape
2009-02-13 17:16:39 +05:00
* \param theState - required state
* \return List of all found sub-shapes.
*/
ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape,
in short theShapeType,
in shape_state theState);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find sub-shapes complying with given status
* \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2009-02-13 17:16:39 +05:00
* \param theShape - the shape to explore
2012-08-09 13:58:02 +06:00
* \param theShapeType - type of sub-shape of theShape
2009-02-13 17:16:39 +05:00
* \param theState - required state
* \return compound includes all found sub-shapes.
*/
GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape,
in short theShapeType,
in shape_state theState);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get sub-shape(s) of \a theShapeWhere, which are
2005-01-20 11:24:17 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShapeWhat);
/*!
2012-08-09 13:58:02 +06:00
* Old implementation of GetInPlace functionality, based on shape properties.
*/
GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
in GEOM_Object theShapeWhat);
/*!
* \brief Get sub-shape(s) of \a theShapeWhere, which are
* coincident with \a theShapeWhat or could be a part of it.
*
* Implementation of this method is based on a saved history of an operation,
* produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
* arguments (an argument shape or a sub-shape of an argument shape).
* The operation could be the Partition or one of boolean operations,
* performed on simple shapes (not on compounds).
*
* \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 GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShapeWhat);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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);
2012-08-09 13:58:02 +06:00
/*!
* \brief Get sub-shape Ids 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 Ids.
*/
ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
in GEOM_Object theShapeWhat);
/*!
* \brief Resize the input edge with the new Min and Max parameters.
* The input edge parameters range is [0, 1]. If theMin parameter is
* negative, the input edge is extended, otherwise it is shrinked by
* theMin parameter. If theMax is greater than 1, the edge is extended,
* otherwise it is shrinked by theMax parameter.
* \param theEdge the input edge to be resized.
* \param theMin the minimal parameter value.
* \param theMax the maximal parameter value.
* \return a newly created edge.
*/
GEOM_Object ExtendEdge(in GEOM_Object theEdge,
in double theMin,
in double theMax);
/*!
* \brief Resize the input face with the new UMin, UMax, VMin and VMax
* parameters. The input face U and V parameters range is [0, 1]. If
* theUMin parameter is negative, the input face is extended, otherwise
* it is shrinked along U direction by theUMin parameter. If theUMax is
* greater than 1, the face is extended, otherwise it is shrinked along
* U direction by theUMax parameter. So as for theVMin, theVMax and
* V direction of the input face.
* \param theFace the input face to be resized.
* \param theUMin the minimal U parameter value.
* \param theUMax the maximal U parameter value.
* \param theVMin the minimal V parameter value.
* \param theVMax the maximal V parameter value.
* \return a newly created face.
*/
GEOM_Object ExtendFace(in GEOM_Object theFace,
in double theUMin,
in double theUMax,
in double theVMin,
in double theVMax);
2014-10-28 15:19:15 +05:00
/*!
* \brief Make a surface from a face. This function takes some face as
* input parameter and creates new GEOM_Object, i.e. topological shape
* by extracting underlying surface of the source face and limiting it
* by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
* parametrical space).
* \param theFace the input face.
* \return a newly created face.
*/
GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace);
/*!
* \brief Explode a shape into edges sorted in a row from a starting point.
* \param theShape - the shape to be exploded on edges.
* \param theStartPoint - the starting point.
* \return Ordered list of edges sorted in a row from a starting point.
*/
ListOfGO GetSubShapeEdgeSorted (in GEOM_Object theShape,
in GEOM_Object theStartPoint);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_IBlocksOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for Blocks construction
2004-12-01 15:39:14 +05:00
* Face from points or edges, Block from faces,
* Blocks multi-translation and multi-rotation
*/
interface GEOM_IBlocksOperations : GEOM_IOperations
{
2012-08-09 13:58:02 +06:00
// # Creation of blocks
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a quadrangle face from four edges. Order of Edges is not
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theEdge2,
in GEOM_Object theEdge3,
in GEOM_Object theEdge4);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a quadrangle face on two edges.
*
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theEdge2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a quadrangle face with specified corners.
*
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3,
in GEOM_Object thePnt4);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief 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,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created solid.
*/
GEOM_Object MakeHexa (in GEOM_Object theFace1,
2012-08-09 13:58:02 +06:00
in GEOM_Object theFace2,
in GEOM_Object theFace3,
in GEOM_Object theFace4,
in GEOM_Object theFace5,
in GEOM_Object theFace6);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a hexahedral solid between two given faces.
*
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theFace2);
2004-12-01 15:39:14 +05:00
2012-08-09 13:58:02 +06:00
// # Extract elements of blocks and blocks compounds
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get a vertex, found in the given shape by its coordinates.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get an edge, found in the given shape by two given vertices.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
in GEOM_Object thePoint2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find an edge of the given shape, which has minimal distance to the given point.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a face, found in the given shape by four given corner vertices.
2004-12-01 15:39:14 +05:00
* \param theShape Block or a compound of blocks.
2012-08-09 13:58:02 +06:00
* \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the found face.
*/
GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint1,
in GEOM_Object thePoint2,
in GEOM_Object thePoint3,
in GEOM_Object thePoint4);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get a face of block, found in the given shape by two given edges.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theEdge1,
in GEOM_Object theEdge2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find a face, opposite to the given one in the given block.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theFace);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find a face of the given shape, which has minimal distance to the given point.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find a face of block, whose outside normale has minimal angle with the given vector.
* \param theBlock Block or a compound of blocks.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVector);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
*/
2012-08-09 13:58:02 +06:00
GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
in GEOM_Object thePoint,
in long theShapeType,
in double theTolerance);
// # Extract blocks from blocks compounds
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Check, if the compound contains only specified blocks.
2004-12-01 15:39:14 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \param theNbBlocks Number of specified blocks in theCompound.
2004-12-01 15:39:14 +05:00
* \return TRUE, if the given compound contains only blocks.
*/
boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2012-08-09 13:58:02 +06:00
in long theMinNbFaces,
in long theMaxNbFaces,
out long theNbBlocks);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Enumeration of Blocks Compound defects.
2004-12-01 15:39:14 +05:00
*/
enum BCErrorType
{
2005-01-20 11:24:17 +05:00
/* 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
2004-12-01 15:39:14 +05:00
};
/*!
2012-08-09 13:58:02 +06:00
* \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
2004-12-01 15:39:14 +05:00
*/
struct BCError
{
BCErrorType error;
ListOfLong incriminated;
};
/*!
2012-08-09 13:58:02 +06:00
* \brief Sequence of all Blocks Compound defects.
2004-12-01 15:39:14 +05:00
*/
typedef sequence<BCError> BCErrors;
/*!
2012-08-09 13:58:02 +06:00
* \brief Check, if the compound of blocks is given.
*
2004-12-01 15:39:14 +05:00
* 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.
2005-01-20 11:24:17 +05:00
* \note Single block is also accepted as a valid compound of blocks.
2004-12-01 15:39:14 +05:00
* \param theCompound The compound to check.
* \param theToleranceC1 the tolerance to check if two neighbor edges are
* collinear in the common vertex with this tolerance. Negative
* value means that C1 criterion is not used (old implementation).
2012-08-09 13:58:02 +06:00
* \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2004-12-01 15:39:14 +05:00
* \return TRUE, if the given shape is a compound of blocks.
*/
boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
in double theToleranceC1,
2012-08-09 13:58:02 +06:00
out BCErrors theErrors);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Convert sequence of Blocks Compound errors, returned by
2004-12-01 15:39:14 +05:00
* <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,
2012-08-09 13:58:02 +06:00
in BCErrors theErrors);
2004-12-01 15:39:14 +05:00
2012-10-08 17:16:36 +06:00
/*!
* \brief Retrieve all non blocks solids and faces from a shape.
*
* \param theShape The shape to explore.
* \param theToleranceC1 the tolerance to check if two neighbor edges are
* collinear in the common vertex with this tolerance. Negative
* value means that C1 criterion is not used (old implementation).
2012-10-08 17:16:36 +06:00
* \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,
in double theToleranceC1,
out GEOM_Object theNonQuads);
2012-10-08 17:16:36 +06:00
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Remove all seam and degenerated edges from \a theShape.
*
2005-01-20 11:24:17 +05:00
* Unite faces and edges, sharing one surface.
* \param theShape The compound or single solid to remove irregular edges from.
2012-08-09 13:58:02 +06:00
* \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.
2005-01-20 11:24:17 +05:00
* \return Improved shape.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
in long theOptimumNbFaces);
2005-01-20 11:24:17 +05:00
/*!
* \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);
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Check, if the given shape is a blocks compound.
*
2005-01-20 11:24:17 +05:00
* 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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get all the blocks, contained in the given compound.
*
2004-12-01 15:39:14 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \return List of GEOM_Object, containing the retrieved blocks.
2004-12-01 15:39:14 +05:00
*/
ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2012-08-09 13:58:02 +06:00
in long theMinNbFaces,
in long theMaxNbFaces);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find block, containing the given point inside its volume or on boundary.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePoint);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in ListOfGO theParts);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Return all blocks, containing all the elements, passed as the parts.
2004-12-01 15:39:14 +05:00
* \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.
2012-08-09 13:58:02 +06:00
* \return List of GEOM_Object, containing the found blocks.
2004-12-01 15:39:14 +05:00
*/
ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2012-08-09 13:58:02 +06:00
in ListOfGO theParts);
2004-12-01 15:39:14 +05:00
2012-08-09 13:58:02 +06:00
// # Operations on blocks with gluing of result
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Multi-transformate block and glue the result.
*
2004-12-01 15:39:14 +05:00
* 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>.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2012-08-09 13:58:02 +06:00
in long theDirFace1,
in long theDirFace2,
in long theNbTimes);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Multi-transformate block and glue the result.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in long theDirFace1U,
in long theDirFace2U,
in long theNbTimesU,
in long theDirFace1V,
in long theDirFace2V,
in long theNbTimesV);
2005-01-20 11:24:17 +05:00
2012-08-09 13:58:02 +06:00
// # Special operation - propagation
2005-01-20 11:24:17 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Build all possible propagation groups.
*
2005-01-20 11:24:17 +05:00
* 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.
2012-08-09 13:58:02 +06:00
* \return List of GEOM_Object, each of them is a propagation group.
2005-01-20 11:24:17 +05:00
*/
ListOfGO Propagate (in GEOM_Object theShape);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_IBooleanOperations
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for boolean operations (Cut, Fuse, Common)
2004-12-01 15:39:14 +05:00
*/
interface GEOM_IBooleanOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform one of boolean operations on two given shapes.
2004-12-01 15:39:14 +05:00
* \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.
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2012-08-09 13:58:02 +06:00
in GEOM_Object theShape2,
in long theOperation,
in boolean IsCheckSelfInte);
/*!
* \brief Perform fusion boolean operation on two given shapes.
* \param theShape1 First argument for fuse operation.
* \param theShape2 Second argument for fuse operation.
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
* \param IsRmExtraEdges If TRUE, perform removal of extra edges
* during an operation.
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeFuse (in GEOM_Object theShape1,
in GEOM_Object theShape2,
in boolean IsCheckSelfInte,
in boolean IsRmExtraEdges);
2004-12-01 15:39:14 +05:00
/*!
* \brief Perform fusion boolean operation on list of objects.
* \param theShapes Shapes to be fused.
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
* \param IsRmExtraEdges If TRUE, perform removal of extra edges
* during an operation.
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeFuseList (in ListOfGO theShapes,
in boolean IsCheckSelfInte,
in boolean IsRmExtraEdges);
/*!
* \brief Perform common boolean operation on list of objects.
* \param theShapes Shapes for common operation.
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeCommonList (in ListOfGO theShapes,
in boolean IsCheckSelfInte);
/*!
* \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).
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeCutList (in GEOM_Object theMainShape,
in ListOfGO theShapes,
in boolean IsCheckSelfInte);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform partition operation.
*
2004-12-01 15:39:14 +05:00
* \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).
2012-08-09 13:58:02 +06:00
* \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:
2004-12-01 15:39:14 +05:00
* \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.
*
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shapes.
*/
GEOM_Object MakePartition (in ListOfGO theShapes,
2012-08-09 13:58:02 +06:00
in ListOfGO theTools,
in ListOfGO theKeepInside,
in ListOfGO theRemoveInside,
in short theLimit,
in boolean theRemoveWebs,
in ListOfLong theMaterials,
in short theKeepNonlimitShapes);
/*!
2012-08-09 13:58:02 +06:00
* \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().
* One additional parameter is provided:
* \param IsCheckSelfInte If TRUE, perform check self intersection
* of arguments before an operation.
*
* \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,
2012-08-09 13:58:02 +06:00
in ListOfGO theTools,
in ListOfGO theKeepInside,
in ListOfGO theRemoveInside,
in short theLimit,
in boolean theRemoveWebs,
in ListOfLong theMaterials,
in short theKeepNonlimitShapes,
in boolean IsCheckSelfInte);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform partition of the Shape with the Plane
2004-12-01 15:39:14 +05:00
* \param theShape Shape to be intersected.
* \param thePlane Tool shape, to intersect theShape.
* \return New GEOM_Object, containing the result shape.
*
* \note This operation is a shortcut to the more general \ref MakePartition
* operation, where \a theShape specifies single "object" (shape being partitioned)
* and \a thePlane specifies single "tool" (intersector shape). Other parameters of
* \ref MakePartition operation have default values:
* - \a theLimit: GEOM::SHAPE (shape limit corresponds to the type of \a theShape)
* - \a theKeepNonlimitShapes: 0
* - \a theKeepInside, \a theRemoveInside, \a theRemoveWebs,
* \a theMaterials (obsolete parameters): empty
*
* \sa MakePartition, MakePartitionNonSelfIntersectedShape
2004-12-01 15:39:14 +05:00
*/
GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
in GEOM_Object thePlane);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_ICurvesOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for curves creation.
*
2004-12-01 15:39:14 +05:00
* Polyline, Circle, Spline (Bezier and Interpolation)
*/
interface GEOM_ICurvesOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a circle with given center, normal vector and radius.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theR);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a circle, passing through three given points
2004-12-01 15:39:14 +05:00
* \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
* \return New GEOM_Object, containing the created circle.
*/
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3);
/*!
2012-08-09 13:58:02 +06:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an ellipse with given center, normal vector and radiuses.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theVec,
in double theRMajor,
in double theRMinor);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt2,
in GEOM_Object thePnt3);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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);
2012-08-09 13:58:02 +06:00
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create an arc of ellipse of center C and two points P1 P2.
2009-02-13 17:16:39 +05:00
* \param theCenter Center point of the arc.
* \param thePnt1 Major radius is distance from center to Pnt1.
2012-08-09 13:58:02 +06:00
* \param thePnt2 define a plane and Minor radius as a shortest
* distance from Pnt2 to vector Center->Pnt1.
2009-02-13 17:16:39 +05:00
* \return New GEOM_Object, containing the created arc.
*/
GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2012-08-09 13:58:02 +06:00
in GEOM_Object thePnt1,
in GEOM_Object thePnt2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a polyline on the set of points.
2004-12-01 15:39:14 +05:00
* \param thePoints Sequence of points for the polyline.
2012-08-09 13:58:02 +06:00
* \param theIsClosed If TRUE, build a closed wire.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created polyline.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object MakePolyline (in ListOfGO thePoints,
in boolean theIsClosed);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create bezier curve on the set of points.
2004-12-01 15:39:14 +05:00
* \param thePoints Sequence of points for the bezier curve.
2012-08-09 13:58:02 +06:00
* \param theIsClosed If TRUE, build a closed curve.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created bezier curve.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
in boolean theIsClosed);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Create B-Spline curve on the set of points.
2004-12-01 15:39:14 +05:00
* \param thePoints Sequence of points for the B-Spline curve.
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the created B-Spline curve.
*/
2012-08-09 13:58:02 +06:00
GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
in boolean theIsClosed,
in boolean theDoReordering);
2013-02-12 17:35:16 +06:00
/*!
* \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);
2012-08-09 13:58:02 +06:00
/*!
* \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);
2004-12-01 15:39:14 +05:00
2012-08-09 13:58:02 +06:00
/*!
* \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 Creates an isoline curve on a face.
* \param theFace the face for which an isoline is created.
* \param IsUIsoline True for U-isoline creation; False for V-isoline
* creation.
* \param theParameter the U parameter for U-isoline or V parameter
* for V-isoline.
* \return New GEOM_Object, containing the created isoline edge or a
* compound of edges.
*/
GEOM_Object MakeIsoline(in GEOM_Object theFace,
in boolean IsUIsoline,
in double theParameter);
2012-08-09 13:58:02 +06:00
/*!
* \brief Create a sketcher (wire or face), following the textual description,
2012-10-08 17:16:36 +06:00
* passed through \a theCommand argument.
2012-08-09 13:58:02 +06:00
*
2004-12-01 15:39:14 +05:00
* Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2012-10-08 17:16:36 +06:00
* Format of the description string has to be the following:
2004-12-01 15:39:14 +05:00
*
* "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.
2012-10-08 17:16:36 +06:00
* \return New GEOM_Object, containing the created wire or face.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2012-08-09 13:58:02 +06:00
2009-02-13 17:16:39 +05:00
/*!
2012-10-08 17:16:36 +06:00
* \brief Create a sketcher (wire or face), following the textual description,
* passed through \a theCommand argument.
2012-08-09 13:58:02 +06:00
*
2012-10-08 17:16:36 +06:00
* For format of the description string see the previous method.\n
2009-02-13 17:16:39 +05:00
*
2012-10-08 17:16:36 +06:00
* \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.
2009-02-13 17:16:39 +05:00
*/
2012-10-08 17:16:36 +06:00
GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2012-08-09 13:58:02 +06:00
2012-10-08 17:16:36 +06:00
/*!
* \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)
2012-08-09 13:58:02 +06:00
*
* \param theCommand String, defining the sketcher in local
* coordinates of the working plane.
* \return New GEOM_Object, containing the created wire.
*/
2012-10-08 17:16:36 +06:00
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);
/*!
* \brief Create a 2D polyline (wire or a compound of wires).
*
* The polyline can have several sections. Each section represents a set
* of points in the form of list of coordinates of the following order:
* x1, y1, x2, y2, ..., xN, yN
* Each section has its own name, type of curve (can be either
* GEOM::Polyline or GEOM::Interpolation) and Closed flag.
* For each section a wire is created. It represents either a polyline or
* interpolation BSpline either closed or not depending on the Closed flag.
* The result represents a wire if there is only one section is defined.
* Otherwise a compound of wires is returned.
*
* \param theCoordsList the list of coordinates list. theCoordsList[0]
* is the coordinates list of the first section. theCoordsList[1]
* is for the second section etc.
* \param theNamesList the list of names. The order corresponds to
* theCoordsList.
* \param theTypesList the list of curve types. The order corresponds to
* theCoordsList.
* \param theClosedList the list of Closed flags. The order corresponds to
* theCoordsList.
* \param theWorkingPlane 9 double values, defining origin,
* OZ and OX directions of the working plane.
* \return New GEOM_Object, containing the created wire or a compound
* of wires.
*/
GEOM_Object MakePolyline2D (in ListOfListOfDouble theCoordsList,
in string_array theNamesList,
in short_array theTypesList,
in ListOfBool theClosedList,
in ListOfDouble theWorkingPlane);
/*!
* \brief Create a 2D polyline (wire or a compound of wires).
*
* The polyline can have several sections. Each section represents a set
* of points in the form of list of coordinates of the following order:
* x1, y1, x2, y2, ..., xN, yN
* Each section has its own name, type of curve (can be either
* GEOM::Polyline or GEOM::Interpolation) and Closed flag.
* For each section a wire is created. It represents either a polyline or
* interpolation BSpline either closed or not depending on the Closed flag.
* The result represents a wire if there is only one section is defined.
* Otherwise a compound of wires is returned.
*
* \param theCoordsList the list of coordinates list. theCoordsList[0]
* is the coordinates list of the first section. theCoordsList[1]
* is for the second section etc.
* \param theNamesList the list of names. The order corresponds to
* theCoordsList.
* \param theTypesList the list of curve types. The order corresponds to
* theCoordsList.
* \param theClosedList the list of Closed flags. The order corresponds to
* theCoordsList.
* \param theWorkingPlane planar Face or LCS(Marker) of the working plane.
* \return New GEOM_Object, containing the created wire or a compound
* of wires.
*/
GEOM_Object MakePolyline2DOnPlane (in ListOfListOfDouble theCoordsList,
in string_array theNamesList,
in short_array theTypesList,
in ListOfBool theClosedList,
in GEOM_Object theWorkingPlane);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_ILocalOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for fillet and chamfer creation.
2004-12-01 15:39:14 +05:00
*/
interface GEOM_ILocalOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a fillet on all edges of the given shape.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in double theR);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a fillet on the specified edges of the given shape
2004-12-01 15:39:14 +05:00
* \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>.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theR,
in ListOfLong theEdges);
GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theR1,
in double theR2,
in ListOfLong theEdges);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a fillet on all edges of the specified faces of the given shape.
2004-12-01 15:39:14 +05:00
* \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>.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theR,
in ListOfLong theFaces);
GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theR1,
in double theR2,
in ListOfLong theFaces);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a fillet on a face or a shell at the specified vertexes.
2009-02-13 17:16:39 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in double theR,
in ListOfLong theVertexes);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in double theD);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a chamfer on edges, common to the specified faces.
2004-12-01 15:39:14 +05:00
* 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>.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theD1, in double theD2,
in long theFace1, in long theFace2);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief The Same but with params theD = Chamfer Lenght
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theD, in double theAngle,
in long theFace1, in long theFace2);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform a chamfer on all edges of the specified faces.
2004-12-01 15:39:14 +05:00
* 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>.
2004-12-01 15:39:14 +05:00
* \return New GEOM_Object, containing the result shape.
*/
GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theD1, in double theD2,
in ListOfLong theFaces);
2009-02-13 17:16:39 +05:00
/*!
* The Same but with params theD = Chamfer Lenght
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theD, in double theAngle,
in ListOfLong theFaces);
/*!
2012-08-09 13:58:02 +06:00
* \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.
2012-08-09 13:58:02 +06:00
* \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,
2012-08-09 13:58:02 +06:00
in double theD1, in double theD2,
in ListOfLong theEdges);
2009-02-13 17:16:39 +05:00
/*!
* The Same but with params theD = Chamfer Lenght
* and theAngle = Chamfer Angle (Angle in radians)
*/
GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2012-08-09 13:58:02 +06:00
in double theD, in double theAngle,
in ListOfLong theEdges);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Perform an Archimde operation on the given shape with given parameters.
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
in double theWeight,
in double theWaterDensity,
in double theMeshDeflection);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
*
* Present here only for compatibility.
2004-12-01 15:39:14 +05:00
*/
long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
};
2012-08-09 13:58:02 +06:00
// # GEOM_IHealingOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for shape healing operations
*
2004-12-01 15:39:14 +05:00
* Shape Processing, SuppressFaces, etc.
*/
interface GEOM_IHealingOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Apply a sequence of Shape Healing operators to the given object.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in string_array theOperators,
in string_array theParameters,
in string_array theValues);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get default sequence of operators, their parameters and parameters' values
* of Shape Process operation.
*
* In the current implementation the defaults are
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
out string_array theParameters,
out string_array theValues);
2005-01-24 21:00:40 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get parameters and parameters' values for the given Shape Process operation.
*
2005-01-24 21:00:40 +05:00
* 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,
2012-08-09 13:58:02 +06:00
out string_array theParameters,
out string_array theValues);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Remove faces from the given object (shape).
2004-12-01 15:39:14 +05:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Close an open wire.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in boolean isCommonVertex);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Remove internal wires and edges from the given object (face).
2004-12-01 15:39:14 +05:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Remove internal closed contours (holes) from the given object.
2004-12-01 15:39:14 +05:00
* \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 theObjects Shapes to be processed.
2004-12-01 15:39:14 +05:00
* \param theTolerance Required tolerance value.
* \return New GEOM_Object, containing processed shape.
*/
GEOM_Object Sew (in ListOfGO theObjects, in double theTolerance);
2004-12-01 15:39:14 +05:00
/*!
* Sewing of the given object. Allows non-manifold sewing.
* \param theObjects Shapes to be processed.
* \param theTolerance Required tolerance value.
* \return New GEOM_Object, containing processed shape.
*/
GEOM_Object SewAllowNonManifold(in ListOfGO theObjects, in double theTolerance);
/*!
* Rebuild the topology of theSolids by removing
* the faces that are shared by several solids.
* \param theSolids A list of shapes containing solids to be processed.
* \return New GEOM_Object, containing processed shape.
*/
GEOM_Object RemoveInternalFaces (in ListOfGO theSolids);
2004-12-01 15:39:14 +05:00
/*!
2014-10-21 22:06:51 +06:00
* \brief Addition of a point to a given edge of \a theObject.
2004-12-01 15:39:14 +05:00
* \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]
2014-10-21 22:06:51 +06:00
* \return New GEOM_Object, containing the processed shape.
2004-12-01 15:39:14 +05:00
*/
GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2012-08-09 13:58:02 +06:00
in double theValue, in boolean isByParameter);
2004-12-01 15:39:14 +05:00
2014-10-21 22:06:51 +06:00
/*!
* \brief Addition of points to a given edge of \a theObject by projecting
* other points to the given edge.
2014-10-21 22:06:51 +06:00
* \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 thePoints Points to project to theEdgeIndex-th edge.
2014-10-21 22:06:51 +06:00
* \return New GEOM_Object, containing the processed shape.
*/
GEOM_Object DivideEdgeByPoint (in GEOM_Object theObject,
in short theEdgeIndex,
in ListOfGO thePoints);
2014-10-21 22:06:51 +06:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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 shapes.
* \param theObjects Shapes to get free boundary of.
2004-12-01 15:39:14 +05:00
* \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 ListOfGO theObjects,
2012-08-09 13:58:02 +06:00
out ListOfGO theClosedWires,
out ListOfGO theOpenWires);
/*!
2012-08-09 13:58:02 +06:00
* \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);
2012-08-09 13:58:02 +06:00
/*!
* \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);
/*!
* \brief Return information on what has been done by the last called healing method.
* \return ModifStatistics, information container.
*/
ModifStatistics GetStatistics();
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_IInsertOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for shape insert operations (like copy, import).
2004-12-01 15:39:14 +05:00
*
*/
interface GEOM_IInsertOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Create a copy of the given object
2004-12-01 15:39:14 +05:00
*/
GEOM_Object MakeCopy (in GEOM_Object theOriginal);
/*!
* \brief Deprecated method. Use Export\<FormatName\> (from the
* corresponding plugin) instead; here \<FormatName\> is a name of format.
*
2012-08-09 13:58:02 +06:00
* \brief Export the given shape into a file with given name.
2004-12-01 15:39:14 +05:00
* \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.
*/
void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
/*!
* \brief Deprecated method. Use Import\<FormatName\> (from the
* corresponding plugin) instead; here \<FormatName\> is a name of format.
*
* \brief Import a shape from the STL, BREP, IGES or STEP file
2004-12-01 15:39:14 +05:00
* (depends on given format) with given name.
* \param theFileName The file, containing the shape.
* \param theFormatName Specify format for the file reading.
2012-12-13 14:40:36 +06:00
* 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 List of GEOM_Object, containing the created shape and groups of materials.
2004-12-01 15:39:14 +05:00
*/
ListOfGBO ImportFile (in string theFileName, in string theFormatName);
2004-12-01 15:39:14 +05:00
2012-10-08 17:16:36 +06:00
/*!
* \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
*
2012-10-08 17:16:36 +06:00
* \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.
* \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 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);
2012-08-09 13:58:02 +06:00
/*!
* \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();
2014-11-27 18:09:06 +05:00
/*!
* \brief Non-topological information transfer datum.
*/
struct TransferDatum
{
string myName;
long myNumber;
long myMaxNumber;
};
/*!
* \brief Sequence of non-topological information tranfer data.
*/
typedef sequence<TransferDatum> ListOfTransferDatum;
/*!
* \brief Transfer non-topological data from one object to another
* \param theObjectFrom the source object of non-topological data
* \param theObjectTo the destination object of non-topological data
* \param theFindMethod method to search sub-shapes of theObjectFrom
* in shape theObjectTo. Possible values are: GEOM::FSM_GetInPlace,
* GEOM::FSM_GetInPlaceByHistory and GEOM::FSM_GetInPlace_Old.
* Other values of GEOM::find_shape_method are not supported.
* \param theResult statistics of the operation. Output parameter. It
* represents a sequence of Transfer Datum. A datum has the type
* (string code), the total number of items of this type and
* the number of transfered items.
* \return true in case of success; otherwise false.
*/
boolean TransferData(in GEOM_Object theObjectFrom,
in GEOM_Object theObjectTo,
in find_shape_method theFindMethod,
out ListOfTransferDatum theResult);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_IKindOfShape:
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for shape_kind enumeration.
*/
interface GEOM_IKindOfShape
{
enum shape_kind {
NO_SHAPE,
2012-08-09 13:58:02 +06:00
//COMPOSITEs
COMPOUND,
COMPSOLID,
SHELL,
WIRE,
// SOLIDs
2012-08-09 13:58:02 +06:00
/*! 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
2012-08-09 13:58:02 +06:00
/*! 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
2012-08-09 13:58:02 +06:00
/*! 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
2012-08-09 13:58:02 +06:00
VERTEX,
// ADVANCED shapes
/*! all advanced shapes (temporary implementation) */
ADVANCED
};
};
2012-08-09 13:58:02 +06:00
// # GEOM_IMeasureOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for measurement (distance, whatis) and
2004-12-01 15:39:14 +05:00
* properties calculation (like Centre of Mass, Inertia, etc.).
*
*/
interface GEOM_IMeasureOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \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,
2012-08-09 13:58:02 +06:00
out ListOfLong theIntegers,
out ListOfDouble theDoubles);
/*!
2012-08-09 13:58:02 +06:00
* \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,
2012-08-09 13:58:02 +06:00
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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get summarized length of all wires,
2004-12-01 15:39:14 +05:00
* 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,
2012-08-09 13:58:02 +06:00
out double theLength,
out double theSurfArea,
out double theVolume);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get a point, situated at the centre of mass of theShape.
2004-12-01 15:39:14 +05:00
* \param theShape Shape to define centre of mass of.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
2012-08-09 13:58:02 +06:00
/*
* 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 );
/*!
2012-08-09 13:58:02 +06:00
* \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,
2012-08-09 13:58:02 +06:00
in GEOM_Object theOptionalPoint);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get inertia matrix and moments of inertia of theShape.
2004-12-01 15:39:14 +05:00
* \param theShape Shape to calculate inertia of.
2012-08-09 13:58:02 +06:00
* \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get parameters of bounding box of the given shape
2004-12-01 15:39:14 +05:00
* \param theShape Shape to obtain bounding box of.
* \param precise TRUE for precise computation; FALSE for fast one.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
out double Xmin, out double Xmax,
out double Ymin, out double Ymax,
out double Zmin, out double Zmax);
2004-12-01 15:39:14 +05:00
2013-02-12 17:35:16 +06:00
/*!
* \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.
2013-02-12 17:35:16 +06:00
* \return New GEOM_Object, containing the created bounding box.
*/
GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
in boolean precise);
2013-02-12 17:35:16 +06:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get min and max tolerances of sub-shapes of theShape
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
out double FaceMin, out double FaceMax,
out double EdgeMin, out double EdgeMax,
out double VertMin, out double VertMax);
2004-12-01 15:39:14 +05:00
/*!
* \brief Enumeration of Shape defects coming from CheckShape algorithms.
*/
enum ShapeErrorType
{
/* for vertices */
InvalidPointOnCurve,
InvalidPointOnCurveOnSurface,
InvalidPointOnSurface,
/* for edges */
No3DCurve,
Multiple3DCurve,
Invalid3DCurve,
NoCurveOnSurface,
InvalidCurveOnSurface,
InvalidCurveOnClosedSurface,
InvalidSameRangeFlag,
InvalidSameParameterFlag,
InvalidDegeneratedFlag,
FreeEdge,
InvalidMultiConnexity,
InvalidRange,
/* for wires */
EmptyWire,
RedundantEdge,
SelfIntersectingWire, /* on a face */
/* for faces */
NoSurface,
InvalidWire,
RedundantWire,
IntersectingWires,
InvalidImbricationOfWires,
/* for shells */
EmptyShell,
RedundantFace,
/* for shapes */
UnorientableShape,
NotClosed,
NotConnected,
SubshapeNotInShape,
BadOrientation,
BadOrientationOfSubshape,
InvalidToleranceValue,
/* for exception */
CheckFail
};
/*!
* \brief Description of a shape defect: type and incriminated sub-shapes.
*/
struct ShapeError
{
ShapeErrorType error;
ListOfLong incriminated;
};
/*!
* \brief Sequence of all shape defects.
*/
typedef sequence<ShapeError> ShapeErrors;
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Check a topology of the given shape.
2004-12-01 15:39:14 +05:00
* \param theShape Shape to check validity of.
* \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2004-12-01 15:39:14 +05:00
* \return TRUE, if the shape "seems to be valid" from the topological point of view.
*/
boolean CheckShape (in GEOM_Object theShape,
out ShapeErrors theErrors);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Check a topology and a geometry of the given shape.
* \param theShape Shape to check validity of.
* \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
* \return TRUE, if the shape "seems to be valid".
*/
boolean CheckShapeWithGeometry (in GEOM_Object theShape,
out ShapeErrors theErrors);
/*!
* \brief Convert sequence of shape errors, returned by
* <VAR>CheckShape()</VAR> or <VAR>CheckShapeWithGeometry()</VAR>, into string.
* \param theShape the invalid shape.
* \param theErrors The sequence of \a theShape errors.
* \return String, describing all the errors in form, suitable for printing.
*/
string PrintShapeErrors (in GEOM_Object theShape,
in ShapeErrors theErrors);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Check a topology of the given shape on self-intersections presence.
* \param theShape Shape to check validity of.
* \param theCheckLevel the level of self-interference check.
2012-08-09 13:58:02 +06:00
* \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,
in long theCheckLevel,
2012-08-09 13:58:02 +06:00
out ListOfLong theIntersections);
/*!
* \brief Detect intersections of the given shapes with algorithm based on mesh intersections.
* \param theShape1 First source object
* \param theShape2 Second source object
* \param theTolerance Specifies a distance between shapes used for detecting gaps:
* - if \a theTolerance <= 0, algorithm detects intersections
* - if \a theTolerance > 0, algorithm detects gaps
* \param theDeflection Linear deflection coefficient that specifies quality of tesselation:
* - if \a theDeflection <= 0, default deflection 0.001 is used
* \param theIntersections1 Output: contains list of sub-shapes IDs from 1st shape that localize intersection
* \param theIntersections2 Output: contains list of sub-shapes IDs from 2nd shape that localize intersection
* \return TRUE, if the are intersections (gaps) between source shapes
*/
boolean FastIntersect (in GEOM_Object theShape1,
in GEOM_Object theShape2,
in double theTolerance,
in float theDeflection,
out ListOfLong theIntersections1,
out ListOfLong theIntersections2);
2012-08-09 13:58:02 +06:00
/*!
* \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
2004-12-01 15:39:14 +05:00
* \param theShape Shape to be described.
* \return Description of the given shape.
*/
string WhatIs (in GEOM_Object theShape);
/*!
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
* \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,
2012-08-09 13:58:02 +06:00
out double X1, out double Y1, out double Z1,
out double X2, out double Y2, out double Z2);
2004-12-01 15:39:14 +05:00
2013-02-12 17:35:16 +06:00
/*!
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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
2004-12-01 15:39:14 +05:00
*/
void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get radius of curvature of curve in the point determinated by param
2009-02-13 17:16:39 +05:00
* \param theShape - curve.
* \param theParam - parameter on curve
* \return Value of curvature.
*/
double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get radius of curvature of curve in the given point
2009-02-13 17:16:39 +05:00
* \param theShape - curve.
* \param thePoint - point
* \return Value of curvature.
*/
double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get max radius of curvature of surface in the point determinated by params
2009-02-13 17:16:39 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in double theVParam);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get max radius of curvature of surface in the given point
2009-02-13 17:16:39 +05:00
* \param theShape - surface.
* \param thePoint - point
* \return Value of curvature.
*/
double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
/*!
2012-08-09 13:58:02 +06:00
* \brief Get min radius of curvature of surface in the point determinated by params
2009-02-13 17:16:39 +05:00
* \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,
2012-08-09 13:58:02 +06:00
in double theVParam);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Get min radius of curvature of surface in the given point
2009-02-13 17:16:39 +05:00
* \param theShape - surface.
* \param thePoint - point
* \return Value of curvature.
*/
double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2004-12-01 15:39:14 +05:00
};
2012-08-09 13:58:02 +06:00
// # GEOM_IGroupOperations:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface for groups creation.
2004-12-01 15:39:14 +05:00
*/
interface GEOM_IGroupOperations : GEOM_IOperations
{
/*!
2012-08-09 13:58:02 +06:00
* \brief Creates a new group which will store sub-shapes of theMainShape
* \param theMainShape is a GEOM_Object on which the group is selected
2004-12-01 15:39:14 +05:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \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
2004-12-01 15:39:14 +05:00
*/
void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
/*!
2012-08-09 13:58:02 +06:00
* \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
2004-12-01 15:39:14 +05:00
*/
void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
/*!
2012-08-09 13:58:02 +06:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \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);
/*!
2012-08-09 13:58:02 +06:00
* \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);
2012-10-08 17:16:36 +06:00
/*!
* \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);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a type of sub-objects stored in the group
2004-12-01 15:39:14 +05:00
* \param theGroup is a GEOM group which type is returned.
*/
long GetType (in GEOM_Object theGroup);
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a main shape associated with the group
2004-12-01 15:39:14 +05:00
* \param theGroup is a GEOM group for which a main shape object is requested
2012-08-09 13:58:02 +06:00
* \return a GEOM_Object which is a main shape for theGroup
2004-12-01 15:39:14 +05:00
*/
GEOM_Object GetMainShape (in GEOM_Object theGroup);
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a list of sub-objects ID stored in the group
2004-12-01 15:39:14 +05:00
* \param theGroup is a GEOM group for which a list of IDs is requested
*/
ListOfLong GetObjects (in GEOM_Object theGroup);
};
// # GEOM_IFieldOperations:
/*!
* \brief Interface for field operation.
*/
interface GEOM_IFieldOperations : GEOM_IOperations
{
/*!
* \brief Creates a field
*/
GEOM_Field CreateField(in GEOM_Object shape,
in string name,
in field_data_type type,
in short dimension,
in string_array componentNames);
/*!
* \brief Returns number of fields on a shape
*/
long CountFields(in GEOM_Object shape);
/*!
* \brief Returns all fields on a shape
*/
ListOfFields GetFields(in GEOM_Object shape);
/*!
* \brief Returns a field on a shape by its name
*/
GEOM_Field GetField(in GEOM_Object shape, in string name);
/*!
* \brief Returns number of sub-shapes of given dimension
*/
long GetNbSubShapes(in GEOM_Object shape, in short fieldDim);
};
2012-08-09 13:58:02 +06:00
// # GEOM_Gen:
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Interface to access other GEOM interfaces.
*
* Also contains some methods to access and manage GEOM_Object.
2004-12-01 15:39:14 +05:00
*/
2012-08-09 13:58:02 +06:00
interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
2003-05-12 20:51:31 +06:00
{
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Undo/Redo Management
2004-12-01 15:39:14 +05:00
*/
void Undo (in long theStudyID);
void Redo (in long theStudyID);
/*!
2012-08-09 13:58:02 +06:00
* \brief Publishing management
*
2004-12-01 15:39:14 +05:00
* 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_BaseObject theObject,
in string theName,
in GEOM_BaseObject theFather);
2004-12-01 15:39:14 +05:00
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
*
2009-02-13 17:16:39 +05:00
* 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
2012-08-09 13:58:02 +06:00
* \param theObject published GEOM_Object, arguments of which will be published
2009-02-13 17:16:39 +05:00
* \param theArgs list of GEOM_Object, operation arguments to be published.
* If this list is empty, all operation arguments will be published
2012-08-09 13:58:02 +06:00
* \param theFindMethod method to search sub-shapes, corresponding to arguments and
* their sub-shapes. Value from enumeration GEOM::find_shape_method.
2009-02-13 17:16:39 +05:00
* \param theInheritFirstArg set properties of the first argument for \a theObject.
2012-08-09 13:58:02 +06:00
* Do not publish sub-shapes in place of arguments, but only
* in place of sub-shapes of the first argument,
2009-02-13 17:16:39 +05:00
* 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.
2012-08-09 13:58:02 +06:00
* \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
2009-02-13 17:16:39 +05:00
*/
2012-08-09 13:58:02 +06:00
ListOfGO RestoreSubShapesO (in SALOMEDS::Study theStudy,
in GEOM_Object theObject,
in ListOfGO theArgs,
in find_shape_method theFindMethod,
in boolean theInheritFirstArg,
in boolean theAddPrefix);
2009-02-13 17:16:39 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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
2009-02-13 17:16:39 +05:00
*/
2012-08-09 13:58:02 +06:00
ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study theStudy,
in GEOM_Object theObject,
in ListOfGO theArgs,
in find_shape_method theFindMethod,
in boolean theInheritFirstArg,
in boolean theAddPrefix);
2009-02-13 17:16:39 +05:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \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.
2004-12-01 15:39:14 +05:00
*/
2012-08-09 13:58:02 +06:00
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
2004-12-01 15:39:14 +05:00
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);
GEOM_IFieldOperations GetIFieldOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
2004-12-01 15:39:14 +05:00
GEOM_IOperations GetPluginOperations (in long theStudyID,
in string theLibName) raises (SALOME::SALOME_Exception);
// # Objects Management
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Removes the object from the GEOM component
* \param theObject is a GEOM_Object to be removed
2004-12-01 15:39:14 +05:00
*/
void RemoveObject (in GEOM_BaseObject theObject);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns an object defined by the study and its entry in the GEOM component
2004-12-01 15:39:14 +05:00
* \param theStudyID is a SALOMEDS Study ID
2012-08-09 13:58:02 +06:00
* \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
2004-12-01 15:39:14 +05:00
*/
GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Add a sub-shape defined by indices in \a theIndices
* (contains unique IDs of sub-shapes inside \a theMainShape)
* \note The sub-shape GEOM_Object can has ONLY ONE function.
2004-12-01 15:39:14 +05:00
* Don't try to apply modification operations on them.
* \note Internal method
*/
GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
2012-08-09 13:58:02 +06:00
// # GEOM_Objects IOR Management
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a GEOM_Object defined by its IOR
* \param theIOR a string containg an IOR of the requested GEOM_Object
2004-12-01 15:39:14 +05:00
*/
GEOM_Object GetIORFromString (in string theIOR);
2003-05-12 20:51:31 +06:00
2004-12-01 15:39:14 +05:00
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns a string which contains an IOR of the GEOM_Object
* \param theObject is a GEOM_Object which IOR is requested
2004-12-01 15:39:14 +05:00
*/
string GetStringFromIOR (in GEOM_Object theObject);
/*!
2012-08-09 13:58:02 +06:00
* \brief 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);
/*!
2012-08-09 13:58:02 +06:00
* \brief Returns all names with which a GEOM_Object was dumped
* into python script to avoid the same names in SMESH script
*/
string_array GetAllDumpNames();
2012-08-09 13:58:02 +06:00
/*!
* \brief Publishes the named sub-shapes of given object in the study.
* \param theStudy The study in which the object is published
* \param theObject The object which named sub-shapes are published
*/
ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
//in SObject theSObject,
in Object theObject);
/*!
* \brief Creates a new folder
*
* Creates a new container (folder) for any GEOM objects.
* Folder will have name theName.
* If theFather is not NULL, the folder is placed under theFather object.
* Otherwise, the folder takes place under root 'Geometry' object.
*
* \param theName name of the folder
* \param theFather parent object
* \return SObject represented the created folder.
*/
SALOMEDS::SObject CreateFolder (in string theName,
in SALOMEDS::SObject theFather);
/*!
* \brief Moves object to the specified folder
*
* The moved object should be first published in the study.
* \param theObject GEOM object to move
* \param theFolder target folder
*/
void MoveToFolder (in GEOM_Object theObject,
in SALOMEDS::SObject theFolder);
/*!
* \brief Moves list of objects to the specified folder
*
* The moved objects should be first published in the study.
* \param theListOfGO list of GEOM objects to move
* \param theFolder target folder
*/
void MoveListToFolder (in ListOfGO theListOfGO,
in SALOMEDS::SObject theFolder);
/*!
* \brief Moves objects to the specified position
*
* This function is used in the drag-n-drop functionality.
*
* \param what objects being moved
* \param where parent object where objects are moved to
* \param row position in the parent object's children list at which objects are moved
*/
void Move( in object_list what,
in SALOMEDS::SObject where,
in long row );
2014-05-16 18:49:16 +06:00
/*!
* \brief Collects dependencies of the given objects from other ones
* \param theStudy The study in which the object is published
* \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
* \return Struct of dependent entries and its links as a byte array
2014-06-06 17:03:22 +06:00
* \note This method is supposed to be used by GUI only.
2014-05-16 18:49:16 +06:00
*/
SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
in string_array theListOfEntries);
2014-05-16 18:49:16 +06:00
/*!
* \brief Fills 3 lists that is used to reduce study of redundant objects:
* - dependencies of the given objects from other ones;
* - children of the given objects;
* - all other objects in study.
* \param theStudy The study in which the object was published
* \param theSelectedEntries List of GEOM object entries in OCAF tree
* \param theParentEntries List of GEOM object entries on which the given objects depend
* \param theSubEntries Children entries list of the given objects
* \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
* \note This method is supposed to be used by GUI only.
*/
void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
inout string_array theSelectedEntries,
inout string_array theParentEntries,
inout string_array theSubEntries,
inout string_array theOtherEntries);
2003-05-12 20:51:31 +06:00
};
};
#endif