From: ana Date: Mon, 6 Feb 2012 07:38:17 +0000 (+0000) Subject: Implementation of the "0020839: EDF 1370 DOC : Update of the TUI features documentati... X-Git-Tag: V6_5_0a1~77 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4fba47faef4e78e8730b1083c11f84adf2cf6e6a;p=modules%2Fgeom.git Implementation of the "0020839: EDF 1370 DOC : Update of the TUI features documentation / help(aMethod)" issue. --- diff --git a/doc/salome/gui/GEOM/Makefile.am b/doc/salome/gui/GEOM/Makefile.am index eb1d2b609..c8ac4cc1a 100755 --- a/doc/salome/gui/GEOM/Makefile.am +++ b/doc/salome/gui/GEOM/Makefile.am @@ -33,9 +33,7 @@ usr_docs: doxyfile_tui doxyfile_py doxyfile echo "===========================================" ; \ echo "Replacing geompyDC by geompy" ; \ echo "===========================================" ; \ - sed -e "/class geompyDC/d" -e "s/^ *#/#/g" -e "s/^ *def /def /g" \ - -e "s/geompyDC/geompy/g" $(top_srcdir)/src/GEOM_SWIG/geompyDC.py > \ - ./geompy.py ; \ + $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py geompy.py $(top_srcdir)/src/GEOM_SWIG/geompyDC.py geompy ; \ echo "===========================================" ; \ echo "Generating examples documentation" ; \ echo "===========================================" ; \ diff --git a/doc/salome/gui/GEOM/doxyfile_py.in b/doc/salome/gui/GEOM/doxyfile_py.in index e54f1c3e6..6ae7795b0 100755 --- a/doc/salome/gui/GEOM/doxyfile_py.in +++ b/doc/salome/gui/GEOM/doxyfile_py.in @@ -99,8 +99,8 @@ EXAMPLE_RECURSIVE = NO #--------------------------------------------------------------------------- #Input related options #--------------------------------------------------------------------------- -INPUT = . -FILE_PATTERNS = geompy.py +INPUT = . @top_srcdir@/idl +FILE_PATTERNS = geompy.py GEOM_Gen.idl IMAGE_PATH = @srcdir@/images EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG RECURSIVE = NO diff --git a/doc/salome/gui/GEOM/input/shape_processing_operation.doc b/doc/salome/gui/GEOM/input/shape_processing_operation.doc index 5aac5fd14..aa97ec32f 100644 --- a/doc/salome/gui/GEOM/input/shape_processing_operation.doc +++ b/doc/salome/gui/GEOM/input/shape_processing_operation.doc @@ -6,7 +6,7 @@ select Repair - > Shape Processing. \n This operation processes one or more shapes using various operators. -\n The \b Result will be a \b GEOM_Object. +\n The \b Result will be a \b GEOM.GEOM_Object. \n TUI Command: geompy.ProcessShape(Shape, Operators, Parameters, Values), where \em Shape is a processed shape, \em Operators diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 8c3e2b744..c50451044 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -35,25 +35,44 @@ module GEOM { /*! - * Topological types of shapes (like Open Cascade types) + * \brief Topological types of shapes (like Open Cascade types) */ - enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, - FACE, WIRE, EDGE, VERTEX, SHAPE }; + enum shape_type + { + /*! */ + 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 close wire */ + FACE, + /*! A sequence of edges connected by their vertices */ + 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, + /*! */ + SHAPE }; /*! - * Marker type + * \brief Marker type */ enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS, MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER }; /*! - * Marker size + * /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 }; /*! - * State of shape relatively geometrical surface like plane, sphere or cylinder. + * \brief State of shape relatively geometrical surface like plane, sphere or cylinder. + * * Is used in functions GEOM_IShapesOperations.GetShapesOn() */ enum shape_state @@ -67,7 +86,7 @@ module GEOM * For sphere and cylinder it means outside of volume, bounded by the surface. */ ST_OUT, - + /*! * Shape is in the direction defined by the normal and on surface. * ONOUT = ON || OUT @@ -90,9 +109,10 @@ module GEOM }; /*! - * Kind of method to find inside one main shape some sub-shapes, + * \brief Kind of method to find inside one main shape some sub-shapes, * corresponding to other given shape (its argument) - * Is used in functions GEOM_Gen.RestoreSubShapes() + * + * Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO() */ enum find_shape_method { @@ -120,24 +140,31 @@ module GEOM }; /*! - * Kind of method to perform filling operation - * Is used in functions GEOM_Gen.MakeFilling() + * \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 */ + /*! 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 */ + /*! 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 }; /*! - * Kind of the curves. - * Used in the function GEOM_Gen.MakeCurveParametric() + * \brief Kind of the curves. + * + * Used in the functions GEOM_ICurvesOperations.MakeCurveParametric(), GEOM_ICurvesOperations.MakeCurveParametricNew() */ enum curve_type { /*! Polyline curve */ @@ -161,34 +188,36 @@ module GEOM typedef sequence ListOfGO; + # GEOM_Object /*! - * GEOM_Object: interface of geometric object + * \brief Interface of geometric object */ interface GEOM_Object : SALOME::GenericObj { /*! - * Get an entry of the object in GEOM component. + * \brief Get an entry of the object in GEOM component. */ string GetEntry(); /*! - * Get ID of study, where the object is created. + * \brief Get ID of study, where the object is created. */ long GetStudyID(); /*! - * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...). + * \brief Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...). */ long GetType(); /*! - * Get a shape_type of the object value. + * \brief Get a shape_type of the object value. */ shape_type GetShapeType(); /*! - * Get the topology type of the object value. + * \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. @@ -197,36 +226,42 @@ module GEOM shape_type GetTopologyType(); /*! - * Get a minimal type of the top-level shapes contained in the object. + * \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(); /*! - * Get a maximal type of the top-level shapes contained in the object. + * \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(); /*! - * Set name of the object. + * \brief Set name of the object. + * * \param theName is a name which will be associated with this object. */ void SetName (in string theName); /*! - * Get name of the object associated with this object. + * \brief Get name of the object associated with this object. */ string GetName(); /*! - * Set color of the object. + * \brief Set color of the object. + * * \param theColor is a color of the object. */ void SetColor(in SALOMEDS::Color theColor); @@ -243,106 +278,106 @@ module GEOM void SetAutoColor(in boolean theAutoColor); /*! - * Get flag of object's auto color mode. + * \brief Get flag of object's auto color mode. */ boolean GetAutoColor(); /*! - * Set standard point marker for the object + * \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 ); /*! - * Set custom point marker for the object. The texture can be added - * by LoadTexture() or AddTexture() functions. + * \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); /*! - * Get type of the point marker assigned to the object + * \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(); /*! - * Get size of the point marker assigned to the object + * \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(); /*! - * Get texture idenifier of the point marker assigned to the object + * \brief Get texture idenifier of the point marker assigned to the object * \return marker texture ID (0 if no marker set) */ long GetMarkerTexture(); /*! - * Set a Study entry where this object was published. + * \brief Set a Study entry where this object was published. */ void SetStudyEntry (in string theEntry); /*! - * Get a Study entry where this object was published. + * \brief Get a Study entry where this object was published. */ string GetStudyEntry(); /*! - * Get a list of all GEOM objects on which were the arguments + * \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. */ ListOfGO GetDependency(); /*! - * Get a list of GEOM objects on which the last function that created or modified the object depends. + * \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. */ ListOfGO GetLastDependency(); /*! - * Get the TopoDS_Shape, for colocated case only. + * \brief Get the TopoDS_Shape, for colocated case only. */ long long getShape(); + ###################################################################### + # Internal methods (For sub-shape identification) + ###################################################################### /*! - ###################################################################### - * Internal methods (For sub-shape identification) - ###################################################################### - */ - - /*! - * Get geometric shape of the object as a byte stream + * \brief Get geometric shape of the object as a byte stream */ SALOMEDS::TMPFile GetShapeStream(); /* - * Returns True if this object is not a sub-shape of another object. + * \brief Returns True if this object is not a sub-shape of another object. */ boolean IsMainShape(); /* - * Get a list of ID's of sub-shapes in the main shape. + * \brief Get a list of ID's of sub-shapes in the main shape. * \note Internal method, suppopsed to be used only by GEOM_Client */ ListOfLong GetSubShapeIndices(); /* - * Get a main shape object to which this object is a sub-shape + * \brief Get a main shape object to which this object is a sub-shape * \note Internal method, suppopsed to be used only by GEOM_Client */ GEOM_Object GetMainShape(); /* - * Return true if geom object representes a shape. + * \brief Return true if geom object representes a shape. + * * For example, method return false for GEOM_MARKER */ boolean IsShape(); /* - * Return true if passed object is identical to this object + * \brief Return true if passed object is identical to this object + * * \param other object being compared with this one */ boolean IsSame(in GEOM_Object other); @@ -355,63 +390,64 @@ module GEOM void SetParameters (in string theParameters); /*! - * Return list of notebook variables used for object creation separated by ":" symbol + * \brief Return list of notebook variables used for object creation separated by ":" symbol */ string GetParameters(); }; - + # GEOM_IOperations: /*! - * GEOM_IOperations: basic methods of all geometric operations + * \brief Basic methods of all geometric operations */ interface GEOM_IOperations : SALOME::GenericObj { /*! - * To know, if the operation was successfully performed + * \brief To know, if the operation was successfully performed */ boolean IsDone(); /*! - * Set the operation error code + * \brief Set the operation error code * \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); /*! - * Get the operation error code + * \brief Get the operation error code */ string GetErrorCode(); /*! - * Get ID of study, where the operation is defined + * \brief Get ID of study, where the operation is defined */ long GetStudyID(); /*! - * Opens a new transaction + * \brief Opens a new transaction */ void StartOperation(); /*! - * Closes the previously opened trasaction + * \brief Closes the previously opened trasaction */ void FinishOperation(); /*! - * Aborts the previously opened transaction + * \brief Aborts the previously opened transaction */ void AbortOperation(); }; - + # GEOM_IBasicOperations: /*! - * GEOM_IBasicOperations: interface for basic geometry creation + * \brief Interface for basic geometry creation + * * (Point, Vector, Plane, Marker) */ interface GEOM_IBasicOperations : GEOM_IOperations { /*! - * Create point by three coordinates. + * \brief Create point by three coordinates. * \param theX The X coordinate of the point. * \param theY The Y coordinate of the point. * \param theZ The Z coordinate of the point. @@ -420,7 +456,7 @@ module GEOM GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ); /*! - * Create a point, distant from the referenced point + * \brief Create a point, distant from the referenced point * on the given distances along the coordinate axes. * \param theReference The referenced point. * \param theX Displacement from the referenced point along OX axis. @@ -441,7 +477,7 @@ module GEOM in double theParameter); /*! - * Create a point, corresponding to the given length on the given curve. + * \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 @@ -454,7 +490,7 @@ module GEOM in GEOM_Object theStartPoint); /*! - * Create a point on the given curve, projecting given point + * \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 @@ -467,7 +503,7 @@ module GEOM in double theZPameter); /*! - * Create a point, corresponding to the given parameters on the + * \brief Create a point, corresponding to the given parameters on the * given surface. * \param theRefSurf The referenced surface. * \param theUParameter Value of U-parameter on the referenced surface. @@ -479,7 +515,7 @@ module GEOM in double theVParameter); /*! - * Create a point on the given surface, projecting given point + * \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 @@ -493,7 +529,7 @@ module GEOM /*! - * Create a point, on two lines intersection. + * \brief Create a point, on two lines intersection. * \param theRefLine1, theRefLine2 The referenced lines. * \return New GEOM_Object, containing the created point. */ @@ -501,7 +537,7 @@ module GEOM in GEOM_Object theRefLine2); /*! - * Create a vector, corresponding to tangent to the given parameter on the given curve. + * \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 * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds @@ -512,7 +548,7 @@ module GEOM in double theParameter); /*! - * Create a vector with the given components. + * \brief Create a vector with the given components. * \param theDX X component of the vector. * \param theDY Y component of the vector. * \param theDZ Z component of the vector. @@ -523,7 +559,7 @@ module GEOM in double theDZ); /*! - * Create a vector between two points. + * \brief Create a vector between two points. * \param thePnt1 Start point for the vector. * \param thePnt2 End point for the vector. * \return New GEOM_Object, containing the created vector. @@ -531,7 +567,7 @@ module GEOM GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); /*! - * Create a line, passing through the given point + * C\brief reate a line, passing through the given point * 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. @@ -540,7 +576,7 @@ module GEOM GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir); /*! - * Create a line, passing through the given points + * \brief Create a line, passing through the given points * \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. @@ -548,7 +584,7 @@ module GEOM GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); /*! - * Create a line, given by two faces intersection. + * \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. @@ -556,7 +592,7 @@ module GEOM GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2); /*! - * Create a plane, passing through the three given points + * \brief Create a plane, passing through the three given points * \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. @@ -569,7 +605,7 @@ module GEOM in double theTrimSize); /*! - * Create a plane, passing through the given point + * \brief Create a plane, passing through the given point * and normal to the given vector. * \param thePnt Point, the plane has to pass through. * \param theVec Vector, defining the plane normal direction. @@ -581,7 +617,7 @@ module GEOM in double theTrimSize); /*! - * Create a plane, similar to the existing one, but with another size of representing face. + * \brief Create a plane, similar to the existing one, but with another size of representing face. * \param theFace Referenced plane or LCS(Marker). * \param theTrimSize New half size of a side of quadrangle face, representing the plane. * \return New GEOM_Object, containing the created plane. @@ -590,7 +626,7 @@ module GEOM in double theTrimSize); /*! - * Create a plane, by two vectors. + * \brief Create a plane, by two vectors. * \param theVec1 Vector1, the plane has to pass through first point of this vector. * \param theVec Vector2, defining the plane normal direction. * \param theTrimSize Half size of a side of quadrangle face, representing the plane. @@ -601,7 +637,7 @@ module GEOM in double theTrimSize); /*! - * Create a plane, defined by local coordinate system. + * \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). @@ -612,7 +648,7 @@ module GEOM in double theOrientation); /*! - * Create a local coordinate system. + * \brief Create a local coordinate system. * \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 @@ -623,14 +659,14 @@ module GEOM in double theYDX, in double theYDY, in double theYDZ); /*! - * Create a local coordinate system from shape. + * \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); /*! - * Create a local coordinate system from point and two vectors (DX, DY). + * \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. @@ -640,7 +676,8 @@ module GEOM in GEOM_Object theXVec, in GEOM_Object theYVec); /*! - * Create a tangent plane to specified face in the point with specified parameters. + * \brief Create a tangent plane to specified face in the point with specified parameters. + * * Values of parameters should be between 0. and 1.0 * \param theFace - face for which tangent plane shuold be built. * \param theParameterU - value of parameter by U @@ -657,7 +694,7 @@ module GEOM interface GEOM_ITransformOperations : GEOM_IOperations { /*! - * Translate the given object along the vector, specified by its end points. + * \brief Translate the given object along the vector, specified by its end points. * \param theObject The object to be translated. * \param thePoint1 Start point of translation vector. * \param thePoint2 End point of translation vector. @@ -668,7 +705,7 @@ module GEOM in GEOM_Object thePoint2); /*! - * Translate the given object along the vector, specified + * \brief Translate the given object along the vector, specified * by its end points, creating its copy before the translation. * \param theObject The object to be translated. * \param thePoint1 Start point of translation vector. @@ -680,7 +717,7 @@ module GEOM in GEOM_Object thePoint2); /*! - * Translate the given object along the vector, specified by its components. + * \brief Translate the given object along the vector, specified by its components. * \param theObject The object to be translated. * \param theDX,theDY,theDZ Components of translation vector. * \return theObject. @@ -689,7 +726,7 @@ module GEOM in double theDX, in double theDY, in double theDZ); /*! - * Translate the given object along the vector, specified + * \brief Translate the given object along the vector, specified * by its components, creating its copy before the translation. * \param theObject The object to be translated. * \param theDX,theDY,theDZ Components of translation vector. @@ -700,7 +737,7 @@ module GEOM /*! - * Translate the given object along the given vector. + * \brief Translate the given object along the given vector. * \param theObject The object to be translated. * \param theVector Translation vector, giving both direction and distance. * \return theObject. @@ -709,7 +746,7 @@ module GEOM in GEOM_Object theVector); /*! - * Translate the given object along the given vector, + * \brief Translate the given object along the given vector, * creating its copy before the translation. * \param theObject The object to be translated. * \param theVector Translation vector, giving both direction and distance. @@ -719,7 +756,7 @@ module GEOM in GEOM_Object theVector); /*! - * Translate the given object along the given vector on given distance, + * \brief Translate the given object along the given vector on given distance, * creating its copy before the translation. * \param theObject The object to be translated. * \param theVector Translation vector, giving a direction. @@ -733,7 +770,7 @@ module GEOM in boolean theCopy); /*! - * Translate the given object along the given vector a given number times + * \brief Translate the given object along the given vector a given number times * \param theObject The object to be translated. * \param theVector Direction of the translation. * \param theStep Distance to translate on. @@ -747,7 +784,7 @@ module GEOM in long theNbTimes); /*! - * Conseqently apply two specified translations to theObject specified number of times. + * \brief Conseqently apply two specified translations to theObject specified number of times. * \param theObject The object to be translated. * \param theVector1 Direction of the first translation. * \param theStep1 Step of the first translation. @@ -767,7 +804,7 @@ module GEOM in long theNbTimes2); /*! - * Rotate given object around vector perpendicular to plane containing three points. + * \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 * containing the three points. @@ -781,7 +818,8 @@ module GEOM /*! - * Rotate given object around vector perpendicular to plane containing three points. + * \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 @@ -795,7 +833,7 @@ module GEOM in GEOM_Object thePoint2); /*! - * Rotate the given object around the given axis on the given angle. + * \brief Rotate the given object around the given axis on the given angle. * \param theObject The object to be rotated. * \param theAxis Rotation axis. * \param theAngle Rotation angle in radians. @@ -820,7 +858,8 @@ module GEOM /*! - * Rotate the given object around the given axis a given number times. + * \brief Rotate the given object around the given axis a given number times. + * * Rotation angle will be 2*PI/theNbTimes. * \param theObject The object to be rotated. * \param theAxis The rotation axis. @@ -833,9 +872,10 @@ module GEOM in long theNbTimes); /*! - * Rotate the given object around the + * \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. @@ -855,7 +895,7 @@ module GEOM in long theNbTimes2); /*! - * Replace the given object by an object, + * \brief Replace the given object by an object, * symmetrical to it relatively the given plane. * \param theObject The object to be mirrored. * \param thePlane Plane of symmetry. @@ -863,7 +903,7 @@ module GEOM GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane); /*! - * Create an object, symmetrical + * \brief Create an object, symmetrical * to the given one relatively the given plane. * \param theObject The object to be mirrored. * \param thePlane Plane of symmetry. @@ -872,7 +912,7 @@ module GEOM GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane); /*! - * Replace the given object by an object, + * \brief Replace the given object by an object, * symmetrical to it relatively the given axis. * \param theObject The object to be mirrored. * \param theAxis Axis of symmetry. @@ -881,7 +921,7 @@ module GEOM GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis); /*! - * Create an object, symmetrical + * \brief Create an object, symmetrical * to the given one relatively the given axis. * \param theObject The object to be mirrored. * \param theAxis Axis of symmetry. @@ -890,7 +930,7 @@ module GEOM GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis); /*! - * Replace the given object by an object, symmetrical to it relatively the given point. + * \brief Replace the given object by an object, symmetrical to it relatively the given point. * \param theObject The object to be mirrored. * \param thePoint Point of symmetry. * \return theObject. @@ -898,7 +938,7 @@ module GEOM GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint); /*! - * Create an object, symmetrical to the given one relatively the given point. + * \brief Create an object, symmetrical to the given one relatively the given point. * \param theObject The object to be mirrored. * \param thePoint Point of symmetry. * \return New GEOM_Object, containing the mirrored object. @@ -906,7 +946,7 @@ module GEOM GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint); /*! - * Replace the given object by its offset. + * \brief Replace the given object by its offset. * \param theObject The base object for the offset. * \param theOffset Offset value. * \return theObject. @@ -914,7 +954,7 @@ module GEOM GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset); /*! - * Create new object as offset of the given one. + * \brief Create new object as offset of the given one. * \param theObject The base object for the offset. * \param theOffset Offset value. * \return New GEOM_Object, containing the offset object. @@ -922,7 +962,7 @@ module GEOM GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset); /*! - * Create new object as projection of the given one on a 2D surface. + * \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. @@ -930,7 +970,7 @@ module GEOM GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget); /*! - * Scale the given object by the factor. + * \brief Scale the given object by the factor. * \param theObject The object to be scaled. * \param thePoint Center point for scaling. * \param theFactor Scaling factor value. @@ -940,7 +980,7 @@ module GEOM in double theFactor); /*! - * Scale the given object by the factor, creating its copy before the scaling. + * \brief Scale the given object by the factor, creating its copy before the scaling. * \param theObject The object to be scaled. * \param thePoint Center point for scaling. * \param theFactor Scaling factor value. @@ -950,7 +990,7 @@ module GEOM in double theFactor); /*! - * Scale the given object by different factors along coordinate axes. + * \brief Scale the given object by different factors along coordinate axes. * \param theObject The object to be scaled. * \param thePoint Center point for scaling. * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis. @@ -963,7 +1003,7 @@ module GEOM in double theFactorZ); /*! - * Scale the given object by different factors along coordinate axes, + * \brief Scale the given object by different factors along coordinate axes, * creating its copy before the scaling. * \param theObject The object to be scaled. * \param thePoint Center point for scaling. @@ -977,7 +1017,7 @@ module GEOM in double theFactorZ); /*! - * Modify the Location of the given object by LCS. + * \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 @@ -992,7 +1032,7 @@ module GEOM in GEOM_Object theEndLCS); /*! - * Modify the Location of the given object by LCS, + * \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. @@ -1008,7 +1048,7 @@ module GEOM in GEOM_Object theEndLCS); /*! - * Modify the Location of the given object by Path, + * \brief Modify the Location of the given object by Path, * \param theObject The object to be displaced. * \param thePath Wire or Edge along that the object will be translated. * \param theDistance progress of Path (0 = actual location, 1 = end of path location). @@ -1023,7 +1063,7 @@ module GEOM in boolean theReverse); /*! - * Transform the shape in the same way what was used for the sample shape creation. + * \brief Transform the shape in the same way what was used for the sample shape creation. * \param theObject The object to be transformed. * \param theSample The object containing information about required transformation. * \note Implementation of this method is limited by multi-transformations now. @@ -1034,23 +1074,26 @@ module GEOM in GEOM_Object theSample); /*! - * Recompute the shape from its arguments. + * \brief Recompute the shape from its arguments. * \param theObject The object to be recomputed. * \return theObject. */ GEOM_Object RecomputeObject (in GEOM_Object theObject); }; - + + # GEOM_I3DPrimOperations: /*! - * GEOM_I3DPrimOperations: Interface for 3D primitives creation + * \brief Interface for 3D primitives creation + * * Box, Cylinder, Cone, Sphere, Prism (extrusion), * Pipe (extrusion along contour), Revolution, Solid (from shell). */ interface GEOM_I3DPrimOperations : GEOM_IOperations { /*! - * Create a box with specified dimensions along the coordinate axes + * \brief Create a box with specified dimensions along the coordinate axes * and with edges, parallel to the coordinate axes. + * * 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. @@ -1060,7 +1103,7 @@ module GEOM GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ); /*! - * Create a box with two specified opposite vertices, + * \brief Create a box with two specified opposite vertices, * and with edges, parallel to the coordinate axes * \param thePnt1 First of two opposite vertices. * \param thePnt2 Second of two opposite vertices. @@ -1069,8 +1112,9 @@ module GEOM GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); /*! - * Create a face specified dimensions along OX-OY coordinate axes, + * \brief Create a face specified dimensions along OX-OY coordinate axes, * with edges parallel to the coordinate axes. + * * Center of the face will be at point (0, 0, 0). * \param theH Height of the Face. * \param theW Width of the Face. @@ -1079,7 +1123,7 @@ module GEOM */ GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation); /*! - * Create a face by normale vector or edge and two specified sizes, + * \brief Create a face by normale vector or edge and two specified sizes, * vertical (H) and horisontal (W). * \param theVec defines plane. * \param theH vertical size (height). @@ -1088,7 +1132,7 @@ module GEOM */ GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW); /*! - * Create a Disk (circular face) with given center, normal vector and radius. + * \brief Create a Disk (circular face) with given center, normal vector and radius. * \param thePnt disk center. * \param theVec Vector, normal to the plane of the disk. * \param theR Disk radius. @@ -1098,7 +1142,7 @@ module GEOM in GEOM_Object theVec, in double theR); /*! - * Create a disk (circular face), passing through three given points + * \brief Create a disk (circular face), passing through three given points * \param thePnt1, thePnt2, thePnt3 Points, defining the disk. * \return New GEOM_Object, containing the created disk. */ @@ -1107,7 +1151,8 @@ module GEOM in GEOM_Object thePnt3); /*! - * Create a disk specified dimensions along OX-OY coordinate axes, + * \brief Create a disk specified dimensions along OX-OY coordinate axes. + * * Center of the disk at point (0, 0, 0). * \param theR of the Disk. * \param theOrientation Orientation belong axis OXY OYZ OZX @@ -1116,9 +1161,10 @@ module GEOM GEOM_Object MakeDiskR (in double theR, in short theOrientation); /*! - * 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. + * \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. @@ -1126,7 +1172,7 @@ module GEOM GEOM_Object MakeCylinderRH (in double theR, in double theH); /*! - * Create a cylinder with given base point, axis, radius and height. + * \brief Create a cylinder with given base point, axis, radius and height. * \param thePnt Central point of cylinder base. * \param theAxis Cylinder axis. * \param theR Cylinder radius. @@ -1139,9 +1185,10 @@ module GEOM in double theH); /*! - * 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. + * \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. * \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. @@ -1152,7 +1199,7 @@ module GEOM GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH); /*! - * Create a cone with given base point, axis, height and radiuses. + * \brief Create a cone with given base point, axis, height and radiuses. * \param thePnt Central point of the first cone base. * \param theAxis Cone axis. * \param theR1 Radius of the first cone base. @@ -1169,7 +1216,7 @@ module GEOM in double theH); /*! - * Create a torus with given radiuses at the origin of coordinate system. + * \brief Create a torus with given radiuses at the origin of coordinate system. * \param theRMajor Torus major radius. * \param theRMinor Torus minor radius. * \return New GEOM_Object, containing the created torus. @@ -1178,7 +1225,7 @@ module GEOM in double theRMinor); /*! - * Create a torus with given center, normal vector and radiuses. + * \brief Create a torus with given center, normal vector and radiuses. * \param thePnt Torus central point. * \param theVec Torus axis of symmetry. * \param theRMajor Torus major radius. @@ -1191,14 +1238,14 @@ module GEOM in double theRMinor); /*! - * Create a sphere with given radius at the origin of coordinate system. + * \brief Create a sphere with given radius at the origin of coordinate system. * \param theR Sphere radius. * \return New GEOM_Object, containing the created sphere. */ GEOM_Object MakeSphereR (in double theR); /*! - * Create a sphere with given center and radius. + * \brief Create a sphere with given center and radius. * \param thePnt Sphere center. * \param theR Sphere radius. * \return New GEOM_Object, containing the created . @@ -1206,8 +1253,9 @@ module GEOM GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR); /*! - * Create a shape by extrusion of the base shape along the vector, - * i.e. all the space, transfixed by the base shape during its translation + * \brief Create a shape by extrusion of the base shape along the vector + * + * All the space, transfixed by the base shape during its translation * along the vector on the given distance. * \param theBase Base shape to be extruded. * \param theVec Direction of extrusion. @@ -1217,18 +1265,18 @@ module GEOM GEOM_Object MakePrismVecH (in GEOM_Object theBase, in GEOM_Object theVec, in double theH); - /* The Same Prism but in 2 directions (forward&backward) */ + /* \brief The Same Prism but in 2 directions (forward&backward) */ GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase, in GEOM_Object theVec, in double theH); - /* The Same as MakePrismVecH but with scaling */ + /* \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); /*! - * Create a shape by extrusion of the base shape along a vector, defined by two points. + * \brief Create a shape by extrusion of the base shape along a vector, defined by two points. * \param theBase Base shape to be extruded. * \param thePoint1 First end of extrusion vector. * \param thePoint2 Second end of extrusion vector. @@ -1237,34 +1285,34 @@ module GEOM GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase, in GEOM_Object thePoint1, in GEOM_Object thePoint2); - /* The same prism but in two directions forward&backward */ + /* \brief The same prism but in two directions forward&backward */ GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase, in GEOM_Object thePoint1, in GEOM_Object thePoint2); - /* The Same as MakePrismTwoPnt but with scaling */ + /* \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); /*! - * Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ. + * \brief Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ. * \param theBase Base shape to be extruded. * \param DX, DY, DZ end of extrusion vector. * \return New GEOM_Object, containing the created prism. */ GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase, in double theDX, in double theDY, in double theDZ); - /* The same prism but in two directions forward&backward */ + /* \brief The same prism but in two directions forward&backward */ GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase, in double theDX, in double theDY, in double theDZ); - /* The Same as MakePrismDXDYDZ but with scaling */ + /* \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); /*! - * Create a shape by extrusion of the base shape along + * \brief Create a shape by extrusion of the base shape along * 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. @@ -1273,8 +1321,10 @@ module GEOM GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath); /*! - * Create a shape by revolution of the base shape around the axis - * on the given angle, i.e. all the space, transfixed by the base + * \brief Create a shape by revolution of the base shape around the axis + * on the given angle. + * + * All the space, transfixed by the base * shape during its rotation around the axis on the given angle. * \param theBase Base shape to be rotated. * \param theAxis Rotation axis. @@ -1290,7 +1340,7 @@ module GEOM in double theAngle); /*! - * Create a filling from the given compound of contours. + * \brief Create a filling from the given compound of contours. * \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 @@ -1307,7 +1357,7 @@ module GEOM in boolean theApprox); /*! - * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. + * \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 @@ -1319,9 +1369,11 @@ module GEOM in double thePreci, in boolean theRuled); - /*! - * Create a shape by extrusion of the profile shape along - * the path shape. The path shape can be a wire or an edge. + /*! + * \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 @@ -1341,8 +1393,10 @@ module GEOM in boolean theWithCorrection ); /*! - * Create a shape by extrusion of the profile shape along - * the path shape. The path shape can be a shell or a face. + * \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. * \param theSeqSubBases - list of corresponding sub-shapes of section shapes. @@ -1364,7 +1418,7 @@ module GEOM in boolean theWithCorrection ); /*! - * Create solids between given sections + * \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. @@ -1373,8 +1427,9 @@ module GEOM in ListOfGO theLocations); /*! - * Create a shape by extrusion of the base shape along + * \brief Create a shape by extrusion of the base shape along * the path shape with constant bi-normal direction along the given vector. + * * 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. @@ -1389,15 +1444,17 @@ module GEOM }; + # GEOM_IShapesOperations /*! - * GEOM_IShapesOperations: Interface for Shapes creation: + * \brief Interface for Shapes creation: + * * Edge from two points, Wire from edges, Face from wire, * Shell from faces, Solid from shells, Compound from shapes */ interface GEOM_IShapesOperations : GEOM_IOperations { /*! - * Create a linear edge with specified ends. + * \brief Create a linear edge with specified ends. * \param thePnt1 Point for the first end of edge. * \param thePnt2 Point for the second end of edge. * \return New GEOM_Object, containing the created edge. @@ -1405,7 +1462,7 @@ module GEOM GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2); /*! - * Create an edge on another edge, corresponding to the given length on the given edge. + * \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. @@ -1419,7 +1476,7 @@ module GEOM in GEOM_Object theStartPoint); /*! - * Create an edge from specified wire. + * \brief Create an edge from specified wire. * \param theWire source Wire. * \param theLinearTolerance linear tolerance value * \param theAngularTolerance angular tolerance value @@ -1430,7 +1487,7 @@ module GEOM in double theAngularTolerance); /*! - * Create a wire from the set of edges and wires. + * \brief Create a wire from the set of edges and wires. * \param theEdgesAndWires List of edge and/or wires. * \param theTolerance Maximum distance between vertices, that will be merged. * Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()). @@ -1440,7 +1497,7 @@ module GEOM in double theTolerance); /*! - * Create a face on the given wire. + * \brief Create a face on the given wire. * \param theWire closed Wire or Edge to build the face on. * \param isPlanarWanted If TRUE, only planar face will be built. * If impossible, NULL object will be returned. @@ -1449,7 +1506,7 @@ module GEOM GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted); /*! - * Create a face on the given wires set. + * \brief Create a face on the given wires set. * \param theWires List of closed wires or edges to build the face on. * \param isPlanarWanted If TRUE, only planar face will be built. * If impossible, NULL object will be returned. @@ -1458,35 +1515,35 @@ module GEOM GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted); /*! - * Create a shell from the set of faces and shells. + * \brief Create a shell from the set of faces and shells. * \param theFacesAndShells List of faces and/or shells. * \return New GEOM_Object, containing the created shell. */ GEOM_Object MakeShell (in ListOfGO theFacesAndShells); /*! - * Create a solid, bounded by the given shell. + * \brief Create a solid, bounded by the given shell. * \param theShell Bounding shell. * \return New GEOM_Object, containing the created solid. */ GEOM_Object MakeSolidShell (in GEOM_Object theShell); /*! - * Create a solid, bounded by the given shells. + * \brief Create a solid, bounded by the given shells. * \param theShells Bounding shells. * \return New GEOM_Object, containing the created solid. */ GEOM_Object MakeSolidShells (in ListOfGO theShells); /*! - * Create a compound of the given shapes. + * \brief Create a compound of the given shapes. * \param theShapes List of shapes to put in compound. * \return New GEOM_Object, containing the created compound. */ GEOM_Object MakeCompound (in ListOfGO theShapes); /*! - * Replace coincident faces in theShape by one face. + * \brief Replace coincident faces in theShape by one face. * \param theShape Initial shape. * \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. @@ -1503,7 +1560,7 @@ module GEOM ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance); /*! - * Replace coincident faces in theShape by one face + * \brief Replace coincident faces in theShape by one face * in compliance with given list of faces * \param theShape Initial shape. * \param theTolerance Maximum distance between faces, which can be considered as coincident. @@ -1519,7 +1576,7 @@ module GEOM in boolean doGlueAllEdges); /*! - * Replace coincident edges in theShape by one edge. + * \brief Replace coincident edges in theShape by one edge. * \param theShape Initial shape. * \param theTolerance Maximum distance between edges, which can be considered as coincident. * \return New GEOM_Object, containing a copy of theShape without coincident edges. @@ -1535,7 +1592,7 @@ module GEOM ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance); /*! - * Replace coincident edges in theShape by one edge + * \brief Replace coincident edges in theShape by one edge * in compliance with given list of edges * \param theShape Initial shape. * \param theTolerance Maximum distance between edges, which can be considered as coincident. @@ -1547,7 +1604,7 @@ module GEOM in ListOfGO theEdges); /*! - * Get all sub-shapes and groups of \a theShape, + * \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 @@ -1558,15 +1615,18 @@ module GEOM in boolean theGroupsOnly); /*! - * Deprecated method. Use MakeAllSubShapes() instead. + * \brief Deprecated method. + * + * Use MakeAllSubShapes() instead. */ ListOfGO MakeExplode (in GEOM_Object theShape, in long theShapeType, in boolean isSorted); /*! - * Explode a shape on sub-shapes of a given type. If the - * shape itself has the given type, it is also returned. + * \brief Explode a shape on sub-shapes of a given type. + * + * If the shape itself has the given type, it is also returned. * \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 @@ -1578,7 +1638,7 @@ module GEOM in boolean isSorted); /*! - * Extract all sub-shapes of the given type from + * \brief Extract all sub-shapes of the given type from * the given shape, excluding the shape itself. * \param theShape Shape to be exploded. * \param theShapeType Type of sub-shapes to be retrieved. @@ -1591,16 +1651,17 @@ module GEOM in boolean isSorted); /*! - * Deprecated method. Use GetAllSubShapesIDs() instead. + * \brief Deprecated method. Use GetAllSubShapesIDs() instead. */ ListOfLong SubShapeAllIDs (in GEOM_Object theShape, in long theShapeType, in boolean isSorted); /*! - * Explode a shape on sub-shapes of a given type. + * \brief Explode a shape on sub-shapes of a given type. + * * Does the same, as MakeAllSubShapes, but returns IDs of - * sub-shapes, not GEOM_Objects. It works faster. + * 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 @@ -1612,22 +1673,22 @@ module GEOM in boolean isSorted); /*! - * Get a sub-shape defined by its unique ID inside \a theMainShape + * \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_Objects can has ONLY ONE function. + * \note The sub-shape GEOM_Object can has ONLY ONE function. * Don't try to apply modification operations (without copy) on them. */ GEOM_Object GetSubShape (in GEOM_Object theMainShape, in long theID); /*! - * Get a set of sub-shapes defined by their unique IDs inside \a theMainShape + * \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_Objects, corresponding to found sub-shapes. - * \note The sub-shape GEOM_Objects can has ONLY ONE function. + * \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, @@ -1642,7 +1703,8 @@ module GEOM long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape); /*! - * Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type. + * \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type. + * * Together with method GetShapeTypeString() it can be used * to generate automatic names for sub-shapes, when publishing them in a study. * \param theMainShape Main shape. @@ -1663,21 +1725,21 @@ module GEOM string GetShapeTypeString (in GEOM_Object theShape); /*! - * Count number of faces in the given shape. + * \brief Count number of faces in the given shape. * \param theShape Shape to count faces in. * \return Number of faces in the given shape. */ long NumberOfFaces (in GEOM_Object theShape); /*! - * Count number of edges in the given shape. + * \brief Count number of edges in the given shape. * \param theShape Shape to count edges in. * \return Number of edges in theShape. */ long NumberOfEdges (in GEOM_Object theShape); /*! - * Count number of sub-shapes of type \a theShapeType in the given shape. + * \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. @@ -1693,7 +1755,8 @@ module GEOM GEOM_Object ChangeOrientation (in GEOM_Object theShape); /*! - * Retrieve all free faces from the given shape. + * \brief Retrieve all free faces from the given shape. + * * Free face is a face, which is not shared between two shells of the shape. * \param theShape Shape to find free faces in. * \return List of IDs of all free faces, contained in theShape. @@ -1701,7 +1764,7 @@ module GEOM ListOfLong GetFreeFacesIDs (in GEOM_Object theShape); /*! - * Get all sub-shapes of theShape1 of the given type, shared with theShape2. + * \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2. * \param theShape1 Shape to find sub-shapes in. * \param theShape2 Shape to find shared sub-shapes with. * \param theShapeType Type of sub-shapes to be retrieved. @@ -1712,7 +1775,7 @@ module GEOM in long theShapeType); /*! - * Get all sub-shapes, shared by all shapes in the list \a theShapes. + * \brief Get all sub-shapes, shared by all shapes in the list \a theShapes. * \param theShapes Shapes to find common sub-shapes of. * \param theShapeType Type of sub-shapes to be retrieved. * \return List of objects, that are sub-shapes of all given shapes. @@ -1721,7 +1784,7 @@ module GEOM in long theShapeType); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1735,7 +1798,7 @@ module GEOM in GEOM_Object theAx1, in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \briefFind 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. @@ -1754,7 +1817,7 @@ module GEOM /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1771,7 +1834,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1790,7 +1853,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1806,7 +1869,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1826,7 +1889,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1841,7 +1904,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1858,7 +1921,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1875,7 +1938,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1894,7 +1957,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1910,7 +1973,7 @@ module GEOM in shape_state theState); /*! - * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * \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. @@ -1995,7 +2058,7 @@ module GEOM in shape_state theState); /*! - * Get sub-shape(s) of \a theShapeWhere, which are + * \brief Get sub-shape(s) of \a theShapeWhere, which are * coincident with \a theShapeWhat or could be a part of it. * \param theShapeWhere Shape to find sub-shapes of. * \param theShapeWhat Shape, specifying what to find. @@ -2011,7 +2074,7 @@ module GEOM in GEOM_Object theShapeWhat); /*! - * Get sub-shape(s) of \a theShapeWhere, which are + * \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, @@ -2028,7 +2091,7 @@ module GEOM in GEOM_Object theShapeWhat); /*! - * Get sub-shape of theShapeWhere, which are + * \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. @@ -2038,19 +2101,19 @@ module GEOM in GEOM_Object theShapeWhat); }; + # GEOM_IBlocksOperations: /*! - * GEOM_IBlocksOperations: Interface for Blocks construction + * \brief Interface for Blocks construction * Face from points or edges, Block from faces, * Blocks multi-translation and multi-rotation */ interface GEOM_IBlocksOperations : GEOM_IOperations { - /*! - * Creation of blocks - */ + + # Creation of blocks /*! - * Create a quadrangle face from four edges. Order of Edges is not + * \brief Create a quadrangle face from four edges. Order of Edges is not * important. It is not necessary that edges share the same vertex. * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound. * \return New GEOM_Object, containing the created face. @@ -2061,7 +2124,8 @@ module GEOM in GEOM_Object theEdge4); /*! - * Create a quadrangle face on two edges. + * \brief Create a quadrangle face on two edges. + * * The missing edges will be built by creating the shortest ones. * \param theEdge1,theEdge2 Two opposite edges for the face. * \return New GEOM_Object, containing the created face. @@ -2070,7 +2134,8 @@ module GEOM in GEOM_Object theEdge2); /*! - * Create a quadrangle face with specified corners. + * \brief Create a quadrangle face with specified corners. + * * The missing edges will be built by creating the shortest ones. * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face. * \return New GEOM_Object, containing the created face. @@ -2081,8 +2146,10 @@ module GEOM in GEOM_Object thePnt4); /*! - * Create a hexahedral solid, bounded by the six given faces. Order of - * faces is not important. It is not necessary that Faces share the same edge. + * \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-theFace6 Faces for the hexahedral solid. * \return New GEOM_Object, containing the created solid. */ @@ -2094,7 +2161,8 @@ module GEOM in GEOM_Object theFace6); /*! - * Create a hexahedral solid between two given faces. + * \brief Create a hexahedral solid between two given faces. + * * The missing faces will be built by creating the smallest ones. * \param theFace1,theFace2 Two opposite faces for the hexahedral solid. * \return New GEOM_Object, containing the created solid. @@ -2102,12 +2170,12 @@ module GEOM GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1, in GEOM_Object theFace2); - /*! - * Extract elements of blocks and blocks compounds - */ + + # Extract elements of blocks and blocks compounds + /*! - * Get a vertex, found in the given shape by its coordinates. + * \brief Get a vertex, found in the given shape by its coordinates. * \param theShape Block or a compound of blocks. * \param theX,theY,theZ Coordinates of the sought vertex. * \param theEpsilon Maximum allowed distance between the resulting @@ -2121,7 +2189,7 @@ module GEOM in double theEpsilon); /*! - * Find a vertex of the given shape, which has minimal distance to the given point. + * \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. @@ -2130,7 +2198,7 @@ module GEOM in GEOM_Object thePoint); /*! - * Get an edge, found in the given shape by two given vertices. + * \brief Get an edge, found in the given shape by two given vertices. * \param theShape Block or a compound of blocks. * \param thePoint1,thePoint2 Points, close to the ends of the desired edge. * \return New GEOM_Object, containing the found edge. @@ -2140,7 +2208,7 @@ module GEOM in GEOM_Object thePoint2); /*! - * Find an edge of the given shape, which has minimal distance to the given point. + * \brief Find an edge of the given shape, which has minimal distance to the given point. * \param theShape Block or a compound of blocks. * \param thePoint Point, close to the desired edge. * \return New GEOM_Object, containing the found edge. @@ -2149,7 +2217,7 @@ module GEOM in GEOM_Object thePoint); /*! - * Returns a face, found in the given shape by four given corner vertices. + * \brief Returns a face, found in the given shape by four given corner vertices. * \param theShape Block or a compound of blocks. * \param thePoint1-thePoint4 Points, close to the corners of the desired face. * \return New GEOM_Object, containing the found face. @@ -2161,7 +2229,7 @@ module GEOM in GEOM_Object thePoint4); /*! - * Get a face of block, found in the given shape by two given edges. + * \brief Get a face of block, found in the given shape by two given edges. * \param theShape Block or a compound of blocks. * \param theEdge1,theEdge2 Edges, close to the edges of the desired face. * \return New GEOM_Object, containing the found face. @@ -2171,7 +2239,7 @@ module GEOM in GEOM_Object theEdge2); /*! - * Find a face, opposite to the given one in the given block. + * \brief Find a face, opposite to the given one in the given block. * \param theBlock Must be a hexahedral solid. * \param theFace Face of \a theBlock, opposite to the desired face. * \return New GEOM_Object, containing the found face. @@ -2180,7 +2248,7 @@ module GEOM in GEOM_Object theFace); /*! - * Find a face of the given shape, which has minimal distance to the given point. + * \brief Find a face of the given shape, which has minimal distance to the given point. * \param theShape Block or a compound of blocks. * \param thePoint Point, close to the desired face. * \return New GEOM_Object, containing the found face. @@ -2189,7 +2257,7 @@ module GEOM in GEOM_Object thePoint); /*! - * Find a face of block, whose outside normale has minimal angle with the given vector. + * \brief Find a face of block, whose outside normale has minimal angle with the given vector. * \param theShape Block or a compound of blocks. * \param theVector Vector, close to the normale of the desired face. * \return New GEOM_Object, containing the found face. @@ -2198,7 +2266,7 @@ module GEOM in GEOM_Object theVector); /*! - * Find all sub-shapes of type \a theShapeType of the given shape, + * \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. @@ -2213,12 +2281,11 @@ module GEOM in long theShapeType, in double theTolerance); - /*! - * Extract blocks from blocks compounds - */ + # Extract blocks from blocks compounds + /*! - * Check, if the compound contains only specified blocks. + * \brief Check, if the compound contains only specified blocks. * \param theCompound The compound to check. * \param theMinNbFaces If solid has lower number of faces, it is not a block. * \param theMaxNbFaces If solid has higher number of faces, it is not a block. @@ -2232,7 +2299,7 @@ module GEOM out long theNbBlocks); /*! - * Enumeration of Blocks Compound defects. + * \brief Enumeration of Blocks Compound defects. */ enum BCErrorType { @@ -2253,7 +2320,7 @@ module GEOM }; /*! - * Description of Blocks Compound defect: type and incriminated sub-shapes. + * \brief Description of Blocks Compound defect: type and incriminated sub-shapes. */ struct BCError { @@ -2262,12 +2329,13 @@ module GEOM }; /*! - * Sequence of all Blocks Compound defects. + * \brief Sequence of all Blocks Compound defects. */ typedef sequence BCErrors; /*! - * Check, if the compound of blocks is given. + * \brief Check, if the compound of blocks is given. + * * To be considered as a compound of blocks, the * given shape must satisfy the following conditions: * - Each element of the compound should be a Block (6 faces and 12 edges). @@ -2283,7 +2351,7 @@ module GEOM out BCErrors theErrors); /*! - * Convert sequence of Blocks Compound errors, returned by + * \brief Convert sequence of Blocks Compound errors, returned by * CheckCompoundOfBlocks(), into string. * \param theCompound The bad compound. * \param theErrors The sequence of \a theCompound errors. @@ -2293,7 +2361,8 @@ module GEOM in BCErrors theErrors); /*! - * Remove all seam and degenerated edges from \a theShape. + * \brief Remove all seam and degenerated edges from \a theShape. + * * Unite faces and edges, sharing one surface. * \param theShape The compound or single solid to remove irregular edges from. * \param theOptimumNbFaces If more than zero, unite faces only for those solids, @@ -2306,7 +2375,8 @@ module GEOM in long theOptimumNbFaces); /*! - * Check, if the given shape is a blocks compound. + * \brief Check, if the given shape is a blocks compound. + * * Fix all detected errors. * \note Single block can be also fixed by this method. * \param theCompound The compound to check and improve. @@ -2315,19 +2385,20 @@ module GEOM GEOM_Object CheckAndImprove (in GEOM_Object theCompound); /*! - * Get all the blocks, contained in the given compound. + * \brief Get all the blocks, contained in the given compound. + * * \param theCompound The compound to explode. * \param theMinNbFaces If solid has lower number of faces, it is not a block. * \param theMaxNbFaces If solid has higher number of faces, it is not a block. * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. - * \return List of GEOM_Objects, containing the retrieved blocks. + * \return List of GEOM_Object, containing the retrieved blocks. */ ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, in long theMinNbFaces, in long theMaxNbFaces); /*! - * Find block, containing the given point inside its volume or on boundary. + * \brief Find block, containing the given point inside its volume or on boundary. * \param theCompound Compound, to find block in. * \param thePoint Point, close to the desired block. If the point lays on * boundary between some blocks, we return block with nearest center. @@ -2337,7 +2408,7 @@ module GEOM in GEOM_Object thePoint); /*! - * Find block, containing all the elements, passed as the parts, or maximum quantity of them. + * \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them. * \param theCompound Compound, to find block in. * \param theParts List of faces and/or edges and/or vertices to be parts of the found block. * \return New GEOM_Object, containing the found block. @@ -2346,20 +2417,19 @@ module GEOM in ListOfGO theParts); /*! - * Return all blocks, containing all the elements, passed as the parts. + * \brief Return all blocks, containing all the elements, passed as the parts. * \param theCompound Compound, to find blocks in. * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks. - * \return List of GEOM_Objects, containing the found blocks. + * \return List of GEOM_Object, containing the found blocks. */ ListOfGO GetBlocksByParts (in GEOM_Object theCompound, in ListOfGO theParts); - /*! - * Operations on blocks with gluing of result - */ + # Operations on blocks with gluing of result /*! - * Multi-transformate block and glue the result. + * \brief Multi-transformate block and glue the result. + * * Transformation is defined so, as to superpose theDirFace1 with theDirFace2. * \param theBlock Hexahedral solid to be multi-transformed. * \param theDirFace1 First direction face global index. @@ -2375,7 +2445,7 @@ module GEOM in long theNbTimes); /*! - * Multi-transformate block and glue the result. + * \brief Multi-transformate block and glue the result. * \param theBlock Hexahedral solid to be multi-transformed. * \param theDirFace1U,theDirFace2U Direction faces for the first transformation. * \param theDirFace1V,theDirFace2V Direction faces for the second transformation. @@ -2390,28 +2460,29 @@ module GEOM in long theDirFace2V, in long theNbTimesV); - /*! - * Special operation - propagation - */ + # Special operation - propagation + /*! - * Build all possible propagation groups. + * \brief Build all possible propagation groups. + * * Propagation group is a set of all edges, opposite to one (main) * edge of this group directly or through other opposite edges. * Notion of Opposite Edge make sence only on quadrangle face. * \param theShape Shape to build propagation groups on. - * \return List of GEOM_Objects, each of them is a propagation group. + * \return List of GEOM_Object, each of them is a propagation group. */ ListOfGO Propagate (in GEOM_Object theShape); }; + # GEOM_IBooleanOperations /*! - * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common) + * \brief Interface for boolean operations (Cut, Fuse, Common) */ interface GEOM_IBooleanOperations : GEOM_IOperations { /*! - * Perform one of boolean operations on two given shapes. + * \brief Perform one of boolean operations on two given shapes. * \param theShape1 First argument for boolean operation. * \param theShape2 Second argument for boolean operation. * \param theOperation Indicates the operation to be done: @@ -2423,7 +2494,8 @@ module GEOM in long theOperation); /*! - * Perform partition operation. + * \brief Perform partition operation. + * * \param theShapes Shapes to be intersected. * \param theTools Shapes to intersect theShapes. * \note Each compound from ListShapes and ListTools will be exploded in order @@ -2457,7 +2529,8 @@ module GEOM in short theKeepNonlimitShapes); /*! - * Perform partition operation. + * \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. @@ -2479,7 +2552,7 @@ module GEOM in short theKeepNonlimitShapes); /*! - * Perform partition of the Shape with the Plane + * \brief Perform partition of the Shape with the Plane * \param theShape Shape to be intersected. * \param thePlane Tool shape, to intersect theShape. * \return New GEOM_Object, containing the result shape. @@ -2488,14 +2561,16 @@ module GEOM in GEOM_Object thePlane); }; + # GEOM_ICurvesOperations: /*! - * GEOM_ICurvesOperations: Interface for curves creation. + * \brief Interface for curves creation. + * * Polyline, Circle, Spline (Bezier and Interpolation) */ interface GEOM_ICurvesOperations : GEOM_IOperations { /*! - * Create a circle with given center, normal vector and radius. + * \brief Create a circle with given center, normal vector and radius. * \param thePnt Circle center. * \param theVec Vector, normal to the plane of the circle. * \param theR Circle radius. @@ -2505,7 +2580,7 @@ module GEOM in GEOM_Object theVec, in double theR); /*! - * Create a circle, passing through three given points + * \brief Create a circle, passing through three given points * \param thePnt1,thePnt2,thePnt3 Points, defining the circle. * \return New GEOM_Object, containing the created circle. */ @@ -2513,7 +2588,7 @@ module GEOM in GEOM_Object thePnt2, in GEOM_Object thePnt3); /*! - * Create a circle with given center, with a radius equals the distance from center to Point1 + * \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. @@ -2522,7 +2597,7 @@ module GEOM in GEOM_Object thePnt2, in GEOM_Object thePnt3); /*! - * Create an ellipse with given center, normal vector and radiuses. + * \brief Create an ellipse with given center, normal vector and radiuses. * \param thePnt Ellipse center. * \param theVec Vector, normal to the plane of the ellipse. * \param theRMajor Major ellipse radius. @@ -2535,7 +2610,7 @@ module GEOM in double theRMinor); /*! - * Create an ellipse with given center, normal vector, main axis vector and radiuses. + * \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. @@ -2550,7 +2625,7 @@ module GEOM in GEOM_Object theVecMaj); /*! - * Create an arc of circle, passing through three given points. + * \brief Create an arc of circle, passing through three given points. * \param thePnt1 Start point of the arc. * \param thePnt2 Middle point of the arc. * \param thePnt3 End point of the arc. @@ -2561,7 +2636,7 @@ module GEOM in GEOM_Object thePnt3); /*! - * Create an arc of circle of center C from one point to another + * \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. @@ -2574,7 +2649,7 @@ module GEOM in boolean theSense); /*! - * Create an arc of ellipse of center C and two points P1 P2. + * \brief Create an arc of ellipse of center C and two points P1 P2. * \param theCenter Center point of the arc. * \param thePnt1 Major radius is distance from center to Pnt1. * \param thePnt2 define a plane and Minor radius as a shortest @@ -2587,7 +2662,7 @@ module GEOM /*! - * Create a polyline on the set of points. + * \brief Create a polyline on the set of points. * \param thePoints Sequence of points for the polyline. * \param theIsClosed If TRUE, build a closed wire. * \return New GEOM_Object, containing the created polyline. @@ -2596,7 +2671,7 @@ module GEOM in boolean theIsClosed); /*! - * Create bezier curve on the set of points. + * \brief Create bezier curve on the set of points. * \param thePoints Sequence of points for the bezier curve. * \param theIsClosed If TRUE, build a closed curve. * \return New GEOM_Object, containing the created bezier curve. @@ -2605,7 +2680,7 @@ module GEOM in boolean theIsClosed); /*! - * Create B-Spline curve on the set of points. + * \brief Create B-Spline curve on the set of points. * \param thePoints Sequence of points for the B-Spline curve. * \param theIsClosed If TRUE, build a closed curve. * \param theDoReordering If TRUE, the algo does not follow the order of @@ -2617,7 +2692,7 @@ module GEOM in boolean theDoReordering); /*! - * Creates a curve using the parametric definition of the basic points. + * \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. @@ -2636,7 +2711,7 @@ module GEOM in curve_type theCurveType); /*! - * Creates a curve using the parametric definition of the basic points. + * \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. @@ -2655,8 +2730,9 @@ module GEOM in curve_type theCurveType); /*! - * Create a sketcher (wire or face), following the textual description, - * passed through \a theCommand argument. \n + * \brief Create a sketcher (wire or face), following the textual description, + * passed through \a theCommand argument. + * * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n * Format of the description string have to be the following: * @@ -2691,8 +2767,9 @@ module GEOM GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane); /*! - * Create a 3D sketcher, following the numerical description, - * passed through points created by \a theCoordinates argument. \n + * \brief Create a 3D sketcher, following the numerical description, + * passed through points created by \a theCoordinates argument. + * * Format of the description string have to be the following: * * "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]" @@ -2701,8 +2778,9 @@ module GEOM GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates); /*! - * Create a sketcher (wire or face), following the textual description, - * passed through \a theCommand argument. \n + * \brief Create a sketcher (wire or face), following the textual description, + * passed through \a theCommand argument. + * * For format of the description string see the previous method.\n * \param theCommand String, defining the sketcher in local * coordinates of the working plane. @@ -2712,13 +2790,14 @@ module GEOM GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane); }; + # GEOM_ILocalOperations: /*! - * GEOM_ILocalOperations: Interface for fillet and chamfer creation. + * \brief Interface for fillet and chamfer creation. */ interface GEOM_ILocalOperations : GEOM_IOperations { /*! - * Perform a fillet on all edges of the given shape. + * \brief Perform a fillet on all edges of the given shape. * \param theShape Shape, to perform fillet on. * \param theR Fillet radius. * \return New GEOM_Object, containing the result shape. @@ -2727,7 +2806,7 @@ module GEOM in double theR); /*! - * Perform a fillet on the specified edges of the given shape + * \brief Perform a fillet on the specified edges of the given shape * \param theShape Shape, to perform fillet on. * \param theR Fillet radius. * \param theEdges Global indices of edges to perform fillet on. @@ -2744,7 +2823,7 @@ module GEOM in ListOfLong theEdges); /*! - * Perform a fillet on all edges of the specified faces of the given shape. + * \brief Perform a fillet on all edges of the specified faces of the given shape. * \param theShape Shape, to perform fillet on. * \param theR Fillet radius. * \param theFaces Global indices of faces to perform fillet on. @@ -2762,7 +2841,7 @@ module GEOM in ListOfLong theFaces); /*! - * Perform a fillet on a face or a shell at the specified vertexes. + * \brief Perform a fillet on a face or a shell at the specified vertexes. * \param theShape Shape, to perform fillet on. * \param theR Fillet radius. * \param theVertexes Global indices of vertexes to perform fillet on. @@ -2775,7 +2854,7 @@ module GEOM in ListOfLong theVertexes); /*! - * Perform a fillet on edges of the specified vertexes of the given wire. + * \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. @@ -2790,7 +2869,7 @@ module GEOM in ListOfLong theVertexes); /*! - * Perform a symmetric chamfer on all edges of the given shape. + * \brief Perform a symmetric chamfer on all edges of the given shape. * \param theShape Shape, to perform chamfer on. * \param theD Chamfer size along each face. * \return New GEOM_Object, containing the result shape. @@ -2799,7 +2878,7 @@ module GEOM in double theD); /*! - * Perform a chamfer on edges, common to the specified faces. + * \brief Perform a chamfer on edges, common to the specified faces. * with distance D1 on the Face1 * \param theShape Shape, to perform chamfer on. * \param theD1 Chamfer size along \a theFace1. @@ -2813,7 +2892,7 @@ module GEOM in double theD1, in double theD2, in long theFace1, in long theFace2); /*! - * The Same but with params theD = Chamfer Lenght + * \brief The Same but with params theD = Chamfer Lenght * and theAngle = Chamfer Angle (Angle in radians) */ GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape, @@ -2821,7 +2900,7 @@ module GEOM in long theFace1, in long theFace2); /*! - * Perform a chamfer on all edges of the specified faces. + * \brief Perform a chamfer on all edges of the specified faces. * with distance D1 on the first specified face (if several for one edge) * \param theShape Shape, to perform chamfer on. * \param theD1 Chamfer size along face from \a theFaces. If both faces, @@ -2845,7 +2924,7 @@ module GEOM in ListOfLong theFaces); /*! - * Perform a chamfer on edges, + * \brief Perform a chamfer on edges, * with distance D1 on the first specified face (if several for one edge) * \param theShape Shape, to perform chamfer on. * \param theD1 theD2 Chamfer size @@ -2864,7 +2943,7 @@ module GEOM in ListOfLong theEdges); /*! - * Perform an Archimde operation on the given shape with given parameters. + * \brief Perform an Archimde operation on the given shape with given parameters. * The object presenting the resulting face is returned * \param theShape Shape to be put in water. * \param theWeight Weight og the shape. @@ -2879,20 +2958,23 @@ module GEOM in double theMeshDeflection); /*! - * Duplicates GEOM_IShapesOperations.GetSubShapeIndex(). + * \brief Duplicates GEOM_IShapesOperations.GetSubShapeIndex(). + * * Present here only for compatibility. */ long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape); }; + # GEOM_IHealingOperations: /*! - * GEOM_IHealingOperations: Interface for shape healing operations. + * \brief Interface for shape healing operations + * * Shape Processing, SuppressFaces, etc. */ interface GEOM_IHealingOperations : GEOM_IOperations { /*! - * Apply a sequence of Shape Healing operators to the given object. + * \brief Apply a sequence of Shape Healing operators to the given object. * \param theShapes Shape to be processed. * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.). * \param theParameters List of names of parameters @@ -2907,8 +2989,10 @@ module GEOM in string_array theValues); /*! - * Get default sequence of operators, their parameters and parameters' values - * of Shape Process operation. In the current implementation the defaults are + * \brief Get default sequence of operators, their parameters and parameters' values + * of Shape Process operation. + * + * In the current implementation the defaults are * read from the file pointed by CSF_ShHealingDefaults environmental variable. * \param theOperators Output. Default list of names of operators. * \param theParameters Output. Default list of names of parameters. @@ -2919,7 +3003,8 @@ module GEOM out string_array theParameters, out string_array theValues); /*! - * Get parameters and parameters' values for the given Shape Process operation. + * \brief Get parameters and parameters' values for the given Shape Process operation. + * * In the current implementation the defaults are * read from the file pointed by CSF_ShHealingDefaults environmental variable. * \param theOperator Input. The operator's name. @@ -2932,7 +3017,7 @@ module GEOM out string_array theValues); /*! - * Remove faces from the given object (shape). + * \brief Remove faces from the given object (shape). * \param theObject Shape to be processed. * \param theFaces Indices of faces to be removed, if EMPTY then the method * removes ALL faces of the given object. @@ -2941,7 +3026,7 @@ module GEOM GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces); /*! - * Close an open wire. + * \brief Close an open wire. * \param theObject Shape to be processed. * \param theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, * if -1, then theObject itself is a wire. @@ -2953,7 +3038,7 @@ module GEOM in boolean isCommonVertex); /*! - * Remove internal wires and edges from the given object (face). + * \brief Remove internal wires and edges from the given object (face). * \param theObject Shape to be processed. * \param theWires Indices of wires to be removed, if EMPTY then the method * removes ALL internal wires of the given object. @@ -2962,7 +3047,7 @@ module GEOM GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires); /*! - * Remove internal closed contours (holes) from the given object. + * \brief Remove internal closed contours (holes) from the given object. * \param theObject Shape to be processed. * \param theWires Indices of wires to be removed, if EMPTY then the method * removes ALL internal holes of the given object @@ -2979,7 +3064,7 @@ module GEOM GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance); /*! - * Addition of a point to a given edge object. + * \brief Addition of a point to a given edge object. * \param theObject Shape to be processed. * \param theEdgeIndex Index of edge to be divided within theObject's shape, * if -1, then theObject itself is the edge. @@ -2993,7 +3078,7 @@ module GEOM in double theValue, in boolean isByParameter); /*! - * Get a list of wires (wrapped in GEOM_Object-s), + * \brief Get a list of wires (wrapped in GEOM_Object-s), * that constitute a free boundary of the given shape. * \param theObject Shape to get free boundary of. * \param theClosedWires Output. Closed wires on the free boundary of the given shape. @@ -3005,7 +3090,7 @@ module GEOM out ListOfGO theOpenWires); /*! - * Change orientation of the given object. + * \brief Change orientation of the given object. * \param theObject Shape to be processed. * \return New GEOM_Object, containing processed shape. */ @@ -3013,7 +3098,7 @@ module GEOM GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject); /*! - * Try to limit tolerance of the given object by value \a theTolerance. + * \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. @@ -3022,19 +3107,20 @@ module GEOM }; + # GEOM_IInsertOperations: /*! - * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import). + * \brief Interface for shape insert operations (like copy, import). * */ interface GEOM_IInsertOperations : GEOM_IOperations { /*! - * Create a copy of the given object + * \brief Create a copy of the given object */ GEOM_Object MakeCopy (in GEOM_Object theOriginal); /*! - * Export the given shape into a file with given name. + * \brief Export the given shape into a file with given name. * \param theObject Shape to be stored in the file. * \param theFileName Name of the file to store the given shape in. * \param theFormatName Specify format for the shape storage. @@ -3043,7 +3129,7 @@ module GEOM void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName); /*! - * Import a shape from the BRep or IGES or STEP file + * \brief Import a shape from the BRep or IGES or STEP file * (depends on given format) with given name. * \param theFileName The file, containing the shape. * \param theFormatName Specify format for the file reading. @@ -3055,7 +3141,7 @@ module GEOM GEOM_Object ImportFile (in string theFileName, in string theFormatName); /*! - * Get the supported import formats and corresponding patterns for File dialog. + * \brief Get the supported import formats and corresponding patterns for File dialog. * \param theFormats Output. List of formats, available for import. * \param thePatterns Output. List of file patterns, corresponding to available formats. * \return Returns available formats and patterns through the arguments. @@ -3064,7 +3150,7 @@ module GEOM out string_array thePatterns); /*! - * Get the supported export formats and corresponding patterns for File dialog. + * \brief Get the supported export formats and corresponding patterns for File dialog. * \param theFormats Output. List of formats, available for export. * \param thePatterns Output. List of file patterns, corresponding to available formats. * \return Returns available formats and patterns through the arguments. @@ -3073,14 +3159,14 @@ module GEOM out string_array thePatterns); /*! - * Load texture from file + * \brief Load texture from file * \param theTextureFile texture file name * \return unique texture identifier */ long LoadTexture(in string theTextureFile); /*! - * Add texture to the study + * \brief Add texture to the study * \param theWidth texture width in pixels * \param theHeight texture height in pixels * \param theTexture texture byte array @@ -3089,7 +3175,7 @@ module GEOM long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture); /*! - * Get previously loaded texture data + * \brief Get previously loaded texture data * \param theID texture identifier * \param theWidth texture width in pixels * \param theHeight texture height in pixels @@ -3098,69 +3184,96 @@ module GEOM SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight); /*! - * Get list of all avaiable texture IDs + * \brief Get list of all avaiable texture IDs * \return list of all texture IDs avaiable for the current study */ ListOfLong GetAllTextures(); }; + # GEOM_IKindOfShape: /*! - * GEOM_IKindOfShape: namespace for shape_kind enumeration. + * \brief Interface for shape_kind enumeration. */ interface GEOM_IKindOfShape { enum shape_kind { NO_SHAPE, - // COMPOSITEs + //COMPOSITEs COMPOUND, COMPSOLID, SHELL, WIRE, // SOLIDs - SPHERE, // full sphere - CYLINDER, // cylinder - BOX, // box with faces, parallel to global coordinate planes - ROTATED_BOX, // other box - TORUS, // full torus - CONE, // cone - POLYHEDRON, // solid, bounded by polygons - SOLID, // other solid + /*! 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 - SPHERE2D, // spherical face (closed) - CYLINDER2D, // cylindrical face with defined height - TORUS2D, // toroidal face (closed) - CONE2D, // conical face with defined height - DISK_CIRCLE, // planar, bounded by circle - DISK_ELLIPSE, // planar, bounded by ellipse - POLYGON, // planar, bounded by segments - PLANE, // infinite planar - PLANAR, // other planar - FACE, // other face + /*! 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 - CIRCLE, // full circle - ARC_CIRCLE, // arc of circle - ELLIPSE, // full ellipse - ARC_ELLIPSE, // arc of ellipse - LINE, // infinite segment - SEGMENT, // segment - EDGE, // other edge + /*! full circle */ + CIRCLE, + /*! arc of circle */ + ARC_CIRCLE, + /*! full ellipse */ + ELLIPSE, + /*! arc of ellipse */ + ARC_ELLIPSE, + /*! infinite segment */ + LINE, + /*! segment */ + SEGMENT, + /*! other edge */ + EDGE, // VERTEX VERTEX, // ADVANCED shapes - ADVANCED // all advanced shapes (temporary implementation) + /*! all advanced shapes (temporary implementation) */ + ADVANCED }; }; - + # GEOM_IMeasureOperations: /*! - * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and + * \brief Interface for measurement (distance, whatis) and * properties calculation (like Centre of Mass, Inertia, etc.). * */ interface GEOM_IMeasureOperations : GEOM_IOperations { /*! - * Get kind of theShape. + * \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.) @@ -3175,7 +3288,7 @@ module GEOM out ListOfDouble theDoubles); /*! - * Get position (LCS) of theShape. + * \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. @@ -3191,7 +3304,7 @@ module GEOM out double Xx, out double Xy, out double Xz); /*! - * Get summarized length of all wires, + * \brief Get summarized length of all wires, * area of surface and volume of the given shape. * \param theShape Shape to define properties of. * \param theLength Output. Summarized length of all wires of the given shape. @@ -3205,7 +3318,7 @@ module GEOM out double theVolume); /*! - * Get a point, situated at the centre of mass of theShape. + * \brief Get a point, situated at the centre of mass of theShape. * \param theShape Shape to define centre of mass of. * \return New GEOM_Object, containing the created point. */ @@ -3220,7 +3333,7 @@ module GEOM GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index ); /*! - * Get a vector, representing the normal of theFace. + * \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. @@ -3231,7 +3344,7 @@ module GEOM in GEOM_Object theOptionalPoint); /*! - * Get inertia matrix and moments of inertia of theShape. + * \brief Get inertia matrix and moments of inertia of theShape. * \param theShape Shape to calculate inertia of. * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape. * \param Ix,Iy,Iz Output. Moments of inertia of the given shape. @@ -3244,7 +3357,7 @@ module GEOM out double Ix , out double Iy , out double Iz); /*! - * Get parameters of bounding box of the given shape + * \brief Get parameters of bounding box of the given shape * \param theShape Shape to obtain bounding box of. * \param Xmin,Xmax Output. Limits of shape along OX axis. * \param Ymin,Ymax Output. Limits of shape along OY axis. @@ -3257,7 +3370,7 @@ module GEOM out double Zmin, out double Zmax); /*! - * Get min and max tolerances of sub-shapes of theShape + * \brief Get min and max tolerances of sub-shapes of theShape * \param theShape Shape, to get tolerances of. * \param FaceMin,FaceMax Output. Min and max tolerances of the faces. * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges. @@ -3270,7 +3383,7 @@ module GEOM out double VertMin, out double VertMax); /*! - * Check a topology of the given shape. + * \brief Check a topology of the given shape. * \param theShape Shape to check validity of. * \param theDescription Output. Description of problems in the shape, if they are. * \return TRUE, if the shape "seems to be valid" from the topological point of view. @@ -3279,7 +3392,7 @@ module GEOM out string theDescription); /*! - * Check a topology and a geometry of the given shape. + * \brief Check a topology and a geometry of the given shape. * \param theShape Shape to check validity of. * \param theDescription Output. Description of problems in the shape, if they are. * \return TRUE, if the shape "seems to be valid". @@ -3288,7 +3401,7 @@ module GEOM out string theDescription); /*! - * Check a topology of the given shape on self-intersections presence. + * \brief Check a topology of the given shape on self-intersections presence. * \param theShape Shape to check validity of. * \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs. * \return TRUE, if the shape does not have any self-intersections. @@ -3297,21 +3410,21 @@ module GEOM out ListOfLong theIntersections); /*! - * Check if the given shape can be an argument for MakeSolid operation + * \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); /*! - * Obtain description of the given shape + * O\brief btain description of the given shape * \param theShape Shape to be described. * \return Description of the given shape. */ string WhatIs (in GEOM_Object theShape); /*! - * Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on + * \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. @@ -3321,7 +3434,7 @@ module GEOM ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance); /*! - * Get minimal distance between the given shapes. + * \brief Get minimal distance between the given shapes. * \param theShape1,theShape2 Shapes to find minimal distance between. * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2. * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1. @@ -3332,26 +3445,26 @@ module GEOM out double X2, out double Y2, out double Z2); /*! - * Get angle between the given lines or linear edges. + * \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); /*! - * Get angle between the given vectors. + * \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); /*! - * Get point coordinates + * \brief Get point coordinates */ void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z); /*! - * Get radius of curvature of curve in the point determinated by param + * \brief Get radius of curvature of curve in the point determinated by param * \param theShape - curve. * \param theParam - parameter on curve * \return Value of curvature. @@ -3359,7 +3472,7 @@ module GEOM double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam); /*! - * Get radius of curvature of curve in the given point + * \brief Get radius of curvature of curve in the given point * \param theShape - curve. * \param thePoint - point * \return Value of curvature. @@ -3367,7 +3480,7 @@ module GEOM double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint); /*! - * Get max radius of curvature of surface in the point determinated by params + * \brief Get max radius of curvature of surface in the point determinated by params * \param theShape - surface. * \param theUParam - U-parameter on surface * \param theVParam - V-parameter on surface @@ -3377,7 +3490,7 @@ module GEOM in double theVParam); /*! - * Get max radius of curvature of surface in the given point + * \brief Get max radius of curvature of surface in the given point * \param theShape - surface. * \param thePoint - point * \return Value of curvature. @@ -3385,7 +3498,7 @@ module GEOM double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint); /*! - * Get min radius of curvature of surface in the point determinated by params + * \brief Get min radius of curvature of surface in the point determinated by params * \param theShape - surface. * \param theUParam - U-parameter on surface * \param theVParam - V-parameter on surface @@ -3395,7 +3508,7 @@ module GEOM in double theVParam); /*! - * Get min radius of curvature of surface in the given point + * \brief Get min radius of curvature of surface in the given point * \param theShape - surface. * \param thePoint - point * \return Value of curvature. @@ -3404,22 +3517,22 @@ module GEOM }; - + # GEOM_IGroupOperations: /*! - * GEOM_IGroupOperations: Interface for groups creation. + * \brief Interface for groups creation. */ interface GEOM_IGroupOperations : GEOM_IOperations { /*! - * Creates a new group which will store sub-shapes of theMainShape - * \param theMainShape is a GEOM object on which the group is selected + * \brief Creates a new group which will store sub-shapes of theMainShape + * \param theMainShape is a GEOM_Object on which the group is selected * \param theShapeType defines a shape type of the group * \return a newly created GEOM group */ GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType); /*! - * Adds a sub-object with ID theSubShapeId to the group + * \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 GEOM_IShapesOperations.GetSubShapeIndex() to get an ID by the sub-shape @@ -3427,7 +3540,7 @@ module GEOM void AddObject (in GEOM_Object theGroup, in long theSubShapeId); /*! - * Removes a sub-object with ID \a theSubShapeId from the group + * \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 GEOM_IShapesOperations.GetSubShapeIndex() to get an ID by the sub-shape @@ -3435,62 +3548,63 @@ module GEOM void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId); /*! - * Adds to the group all the given shapes. No errors, if some shapes are alredy included. + * \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); /*! - * Removes from the group all the given shapes. No errors, if some shapes are not included. + * \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); /*! - * Adds to the group all the given shapes. No errors, if some shapes are alredy included. + * \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); /*! - * Removes from the group all the given shapes. No errors, if some shapes are not included. + * \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); /*! - * Returns a type of sub-objects stored in the group + * \brief Returns a type of sub-objects stored in the group * \param theGroup is a GEOM group which type is returned. */ long GetType (in GEOM_Object theGroup); /*! - * Returns a main shape associated with the group + * \brief Returns a main shape associated with the group * \param theGroup is a GEOM group for which a main shape object is requested - * \return a GEOM object which is a main shape for theGroup + * \return a GEOM_Object which is a main shape for theGroup */ GEOM_Object GetMainShape (in GEOM_Object theGroup); /*! - * Returns a list of sub-objects ID stored in the group + * \brief Returns a list of sub-objects ID stored in the group * \param theGroup is a GEOM group for which a list of IDs is requested */ ListOfLong GetObjects (in GEOM_Object theGroup); }; - + # GEOM_IAdvancedOperations: /*! - * GEOM_IAdvancedOperations: Interface for advanced modeling functions. + * \brief Interface for advanced modeling functions. */ interface GEOM_IAdvancedOperations : GEOM_IOperations { /*! - * Create a T-shape object with specified caracteristics for the main and + * \brief Create a T-shape object with specified caracteristics for the main and * the incident pipes (radius, width, half-length). + * * Center of the shape is (0,0,0). The main plane of the T-shape is XOY. * \param theR1 Internal radius of main pipe * \param theW1 Width of main pipe @@ -3499,14 +3613,15 @@ module GEOM * \param theW2 Width of incident pipe (R2+W2 < R1+W1) * \param theL2 Half-length of incident pipe * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true) - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, in boolean theHexMesh); /*! - * Create a T-shape object with specified caracteristics for the main and + * \brief Create a T-shape object with specified caracteristics for the main and * the incident pipes (radius, width, half-length). + * * The extremities of the main pipe are located on junctions points P1 and P2. * The extremity of the incident pipe is located on junction point P3. * \param theR1 Internal radius of main pipe @@ -3519,16 +3634,17 @@ module GEOM * \param theP1 1st junction point of main pipe * \param theP2 2nd junction point of main pipe * \param theP3 Junction point of incident pipe - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, in boolean theHexMesh, in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); /*! - * Create a T-shape object with specified caracteristics for the main and + * \brief Create a T-shape object with specified caracteristics for the main and * the incident pipes (radius, width, half-length). A chamfer is created * on the junction of the pipes. + * * Center of the shape is (0,0,0). The main plane of the T-shape is XOY. * \param theR1 Internal radius of main pipe * \param theW1 Width of main pipe @@ -3539,15 +3655,16 @@ module GEOM * \param theH Height of the chamfer. * \param theW Width of the chamfer. * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true) - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, in double theH, in double theW, in boolean theHexMesh); /*! - * Create a T-shape object with specified caracteristics for the main and - * the incident pipes (radius, width, half-length). A chamfer is created - * on the junction of the pipes. + * \brief Create a T-shape object with specified caracteristics for the main and + * the incident pipes (radius, width, half-length). + * + * A chamfer is created on the junction of the pipes. * The extremities of the main pipe are located on junctions points P1 and P2. * The extremity of the incident pipe is located on junction point P3. * \param theR1 Internal radius of main pipe @@ -3562,16 +3679,17 @@ module GEOM * \param theP1 1st junction point of main pipe * \param theP2 2nd junction point of main pipe * \param theP3 Junction point of incident pipe - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, in double theH, in double theW, in boolean theHexMesh, in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); /*! - * Create a T-shape object with specified caracteristics for the main and - * the incident pipes (radius, width, half-length). A fillet is created - * on the junction of the pipes. + * \brief Create a T-shape object with specified caracteristics for the main and + * the incident pipes (radius, width, half-length). + * + * A fillet is created on the junction of the pipes. * Center of the shape is (0,0,0). The main plane of the T-shape is XOY. * \param theR1 Internal radius of main pipe * \param theW1 Width of main pipe @@ -3581,15 +3699,16 @@ module GEOM * \param theL2 Half-length of incident pipe * \param theRF Radius of curvature of fillet. * \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true) - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, in double theRF, in boolean theHexMesh); /*! - * Create a T-shape object with specified caracteristics for the main and - * the incident pipes (radius, width, half-length). A fillet is created - * on the junction of the pipes. + * \brief Create a T-shape object with specified caracteristics for the main and + * the incident pipes (radius, width, half-length). + * + * A fillet is created on the junction of the pipes. * The extremities of the main pipe are located on junctions points P1 and P2. * The extremity of the incident pipe is located on junction point P3. * \param theR1 Internal radius of main pipe @@ -3603,7 +3722,7 @@ module GEOM * \param theP1 1st junction point of main pipe * \param theP2 2nd junction point of main pipe * \param theP3 Junction point of incident pipe - * \return List of GEOM_Objects, containing the created shape and propagation groups. + * \return List of GEOM_Object, containing the created shape and propagation groups. */ ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1, in double theR2, in double theW2, in double theL2, @@ -3612,14 +3731,16 @@ module GEOM /*@@ insert new functions before this line @@ do not remove this line @@*/ }; + # GEOM_Gen: /*! - * GEOM_Gen: Interface to access other GEOM interfaces. - * Also contains some methods to access and manage GEOM objects. + * \brief Interface to access other GEOM interfaces. + * + * Also contains some methods to access and manage GEOM_Object. */ interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver { /*! - * Undo/Redo Management + * \brief Undo/Redo Management */ void Undo (in long theStudyID); @@ -3627,7 +3748,8 @@ module GEOM void Redo (in long theStudyID); /*! - * Publishing management + * \brief Publishing management + * * Adds in theStudy a object theObject under with a name theName, * if theFather is not NULL the object is placed under thFather's SObject. * Returns a SObject where theObject is placed @@ -3638,11 +3760,12 @@ module GEOM in GEOM_Object theFather); /*! - * Publish sub-shapes, standing for arguments and sub-shapes of arguments + * \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 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 @@ -3668,11 +3791,12 @@ module GEOM in boolean theAddPrefix); /*! - * Publish sub-shapes, standing for arguments and sub-shapes of arguments + * \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 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 @@ -3698,10 +3822,11 @@ module GEOM in boolean theAddPrefix); /*! - * Publish sub-shapes, standing for arguments and sub-shapes of arguments + * \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 theSObject study object, referencing GEOM object, arguments of which will be published + * \param theSObject study object, referencing GEOM_Object, arguments of which will be published */ ListOfGO RestoreSubShapesSO (in SALOMEDS::Study theStudy, in SALOMEDS::SObject theSObject, @@ -3710,9 +3835,8 @@ module GEOM in boolean theInheritFirstArg, in boolean theAddPrefix); - /*! - * Methods to access interfaces for objects creation and transformation - */ + # Methods to access interfaces for objects creation and transformation + GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception); GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception); GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception); @@ -3727,63 +3851,60 @@ module GEOM GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception); GEOM_IAdvancedOperations GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception); - /*! - * Objects Management - */ + # Objects Management + /*! - * Removes the object from the GEOM component - * \param theObject is a GEOM object to be removed + * \brief Removes the object from the GEOM component + * \param theObject is a GEOM_Object to be removed */ void RemoveObject (in GEOM_Object theObject); /*! - * Returns an object defined by the study and its entry in the GEOM component + * \brief Returns an object defined by the study and its entry in the GEOM component * \param theStudyID is a SALOMEDS Study ID - * \param theEntry is an entry of the requested GEOM object in the GEOM component - * \note if the object has not previously been created a NULL GEOM object is returned + * \param theEntry is an entry of the requested GEOM_Object in the GEOM component + * \note if the object has not previously been created a NULL GEOM_Object is returned */ GEOM_Object GetObject (in long theStudyID, in string theEntry); /*! - * Add a sub-shape defined by indices in \a theIndices + * \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_Objects can has ONLY ONE function. + * \note The sub-shape GEOM_Object can has ONLY ONE function. * Don't try to apply modification operations on them. * \note Internal method */ GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices); + # GEOM_Objects IOR Management + /*! - * GEOM object's IOR Management - */ - - /*! - * Returns a GEOM Object defined by its IOR - * \param theIOR a string containg an IOR of the requested GEOM object + * \brief Returns a GEOM_Object defined by its IOR + * \param theIOR a string containg an IOR of the requested GEOM_Object */ GEOM_Object GetIORFromString (in string theIOR); /*! - * Returns a string which contains an IOR of the GEOM object - * \param theObject is a GEOM object which IOR is requested + * \brief Returns a string which contains an IOR of the GEOM_Object + * \param theObject is a GEOM_Object which IOR is requested */ string GetStringFromIOR (in GEOM_Object theObject); /*! - * Returns a name with which a GEOM object was dumped into python script - * \param theStudyEntry is an entry of the GEOM object in the study + * \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); /*! - * Returns all names with which a GEOM objects was dumped + * \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(); /*! - * Publishes the named sub-shapes of given object in the study. + * \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 */ diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 502b9f219..31cc24710 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -82,7 +82,8 @@ from salome_notebook import * import GEOM import math -## Enumeration ShapeType as a dictionary +## Enumeration ShapeType as a dictionary. \n +## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details. # @ingroup l1_geompy_auxiliary ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} @@ -188,6 +189,21 @@ def ParseSketcherCommand(command): ## @return data packed to the byte stream ## @ingroup l1_geompy_auxiliary def PackData(data): + """ + Helper function which can be used to pack the passed string to the byte data. + Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes. + If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception. + + Parameters: + data unpacked data - a string containing '1' and '0' symbols + + Returns: + data packed to the byte stream + + Example of usage: + val = PackData("10001110") # val = 0xAE + val = PackData("1") # val = 0x80 + """ bytes = len(data)/8 if len(data)%8: bytes += 1 res = "" @@ -226,6 +242,28 @@ def PackData(data): ## @return sequence of tree values: texture's width, height in pixels and its byte stream ## @ingroup l1_geompy_auxiliary def ReadTexture(fname): + """ + Read bitmap texture from the text file. + In that file, any non-zero symbol represents '1' opaque pixel of the bitmap. + A zero symbol ('0') represents transparent pixel of the texture bitmap. + The function returns width and height of the pixmap in pixels and byte stream representing + texture bitmap itself. + This function can be used to read the texture to the byte stream in order to pass it to + the AddTexture() function of geompy class. + + Parameters: + fname texture file name + + Returns: + sequence of tree values: texture's width, height in pixels and its byte stream + + Example of usage: + import geompy + geompy.init_geom(salome.myStudy) + texture = geompy.readtexture('mytexture.dat') + texture = geompy.AddTexture(*texture) + obj.SetMarkerTexture(texture) + """ try: f = open(fname) lines = [ l.strip() for l in f.readlines()] @@ -260,19 +298,68 @@ def ReadTexture(fname): ## Returns a long value from enumeration type # Can be used for CORBA enumerator types like GEOM.shape_type +# @param theItem enumeration type # @ingroup l1_geompy_auxiliary def EnumToLong(theItem): + """ + Returns a long value from enumeration type + Can be used for CORBA enumerator types like geompy.ShapeType + + Parameters: + theItem enumeration type + """ ret = theItem if hasattr(theItem, "_v"): ret = theItem._v return ret -## Kinds of shape enumeration +## Kinds of shape in terms of GEOM.GEOM_IKindOfShape.shape_kind enumeration +# and a list of parameters, describing the shape. +# List of parameters, describing the shape: +# - COMPOUND: [nb_solids nb_faces nb_edges nb_vertices] +# - COMPSOLID: [nb_solids nb_faces nb_edges nb_vertices] +# +# - SHELL: [info.CLOSED / info.UNCLOSED nb_faces nb_edges nb_vertices] +# +# - WIRE: [info.CLOSED / info.UNCLOSED nb_edges nb_vertices] +# +# - SPHERE: [xc yc zc R] +# - CYLINDER: [xb yb zb dx dy dz R H] +# - BOX: [xc yc zc ax ay az] +# - ROTATED_BOX: [xc yc zc zx zy zz xx xy xz ax ay az] +# - TORUS: [xc yc zc dx dy dz R_1 R_2] +# - CONE: [xb yb zb dx dy dz R_1 R_2 H] +# - POLYHEDRON: [nb_faces nb_edges nb_vertices] +# - SOLID: [nb_faces nb_edges nb_vertices] +# +# - SPHERE2D: [xc yc zc R] +# - CYLINDER2D: [xb yb zb dx dy dz R H] +# - TORUS2D: [xc yc zc dx dy dz R_1 R_2] +# - CONE2D: [xc yc zc dx dy dz R_1 R_2 H] +# - DISK_CIRCLE: [xc yc zc dx dy dz R] +# - DISK_ELLIPSE: [xc yc zc dx dy dz R_1 R_2] +# - POLYGON: [xo yo zo dx dy dz nb_edges nb_vertices] +# - PLANE: [xo yo zo dx dy dz] +# - PLANAR: [xo yo zo dx dy dz nb_edges nb_vertices] +# - FACE: [nb_edges nb_vertices] +# +# - CIRCLE: [xc yc zc dx dy dz R] +# - ARC_CIRCLE: [xc yc zc dx dy dz R x1 y1 z1 x2 y2 z2] +# - ELLIPSE: [xc yc zc dx dy dz R_1 R_2] +# - ARC_ELLIPSE: [xc yc zc dx dy dz R_1 R_2 x1 y1 z1 x2 y2 z2] +# - LINE: [xo yo zo dx dy dz] +# - SEGMENT: [x1 y1 z1 x2 y2 z2] +# - EDGE: [nb_vertices] +# +# - VERTEX: [x y z] # @ingroup l1_geompy_auxiliary kind = GEOM.GEOM_IKindOfShape ## Information about closed/unclosed state of shell or wire # @ingroup l1_geompy_auxiliary class info: + """ + Information about closed/unclosed state of shell or wire + """ UNKNOWN = 0 CLOSED = 1 UNCLOSED = 2 @@ -335,12 +422,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Dump component to the Python script # This method overrides IDL function to allow default values for the parameters. def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True): + """ + Dump component to the Python script + This method overrides IDL function to allow default values for the parameters. + """ return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile) ## Get name for sub-shape aSubObj of shape aMainObj # # @ref swig_SubShapeAllSorted "Example" def SubShapeName(self,aSubObj, aMainObj): + """ + Get name for sub-shape aSubObj of shape aMainObj + """ # Example: see GEOM_TestAll.py #aSubId = orb.object_to_string(aSubObj) @@ -358,13 +452,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \param doRestoreSubShapes if True, finds and publishes also # sub-shapes of aShape, corresponding to its arguments # and published sub-shapes of arguments - # \param theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes for + # \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for # these arguments description # \return study entry of the published shape in form of string # # @ref swig_MakeQuad4Vertices "Example" def addToStudy(self, aShape, aName, doRestoreSubShapes=False, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False): + """ + Publish in study aShape with name aName + + Parameters: + aShape the shape to be published + aName the name for the shape + doRestoreSubShapes if True, finds and publishes also + sub-shapes of aShape, corresponding to its arguments + and published sub-shapes of arguments + theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for + these arguments description + + Returns: + study entry of the published shape in form of string + + Example of usage: + id_block1 = geompy.addToStudy(Block1, "Block 1") + """ # Example: see GEOM_TestAll.py try: aSObject = self.AddInStudy(self.myStudy, aShape, aName, None) @@ -377,9 +489,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): return aShape.GetStudyEntry() ## Publish in study aShape with name aName as sub-object of previously published aFather + # \param aFather previously published object + # \param aShape the shape to be published as sub-object of aFather + # \param aName the name for the shape # + # \return study entry of the published shape in form of string # @ref swig_SubShapeAllSorted "Example" def addToStudyInFather(self, aFather, aShape, aName): + """ + Publish in study aShape with name aName as sub-object of previously published aFather + + Parameters: + aFather previously published object + aShape the shape to be published as sub-object of aFather + aName the name for the shape + + Returns: + study entry of the published shape in form of string + """ # Example: see GEOM_TestAll.py try: aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather) @@ -390,7 +517,14 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Unpublish object in study # + # \param aobj the object to be unpublished def hideInStudy(self, obj): + """ + Unpublish object in study + + Parameters: + obj the object to be unpublished + """ ior = salome.orb.object_to_string(obj) aSObject = self.myStudy.FindObjectIOR(ior) if aSObject is not None: @@ -406,12 +540,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## @{ ## 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 theObject published GEOM object, arguments of which will be published - # \param theArgs list of GEOM_Object, operation arguments to be published. + # To be used from python scripts out of addToStudy() (non-default usage) + # \param theObject published GEOM.GEOM_Object, arguments of which will be published + # \param theArgs list of GEOM.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. + # their sub-shapes. Value from enumeration GEOM.find_shape_method. # \param theInheritFirstArg set properties of the first argument for theObject. # Do not publish sub-shapes in place of arguments, but only # in place of sub-shapes of the first argument, @@ -428,14 +562,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @ref tui_restore_prs_params "Example" def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False, theAddPrefix=True): + """ + Publish sub-shapes, standing for arguments and sub-shapes of arguments + To be used from python scripts out of geompy.addToStudy (non-default usage) + + Parameters: + theObject published GEOM.GEOM_Object, arguments of which will be published + theArgs list of GEOM.GEOM_Object, operation arguments to be published. + If this list is empty, all operation arguments will be published + theFindMethod method to search sub-shapes, corresponding to arguments and + their sub-shapes. Value from enumeration GEOM.find_shape_method. + theInheritFirstArg set properties of the first argument for 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. + theAddPrefix add prefix "from_" to names of restored sub-shapes, + and prefix "from_subshapes_of_" to names of partially restored sub-shapes. + Returns: + list of published sub-shapes + """ # Example: see GEOM_TestAll.py return self.RestoreSubShapesO(self.myStudy, theObject, theArgs, theFindMethod, theInheritFirstArg, theAddPrefix) ## 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 theObject published GEOM object, arguments of which will be published - # \param theArgs list of GEOM_Object, operation arguments to be published. + # To be used from python scripts out of addToStudy() (non-default usage) + # \param theObject published GEOM.GEOM_Object, arguments of which will be published + # \param theArgs list of GEOM.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. @@ -455,6 +613,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @ref tui_restore_prs_params "Example" def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False, theAddPrefix=True): + """ + Publish sub-shapes, standing for arguments and sub-shapes of arguments + To be used from python scripts out of geompy.addToStudy() (non-default usage) + + Parameters: + theObject published GEOM.GEOM_Object, arguments of which will be published + theArgs list of GEOM.GEOM_Object, operation arguments to be published. + If this list is empty, all operation arguments will be published + theFindMethod method to search sub-shapes, corresponding to arguments and + their sub-shapes. Value from enumeration GEOM::find_shape_method. + theInheritFirstArg set properties of the first argument for 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. + theAddPrefix add prefix "from_" to names of restored sub-shapes, + and prefix "from_subshapes_of_" to names of partially restored sub-shapes. + + Returns: + list of published sub-shapes + """ # Example: see GEOM_TestAll.py return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs, theFindMethod, theInheritFirstArg, theAddPrefix) @@ -469,10 +652,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_creation_point "Example" def MakeVertex(self, theX, theY, theZ): + """ + Create point by three coordinates. + + Parameters: + theX The X coordinate of the point. + theY The Y coordinate of the point. + theZ The Z coordinate of the point. + + Returns: + New GEOM.GEOM_Object, containing the created point. + """ # Example: see GEOM_TestAll.py theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ) anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ) @@ -486,10 +680,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_creation_point "Example" def MakeVertexWithRef(self,theReference, theX, theY, theZ): + """ + Create a point, distant from the referenced point + on the given distances along the coordinate axes. + + Parameters: + theReference The referenced point. + theX Displacement from the referenced point along OX axis. + theY Displacement from the referenced point along OY axis. + theZ Displacement from the referenced point along OZ axis. + + Returns: + New GEOM.GEOM_Object, containing the created point. + """ # Example: see GEOM_TestAll.py theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ) anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ) @@ -500,10 +707,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_creation_point "Example" def MakeVertexOnCurve(self,theRefCurve, theParameter): + """ + Create a point, corresponding to the given parameter on the given curve. + + Parameters: + theRefCurve The referenced curve. + theParameter Value of parameter on the referenced curve. + + Returns: + New GEOM.GEOM_Object, containing the created point. + + Example of usage: + p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25) + """ # Example: see GEOM_TestAll.py theParameter, Parameters = ParseParameters(theParameter) anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter) @@ -516,10 +736,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theX X-coordinate in 3D space # @param theY Y-coordinate in 3D space # @param theZ Z-coordinate in 3D space - # @return New GEOM_Object, containing the created point. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_creation_point "Example" def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ): + """ + Create a point by projection give coordinates on the given curve + + Parameters: + theRefCurve The referenced curve. + theX X-coordinate in 3D space + theY Y-coordinate in 3D space + theZ Z-coordinate in 3D space + + Returns: + New GEOM.GEOM_Object, containing the created point. + + Example of usage: + p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10) + """ # Example: see GEOM_TestAll.py theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ) anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ) @@ -532,10 +767,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theLength Length on the referenced curve. It can be negative. # @param theStartPoint Point allowing to choose the direction for the calculation # of the length. If None, start from the first point of theRefCurve. - # @return New GEOM_Object, containing the created point. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_creation_point "Example" def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None): + """ + Create a point, corresponding to the given length on the given curve. + + Parameters: + theRefCurve The referenced curve. + theLength Length on the referenced curve. It can be negative. + theStartPoint Point allowing to choose the direction for the calculation + of the length. If None, start from the first point of theRefCurve. + + Returns: + New GEOM.GEOM_Object, containing the created point. + """ # Example: see GEOM_TestAll.py theLength, Parameters = ParseParameters(theLength) anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint) @@ -548,10 +795,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref swig_MakeVertexOnSurface "Example" def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter): + """ + Create a point, corresponding to the given parameters on the + given surface. + + Parameters: + theRefSurf The referenced surface. + theUParameter Value of U-parameter on the referenced surface. + theVParameter Value of V-parameter on the referenced surface. + + Returns: + New GEOM.GEOM_Object, containing the created point. + + Example of usage: + p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8) #(GEOM_Object, Double, Double)->GEOM_Object + """ theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter) # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter) @@ -564,10 +826,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theX X-coordinate in 3D space # @param theY Y-coordinate in 3D space # @param theZ Z-coordinate in 3D space - # @return New GEOM_Object, containing the created point. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref swig_MakeVertexOnSurfaceByCoord "Example" def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ): + """ + Create a point by projection give coordinates on the given surface + + Parameters: + theRefSurf The referenced surface. + theX X-coordinate in 3D space + theY Y-coordinate in 3D space + theZ Z-coordinate in 3D space + + Returns: + New GEOM.GEOM_Object, containing the created point. + + Example of usage: + p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.) #(GEOM_Object, Double, Double, Double)->GEOM_Object + """ theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ) # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ) @@ -577,10 +854,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a point on intersection of two lines. # @param theRefLine1, theRefLine2 The referenced lines. - # @return New GEOM_Object, containing the created point. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref swig_MakeVertexOnLinesIntersection "Example" def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2): + """ + Create a point on intersection of two lines. + + Parameters: + theRefLine1, theRefLine2 The referenced lines. + + Returns: + New GEOM.GEOM_Object, containing the created point. + """ # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2) RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp) @@ -589,10 +875,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a tangent, 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 tangent. + # @return New GEOM.GEOM_Object, containing the created tangent. # # @ref swig_MakeTangentOnCurve "Example" def MakeTangentOnCurve(self, theRefCurve, theParameter): + """ + Create a tangent, corresponding to the given parameter on the given curve. + + Parameters: + theRefCurve The referenced curve. + theParameter Value of parameter on the referenced curve. + + Returns: + New GEOM.GEOM_Object, containing the created tangent. + + Example of usage: + tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object, Double)->GEOM_Object + """ anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter) RaiseIfFailed("MakeTangentOnCurve", self.BasicOp) return anObj @@ -602,10 +901,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theParameterV vertical value of the center point (0.0 - 1.0). # @param theParameterU horisontal value of the center point (0.0 - 1.0). # @param theTrimSize the size of plane. - # @return New GEOM_Object, containing the created tangent. + # @return New GEOM.GEOM_Object, containing the created tangent. # # @ref swig_MakeTangentPlaneOnFace "Example" def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize): + """ + Create a tangent plane, corresponding to the given parameter on the given face. + + Parameters: + theFace The face for which tangent plane should be built. + theParameterV vertical value of the center point (0.0 - 1.0). + theParameterU horisontal value of the center point (0.0 - 1.0). + theTrimSize the size of plane. + + Returns: + New GEOM.GEOM_Object, containing the created tangent. + + Example of usage: + an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150) + """ anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize) RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp) return anObj @@ -614,10 +928,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created vector. # # @ref tui_creation_vector "Example" def MakeVectorDXDYDZ(self,theDX, theDY, theDZ): + """ + Create a vector with the given components. + + Parameters: + theDX X component of the vector. + theDY Y component of the vector. + theDZ Z component of the vector. + + Returns: + New GEOM.GEOM_Object, containing the created vector. + """ # Example: see GEOM_TestAll.py theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ) anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ) @@ -628,10 +953,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a vector between two points. # @param thePnt1 Start point for the vector. # @param thePnt2 End point for the vector. - # @return New GEOM_Object, containing the created vector. + # @return New GEOM.GEOM_Object, containing the created vector. # # @ref tui_creation_vector "Example" def MakeVector(self,thePnt1, thePnt2): + """ + Create a vector between two points. + + Parameters: + thePnt1 Start point for the vector. + thePnt2 End point for the vector. + + Returns: + New GEOM.GEOM_Object, containing the created vector. + """ # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp) @@ -641,10 +976,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the created line. # # @ref tui_creation_line "Example" def MakeLine(self,thePnt, theDir): + """ + Create a line, passing through the given point + and parrallel to the given direction + + Parameters: + thePnt Point. The resulting line will pass through it. + theDir Direction. The resulting line will be parallel to it. + + Returns: + New GEOM.GEOM_Object, containing the created line. + """ # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLine(thePnt, theDir) RaiseIfFailed("MakeLine", self.BasicOp) @@ -653,10 +999,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a line, passing through the given points # @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. + # @return New GEOM.GEOM_Object, containing the created line. # # @ref tui_creation_line "Example" def MakeLineTwoPnt(self,thePnt1, thePnt2): + """ + Create a line, passing through the given points + + Parameters: + thePnt1 First of two points, defining the line. + thePnt2 Second of two points, defining the line. + + Returns: + New GEOM.GEOM_Object, containing the created line. + """ # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeLineTwoPnt", self.BasicOp) @@ -665,10 +1021,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a line on 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. + # @return New GEOM.GEOM_Object, containing the created line. # # @ref swig_MakeLineTwoFaces "Example" def MakeLineTwoFaces(self, theFace1, theFace2): + """ + Create a line on two faces intersection. + + Parameters: + theFace1 First of two faces, defining the line. + theFace2 Second of two faces, defining the line. + + Returns: + New GEOM.GEOM_Object, containing the created line. + """ # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2) RaiseIfFailed("MakeLineTwoFaces", self.BasicOp) @@ -679,10 +1045,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created plane. # # @ref tui_creation_plane "Example" def MakePlane(self,thePnt, theVec, theTrimSize): + """ + Create a plane, passing through the given point + and normal to the given vector. + + Parameters: + thePnt Point, the plane has to pass through. + theVec Vector, defining the plane normal direction. + theTrimSize Half size of a side of quadrangle face, representing the plane. + + Returns: + New GEOM.GEOM_Object, containing the created plane. + """ # Example: see GEOM_TestAll.py theTrimSize, Parameters = ParseParameters(theTrimSize); anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize) @@ -695,10 +1073,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created plane. # # @ref tui_creation_plane "Example" def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize): + """ + Create a plane, passing through the three given points + + Parameters: + thePnt1 First of three points, defining the plane. + thePnt2 Second of three points, defining the plane. + thePnt3 Fird of three points, defining the plane. + theTrimSize Half size of a side of quadrangle face, representing the plane. + + Returns: + New GEOM.GEOM_Object, containing the created plane. + """ # Example: see GEOM_TestAll.py theTrimSize, Parameters = ParseParameters(theTrimSize); anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize) @@ -709,10 +1099,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a plane, similar to the existing one, but with another size of representing face. # @param theFace Referenced plane or LCS(Marker). # @param theTrimSize New half size of a side of quadrangle face, representing the plane. - # @return New GEOM_Object, containing the created plane. + # @return New GEOM.GEOM_Object, containing the created plane. # # @ref tui_creation_plane "Example" def MakePlaneFace(self,theFace, theTrimSize): + """ + Create a plane, similar to the existing one, but with another size of representing face. + + Parameters: + theFace Referenced plane or LCS(Marker). + theTrimSize New half size of a side of quadrangle face, representing the plane. + + Returns: + New GEOM.GEOM_Object, containing the created plane. + """ # Example: see GEOM_TestAll.py theTrimSize, Parameters = ParseParameters(theTrimSize); anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize) @@ -725,10 +1125,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVec1 Vector, defining center point and plane direction. # @param theVec2 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. + # @return New GEOM.GEOM_Object, containing the created plane. # # @ref tui_creation_plane "Example" def MakePlane2Vec(self,theVec1, theVec2, theTrimSize): + """ + Create a plane, passing through the 2 vectors + with center in a start point of the first vector. + + Parameters: + theVec1 Vector, defining center point and plane direction. + theVec2 Vector, defining the plane normal direction. + theTrimSize Half size of a side of quadrangle face, representing the plane. + + Returns: + New GEOM.GEOM_Object, containing the created plane. + """ # Example: see GEOM_TestAll.py theTrimSize, Parameters = ParseParameters(theTrimSize); anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize) @@ -740,10 +1152,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theLCS coordinate system, defining plane. # @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. + # @return New GEOM.GEOM_Object, containing the created plane. # # @ref tui_creation_plane "Example" def MakePlaneLCS(self,theLCS, theTrimSize, theOrientation): + """ + Create a plane, based on a Local coordinate system. + + Parameters: + theLCS coordinate system, defining plane. + theTrimSize Half size of a side of quadrangle face, representing the plane. + theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3) + + Returns: + New GEOM.GEOM_Object, containing the created plane. + """ # Example: see GEOM_TestAll.py theTrimSize, Parameters = ParseParameters(theTrimSize); anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation) @@ -755,10 +1178,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param OX,OY,OZ Three coordinates of coordinate system origin. # @param XDX,XDY,XDZ Three components of OX direction # @param YDX,YDY,YDZ Three components of OY direction - # @return New GEOM_Object, containing the created coordinate system. + # @return New GEOM.GEOM_Object, containing the created coordinate system. # # @ref swig_MakeMarker "Example" def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): + """ + Create a local coordinate system. + + Parameters: + OX,OY,OZ Three coordinates of coordinate system origin. + XDX,XDY,XDZ Three components of OX direction + YDX,YDY,YDZ Three components of OY direction + + Returns: + New GEOM.GEOM_Object, containing the created coordinate system. + """ # Example: see GEOM_TestAll.py OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ); anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ) @@ -768,10 +1202,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing the created coordinate system. # # @ref tui_creation_lcs "Example" def MakeMarkerFromShape(self, theShape): + """ + Create a local coordinate system from shape. + + Parameters: + theShape The initial shape to detect the coordinate system. + + Returns: + New GEOM.GEOM_Object, containing the created coordinate system. + """ anObj = self.BasicOp.MakeMarkerFromShape(theShape) RaiseIfFailed("MakeMarkerFromShape", self.BasicOp) return anObj @@ -780,10 +1223,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created coordinate system. # # @ref tui_creation_lcs "Example" def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec): + """ + Create a local coordinate system from point and two vectors. + + Parameters: + theOrigin Point of coordinate system origin. + theXVec Vector of X direction + theYVec Vector of Y direction + + Returns: + New GEOM.GEOM_Object, containing the created coordinate system. + + """ anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec) RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp) return anObj @@ -798,10 +1253,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created arc. # # @ref swig_MakeArc "Example" def MakeArc(self,thePnt1, thePnt2, thePnt3): + """ + Create an arc of circle, passing through three given points. + + Parameters: + thePnt1 Start point of the arc. + thePnt2 Middle point of the arc. + thePnt3 End point of the arc. + + Returns: + New GEOM.GEOM_Object, containing the created arc. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeArc", self.CurvesOp) @@ -812,10 +1278,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePnt2 Start point of the arc. (Gives also the radius of the arc) # @param thePnt3 End point of the arc (Gives also a direction) # @param theSense Orientation of the arc - # @return New GEOM_Object, containing the created arc. + # @return New GEOM.GEOM_Object, containing the created arc. # # @ref swig_MakeArc "Example" def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False): + """ + Create an arc of circle from a center and 2 points. + + Parameters: + thePnt1 Center of the arc + thePnt2 Start point of the arc. (Gives also the radius of the arc) + thePnt3 End point of the arc (Gives also a direction) + theSense Orientation of the arc + + Returns: + New GEOM.GEOM_Object, containing the created arc. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense) RaiseIfFailed("MakeArcCenter", self.CurvesOp) @@ -825,10 +1303,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theCenter Center of the arc. # @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2. # @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2. - # @return New GEOM_Object, containing the created arc. + # @return New GEOM.GEOM_Object, containing the created arc. # # @ref swig_MakeArc "Example" def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2): + """ + Create an arc of ellipse, of center and two points. + + Parameters: + theCenter Center of the arc. + thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2. + thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2. + + Returns: + New GEOM.GEOM_Object, containing the created arc. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2) RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp) @@ -838,10 +1327,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created circle. # # @ref tui_creation_circle "Example" def MakeCircle(self, thePnt, theVec, theR): + """ + Create a circle with given center, normal vector and radius. + + Parameters: + thePnt Circle center. + theVec Vector, normal to the plane of the circle. + theR Circle radius. + + Returns: + New GEOM.GEOM_Object, containing the created circle. + """ # Example: see GEOM_TestAll.py theR, Parameters = ParseParameters(theR) anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR) @@ -853,18 +1353,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Center of the circle will be in the origin of global # coordinate system and normal vector will be codirected with Z axis # @param theR Circle radius. - # @return New GEOM_Object, containing the created circle. + # @return New GEOM.GEOM_Object, containing the created circle. def MakeCircleR(self, theR): + """ + Create a circle with given radius. + Center of the circle will be in the origin of global + coordinate system and normal vector will be codirected with Z axis + + Parameters: + theR Circle radius. + + Returns: + New GEOM.GEOM_Object, containing the created circle. + """ anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR) RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp) return anObj ## Create a circle, passing through three given points # @param thePnt1,thePnt2,thePnt3 Points, defining the circle. - # @return New GEOM_Object, containing the created circle. + # @return New GEOM.GEOM_Object, containing the created circle. # # @ref tui_creation_circle "Example" def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3): + """ + Create a circle, passing through three given points + + Parameters: + thePnt1,thePnt2,thePnt3 Points, defining the circle. + + Returns: + New GEOM.GEOM_Object, containing the created circle. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp) @@ -874,10 +1394,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # passing through the point2 as radius and laying in the plane, # defined by all three given points. # @param thePnt1,thePnt2,thePnt3 Points, defining the circle. - # @return New GEOM_Object, containing the created circle. + # @return New GEOM.GEOM_Object, containing the created circle. # # @ref swig_MakeCircle "Example" def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3): + """ + Create a circle, with given point1 as center, + passing through the point2 as radius and laying in the plane, + defined by all three given points. + + Parameters: + thePnt1,thePnt2,thePnt3 Points, defining the circle. + + Returns: + New GEOM.GEOM_Object, containing the created circle. + """ # Example: see GEOM_example6.py anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp) @@ -889,10 +1420,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created ellipse. # # @ref tui_creation_ellipse "Example" def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None): + """ + Create an ellipse with given center, normal vector and radiuses. + + Parameters: + thePnt Ellipse center. + theVec Vector, normal to the plane of the ellipse. + theRMajor Major ellipse radius. + theRMinor Minor ellipse radius. + theVecMaj Vector, direction of the ellipse's main axis. + + Returns: + New GEOM.GEOM_Object, containing the created ellipse. + """ # Example: see GEOM_TestAll.py theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor) if theVecMaj is not None: @@ -909,8 +1453,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): # coordinate system and normal vector will be codirected with Z axis # @param theRMajor Major ellipse radius. # @param theRMinor Minor ellipse radius. - # @return New GEOM_Object, containing the created ellipse. + # @return New GEOM.GEOM_Object, containing the created ellipse. def MakeEllipseRR(self, theRMajor, theRMinor): + """ + Create an ellipse with given radiuses. + Center of the ellipse will be in the origin of global + coordinate system and normal vector will be codirected with Z axis + + Parameters: + theRMajor Major ellipse radius. + theRMinor Minor ellipse radius. + + Returns: + New GEOM.GEOM_Object, containing the created ellipse. + """ anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor) RaiseIfFailed("MakeEllipse", self.CurvesOp) return anObj @@ -918,10 +1474,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a polyline on the set of points. # @param thePoints Sequence of points for the polyline. # @param theIsClosed If True, build a closed wire. - # @return New GEOM_Object, containing the created polyline. + # @return New GEOM.GEOM_Object, containing the created polyline. # # @ref tui_creation_curve "Example" def MakePolyline(self, thePoints, theIsClosed=False): + """ + Create a polyline on the set of points. + + Parameters: + thePoints Sequence of points for the polyline. + theIsClosed If True, build a closed wire. + + Returns: + New GEOM.GEOM_Object, containing the created polyline. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed) RaiseIfFailed("MakePolyline", self.CurvesOp) @@ -930,10 +1496,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create bezier curve on the set of points. # @param thePoints Sequence of points for the bezier curve. # @param theIsClosed If True, build a closed curve. - # @return New GEOM_Object, containing the created bezier curve. + # @return New GEOM.GEOM_Object, containing the created bezier curve. # # @ref tui_creation_curve "Example" def MakeBezier(self, thePoints, theIsClosed=False): + """ + Create bezier curve on the set of points. + + Parameters: + thePoints Sequence of points for the bezier curve. + theIsClosed If True, build a closed curve. + + Returns: + New GEOM.GEOM_Object, containing the created bezier curve. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed) RaiseIfFailed("MakeSplineBezier", self.CurvesOp) @@ -944,10 +1520,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theIsClosed If True, build a closed curve. # @param theDoReordering If TRUE, the algo does not follow the order of # \a thePoints but searches for the closest vertex. - # @return New GEOM_Object, containing the created B-Spline curve. + # @return New GEOM.GEOM_Object, containing the created B-Spline curve. # # @ref tui_creation_curve "Example" def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False): + """ + Create B-Spline curve on the set of points. + + Parameters: + thePoints Sequence of points for the B-Spline curve. + theIsClosed If True, build a closed curve. + theDoReordering If True, the algo does not follow the order of + thePoints but searches for the closest vertex. + + Returns: + New GEOM.GEOM_Object, containing the created B-Spline curve. + """ # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering) RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp) @@ -963,11 +1551,28 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter. # @param theCurveType the type of the curve. # @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug. - # @return New GEOM_Object, containing the created curve. + # @return New GEOM.GEOM_Object, containing the created curve. # # @ref tui_creation_curve "Example" def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr, theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False ): + """ + Creates a curve using the parametric definition of the basic points. + + Parameters: + thexExpr parametric equation of the coordinates X. + theyExpr parametric equation of the coordinates Y. + thezExpr parametric equation of the coordinates Z. + theParamMin the minimal value of the parameter. + theParamMax the maximum value of the parameter. + theParamStep the number of steps if theNewMethod = True, else step value of the parameter. + theCurveType the type of the curve. + theNewMethod flag for switching to the new method if the flag is set to false a deprecated + method is used which can lead to a bug. + + Returns: + New GEOM.GEOM_Object, containing the created curve. + """ theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep) if theNewMethod: anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType) @@ -1034,10 +1639,58 @@ class geompyDC(GEOM._objref_GEOM_Gen): # coordinates of the working plane. # @param theWorkingPlane Nine double values, defining origin, # OZ and OX directions of the working plane. - # @return New GEOM_Object, containing the created wire. + # @return New GEOM.GEOM_Object, containing the created wire. # # @ref tui_sketcher_page "Example" def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]): + """ + Create a sketcher (wire or face), following the textual description, passed + through theCommand argument. + Edges of the resulting wire or face will be arcs of circles and/or linear segments. + Format of the description string have to be the following: + "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]" + Where: + - x1, y1 are coordinates of the first sketcher point (zero by default), + - CMD is one of + - "R angle" : Set the direction by angle + - "D dx dy" : Set the direction by DX & DY + + - "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 + + - "C radius length" : Create arc by direction, radius and length(in degree) + - "AA x y": Create arc by point at X & Y + - "A dx dy" : Create arc by point with DX & DY + - "A dx dy" : Create arc by point with DX & DY + - "UU x y radius flag1": Create arc by point at X & Y with given radiUs + - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs + - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates + - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates + + - "WW" : Close Wire (to finish) + - "WF" : Close Wire and build face (to finish) + + - Flag1 (= reverse) is 0 or 2 ... + - if 0 the drawn arc is the one of lower angle (< Pi) + - if 2 the drawn arc ius the one of greater angle (> Pi) + + - Flag2 (= control tolerance) is 0 or 1 ... + - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7) + - if 1 the wire is built only if the end point is on the arc + with a tolerance of 10^-7 on the distance else the creation fails + + Parameters: + theCommand String, defining the sketcher in local + coordinates of the working plane. + theWorkingPlane Nine double values, defining origin, + OZ and OX directions of the working plane. + + Returns: + New GEOM.GEOM_Object, containing the created wire. + """ # Example: see GEOM_TestAll.py theCommand,Parameters = ParseSketcherCommand(theCommand) anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane) @@ -1047,14 +1700,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a sketcher (wire or face), following the textual description, # passed through theCommand argument. \n - # For format of the description string see the previous method.\n + # For format of the description string see MakeSketcher() method.\n # @param theCommand String, defining the sketcher in local # coordinates of the working plane. # @param theWorkingPlane Planar Face or LCS(Marker) of the working plane. - # @return New GEOM_Object, containing the created wire. + # @return New GEOM.GEOM_Object, containing the created wire. # # @ref tui_sketcher_page "Example" def MakeSketcherOnPlane(self, theCommand, theWorkingPlane): + """ + Create a sketcher (wire or face), following the textual description, + passed through theCommand argument. + For format of the description string see geompy.MakeSketcher() method. + + Parameters: + theCommand String, defining the sketcher in local + coordinates of the working plane. + theWorkingPlane Planar Face or LCS(Marker) of the working plane. + + Returns: + New GEOM.GEOM_Object, containing the created wire. + """ anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane) RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp) return anObj @@ -1063,10 +1729,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # passed through theCoordinates argument. \n # @param theCoordinates double values, defining points to create a wire, # passing from it. - # @return New GEOM_Object, containing the created wire. + # @return New GEOM.GEOM_Object, containing the created wire. # # @ref tui_sketcher_page "Example" def Make3DSketcher(self, theCoordinates): + """ + Create a sketcher wire, following the numerical description, + passed through theCoordinates argument. + + Parameters: + theCoordinates double values, defining points to create a wire, + passing from it. + + Returns: + New GEOM_Object, containing the created wire. + """ theCoordinates,Parameters = ParseParameters(theCoordinates) anObj = self.CurvesOp.Make3DSketcher(theCoordinates) RaiseIfFailed("Make3DSketcher", self.CurvesOp) @@ -1081,8 +1758,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a box by coordinates of two opposite vertices. # + # @param x1,y1,z1 double values, defining first point it. + # @param x2,y2,z2 double values, defining first point it. + # + # @return New GEOM.GEOM_Object, containing the created box. # @ref tui_creation_box "Example" def MakeBox(self,x1,y1,z1,x2,y2,z2): + """ + Create a box by coordinates of two opposite vertices. + + Parameters: + x1,y1,z1 double values, defining first point. + x2,y2,z2 double values, defining second point. + + Returns: + New GEOM.GEOM_Object, containing the created box. + """ # Example: see GEOM_TestAll.py pnt1 = self.MakeVertex(x1,y1,z1) pnt2 = self.MakeVertex(x2,y2,z2) @@ -1094,10 +1785,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created box. # # @ref tui_creation_box "Example" def MakeBoxDXDYDZ(self,theDX, theDY, theDZ): + """ + Create a box with specified dimensions along the coordinate axes + and with edges, parallel to the coordinate axes. + Center of the box will be at point (DX/2, DY/2, DZ/2). + + Parameters: + theDX Length of Box edges, parallel to OX axis. + theDY Length of Box edges, parallel to OY axis. + theDZ Length of Box edges, parallel to OZ axis. + + Returns: + New GEOM.GEOM_Object, containing the created box. + """ # Example: see GEOM_TestAll.py theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ) anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ) @@ -1109,10 +1813,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the created box. # # @ref tui_creation_box "Example" def MakeBoxTwoPnt(self,thePnt1, thePnt2): + """ + Create a box with two specified opposite vertices, + and with edges, parallel to the coordinate axes + + Parameters: + thePnt1 First of two opposite vertices. + thePnt2 Second of two opposite vertices. + + Returns: + New GEOM.GEOM_Object, containing the created box. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp) @@ -1123,10 +1838,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH height of Face. # @param theW width of Face. # @param theOrientation orientation belong axis OXY OYZ OZX - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_creation_face "Example" def MakeFaceHW(self,theH, theW, theOrientation): + """ + Create a face with specified dimensions along OX-OY coordinate axes, + with edges, parallel to this coordinate axes. + + Parameters: + theH height of Face. + theW width of Face. + theOrientation orientation belong axis OXY OYZ OZX + + Returns: + New GEOM.GEOM_Object, containing the created face. + """ # Example: see GEOM_TestAll.py theH,theW,Parameters = ParseParameters(theH, theW) anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation) @@ -1140,10 +1867,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # the face object. # @param theH Height (vertical size). # @param theW Width (horisontal size). - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_creation_face "Example" def MakeFaceObjHW(self, theObj, theH, theW): + """ + Create a face from another plane and two sizes, + vertical size and horisontal size. + + Parameters: + theObj Normale vector to the creating face or + the face object. + theH Height (vertical size). + theW Width (horisontal size). + + Returns: + New GEOM_Object, containing the created face. + """ # Example: see GEOM_TestAll.py theH,theW,Parameters = ParseParameters(theH, theW) anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW) @@ -1155,10 +1895,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created disk. # # @ref tui_creation_disk "Example" def MakeDiskPntVecR(self,thePnt, theVec, theR): + """ + Create a disk with given center, normal vector and radius. + + Parameters: + thePnt Disk center. + theVec Vector, normal to the plane of the disk. + theR Disk radius. + + Returns: + New GEOM.GEOM_Object, containing the created disk. + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR) @@ -1168,10 +1919,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a disk, passing through three given points # @param thePnt1,thePnt2,thePnt3 Points, defining the disk. - # @return New GEOM_Object, containing the created disk. + # @return New GEOM.GEOM_Object, containing the created disk. # # @ref tui_creation_disk "Example" def MakeDiskThreePnt(self,thePnt1, thePnt2, thePnt3): + """ + Create a disk, passing through three given points + + Parameters: + thePnt1,thePnt2,thePnt3 Points, defining the disk. + + Returns: + New GEOM.GEOM_Object, containing the created disk. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeDiskThreePnt", self.PrimOp) @@ -1180,10 +1940,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a disk with specified dimensions along OX-OY coordinate axes. # @param theR Radius of Face. # @param theOrientation set the orientation belong axis OXY or OYZ or OZX - # @return New GEOM_Object, containing the created disk. + # @return New GEOM.GEOM_Object, containing the created disk. # # @ref tui_creation_face "Example" def MakeDiskR(self,theR, theOrientation): + """ + Create a disk with specified dimensions along OX-OY coordinate axes. + + Parameters: + theR Radius of Face. + theOrientation set the orientation belong axis OXY or OYZ or OZX + + Returns: + New GEOM.GEOM_Object, containing the created disk. + + Example of usage: + Disk3 = geompy.MakeDiskR(100., 1) #(1 Doubles, 1 Int)->GEOM_Object + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.PrimOp.MakeDiskR(theR, theOrientation) @@ -1196,10 +1969,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theAxis Cylinder axis. # @param theR Cylinder radius. # @param theH Cylinder height. - # @return New GEOM_Object, containing the created cylinder. + # @return New GEOM.GEOM_Object, containing the created cylinder. # # @ref tui_creation_cylinder "Example" def MakeCylinder(self,thePnt, theAxis, theR, theH): + """ + Create a cylinder with given base point, axis, radius and height. + + Parameters: + thePnt Central point of cylinder base. + theAxis Cylinder axis. + theR Cylinder radius. + theH Cylinder height. + + Returns: + New GEOM.GEOM_Object, containing the created cylinder. + """ # Example: see GEOM_TestAll.py theR,theH,Parameters = ParseParameters(theR, theH) anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH) @@ -1212,10 +1997,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the created cylinder. # # @ref tui_creation_cylinder "Example" def MakeCylinderRH(self,theR, theH): + """ + 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. + + Parameters: + theR Cylinder radius. + theH Cylinder height. + + Returns: + New GEOM.GEOM_Object, containing the created cylinder. + """ # Example: see GEOM_TestAll.py theR,theH,Parameters = ParseParameters(theR, theH) anObj = self.PrimOp.MakeCylinderRH(theR, theH) @@ -1226,10 +2023,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a sphere with given center and radius. # @param thePnt Sphere center. # @param theR Sphere radius. - # @return New GEOM_Object, containing the created sphere. + # @return New GEOM.GEOM_Object, containing the created sphere. # # @ref tui_creation_sphere "Example" def MakeSpherePntR(self, thePnt, theR): + """ + Create a sphere with given center and radius. + + Parameters: + thePnt Sphere center. + theR Sphere radius. + + Returns: + New GEOM.GEOM_Object, containing the created sphere. + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.PrimOp.MakeSpherePntR(thePnt, theR) @@ -1240,10 +2047,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a sphere with given center and radius. # @param x,y,z Coordinates of sphere center. # @param theR Sphere radius. - # @return New GEOM_Object, containing the created sphere. + # @return New GEOM.GEOM_Object, containing the created sphere. # # @ref tui_creation_sphere "Example" def MakeSphere(self, x, y, z, theR): + """ + Create a sphere with given center and radius. + + Parameters: + x,y,z Coordinates of sphere center. + theR Sphere radius. + + Returns: + New GEOM.GEOM_Object, containing the created sphere. + """ # Example: see GEOM_TestAll.py point = self.MakeVertex(x, y, z) anObj = self.MakeSpherePntR(point, theR) @@ -1251,10 +2068,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a sphere with given radius at the origin of coordinate system. # @param theR Sphere radius. - # @return New GEOM_Object, containing the created sphere. + # @return New GEOM.GEOM_Object, containing the created sphere. # # @ref tui_creation_sphere "Example" def MakeSphereR(self, theR): + """ + Create a sphere with given radius at the origin of coordinate system. + + Parameters: + theR Sphere radius. + + Returns: + New GEOM.GEOM_Object, containing the created sphere. + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.PrimOp.MakeSphereR(theR) @@ -1270,10 +2096,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \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. + # @return New GEOM.GEOM_Object, containing the created cone. # # @ref tui_creation_cone "Example" def MakeCone(self,thePnt, theAxis, theR1, theR2, theH): + """ + Create a cone with given base point, axis, height and radiuses. + + Parameters: + thePnt Central point of the first cone base. + theAxis Cone axis. + theR1 Radius of the first cone base. + theR2 Radius of the second cone base. + theH Cone height. + + Note: + If both radiuses are non-zero, the cone will be truncated. + If the radiuses are equal, a cylinder will be created instead. + + Returns: + New GEOM.GEOM_Object, containing the created cone. + """ # Example: see GEOM_TestAll.py theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH) anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH) @@ -1289,10 +2132,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \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. + # @return New GEOM.GEOM_Object, containing the created cone. # # @ref tui_creation_cone "Example" def MakeConeR1R2H(self,theR1, theR2, theH): + """ + 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. + + Parameters: + theR1 Radius of the first cone base. + theR2 Radius of the second cone base. + theH Cone height. + + Note: + If both radiuses are non-zero, the cone will be truncated. + If the radiuses are equal, a cylinder will be created instead. + + Returns: + New GEOM.GEOM_Object, containing the created cone. + """ # Example: see GEOM_TestAll.py theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH) anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH) @@ -1305,10 +2165,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVec Torus axis of symmetry. # @param theRMajor Torus major radius. # @param theRMinor Torus minor radius. - # @return New GEOM_Object, containing the created torus. + # @return New GEOM.GEOM_Object, containing the created torus. # # @ref tui_creation_torus "Example" def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor): + """ + Create a torus with given center, normal vector and radiuses. + + Parameters: + thePnt Torus central point. + theVec Torus axis of symmetry. + theRMajor Torus major radius. + theRMinor Torus minor radius. + + Returns: + New GEOM.GEOM_Object, containing the created torus. + """ # Example: see GEOM_TestAll.py theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor) anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor) @@ -1319,10 +2191,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a torus with given radiuses at the origin of coordinate system. # @param theRMajor Torus major radius. # @param theRMinor Torus minor radius. - # @return New GEOM_Object, containing the created torus. + # @return New GEOM.GEOM_Object, containing the created torus. # # @ref tui_creation_torus "Example" def MakeTorusRR(self, theRMajor, theRMinor): + """ + Create a torus with given radiuses at the origin of coordinate system. + + Parameters: + theRMajor Torus major radius. + theRMinor Torus minor radius. + + Returns: + New GEOM.GEOM_Object, containing the created torus. + """ # Example: see GEOM_TestAll.py theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor) anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor) @@ -1342,10 +2224,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePoint2 Second end of extrusion vector. # @param theScaleFactor Use it to make prism with scaled second base. # Nagative value means not scaled second base. - # @return New GEOM_Object, containing the created prism. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0): + """ + Create a shape by extrusion of the base shape along a vector, defined by two points. + + Parameters: + theBase Base shape to be extruded. + thePoint1 First end of extrusion vector. + thePoint2 Second end of extrusion vector. + theScaleFactor Use it to make prism with scaled second base. + Nagative value means not scaled second base. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py anObj = None Parameters = "" @@ -1363,10 +2258,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrism2Ways(self, theBase, thePoint1, thePoint2): + """ + Create a shape by extrusion of the base shape along a + vector, defined by two points, in 2 Ways (forward/backward). + + Parameters: + theBase Base shape to be extruded. + thePoint1 First end of extrusion vector. + thePoint2 Second end of extrusion vector. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2) RaiseIfFailed("MakePrismTwoPnt", self.PrimOp) @@ -1379,11 +2286,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVec Direction of extrusion. # @param theH Prism dimension along theVec. # @param theScaleFactor Use it to make prism with scaled second base. - # Nagative value means not scaled second base. - # @return New GEOM_Object, containing the created prism. + # Negative value means not scaled second base. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0): + """ + Create a shape by extrusion of the base shape along the vector, + i.e. all the space, transfixed by the base shape during its translation + along the vector on the given distance. + + Parameters: + theBase Base shape to be extruded. + theVec Direction of extrusion. + theH Prism dimension along theVec. + theScaleFactor Use it to make prism with scaled second base. + Negative value means not scaled second base. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py anObj = None Parameters = "" @@ -1403,10 +2325,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theBase Base shape to be extruded. # @param theVec Direction of extrusion. # @param theH Prism dimension along theVec in forward direction. - # @return New GEOM_Object, containing the created prism. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrismVecH2Ways(self, theBase, theVec, theH): + """ + Create a shape by extrusion of the base shape along the vector, + i.e. all the space, transfixed by the base shape during its translation + along the vector on the given distance in 2 Ways (forward/backward). + + Parameters: + theBase Base shape to be extruded. + theVec Direction of extrusion. + theH Prism dimension along theVec in forward direction. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py theH,Parameters = ParseParameters(theH) anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH) @@ -1419,10 +2354,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theDX, theDY, theDZ Directions of extrusion. # @param theScaleFactor Use it to make prism with scaled second base. # Nagative value means not scaled second base. - # @return New GEOM_Object, containing the created prism. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0): + """ + Create a shape by extrusion of the base shape along the dx, dy, dz direction + + Parameters: + theBase Base shape to be extruded. + theDX, theDY, theDZ Directions of extrusion. + theScaleFactor Use it to make prism with scaled second base. + Nagative value means not scaled second base. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py anObj = None Parameters = "" @@ -1441,10 +2388,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # along the vector on the given distance in 2 Ways (forward/backward). # @param theBase Base shape to be extruded. # @param theDX, theDY, theDZ Directions of extrusion. - # @return New GEOM_Object, containing the created prism. + # @return New GEOM.GEOM_Object, containing the created prism. # # @ref tui_creation_prism "Example" def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ): + """ + Create a shape by extrusion of the base shape along the dx, dy, dz direction + i.e. all the space, transfixed by the base shape during its translation + along the vector on the given distance in 2 Ways (forward/backward). + + Parameters: + theBase Base shape to be extruded. + theDX, theDY, theDZ Directions of extrusion. + + Returns: + New GEOM.GEOM_Object, containing the created prism. + """ # Example: see GEOM_TestAll.py theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ) anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ) @@ -1458,10 +2417,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created revolution. # # @ref tui_creation_revolution "Example" def MakeRevolution(self, theBase, theAxis, theAngle): + """ + Create a shape by revolution of the base shape around the axis + on the given angle, i.e. all the space, transfixed by the base + shape during its rotation around the axis on the given angle. + + Parameters: + theBase Base shape to be rotated. + theAxis Rotation axis. + theAngle Rotation angle in radians. + + Returns: + New GEOM.GEOM_Object, containing the created revolution. + """ # Example: see GEOM_TestAll.py theAngle,Parameters = ParseParameters(theAngle) anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle) @@ -1469,8 +2441,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj.SetParameters(Parameters) return anObj - ## The Same Revolution but in both ways forward&backward. + ## Create a shape by revolution of the base shape around the axis + # on the given angle, i.e. all the space, transfixed by the base + # shape during its rotation around the axis on the given angle in + # both directions (forward/backward) + # @param theBase Base shape to be rotated. + # @param theAxis Rotation axis. + # @param theAngle Rotation angle in radians. + # @return New GEOM.GEOM_Object, containing the created revolution. + # + # @ref tui_creation_revolution "Example" def MakeRevolution2Ways(self, theBase, theAxis, theAngle): + """ + Create a shape by revolution of the base shape around the axis + on the given angle, i.e. all the space, transfixed by the base + shape during its rotation around the axis on the given angle in + both directions (forward/backward). + + Parameters: + theBase Base shape to be rotated. + theAxis Rotation axis. + theAngle Rotation angle in radians. + + Returns: + New GEOM.GEOM_Object, containing the created revolution. + """ theAngle,Parameters = ParseParameters(theAngle) anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle) RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp) @@ -1484,24 +2479,40 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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 - # @param theMethod Kind of method to perform filling operation: - # GEOM.FOM_Default - Default - standard behaviour - # /GEOM.FOM_UseOri - 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. - # /GEOM.FOM_AutoCorrect - Auto-correct orientation - changes the orientation - # of the curves using minimization of sum of distances - # between the end points of the edges. + # @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method()) # @param isApprox if True, BSpline curves are generated in the process # of surface construction. By default it is False, that means # the surface is created using Besier curves. The usage of # Approximation makes the algorithm work slower, but allows # building the surface for rather complex cases - # @return New GEOM_Object, containing the created filling surface. + # @return New GEOM.GEOM_Object, containing the created filling surface. # # @ref tui_creation_filling "Example" def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0): + """ + Create a filling from the given compound of contours. + + Parameters: + theShape the compound of contours + theMinDeg a minimal degree of BSpline surface to create + theMaxDeg a maximal degree of BSpline surface to create + theTol2D a 2d tolerance to be reached + theTol3D a 3d tolerance to be reached + theNbIter a number of iteration of approximation algorithm + theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method()) + isApprox if True, BSpline curves are generated in the process + of surface construction. By default it is False, that means + the surface is created using Besier curves. The usage of + Approximation makes the algorithm work slower, but allows + building the surface for rather complex cases + + Returns: + New GEOM.GEOM_Object, containing the created filling surface. + + Example of usage: + filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5) + """ # Example: see GEOM_TestAll.py theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter) anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, @@ -1514,12 +2525,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 thePreci - precision 3D used for smoothing # @param theRuled - mode defining type of the result surfaces (ruled or smoothed). - # @return New GEOM_Object, containing the created shell or solid. + # @return New GEOM.GEOM_Object, containing the created shell or solid. # # @ref swig_todo "Example" def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled): + """ + Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. + + Parameters: + theSeqSections - set of specified sections. + theModeSolid - mode defining building solid or shell + thePreci - precision 3D used for smoothing + theRuled - mode defining type of the result surfaces (ruled or smoothed). + + Returns: + New GEOM.GEOM_Object, containing the created shell or solid. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled) RaiseIfFailed("MakeThruSections", self.PrimOp) @@ -1529,10 +2552,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the created pipe. # # @ref tui_creation_pipe "Example" def MakePipe(self,theBase, thePath): + """ + Create a shape by extrusion of the base shape along + the path shape. The path shape can be a wire or an edge. + + Parameters: + theBase Base shape to be extruded. + thePath Path shape to extrude the base shape along it. + + Returns: + New GEOM.GEOM_Object, containing the created pipe. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePipe(theBase, thePath) RaiseIfFailed("MakePipe", self.PrimOp) @@ -1550,12 +2584,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # contact with the spine. # @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. + # @return New GEOM.GEOM_Object, containing the created pipe. # # @ref tui_creation_pipe_with_diff_sec "Example" def MakePipeWithDifferentSections(self, theSeqBases, theLocations, thePath, theWithContact, theWithCorrection): + """ + 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. + + Parameters: + theSeqBases - list of Bases shape to be extruded. + 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. + thePath - Path shape to extrude the base shape along it. + theWithContact - the mode defining that the section is translated to be in + contact with the spine(0/1) + theWithCorrection - defining that the section is rotated to be + orthogonal to the spine tangent in the correspondent point (0/1) + + Returns: + New GEOM.GEOM_Object, containing the created pipe. + """ anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases, theLocations, thePath, theWithContact, theWithCorrection) @@ -1583,12 +2636,40 @@ class geompyDC(GEOM._objref_GEOM_Gen): # contact with the spine. # @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 solids. + # @return New GEOM.GEOM_Object, containing the created solids. # # @ref tui_creation_pipe_with_shell_sec "Example" def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases, theLocations, thePath, theWithContact, theWithCorrection): + """ + Create a shape by extrusion of the profile shape along + the path shape. The path shape can be a wire or a edge. + the several profiles can be specified in the several locations of path. + + Parameters: + theSeqBases - list of Bases shape to be extruded. Base shape must be + shell or face. If number of faces in neighbour sections + aren't coincided result solid between such sections will + be created using external boundaries of this shells. + theSeqSubBases - list of corresponding sub-shapes of section shapes. + This list is used for searching correspondences between + faces in the sections. Size of this list must be equal + to size of list of base shapes. + theLocations - list of locations on the path corresponding + specified list of the Bases shapes. Number of locations + should be equal to number of bases. First and last + locations must be coincided with first and last vertexes + of path correspondingly. + thePath - Path shape to extrude the base shape along it. + theWithContact - the mode defining that the section is translated to be in + contact with the spine (0/1) + theWithCorrection - defining that the section is rotated to be + orthogonal to the spine tangent in the correspondent point (0/1) + + Returns: + New GEOM.GEOM_Object, containing the created solids. + """ anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases, theLocations, thePath, theWithContact, theWithCorrection) @@ -1597,13 +2678,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a shape by extrusion of the profile shape along # the path shape. This function is used only for debug pipe - # functionality - it is a version of previous function - # (MakePipeWithShellSections(...)) which give a possibility to - # recieve information about creating pipe between each pair of - # sections step by step. + # functionality - it is a version of function MakePipeWithShellSections() + # which give a possibility to recieve information about + # creating pipe between each pair of sections step by step. def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases, theLocations, thePath, theWithContact, theWithCorrection): + """ + Create a shape by extrusion of the profile shape along + the path shape. This function is used only for debug pipe + functionality - it is a version of previous function + geompy.MakePipeWithShellSections() which give a possibility to + recieve information about creating pipe between each pair of + sections step by step. + """ res = [] nbsect = len(theSeqBases) nbsubsect = len(theSeqSubBases) @@ -1635,10 +2723,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing the created solids. # # @ref tui_creation_pipe_without_path "Example" def MakePipeShellsWithoutPath(self, theSeqBases, theLocations): + """ + Create solids between given sections + + Parameters: + theSeqBases - list of sections (shell or face). + theLocations - list of corresponding vertexes + + Returns: + New GEOM.GEOM_Object, containing the created solids. + """ anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations) RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp) return anObj @@ -1651,10 +2749,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the created pipe. # # @ref tui_creation_pipe "Example" def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec): + """ + Create a shape by extrusion of the base shape along + the path shape with constant bi-normal direction along the given vector. + The path shape can be a wire or an edge. + + Parameters: + theBase Base shape to be extruded. + thePath Path shape to extrude the base shape along it. + theVec Vector defines a constant binormal direction to keep the + same angle beetween the direction and the sections + along the sweep surface. + + Returns: + New GEOM.GEOM_Object, containing the created pipe. + """ # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec) RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp) @@ -1669,10 +2782,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a linear edge with specified ends. # @param thePnt1 Point for the first end of edge. # @param thePnt2 Point for the second end of edge. - # @return New GEOM_Object, containing the created edge. + # @return New GEOM.GEOM_Object, containing the created edge. # # @ref tui_creation_edge "Example" def MakeEdge(self,thePnt1, thePnt2): + """ + Create a linear edge with specified ends. + + Parameters: + thePnt1 Point for the first end of edge. + thePnt2 Point for the second end of edge. + + Returns: + New GEOM.GEOM_Object, containing the created edge. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2) RaiseIfFailed("MakeEdge", self.ShapesOp) @@ -1684,10 +2807,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theStartPoint Any point can be selected for it, the new edge will begin # at the end of \a theRefCurve, close to the selected point. # If None, start from the first point of \a theRefCurve. - # @return New GEOM_Object, containing the created edge. + # @return New GEOM.GEOM_Object, containing the created edge. # # @ref tui_creation_edge "Example" def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None): + """ + Create a new edge, corresponding to the given length on the given curve. + + Parameters: + theRefCurve The referenced curve (edge). + theLength Length on the referenced curve. It can be negative. + theStartPoint Any point can be selected for it, the new edge will begin + at the end of theRefCurve, close to the selected point. + If None, start from the first point of theRefCurve. + + Returns: + New GEOM.GEOM_Object, containing the created edge. + """ # Example: see GEOM_TestAll.py theLength, Parameters = ParseParameters(theLength) anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint) @@ -1696,13 +2832,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): return anObj ## 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. + # @param theWire source Wire + # @param theLinearTolerance linear tolerance value (default = 1e-07) + # @param theAngularTolerance angular tolerance value (default = 1e-12) + # @return New GEOM.GEOM_Object, containing the created edge. # # @ref tui_creation_edge "Example" def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12): + """ + Create an edge from specified wire. + + Parameters: + theWire source Wire + theLinearTolerance linear tolerance value (default = 1e-07) + theAngularTolerance angular tolerance value (default = 1e-12) + + Returns: + New GEOM.GEOM_Object, containing the created edge. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance) RaiseIfFailed("MakeEdgeWire", self.ShapesOp) @@ -1711,11 +2858,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a wire from the set of edges and wires. # @param theEdgesAndWires List of edges and/or wires. # @param theTolerance Maximum distance between vertices, that will be merged. - # Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()). - # @return New GEOM_Object, containing the created wire. + # Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()) + # @return New GEOM.GEOM_Object, containing the created wire. # # @ref tui_creation_wire "Example" def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07): + """ + Create a wire from the set of edges and wires. + + Parameters: + theEdgesAndWires List of edges and/or wires. + theTolerance Maximum distance between vertices, that will be merged. + Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()). + + Returns: + New GEOM.GEOM_Object, containing the created wire. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance) RaiseIfFailed("MakeWire", self.ShapesOp) @@ -1725,10 +2883,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theWire closed Wire or Edge to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_creation_face "Example" def MakeFace(self,theWire, isPlanarWanted): + """ + Create a face on the given wire. + + Parameters: + theWire closed Wire or Edge to build the face on. + isPlanarWanted If TRUE, only planar face will be built. + If impossible, NULL object will be returned. + + Returns: + New GEOM.GEOM_Object, containing the created face. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted) if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG": @@ -1742,10 +2911,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theWires List of closed wires or edges to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_creation_face "Example" def MakeFaceWires(self,theWires, isPlanarWanted): + """ + Create a face on the given wires set. + + Parameters: + theWires List of closed wires or edges to build the face on. + isPlanarWanted If TRUE, only planar face will be built. + If impossible, NULL object will be returned. + + Returns: + New GEOM.GEOM_Object, containing the created face. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted) if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG": @@ -1754,21 +2934,33 @@ class geompyDC(GEOM._objref_GEOM_Gen): RaiseIfFailed("MakeFaceWires", self.ShapesOp) return anObj - ## Shortcut to MakeFaceWires() + ## See MakeFaceWires() method for details. # # @ref tui_creation_face "Example 1" # \n @ref swig_MakeFaces "Example 2" def MakeFaces(self,theWires, isPlanarWanted): + """ + See geompy.MakeFaceWires() method for details. + """ # Example: see GEOM_TestOthers.py anObj = self.MakeFaceWires(theWires, isPlanarWanted) return anObj ## Create a shell from the set of faces and shells. # @param theFacesAndShells List of faces and/or shells. - # @return New GEOM_Object, containing the created shell. + # @return New GEOM.GEOM_Object, containing the created shell. # # @ref tui_creation_shell "Example" def MakeShell(self,theFacesAndShells): + """ + Create a shell from the set of faces and shells. + + Parameters: + theFacesAndShells List of faces and/or shells. + + Returns: + New GEOM.GEOM_Object, containing the created shell. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeShell(theFacesAndShells) RaiseIfFailed("MakeShell", self.ShapesOp) @@ -1776,10 +2968,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a solid, bounded by the given shells. # @param theShells Sequence of bounding shells. - # @return New GEOM_Object, containing the created solid. + # @return New GEOM.GEOM_Object, containing the created solid. # # @ref tui_creation_solid "Example" def MakeSolid(self,theShells): + """ + Create a solid, bounded by the given shells. + + Parameters: + theShells Sequence of bounding shells. + + Returns: + New GEOM.GEOM_Object, containing the created solid. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeSolidShells(theShells) RaiseIfFailed("MakeSolidShells", self.ShapesOp) @@ -1787,10 +2988,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a compound of the given shapes. # @param theShapes List of shapes to put in compound. - # @return New GEOM_Object, containing the created compound. + # @return New GEOM.GEOM_Object, containing the created compound. # # @ref tui_creation_compound "Example" def MakeCompound(self,theShapes): + """ + Create a compound of the given shapes. + + Parameters: + theShapes List of shapes to put in compound. + + Returns: + New GEOM.GEOM_Object, containing the created compound. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeCompound(theShapes) RaiseIfFailed("MakeCompound", self.ShapesOp) @@ -1808,6 +3018,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_NumberOf "Example" def NumberOfFaces(self, theShape): + """ + Gives quantity of faces in the given shape. + + Parameters: + theShape Shape to count faces of. + + Returns: + Quantity of faces. + """ # Example: see GEOM_TestOthers.py nb_faces = self.ShapesOp.NumberOfFaces(theShape) RaiseIfFailed("NumberOfFaces", self.ShapesOp) @@ -1819,6 +3038,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_NumberOf "Example" def NumberOfEdges(self, theShape): + """ + Gives quantity of edges in the given shape. + + Parameters: + theShape Shape to count edges of. + + Returns: + Quantity of edges. + """ # Example: see GEOM_TestOthers.py nb_edges = self.ShapesOp.NumberOfEdges(theShape) RaiseIfFailed("NumberOfEdges", self.ShapesOp) @@ -1826,11 +3054,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Gives quantity of sub-shapes of type theShapeType in the given shape. # @param theShape Shape to count sub-shapes of. - # @param theShapeType Type of sub-shapes to count. + # @param theShapeType Type of sub-shapes to count (see ShapeType()) # @return Quantity of sub-shapes of given type. # # @ref swig_NumberOf "Example" def NumberOfSubShapes(self, theShape, theShapeType): + """ + Gives quantity of sub-shapes of type theShapeType in the given shape. + + Parameters: + theShape Shape to count sub-shapes of. + theShapeType Type of sub-shapes to count (see geompy.ShapeType) + + Returns: + Quantity of sub-shapes of given type. + """ # Example: see GEOM_TestOthers.py nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType) RaiseIfFailed("NumberOfSubShapes", self.ShapesOp) @@ -1842,6 +3080,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_NumberOf "Example" def NumberOfSolids(self, theShape): + """ + Gives quantity of solids in the given shape. + + Parameters: + theShape Shape to count solids in. + + Returns: + Quantity of solids. + """ # Example: see GEOM_TestOthers.py nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"]) RaiseIfFailed("NumberOfSolids", self.ShapesOp) @@ -1859,15 +3106,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_ChangeOrientation "Example" def ChangeOrientation(self,theShape): + """ + Reverses an orientation the given shape. + + Parameters: + theShape Shape to be reversed. + + Returns: + The reversed copy of theShape. + """ # Example: see GEOM_TestAll.py anObj = self.ShapesOp.ChangeOrientation(theShape) RaiseIfFailed("ChangeOrientation", self.ShapesOp) return anObj - ## Shortcut to ChangeOrientation() + ## See ChangeOrientation() method for details. # # @ref swig_OrientationChange "Example" def OrientationChange(self,theShape): + """ + See geompy.ChangeOrientation method for details. + """ # Example: see GEOM_TestOthers.py anObj = self.ChangeOrientation(theShape) return anObj @@ -1885,6 +3144,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def GetFreeFacesIDs(self,theShape): + """ + Retrieve all free faces from the given shape. + Free face is a face, which is not shared between two shells of the shape. + + Parameters: + theShape Shape to find free faces in. + + Returns: + List of IDs of all free faces, contained in theShape. + """ # Example: see GEOM_TestOthers.py anIDs = self.ShapesOp.GetFreeFacesIDs(theShape) RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp) @@ -1898,6 +3167,17 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetSharedShapes "Example" def GetSharedShapes(self,theShape1, theShape2, theShapeType): + """ + Get all sub-shapes of theShape1 of the given type, shared with theShape2. + + Parameters: + theShape1 Shape to find sub-shapes in. + theShape2 Shape to find shared sub-shapes with. + theShapeType Type of sub-shapes to be retrieved. + + Returns: + List of sub-shapes of theShape1, shared with theShape2. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType) RaiseIfFailed("GetSharedShapes", self.ShapesOp) @@ -1905,11 +3185,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get all sub-shapes, shared by all shapes in the list theShapes. # @param theShapes Shapes to find common sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of objects, that are sub-shapes of all given shapes. # # @ref swig_GetSharedShapes "Example" def GetSharedShapesMulti(self, theShapes, theShapeType): + """ + Get all sub-shapes, shared by all shapes in the list theShapes. + + Parameters: + theShapes Shapes to find common sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + List of GEOM.GEOM_Object, that are sub-shapes of all given shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType) RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp) @@ -1919,24 +3209,61 @@ class geompyDC(GEOM._objref_GEOM_Gen): # situated relatively the specified plane by the certain way, # defined through theState parameter. # @param theShape Shape to find sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theAx1 Vector (or line, or linear edge), specifying normal # direction and location of the plane to find shapes on. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnPlane "Example" def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified plane by the certain way, + defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAx1 Vector (or line, or linear edge), specifying normal + direction and location of the plane to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState) RaiseIfFailed("GetShapesOnPlane", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## Find in theShape all sub-shapes of type theShapeType, + # situated relatively the specified plane by the certain way, + # defined through theState parameter. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theAx1 Vector (or line, or linear edge), specifying normal + # direction and location of the plane to find shapes on. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnPlaneIDs "Example" def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified plane by the certain way, + defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAx1 Vector (or line, or linear edge), specifying normal + direction and location of the plane to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState) RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp) @@ -1946,26 +3273,66 @@ class geompyDC(GEOM._objref_GEOM_Gen): # situated relatively the specified plane by the certain way, # defined through theState parameter. # @param theShape Shape to find sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theAx1 Vector (or line, or linear edge), specifying normal # direction of the plane to find shapes on. # @param thePnt Point specifying location of the plane to find shapes on. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnPlaneWithLocation "Example" def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified plane by the certain way, + defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAx1 Vector (or line, or linear edge), specifying normal + direction and location of the plane to find shapes on. + thePnt Point specifying location of the plane to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState) RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## Find in theShape all sub-shapes of type theShapeType, + # situated relatively the specified plane by the certain way, + # defined through theState parameter. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theAx1 Vector (or line, or linear edge), specifying normal + # direction of the plane to find shapes on. + # @param thePnt Point specifying location of the plane to find shapes on. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnPlaneWithLocationIDs "Example" def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified plane by the certain way, + defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAx1 Vector (or line, or linear edge), specifying normal + direction and location of the plane to find shapes on. + thePnt Point specifying location of the plane to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState) @@ -1975,25 +3342,62 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theAxis Vector (or line, or linear edge), specifying # axis of the cylinder to find shapes on. # @param theRadius Radius of the cylinder to find shapes on. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnCylinder "Example" def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified cylinder by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAxis Vector (or line, or linear edge), specifying + axis of the cylinder to find shapes on. + theRadius Radius of the cylinder to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState) RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## 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 (see ShapeType()) + # @param theAxis Vector (or line, or linear edge), specifying + # axis of the cylinder to find shapes on. + # @param theRadius Radius of the cylinder to find shapes on. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnCylinderIDs "Example" def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified cylinder by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAxis Vector (or line, or linear edge), specifying + axis of the cylinder to find shapes on. + theRadius Radius of the cylinder to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState) RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp) @@ -2002,26 +3406,64 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @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. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnCylinderWithLocation "Example" def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified cylinder by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAxis Vector (or line, or linear edge), specifying + axis of the cylinder to find shapes on. + theRadius Radius of the cylinder to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState) RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## 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 (see ShapeType()) + # @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 (see GEOM::shape_state) + # @return List of all found sub-shapes indices # # @ref swig_GetShapesOnCylinderWithLocationIDs "Example" def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified cylinder by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theAxis Vector (or line, or linear edge), specifying + axis of the cylinder to find shapes on. + theRadius Radius of the cylinder to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState) RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp) @@ -2030,24 +3472,58 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theCenter Point, specifying center of the sphere to find shapes on. # @param theRadius Radius of the sphere to find shapes on. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnSphere "Example" def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified sphere by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theCenter Point, specifying center of the sphere to find shapes on. + theRadius Radius of the sphere to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState) RaiseIfFailed("GetShapesOnSphere", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## 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 (see ShapeType()) + # @param theCenter Point, specifying center of the sphere to find shapes on. + # @param theRadius Radius of the sphere to find shapes on. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnSphereIDs "Example" def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified sphere by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theCenter Point, specifying center of the sphere to find shapes on. + theRadius Radius of the sphere to find shapes on. + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState) RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp) @@ -2056,19 +3532,34 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theTopLeftPoint Point, specifying top left corner of a quadrangle # @param theTopRigthPoint Point, specifying top right corner of a quadrangle # @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnQuadrangle "Example" def GetShapesOnQuadrangle(self, theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified quadrangle by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theTopLeftPoint Point, specifying top left corner of a quadrangle + theTopRigthPoint Point, specifying top right corner of a quadrangle + theBottomLeftPoint Point, specifying bottom left corner of a quadrangle + theBottomRigthPoint Point, specifying bottom right corner of a quadrangle + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, @@ -2076,12 +3567,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## 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 (see ShapeType()) + # @param theTopLeftPoint Point, specifying top left corner of a quadrangle + # @param theTopRigthPoint Point, specifying top right corner of a quadrangle + # @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle + # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnQuadrangleIDs "Example" def GetShapesOnQuadrangleIDs(self, theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified quadrangle by the certain way, defined through theState parameter. + + Parameters: + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theTopLeftPoint Point, specifying top left corner of a quadrangle + theTopRigthPoint Point, specifying top right corner of a quadrangle + theBottomLeftPoint Point, specifying bottom left corner of a quadrangle + theBottomRigthPoint Point, specifying bottom right corner of a quadrangle + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, @@ -2093,22 +3610,53 @@ class geompyDC(GEOM._objref_GEOM_Gen): # the specified \a theBox by the certain way, defined through \a theState parameter. # @param theBox Shape for relative comparing. # @param theShape Shape to find sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnBox "Example" def GetShapesOnBox(self, theBox, theShape, theShapeType, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified theBox by the certain way, defined through theState parameter. + + Parameters: + theBox Shape for relative comparing. + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnBox", self.ShapesOp) return aList - ## Works like the above method, but returns list of sub-shapes indices + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + # the specified \a theBox by the certain way, defined through \a theState parameter. + # @param theBox Shape for relative comparing. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnBoxIDs "Example" def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState): + """ + Find in theShape all sub-shapes of type theShapeType, situated relatively + the specified theBox by the certain way, defined through theState parameter. + + Parameters: + theBox Shape for relative comparing. + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp) @@ -2119,33 +3667,88 @@ class geompyDC(GEOM._objref_GEOM_Gen): # certain way, defined through \a theState parameter. # @param theCheckShape Shape for relative comparing. It must be a solid. # @param theShape Shape to find sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved. - # @param theState The state of the sub-shapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # # @ref swig_GetShapesOnShape "Example" def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified theCheckShape by the + certain way, defined through theState parameter. + + Parameters: + theCheckShape Shape for relative comparing. It must be a solid. + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnShape", self.ShapesOp) return aList - ## Works like the above method, but returns result as compound + ## Find in \a theShape all sub-shapes of type \a theShapeType, + # situated relatively the specified \a theCheckShape by the + # certain way, defined through \a theState parameter. + # @param theCheckShape Shape for relative comparing. It must be a solid. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return All found sub-shapes as compound. # # @ref swig_GetShapesOnShapeAsCompound "Example" def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified theCheckShape by the + certain way, defined through theState parameter. + + Parameters: + theCheckShape Shape for relative comparing. It must be a solid. + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + All found sub-shapes as compound. + """ # Example: see GEOM_TestOthers.py anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp) return anObj - ## Works like the above method, but returns list of sub-shapes indices + ## Find in \a theShape all sub-shapes of type \a theShapeType, + # situated relatively the specified \a theCheckShape by the + # certain way, defined through \a theState parameter. + # @param theCheckShape Shape for relative comparing. It must be a solid. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theState The state of the sub-shapes to find (see GEOM::shape_state) + # @return List of all found sub-shapes indices. # # @ref swig_GetShapesOnShapeIDs "Example" def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState): + """ + Find in theShape all sub-shapes of type theShapeType, + situated relatively the specified theCheckShape by the + certain way, defined through theState parameter. + + Parameters: + theCheckShape Shape for relative comparing. It must be a solid. + theShape Shape to find sub-shapes of. + theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) + theState The state of the sub-shapes to find (see GEOM::shape_state) + + Returns: + List of all found sub-shapes indices. + """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape, theShapeType, theState) @@ -2156,6 +3759,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @param isNewImplementation implementation of GetInPlace functionality + # (default = False, old alghorithm based on shape properties) # @return Group of all found sub-shapes or a single found sub-shape. # # @note This function has a restriction on argument shapes. @@ -2166,6 +3771,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetInPlace "Example" def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False): + """ + Get sub-shape(s) of theShapeWhere, which are + coincident with theShapeWhat or could be a part of it. + + Parameters: + theShapeWhere Shape to find sub-shapes of. + theShapeWhat Shape, specifying what to find. + isNewImplementation Implementation of GetInPlace functionality + (default = False, old alghorithm based on shape properties) + + Returns: + Group of all found sub-shapes or a single found sub-shape. + + + Note: + This function has a restriction on argument shapes. + If theShapeWhere has curved parts with significantly + outstanding centres (i.e. the mass centre of a part is closer to + theShapeWhat than to the part), such parts will not be found. + """ # Example: see GEOM_TestOthers.py anObj = None if isNewImplementation: @@ -2192,6 +3817,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetInPlace "Example" def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat): + """ + Implementation of this method is based on a saved history of an operation, + produced theShapeWhere. The 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). + + Parameters: + theShapeWhere Shape to find sub-shapes of. + theShapeWhat Shape, specifying what to find (must be in the + building history of the ShapeWhere). + + Returns: + Group of all found sub-shapes or a single found sub-shape. + """ # Example: see GEOM_TestOthers.py anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat) RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp) @@ -2201,10 +3841,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # equal to \a theShapeWhat. # @param theShapeWhere Shape to find sub-shape of. # @param theShapeWhat Shape, specifying what to find. - # @return New GEOM_Object for found sub-shape. + # @return New GEOM.GEOM_Object for found sub-shape. # # @ref swig_GetSame "Example" def GetSame(self,theShapeWhere, theShapeWhat): + """ + Get sub-shape of theShapeWhere, which is + equal to theShapeWhat. + + Parameters: + theShapeWhere Shape to find sub-shape of. + theShapeWhat Shape, specifying what to find. + + Returns: + New GEOM.GEOM_Object for found sub-shape. + """ anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat) RaiseIfFailed("GetSame", self.ShapesOp) return anObj @@ -2217,17 +3868,46 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Obtain a composite sub-shape of aShape, composed from sub-shapes # of aShape, selected by their unique IDs inside aShape + # @param aShape Shape to get sub-shape of. + # @param ListOfID List of sub-shapes indices. + # @return Found sub-shape. # # @ref swig_all_decompose "Example" def GetSubShape(self, aShape, ListOfID): + """ + Obtain a composite sub-shape of aShape, composed from sub-shapes + of aShape, selected by their unique IDs inside aShape + + Parameters: + aShape Shape to get sub-shape of. + ListOfID List of sub-shapes indices. + + Returns: + Found sub-shape. + """ # Example: see GEOM_TestAll.py anObj = self.AddSubShape(aShape,ListOfID) return anObj ## Obtain unique ID of sub-shape aSubShape inside aShape + # of aShape, selected by their unique IDs inside aShape + # @param aShape Shape to get sub-shape of. + # @param aSubShape Sub-shapes of aShape. + # @return ID of found sub-shape. # # @ref swig_all_decompose "Example" def GetSubShapeID(self, aShape, aSubShape): + """ + Obtain unique ID of sub-shape aSubShape inside aShape + of aShape, selected by their unique IDs inside aShape + + Parameters: + aShape Shape to get sub-shape of. + aSubShape Sub-shapes of aShape. + + Returns: + ID of found sub-shape. + """ # Example: see GEOM_TestAll.py anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape) RaiseIfFailed("GetSubShapeIndex", self.LocalOp) @@ -2248,6 +3928,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_all_decompose "Example" def GetExistingSubObjects(self, theShape, theGroupsOnly = False): + """ + Get all sub-shapes and groups of theShape, + that were created already by any other methods. + + Parameters: + theShape Any shape. + theGroupsOnly If this parameter is TRUE, only groups will be + returned, else all found sub-shapes and groups. + + Returns: + List of existing sub-objects of theShape. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly) RaiseIfFailed("GetExistingSubObjects", self.ShapesOp) @@ -2260,6 +3952,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_all_decompose "Example" def GetGroups(self, theShape): + """ + Get all groups of theShape, + that were created already by any other methods. + + Parameters: + theShape Any shape. + + Returns: + List of existing groups of theShape. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True) RaiseIfFailed("GetExistingSubObjects", self.ShapesOp) @@ -2268,11 +3970,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Explode a shape on sub-shapes of a given type. # If the shape itself matches the type, it is also returned. # @param aShape Shape to be exploded. - # @param aType Type of sub-shapes to be retrieved. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of sub-shapes of type theShapeType, contained in theShape. # # @ref swig_all_decompose "Example" def SubShapeAll(self, aShape, aType): + """ + Explode a shape on sub-shapes of a given type. + If the shape itself matches the type, it is also returned. + + Parameters: + aShape Shape to be exploded. + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + List of sub-shapes of type theShapeType, contained in theShape. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False) RaiseIfFailed("SubShapeAll", self.ShapesOp) @@ -2280,11 +3993,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Explode a shape on sub-shapes of a given type. # @param aShape Shape to be exploded. - # @param aType Type of sub-shapes to be retrieved. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of IDs of sub-shapes. # # @ref swig_all_decompose "Example" def SubShapeAllIDs(self, aShape, aType): + """ + Explode a shape on sub-shapes of a given type. + + Parameters: + aShape Shape to be exploded (see geompy.ShapeType) + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + List of IDs of sub-shapes. + """ ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False) RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) return ListObj @@ -2292,9 +4015,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Obtain a compound of sub-shapes of aShape, # selected by they indices in list of all sub-shapes of type aType. # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] + # @param aShape Shape to get sub-shape of. + # @param aListOfInd List of sub-shapes indices. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) + # @return A compound of sub-shapes of aShape. # # @ref swig_all_decompose "Example" def SubShape(self, aShape, aType, ListOfInd): + """ + Obtain a compound of sub-shapes of aShape, + selected by they indices in list of all sub-shapes of type aType. + Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] + + Parameters: + aShape Shape to get sub-shape of. + ListOfID List of sub-shapes indices. + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + A compound of sub-shapes of aShape. + """ # Example: see GEOM_TestAll.py ListOfIDs = [] AllShapeIDsList = self.SubShapeAllIDs(aShape, aType) @@ -2307,11 +4047,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Sub-shapes will be sorted by coordinates of their gravity centers. # If the shape itself matches the type, it is also returned. # @param aShape Shape to be exploded. - # @param aType Type of sub-shapes to be retrieved. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of sub-shapes of type theShapeType, contained in theShape. # # @ref swig_SubShapeAllSorted "Example" def SubShapeAllSortedCentres(self, aShape, aType): + """ + Explode a shape on sub-shapes of a given type. + Sub-shapes will be sorted by coordinates of their gravity centers. + If the shape itself matches the type, it is also returned. + + Parameters: + aShape Shape to be exploded. + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + List of sub-shapes of type theShapeType, contained in theShape. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True) RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp) @@ -2320,11 +4072,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Explode a shape on sub-shapes of a given type. # Sub-shapes will be sorted by coordinates of their gravity centers. # @param aShape Shape to be exploded. - # @param aType Type of sub-shapes to be retrieved. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of IDs of sub-shapes. # # @ref swig_all_decompose "Example" def SubShapeAllSortedCentresIDs(self, aShape, aType): + """ + Explode a shape on sub-shapes of a given type. + Sub-shapes will be sorted by coordinates of their gravity centers. + + Parameters: + aShape Shape to be exploded. + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + List of IDs of sub-shapes. + """ ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True) RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) return ListIDs @@ -2332,9 +4095,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Obtain a compound of sub-shapes of aShape, # selected by they indices in sorted list of all sub-shapes of type aType. # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] + # @param aShape Shape to get sub-shape of. + # @param aListOfInd List of sub-shapes indices. + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) + # @return A compound of sub-shapes of aShape. # # @ref swig_all_decompose "Example" def SubShapeSortedCentres(self, aShape, aType, ListOfInd): + """ + Obtain a compound of sub-shapes of aShape, + selected by they indices in sorted list of all sub-shapes of type aType. + Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] + + Parameters: + aShape Shape to get sub-shape of. + ListOfID List of sub-shapes indices. + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + + Returns: + A compound of sub-shapes of aShape. + """ # Example: see GEOM_TestAll.py ListOfIDs = [] AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType) @@ -2345,12 +4125,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Extract shapes (excluding the main shape) of given type. # @param aShape The shape. - # @param aType The shape type. + # @param aType The shape type (see ShapeType()) # @param isSorted Boolean flag to switch sorting on/off. # @return List of sub-shapes of type aType, contained in aShape. # # @ref swig_FilletChamfer "Example" def ExtractShapes(self, aShape, aType, isSorted = False): + """ + Extract shapes (excluding the main shape) of given type. + + Parameters: + aShape The shape. + aType The shape type (see geompy.ShapeType) + isSorted Boolean flag to switch sorting on/off. + + Returns: + List of sub-shapes of type aType, contained in aShape. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted) RaiseIfFailed("ExtractSubShapes", self.ShapesOp) @@ -2359,10 +4150,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get a set of sub-shapes defined by their unique IDs inside theMainShape # @param theMainShape Main shape. # @param theIndices List of unique IDs of sub-shapes inside theMainShape. - # @return List of GEOM_Objects, corresponding to found sub-shapes. + # @return List of GEOM.GEOM_Object, corresponding to found sub-shapes. # # @ref swig_all_decompose "Example" def SubShapes(self, aShape, anIDs): + """ + Get a set of sub-shapes defined by their unique IDs inside theMainShape + + Parameters: + theMainShape Main shape. + theIndices List of unique IDs of sub-shapes inside theMainShape. + + Returns: + List of GEOM.GEOM_Object, corresponding to found sub-shapes. + """ # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs) RaiseIfFailed("SubShapes", self.ShapesOp) @@ -2375,25 +4176,40 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## @{ ## Deprecated method - # It works like SubShapeAllSortedCentres, but wrongly + # It works like SubShapeAllSortedCentres(), but wrongly # defines centres of faces, shells and solids. def SubShapeAllSorted(self, aShape, aType): + """ + Deprecated method + It works like geompy.SubShapeAllSortedCentres, but wrongly + defines centres of faces, shells and solids. + """ ListObj = self.ShapesOp.MakeExplode(aShape, aType, True) RaiseIfFailed("MakeExplode", self.ShapesOp) return ListObj ## Deprecated method - # It works like SubShapeAllSortedCentresIDs, but wrongly + # It works like SubShapeAllSortedCentresIDs(), but wrongly # defines centres of faces, shells and solids. def SubShapeAllSortedIDs(self, aShape, aType): + """ + Deprecated method + It works like geompy.SubShapeAllSortedCentresIDs, but wrongly + defines centres of faces, shells and solids. + """ ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True) RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) return ListIDs ## Deprecated method - # It works like SubShapeSortedCentres, but has a bug + # It works like SubShapeSortedCentres(), but has a bug # (wrongly defines centres of faces, shells and solids). def SubShapeSorted(self, aShape, aType, ListOfInd): + """ + Deprecated method + It works like geompy.SubShapeSortedCentres, but has a bug + (wrongly defines centres of faces, shells and solids). + """ ListOfIDs = [] AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType) for ind in ListOfInd: @@ -2414,10 +4230,157 @@ class geompyDC(GEOM._objref_GEOM_Gen): # ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.). # @param theValues List of values of parameters, in the same order # as parameters are listed in theParameters list. - # @return New GEOM_Object, containing processed shape. # - # @ref tui_shape_processing "Example" + # + # Operators and Parameters: \n + # + # * \b FixShape - corrects invalid shapes. \n + # - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n + # - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n + # + # * \b FixFaceSize - removes small faces, such as spots and strips.\n + # - \b FixFaceSize.Tolerance - defines minimum possible face size. \n + # - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n + # - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n + # + # * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical + # surfaces in segments using a certain angle. \n + # - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments + # if Angle=180, four if Angle=90, etc). \n + # - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n + # + # * \b SplitClosedFaces - splits closed faces in segments. + # The number of segments depends on the number of splitting points.\n + # - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n + # + # * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n + # - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n + # - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n + # - \b SplitContinuity.CurveContinuity - required continuity for curves.\n + # This and the previous parameters can take the following values:\n + # \b Parametric \b Continuity \n + # \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces + # are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n + # \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel, + # ruling out sharp edges).\n + # \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces + # are of the same magnitude).\n + # \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves + # or surfaces (d/du C(u)) are the same at junction. \n + # \b Geometric \b Continuity \n + # \b G1: first derivatives are proportional at junction.\n + # The curve tangents thus have the same direction, but not necessarily the same magnitude. + # i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n + # \b G2: first and second derivatives are proportional at junction. + # As the names imply, geometric continuity requires the geometry to be continuous, while parametric + # continuity requires that the underlying parameterization was continuous as well. + # Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n + # + # * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n + # - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n + # - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n + # - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n + # - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation + # with the specified parameters.\n + # - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation + # with the specified parameters.\n + # - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n + # - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n + # - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n + # - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n + # + # * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n + # - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n + # - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n + # - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n + # - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n + # + # * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n + # - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n + # + # + # @return New GEOM.GEOM_Object, containing processed shape. + # + # \n @ref tui_shape_processing "Example" def ProcessShape(self, theShape, theOperators, theParameters, theValues): + """ + Apply a sequence of Shape Healing operators to the given object. + + Parameters: + theShape Shape to be processed. + theValues List of values of parameters, in the same order + as parameters are listed in theParameters list. + theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.). + theParameters List of names of parameters + ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.). + Operators and Parameters: + + * FixShape - corrects invalid shapes. + * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. + * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. + * FixFaceSize - removes small faces, such as spots and strips. + * FixFaceSize.Tolerance - defines minimum possible face size. + * DropSmallEdges - removes edges, which merge with neighbouring edges. + * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges. + * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces + in segments using a certain angle. + * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments + if Angle=180, four if Angle=90, etc). + * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments. + * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of + splitting points. + * SplitClosedFaces.NbSplitPoints - the number of splitting points. + * SplitContinuity - splits shapes to reduce continuities of curves and surfaces. + * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry. + * SplitContinuity.SurfaceContinuity - required continuity for surfaces. + * SplitContinuity.CurveContinuity - required continuity for curves. + This and the previous parameters can take the following values: + + Parametric Continuity: + C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are + coincidental. The curves or surfaces may still meet at an angle, + giving rise to a sharp corner or edge). + C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces + are parallel, ruling out sharp edges). + C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves + or surfaces are of the same magnitude). + CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of + curves or surfaces (d/du C(u)) are the same at junction. + + Geometric Continuity: + G1: first derivatives are proportional at junction. + The curve tangents thus have the same direction, but not necessarily the same magnitude. + i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c). + G2: first and second derivatives are proportional at junction. As the names imply, + geometric continuity requires the geometry to be continuous, while parametric continuity requires + that the underlying parameterization was continuous as well. Parametric continuity of order n implies + geometric continuity of order n, but not vice-versa. + * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters: + * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary. + * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation. + * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation. + * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with + the specified parameters. + * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with + the specified parameters. + * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines. + * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines. + * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves. + * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves. + * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces. + * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces. + * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves. + * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves. + * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems. + * SameParameter - fixes edges of 2D and 3D curves not having the same parameter. + * SameParameter.Tolerance3d - defines tolerance for fixing of edges. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + + Note: For more information look through SALOME Geometry User's Guide-> + -> Introduction to Geometry-> Repairing Operations-> Shape Processing + """ # Example: see GEOM_TestHealing.py theValues,Parameters = ParseList(theValues) anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues) @@ -2435,19 +4398,43 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_suppress_faces "Example" def SuppressFaces(self,theObject, theFaces): + """ + Remove faces from the given object (shape). + + Parameters: + theObject Shape to be processed. + theFaces Indices of faces to be removed, if EMPTY then the method + removes ALL faces of the given object. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.SuppressFaces(theObject, theFaces) RaiseIfFailed("SuppressFaces", self.HealOp) return anObj ## Sewing of some shapes into single shape. + # @param ListShape Shapes to be processed. + # @param theTolerance Required tolerance value. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_sewing "Example" def MakeSewing(self, ListShape, theTolerance): + """ + Sewing of some shapes into single shape. + + Parameters: + ListShape Shapes to be processed. + theTolerance Required tolerance value. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py comp = self.MakeCompound(ListShape) anObj = self.Sew(comp, theTolerance) @@ -2456,8 +4443,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Sewing of the given object. # @param theObject Shape to be processed. # @param theTolerance Required tolerance value. - # @return New GEOM_Object, containing processed shape. + # @return New GEOM.GEOM_Object, containing processed shape. def Sew(self, theObject, theTolerance): + """ + Sewing of the given object. + + Parameters: + theObject Shape to be processed. + theTolerance Required tolerance value. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see MakeSewing() above theTolerance,Parameters = ParseParameters(theTolerance) anObj = self.HealOp.Sew(theObject, theTolerance) @@ -2469,10 +4466,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_suppress_internal_wires "Example" def SuppressInternalWires(self,theObject, theWires): + """ + Remove internal wires and edges from the given object (face). + + Parameters: + theObject Shape to be processed. + theWires Indices of wires to be removed, if EMPTY then the method + removes ALL internal wires of the given object. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.RemoveIntWires(theObject, theWires) RaiseIfFailed("RemoveIntWires", self.HealOp) @@ -2482,10 +4490,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_suppress_holes "Example" def SuppressHoles(self,theObject, theWires): + """ + Remove internal closed contours (holes) from the given object. + + Parameters: + theObject Shape to be processed. + theWires Indices of wires to be removed, if EMPTY then the method + removes ALL internal holes of the given object + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.FillHoles(theObject, theWires) RaiseIfFailed("FillHoles", self.HealOp) @@ -2497,10 +4516,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # if [ ], then theObject itself is a wire. # @param isCommonVertex If True : closure by creation of a common vertex, # If False : closure by creation of an edge between ends. - # @return New GEOM_Object, containing processed shape. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_close_contour "Example" def CloseContour(self,theObject, theWires, isCommonVertex): + """ + Close an open wire. + + Parameters: + theObject Shape to be processed. + theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, + if [ ], then theObject itself is a wire. + isCommonVertex If True : closure by creation of a common vertex, + If False : closure by creation of an edge between ends. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex) RaiseIfFailed("CloseContour", self.HealOp) @@ -2512,12 +4544,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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], + # @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n # if FALSE : \a theValue is treated as a length parameter [0..1] - # @return New GEOM_Object, containing processed shape. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_add_point_on_edge "Example" def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter): + """ + Addition of a point to a given edge object. + + Parameters: + theObject Shape to be processed. + theEdgeIndex Index of edge to be divided within theObject's shape, + if -1, then theObject itself is the edge. + theValue Value of parameter on edge or length parameter, + depending on isByParameter. + isByParameter If TRUE : theValue is treated as a curve parameter [0..1], + if FALSE : theValue is treated as a length parameter [0..1] + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ # Example: see GEOM_TestHealing.py theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter) anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter) @@ -2527,19 +4574,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Change orientation of the given object. Updates given shape. # @param theObject Shape to be processed. + # @return Updated theObject # # @ref swig_todo "Example" def ChangeOrientationShell(self,theObject): + """ + Change orientation of the given object. Updates given shape. + + Parameters: + theObject Shape to be processed. + + Returns: + Updated theObject + """ theObject = self.HealOp.ChangeOrientation(theObject) RaiseIfFailed("ChangeOrientation", self.HealOp) pass ## Change orientation of the given object. # @param theObject Shape to be processed. - # @return New GEOM_Object, containing processed shape. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref swig_todo "Example" def ChangeOrientationShellCopy(self, theObject): + """ + Change orientation of the given object. + + Parameters: + theObject Shape to be processed. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ anObj = self.HealOp.ChangeOrientationCopy(theObject) RaiseIfFailed("ChangeOrientationCopy", self.HealOp) return anObj @@ -2547,24 +4613,47 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing processed shape. # # @ref tui_limit_tolerance "Example" def LimitTolerance(self, theObject, theTolerance = 1e-07): + """ + Try to limit tolerance of the given object by value theTolerance. + + Parameters: + theObject Shape to be processed. + theTolerance Required tolerance value. + + Returns: + New GEOM.GEOM_Object, containing processed shape. + """ anObj = self.HealOp.LimitTolerance(theObject, theTolerance) RaiseIfFailed("LimitTolerance", self.HealOp) return anObj - ## Get a list of wires (wrapped in GEOM_Object-s), + ## Get a list of wires (wrapped in GEOM.GEOM_Object-s), # that constitute a free boundary of the given shape. # @param theObject Shape to get free boundary of. - # @return [status, theClosedWires, theOpenWires] - # status: FALSE, if an error(s) occured during the method execution. - # theClosedWires: Closed wires on the free boundary of the given shape. - # theOpenWires: Open wires on the free boundary of the given shape. + # @return [\a status, \a theClosedWires, \a theOpenWires] + # \n \a status: FALSE, if an error(s) occured during the method execution. + # \n \a theClosedWires: Closed wires on the free boundary of the given shape. + # \n \a theOpenWires: Open wires on the free boundary of the given shape. # # @ref tui_measurement_tools_page "Example" def GetFreeBoundary(self, theObject): + """ + Get a list of wires (wrapped in GEOM.GEOM_Object-s), + that constitute a free boundary of the given shape. + + Parameters: + theObject Shape to get free boundary of. + + Returns: + [status, theClosedWires, theOpenWires] + status: FALSE, if an error(s) occured during the method execution. + theClosedWires: Closed wires on the free boundary of the given shape. + theOpenWires: Open wires on the free boundary of the given shape. + """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.GetFreeBoundary(theObject) RaiseIfFailed("GetFreeBoundary", self.HealOp) @@ -2575,10 +4664,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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 a copy of theShape without coincident faces. + # @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces. # # @ref tui_glue_faces "Example" def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True): + """ + Replace coincident faces in theShape by one face. + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between faces, which can be considered as coincident. + doKeepNonSolids If FALSE, only solids will present in the result, + otherwise all initial shapes. + + Returns: + New GEOM.GEOM_Object, containing a copy of theShape without coincident faces. + """ # Example: see GEOM_Spanner.py theTolerance,Parameters = ParseParameters(theTolerance) anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids) @@ -2591,10 +4692,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Initial shape. # @param theTolerance Maximum distance between faces, # which can be considered as coincident. - # @return ListOfGO. + # @return GEOM.ListOfGO # # @ref tui_glue_faces "Example" def GetGlueFaces(self, theShape, theTolerance): + """ + Find coincident faces in theShape for possible gluing. + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between faces, + which can be considered as coincident. + + Returns: + GEOM.ListOfGO + """ anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance) RaiseIfFailed("GetGlueFaces", self.ShapesOp) return anObj @@ -2610,12 +4722,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param doGlueAllEdges If TRUE, all coincident edges of theShape # will be glued, otherwise only the edges, # belonging to theFaces. - # @return New GEOM_Object, containing a copy of theShape + # @return New GEOM.GEOM_Object, containing a copy of theShape # without some faces. # # @ref tui_glue_faces "Example" def MakeGlueFacesByList(self, theShape, theTolerance, theFaces, doKeepNonSolids=True, doGlueAllEdges=True): + """ + Replace coincident faces in theShape by one face + in compliance with given list of faces + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between faces, + which can be considered as coincident. + theFaces List of faces for gluing. + doKeepNonSolids If FALSE, only solids will present in the result, + otherwise all initial shapes. + doGlueAllEdges If TRUE, all coincident edges of theShape + will be glued, otherwise only the edges, + belonging to theFaces. + + Returns: + New GEOM.GEOM_Object, containing a copy of theShape + without some faces. + """ anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids, doGlueAllEdges) if anObj is None: @@ -2625,10 +4756,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Replace coincident edges in theShape by one edge. # @param theShape Initial shape. # @param theTolerance Maximum distance between edges, which can be considered as coincident. - # @return New GEOM_Object, containing a copy of theShape without coincident edges. + # @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges. # # @ref tui_glue_edges "Example" def MakeGlueEdges(self, theShape, theTolerance): + """ + Replace coincident edges in theShape by one edge. + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between edges, which can be considered as coincident. + + Returns: + New GEOM.GEOM_Object, containing a copy of theShape without coincident edges. + """ theTolerance,Parameters = ParseParameters(theTolerance) anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance) if anObj is None: @@ -2640,25 +4781,50 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Initial shape. # @param theTolerance Maximum distance between edges, # which can be considered as coincident. - # @return ListOfGO. + # @return GEOM.ListOfGO # # @ref tui_glue_edges "Example" def GetGlueEdges(self, theShape, theTolerance): + """ + Find coincident edges in theShape for possible gluing. + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between edges, + which can be considered as coincident. + + Returns: + GEOM.ListOfGO + """ anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance) RaiseIfFailed("GetGlueEdges", self.ShapesOp) return anObj ## Replace coincident edges in theShape by one edge - # in compliance with given list of edges + # in compliance with given list of edges. # @param theShape Initial shape. # @param theTolerance Maximum distance between edges, # which can be considered as coincident. # @param theFaces List of edges for gluing. - # @return New GEOM_Object, containing a copy of theShape + # @return New GEOM.GEOM_Object, containing a copy of theShape # without some edges. # # @ref tui_glue_edges "Example" def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges): + """ + Replace coincident edges in theShape by one edge + in compliance with given list of edges. + + Parameters: + theShape Initial shape. + theTolerance Maximum distance between edges, + which can be considered as coincident. + theFaces List of edges for gluing. + + Returns: + New GEOM.GEOM_Object, containing a copy of theShape + without some edges. + """ anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges) if anObj is None: raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode() @@ -2677,46 +4843,113 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform one of boolean operations on two given shapes. # @param theShape1 First argument for boolean operation. # @param theShape2 Second argument for boolean operation. - # @param theOperation Indicates the operation to be done: + # @param theOperation Indicates the operation to be done:\n # 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fuse "Example" def MakeBoolean(self,theShape1, theShape2, theOperation): + """ + Perform one of boolean operations on two given shapes. + + Parameters: + theShape1 First argument for boolean operation. + theShape2 Second argument for boolean operation. + theOperation Indicates the operation to be done: + 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation) RaiseIfFailed("MakeBoolean", self.BoolOp) return anObj - ## Shortcut to MakeBoolean(s1, s2, 1) + ## Perform Common boolean operation on two given shapes. + # @param theShape1 First argument for boolean operation. + # @param theShape2 Second argument for boolean operation. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_common "Example 1" # \n @ref swig_MakeCommon "Example 2" def MakeCommon(self, s1, s2): + """ + Perform Common boolean operation on two given shapes. + + Parameters: + theShape1 First argument for boolean operation. + theShape2 Second argument for boolean operation. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 1) - ## Shortcut to MakeBoolean(s1, s2, 2) + ## Perform Cut boolean operation on two given shapes. + # @param theShape1 First argument for boolean operation. + # @param theShape2 Second argument for boolean operation. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_cut "Example 1" # \n @ref swig_MakeCommon "Example 2" def MakeCut(self, s1, s2): + """ + Perform Cut boolean operation on two given shapes. + + Parameters: + theShape1 First argument for boolean operation. + theShape2 Second argument for boolean operation. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 2) - ## Shortcut to MakeBoolean(s1, s2, 3) + ## Perform Fuse boolean operation on two given shapes. + # @param theShape1 First argument for boolean operation. + # @param theShape2 Second argument for boolean operation. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fuse "Example 1" # \n @ref swig_MakeCommon "Example 2" def MakeFuse(self, s1, s2): + """ + Perform Fuse boolean operation on two given shapes. + + Parameters: + theShape1 First argument for boolean operation. + theShape2 Second argument for boolean operation. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 3) - ## Shortcut to MakeBoolean(s1, s2, 4) + ## Perform Section boolean operation on two given shapes. + # @param theShape1 First argument for boolean operation. + # @param theShape2 Second argument for boolean operation. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_section "Example 1" # \n @ref swig_MakeCommon "Example 2" def MakeSection(self, s1, s2): + """ + Perform Section boolean operation on two given shapes. + + Parameters: + theShape1 First argument for boolean operation. + theShape2 Second argument for boolean operation. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 4) @@ -2729,21 +4962,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform partition operation. # @param ListShapes Shapes to be intersected. # @param ListTools 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 Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum). + # @param Limit Type of resulting shapes (see ShapeType()).\n # If this parameter is set to -1 ("Auto"), most appropriate shape limit # type will be detected automatically. - # @param KeepNonlimitShapes: if this parameter == 0, then only shapes of + # @param KeepNonlimitShapes 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). + # @note Each compound from ListShapes and ListTools will be exploded + # in order to avoid possible intersection between shapes from this compound. # # After implementation new version of PartitionAlgo (October 2006) # other parameters are ignored by current functionality. They are kept # in this function only for support old versions. - # Ignored parameters: # @param ListKeepInside Shapes, outside which the results will be deleted. # Each shape from theKeepInside must belong to theShapes also. # @param ListRemoveInside Shapes, inside which the results will be deleted. @@ -2752,12 +4983,45 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param ListMaterials Material indices for each shape. Make sence, # only if theRemoveWebs is TRUE. # - # @return New GEOM_Object, containing the result shapes. + # @return New GEOM.GEOM_Object, containing the result shapes. # # @ref tui_partition "Example" def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[], KeepNonlimitShapes=0): + """ + Perform partition operation. + + Parameters: + ListShapes Shapes to be intersected. + ListTools Shapes to intersect theShapes. + Limit Type of resulting shapes (see geompy.ShapeType) + If this parameter is set to -1 ("Auto"), most appropriate shape limit + type will be detected automatically. + KeepNonlimitShapes 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). + Note: + Each compound from ListShapes and ListTools will be exploded + in order to avoid possible intersection between shapes from + this compound. + + After implementation new version of PartitionAlgo (October 2006) other + parameters are ignored by current functionality. They are kept in this + function only for support old versions. + + Ignored parameters: + ListKeepInside Shapes, outside which the results will be deleted. + Each shape from theKeepInside must belong to theShapes also. + ListRemoveInside Shapes, inside which the results will be deleted. + Each shape from theRemoveInside must belong to theShapes also. + RemoveWebs If TRUE, perform Glue 3D algorithm. + ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE. + + Returns: + New GEOM.GEOM_Object, containing the result shapes. + """ # Example: see GEOM_TestAll.py if Limit == ShapeType["AUTO"]: # automatic detection of the most appropriate shape limit type @@ -2779,16 +5043,32 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # Description of all parameters as in previous method MakePartition() # - # !!!NOTE: Passed compounds (via ListShapes or via ListTools) + # @note Passed compounds (via ListShapes or via ListTools) # have to consist of nonintersecting shapes. # - # @return New GEOM_Object, containing the result shapes. + # @return New GEOM.GEOM_Object, containing the result shapes. # # @ref swig_todo "Example" def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[], KeepNonlimitShapes=0): + """ + Perform partition operation. + This method may be useful if it is needed to make a partition for + compound contains nonintersected shapes. Performance will be better + since intersection between shapes from compound is not performed. + + Parameters: + Description of all parameters as in method geompy.MakePartition + + NOTE: + Passed compounds (via ListShapes or via ListTools) + have to consist of nonintersecting shapes. + + Returns: + New GEOM.GEOM_Object, containing the result shapes. + """ if Limit == ShapeType["AUTO"]: # automatic detection of the most appropriate shape limit type lim = GEOM.SHAPE @@ -2802,13 +5082,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp) return anObj - ## Shortcut to MakePartition() + ## See method MakePartition() for more information. # # @ref tui_partition "Example 1" # \n @ref swig_Partition "Example 2" def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[], KeepNonlimitShapes=0): + """ + See method geompy.MakePartition for more information. + """ # Example: see GEOM_TestOthers.py anObj = self.MakePartition(ListShapes, ListTools, ListKeepInside, ListRemoveInside, @@ -2819,10 +5102,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform partition of the Shape with the Plane # @param theShape Shape to be intersected. # @param thePlane Tool shape, to intersect theShape. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_partition "Example" def MakeHalfPartition(self,theShape, thePlane): + """ + Perform partition of the Shape with the Plane + + Parameters: + theShape Shape to be intersected. + thePlane Tool shape, to intersect theShape. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane) RaiseIfFailed("MakeHalfPartition", self.BoolOp) @@ -2839,11 +5132,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the translated object. # # @ref tui_translation "Example 1" # \n @ref swig_MakeTranslationTwoPoints "Example 2" def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2): + """ + Translate the given object along the vector, specified + by its end points, creating its copy before the translation. + + Parameters: + theObject The object to be translated. + thePoint1 Start point of translation vector. + thePoint2 End point of translation vector. + + Returns: + New GEOM.GEOM_Object, containing the translated object. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2) RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp) @@ -2852,10 +5157,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Translate the given object along the vector, specified by its components. # @param theObject The object to be translated. # @param theDX,theDY,theDZ Components of translation vector. - # @return Translated GEOM_Object. + # @return Translated GEOM.GEOM_Object. # # @ref tui_translation "Example" def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ): + """ + Translate the given object along the vector, specified by its components. + + Parameters: + theObject The object to be translated. + theDX,theDY,theDZ Components of translation vector. + + Returns: + Translated GEOM.GEOM_Object. + """ # Example: see GEOM_TestAll.py theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ) anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ) @@ -2867,10 +5182,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the translated object. # # @ref tui_translation "Example" def MakeTranslation(self,theObject, theDX, theDY, theDZ): + """ + Translate the given object along the vector, specified + by its components, creating its copy before the translation. + + Parameters: + theObject The object to be translated. + theDX,theDY,theDZ Components of translation vector. + + Returns: + New GEOM.GEOM_Object, containing the translated object. + """ # Example: see GEOM_TestAll.py theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ) anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ) @@ -2882,10 +5208,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # creating its copy before the translation. # @param theObject The object to be translated. # @param theVector The translation vector. - # @return New GEOM_Object, containing the translated object. + # @return New GEOM.GEOM_Object, containing the translated object. # # @ref tui_translation "Example" def MakeTranslationVector(self,theObject, theVector): + """ + Translate the given object along the given vector, + creating its copy before the translation. + + Parameters: + theObject The object to be translated. + theVector The translation vector. + + Returns: + New GEOM.GEOM_Object, containing the translated object. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector) RaiseIfFailed("TranslateVectorCopy", self.TrsfOp) @@ -2896,10 +5233,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVector The translation vector. # @param theDistance The translation distance. # @param theCopy Flag used to translate object itself or create a copy. - # @return Translated GEOM_Object. + # @return New GEOM.GEOM_Object, containing the translated object. # # @ref tui_translation "Example" def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy): + """ + Translate the given object along the given vector on given distance. + + Parameters: + theObject The object to be translated. + theVector The translation vector. + theDistance The translation distance. + theCopy Flag used to translate object itself or create a copy. + + Returns: + New GEOM.GEOM_Object, containing the translated object. + """ # Example: see GEOM_TestAll.py theDistance,Parameters = ParseParameters(theDistance) anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy) @@ -2912,10 +5261,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theObject The object to be translated. # @param theVector The translation vector. # @param theDistance The translation distance. - # @return New GEOM_Object, containing the translated object. + # @return New GEOM.GEOM_Object, containing the translated object. # # @ref tui_translation "Example" def MakeTranslationVectorDistance(self, theObject, theVector, theDistance): + """ + Translate the given object along the given vector on given distance, + creating its copy before the translation. + + Parameters: + theObject The object to be translated. + theVector The translation vector. + theDistance The translation distance. + + Returns: + New GEOM.GEOM_Object, containing the translated object. + """ # Example: see GEOM_TestAll.py theDistance,Parameters = ParseParameters(theDistance) anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1) @@ -2927,10 +5288,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theObject The object to be rotated. # @param theAxis Rotation axis. # @param theAngle Rotation angle in radians. - # @return Rotated GEOM_Object. + # @return New GEOM.GEOM_Object, containing the rotated object. # # @ref tui_rotation "Example" def Rotate(self,theObject, theAxis, theAngle): + """ + Rotate the given object around the given axis on the given angle. + + Parameters: + theObject The object to be rotated. + theAxis Rotation axis. + theAngle Rotation angle in radians. + + Returns: + New GEOM.GEOM_Object, containing the rotated object. + """ # Example: see GEOM_TestAll.py flag = False if isinstance(theAngle,str): @@ -2948,10 +5320,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the rotated object. # # @ref tui_rotation "Example" def MakeRotation(self,theObject, theAxis, theAngle): + """ + Rotate the given object around the given axis + on the given angle, creating its copy before the rotatation. + + Parameters: + theObject The object to be rotated. + theAxis Rotation axis. + theAngle Rotation angle in radians. + + Returns: + New GEOM.GEOM_Object, containing the rotated object. + """ # Example: see GEOM_TestAll.py flag = False if isinstance(theAngle,str): @@ -2967,13 +5351,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 + # @param theCentPoint central point the axis is the vector perpendicular to the plane # containing the three points. - # @param thePoint1,thePoint2 - in a perpendicular plane of the axis. - # @return New GEOM_Object, containing the rotated object. + # @param thePoint1,thePoint2 in a perpendicular plane of the axis. + # @return New GEOM.GEOM_Object, containing the rotated object. # # @ref tui_rotation "Example" def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2): + """ + Rotate given object around vector perpendicular to plane + containing three points, creating its copy before the rotatation. + + Parameters: + theObject The object to be rotated. + theCentPoint central point the axis is the vector perpendicular to the plane + containing the three points. + thePoint1,thePoint2 in a perpendicular plane of the axis. + + Returns: + New GEOM.GEOM_Object, containing the rotated object. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2) RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp) @@ -2984,10 +5381,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePoint Center point for scaling. # Passing None for it means scaling relatively the origin of global CS. # @param theFactor Scaling factor value. - # @return New GEOM_Object, containing the scaled shape. + # @return New GEOM.GEOM_Object, containing the scaled shape. # # @ref tui_scale "Example" def MakeScaleTransform(self, theObject, thePoint, theFactor): + """ + Scale the given object by the factor, creating its copy before the scaling. + + Parameters: + theObject The object to be scaled. + thePoint Center point for scaling. + Passing None for it means scaling relatively the origin of global CS. + theFactor Scaling factor value. + + Returns: + New GEOM.GEOM_Object, containing the scaled shape. + """ # Example: see GEOM_TestAll.py theFactor, Parameters = ParseParameters(theFactor) anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor) @@ -3001,10 +5410,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePoint Center point for scaling. # Passing None for it means scaling relatively the origin of global CS. # @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis. - # @return New GEOM_Object, containing the scaled shape. + # @return New GEOM.GEOM_Object, containing the scaled shape. # # @ref swig_scale "Example" def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ): + """ + Scale the given object by different factors along coordinate axes, + creating its copy before the scaling. + + Parameters: + theObject The object to be scaled. + thePoint Center point for scaling. + Passing None for it means scaling relatively the origin of global CS. + theFactorX,theFactorY,theFactorZ Scaling factors along each axis. + + Returns: + New GEOM.GEOM_Object, containing the scaled shape. + """ # Example: see GEOM_TestAll.py theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ) anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint, @@ -3017,10 +5439,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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. + # @return New GEOM.GEOM_Object, containing the mirrored shape. # # @ref tui_mirror "Example" def MakeMirrorByPlane(self,theObject, thePlane): + """ + Create an object, symmetrical to the given one relatively the given plane. + + Parameters: + theObject The object to be mirrored. + thePlane Plane of symmetry. + + Returns: + New GEOM.GEOM_Object, containing the mirrored shape. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane) RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp) @@ -3030,10 +5462,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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 shape. + # @return New GEOM.GEOM_Object, containing the mirrored shape. # # @ref tui_mirror "Example" def MakeMirrorByAxis(self,theObject, theAxis): + """ + Create an object, symmetrical to the given one relatively the given axis. + + Parameters: + theObject The object to be mirrored. + theAxis Axis of symmetry. + + Returns: + New GEOM.GEOM_Object, containing the mirrored shape. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis) RaiseIfFailed("MirrorAxisCopy", self.TrsfOp) @@ -3043,10 +5485,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # to the given one relatively the given point. # @param theObject The object to be mirrored. # @param thePoint Point of symmetry. - # @return New GEOM_Object, containing the mirrored shape. + # @return New GEOM.GEOM_Object, containing the mirrored shape. # # @ref tui_mirror "Example" def MakeMirrorByPoint(self,theObject, thePoint): + """ + Create an object, symmetrical + to the given one relatively the given point. + + Parameters: + theObject The object to be mirrored. + thePoint Point of symmetry. + + Returns: + New GEOM.GEOM_Object, containing the mirrored shape. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint) RaiseIfFailed("MirrorPointCopy", self.TrsfOp) @@ -3055,16 +5508,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @param theStartLCS Coordinate system to perform displacement from it.\n # If \a theStartLCS is NULL, displacement - # will be performed from global CS. + # will be performed from global CS.\n # 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. + # @return New GEOM.GEOM_Object, containing the displaced shape. # # @ref tui_modify_location "Example" def MakePosition(self,theObject, theStartLCS, theEndLCS): + """ + Modify the Location of the given object by LCS, creating its copy before the setting. + + Parameters: + theObject The object to be displaced. + theStartLCS Coordinate system to perform displacement from it. + If theStartLCS is NULL, displacement + will be performed from global CS. + If theObject itself is used as theStartLCS, + its location will be changed to theEndLCS. + theEndLCS Coordinate system to perform displacement to it. + + Returns: + New GEOM.GEOM_Object, containing the displaced shape. + + Example of usage: + # create local coordinate systems + cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0) + cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0) + # modify the location of the given object + position = geompy.MakePosition(cylinder, cs1, cs2) + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS) RaiseIfFailed("PositionShapeCopy", self.TrsfOp) @@ -3075,11 +5550,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePath Wire or Edge along that the object will be translated. # @param theDistance progress of Path (0 = start location, 1 = end of path location). # @param theCopy is to create a copy objects if true. - # @param theReverse - 0 for usual direction, 1 to reverse path direction. - # @return New GEOM_Object, containing the displaced shape. + # @param theReverse 0 - for usual direction, 1 - to reverse path direction. + # @return New GEOM.GEOM_Object, containing the displaced shape. # # @ref tui_modify_location "Example" def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse): + """ + Modify the Location of the given object by Path + + Parameters: + theObject The object to be displaced. + thePath Wire or Edge along that the object will be translated. + theDistance progress of Path (0 = start location, 1 = end of path location). + theCopy is to create a copy objects if true. + theReverse 0 - for usual direction, 1 - to reverse path direction. + + Returns: + New GEOM.GEOM_Object, containing the displaced shape. + + Example of usage: + position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1) + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse) RaiseIfFailed("PositionAlongPath", self.TrsfOp) @@ -3088,10 +5579,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create new object as offset of the given one. # @param theObject The base object for the offset. # @param theOffset Offset value. - # @return New GEOM_Object, containing the offset object. + # @return New GEOM.GEOM_Object, containing the offset object. # # @ref tui_offset "Example" def MakeOffset(self,theObject, theOffset): + """ + Create new object as offset of the given one. + + Parameters: + theObject The base object for the offset. + theOffset Offset value. + + Returns: + New GEOM.GEOM_Object, containing the offset object. + + Example of usage: + box = geompy.MakeBox(20, 20, 20, 200, 200, 200) + # create a new object as offset of the given object + offset = geompy.MakeOffset(box, 70.) + """ # Example: see GEOM_TestAll.py theOffset, Parameters = ParseParameters(theOffset) anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset) @@ -3102,10 +5608,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing the projection. # # @ref tui_projection "Example" def MakeProjection(self, theSource, theTarget): + """ + Create new object as projection of the given one on a 2D surface. + + Parameters: + theSource The source object for the projection. It can be a point, edge or wire. + theTarget The target object. It can be planar or cylindrical face. + + Returns: + New GEOM.GEOM_Object, containing the projection. + """ # Example: see GEOM_TestAll.py anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget) RaiseIfFailed("ProjectShapeCopy", self.TrsfOp) @@ -3120,11 +5636,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVector Direction of the translation. # @param theStep Distance to translate on. # @param theNbTimes Quantity of translations to be done. - # @return New GEOM_Object, containing compound of all + # @return New GEOM.GEOM_Object, containing compound of all # the shapes, obtained after each translation. # # @ref tui_multi_translation "Example" def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes): + """ + Translate the given object along the given vector a given number times + + Parameters: + theObject The object to be translated. + theVector Direction of the translation. + theStep Distance to translate on. + theNbTimes Quantity of translations to be done. + + Returns: + New GEOM.GEOM_Object, containing compound of all + the shapes, obtained after each translation. + + Example of usage: + r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4) + """ # Example: see GEOM_TestAll.py theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes) anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes) @@ -3140,12 +5672,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theVector2 Direction of the second translation. # @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 + # @return New GEOM.GEOM_Object, containing compound of all # the shapes, obtained after each translation. # # @ref tui_multi_translation "Example" def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1, theVector2, theStep2, theNbTimes2): + """ + Conseqently apply two specified translations to theObject specified number of times. + + Parameters: + theObject The object to be translated. + theVector1 Direction of the first translation. + theStep1 Step of the first translation. + theNbTimes1 Quantity of translations to be done along theVector1. + theVector2 Direction of the second translation. + theStep2 Step of the second translation. + theNbTimes2 Quantity of translations to be done along theVector2. + + Returns: + New GEOM.GEOM_Object, containing compound of all + the shapes, obtained after each translation. + + Example of usage: + tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3) + """ # Example: see GEOM_TestAll.py theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2) anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1, @@ -3159,11 +5710,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theObject The object to be rotated. # @param theAxis The rotation axis. # @param theNbTimes Quantity of rotations to be done. - # @return New GEOM_Object, containing compound of all the + # @return New GEOM.GEOM_Object, containing compound of all the # shapes, obtained after each rotation. # # @ref tui_multi_rotation "Example" def MultiRotate1D(self,theObject, theAxis, theNbTimes): + """ + Rotate the given object around the given axis a given number times. + Rotation angle will be 2*PI/theNbTimes. + + Parameters: + theObject The object to be rotated. + theAxis The rotation axis. + theNbTimes Quantity of rotations to be done. + + Returns: + New GEOM.GEOM_Object, containing compound of all the + shapes, obtained after each rotation. + + Example of usage: + rot1d = geompy.MultiRotate1D(prism, vect, 4) + """ # Example: see GEOM_TestAll.py theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes) anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes) @@ -3182,11 +5749,33 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theNbTimes1 Quantity of rotations to be done. # @param theStep Translation distance. # @param theNbTimes2 Quantity of translations to be done. - # @return New GEOM_Object, containing compound of all the + # @return New GEOM.GEOM_Object, containing compound of all the # shapes, obtained after each transformation. # # @ref tui_multi_rotation "Example" def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2): + """ + 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. + + Parameters: + theObject The object to be rotated. + theAxis Rotation axis. + theAngle Rotation angle in graduces. + theNbTimes1 Quantity of rotations to be done. + theStep Translation distance. + theNbTimes2 Quantity of translations to be done. + + Returns: + New GEOM.GEOM_Object, containing compound of all the + shapes, obtained after each transformation. + + Example of usage: + rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5) + """ # Example: see GEOM_TestAll.py theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2) anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2) @@ -3195,16 +5784,34 @@ class geompyDC(GEOM._objref_GEOM_Gen): return anObj ## The same, as MultiRotate1D(), but axis is given by direction and point + # # @ref swig_MakeMultiRotation "Example" def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes): + """ + The same, as geompy.MultiRotate1D, but axis is given by direction and point + + Example of usage: + pz = geompy.MakeVertex(0, 0, 100) + vy = geompy.MakeVectorDXDYDZ(0, 100, 0) + MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6) + """ # Example: see GEOM_TestOthers.py aVec = self.MakeLine(aPoint,aDir) anObj = self.MultiRotate1D(aShape,aVec,aNbTimes) return anObj ## The same, as MultiRotate2D(), but axis is given by direction and point + # # @ref swig_MakeMultiRotation "Example" def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): + """ + The same, as MultiRotate2D(), but axis is given by direction and point + + Example of usage: + pz = geompy.MakeVertex(0, 0, 100) + vy = geompy.MakeVectorDXDYDZ(0, 100, 0) + MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3) + """ # Example: see GEOM_TestOthers.py aVec = self.MakeLine(aPoint,aDir) anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) @@ -3219,11 +5826,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform a fillet on all edges of the given shape. # @param theShape Shape, to perform fillet on. # @param theR Fillet radius. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fillet "Example 1" # \n @ref swig_MakeFilletAll "Example 2" def MakeFilletAll(self,theShape, theR): + """ + Perform a fillet on all edges of the given shape. + + Parameters: + theShape Shape, to perform fillet on. + theR Fillet radius. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + filletall = geompy.MakeFilletAll(prism, 10.) + """ # Example: see GEOM_TestOthers.py theR,Parameters = ParseParameters(theR) anObj = self.LocalOp.MakeFilletAll(theShape, theR) @@ -3234,13 +5854,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform a fillet on the specified edges/faces of the given shape # @param theShape Shape, to perform fillet on. # @param theR Fillet radius. - # @param theShapeType Type of shapes in theListShapes. + # @param theShapeType Type of shapes in theListShapes (see ShapeType()) # @param theListShapes Global indices of edges/faces to perform fillet on. - # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). - # @return New GEOM_Object, containing the result shape. + # \note Global index of sub-shape can be obtained, using method GetSubShapeID(). + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fillet "Example" def MakeFillet(self,theShape, theR, theShapeType, theListShapes): + """ + Perform a fillet on the specified edges/faces of the given shape + + Parameters: + theShape Shape, to perform fillet on. + theR Fillet radius. + theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes) + theListShapes Global indices of edges/faces to perform fillet on. + + Note: + Global index of sub-shape can be obtained, using method geompy.GetSubShapeID + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + # get the list of IDs (IDList) for the fillet + prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"]) + IDlist_e = [] + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0])) + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1])) + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2])) + # make a fillet on the specified edges of the given shape + fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e) + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = None @@ -3253,8 +5898,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj.SetParameters(Parameters) return anObj - ## The same that MakeFillet but with two Fillet Radius R1 and R2 + ## The same that MakeFillet() but with two Fillet Radius R1 and R2 def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes): + """ + The same that geompy.MakeFillet but with two Fillet Radius R1 and R2 + + Example of usage: + # get the list of IDs (IDList) for the fillet + prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"]) + IDlist_e = [] + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0])) + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1])) + IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2])) + # make a fillet on the specified edges of the given shape + fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e) + """ theR1,theR2,Parameters = ParseParameters(theR1,theR2) anObj = None if theShapeType == ShapeType["EDGE"]: @@ -3267,16 +5925,37 @@ class geompyDC(GEOM._objref_GEOM_Gen): return anObj ## Perform a fillet on the specified edges of the given shape - # @param theShape - Wire Shape to perform fillet on. - # @param theR - Fillet radius. + # @param theShape Wire Shape to perform fillet on. + # @param theR Fillet radius. # @param theListOfVertexes Global indices of vertexes to perform fillet on. - # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). + # \note Global index of sub-shape can be obtained, using method GetSubShapeID() # \note The list of vertices could be empty, # in this case fillet will done done at all vertices in wire - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fillet2d "Example" def MakeFillet1D(self,theShape, theR, theListOfVertexes): + """ + Perform a fillet on the specified edges of the given shape + + Parameters: + theShape Wire Shape to perform fillet on. + theR Fillet radius. + theListOfVertexes Global indices of vertexes to perform fillet on. + Note: + Global index of sub-shape can be obtained, using method geompy.GetSubShapeID + + The list of vertices could be empty,in this case fillet will done done at all vertices in wire + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + # create wire + Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4]) + # make fillet at given wire vertices with giver radius + Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10]) + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes) @@ -3285,14 +5964,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): return anObj ## Perform a fillet at the specified vertices of the given face/shell. - # @param theShape - Face or Shell shape to perform fillet on. - # @param theR - Fillet radius. + # @param theShape Face or Shell shape to perform fillet on. + # @param theR Fillet radius. # @param theListOfVertexes Global indices of vertexes to perform fillet on. - # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). - # @return New GEOM_Object, containing the result shape. + # \note Global index of sub-shape can be obtained, using method GetSubShapeID(). + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_fillet2d "Example" def MakeFillet2D(self, theShape, theR, theListOfVertexes): + """ + Perform a fillet at the specified vertices of the given face/shell. + + Parameters: + theShape Face or Shell shape to perform fillet on. + theR Fillet radius. + theListOfVertexes Global indices of vertexes to perform fillet on. + Note: + Global index of sub-shape can be obtained, using method geompy.GetSubShapeID + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + face = geompy.MakeFaceHW(100, 100, 1) + fillet2d = geompy.MakeFillet2D(face, 30, [7, 9]) + """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes) @@ -3303,11 +5999,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Perform a symmetric chamfer on all edges of the given shape. # @param theShape Shape, to perform chamfer on. # @param theD Chamfer size along each face. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_chamfer "Example 1" # \n @ref swig_MakeChamferAll "Example 2" def MakeChamferAll(self,theShape, theD): + """ + Perform a symmetric chamfer on all edges of the given shape. + + Parameters: + theShape Shape, to perform chamfer on. + theD Chamfer size along each face. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + chamfer_all = geompy.MakeChamferAll(prism, 10.) + """ # Example: see GEOM_TestOthers.py theD,Parameters = ParseParameters(theD) anObj = self.LocalOp.MakeChamferAll(theShape, theD) @@ -3321,11 +6030,33 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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 geompy.GetSubShapeID(). - # @return New GEOM_Object, containing the result shape. + # \note Global index of sub-shape can be obtained, using method GetSubShapeID(). + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_chamfer "Example" def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2): + """ + Perform a chamfer on edges, common to the specified faces, + with distance D1 on the Face1 + + Parameters: + theShape Shape, to perform chamfer on. + theD1 Chamfer size along theFace1. + theD2 Chamfer size along theFace2. + theFace1,theFace2 Global indices of two faces of theShape. + + Note: + Global index of sub-shape can be obtained, using method geompy.GetSubShapeID + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"]) + f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0]) + f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1]) + chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2) + """ # Example: see GEOM_TestAll.py theD1,theD2,Parameters = ParseParameters(theD1,theD2) anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2) @@ -3333,9 +6064,36 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj.SetParameters(Parameters) return anObj - ## The Same that MakeChamferEdge but with params theD is chamfer length and - # theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) + ## Perform a chamfer on edges + # @param theShape Shape, to perform chamfer on. + # @param theD Chamfer length + # @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) + # @param theFace1,theFace2 Global indices of two faces of \a theShape. + # \note Global index of sub-shape can be obtained, using method GetSubShapeID(). + # @return New GEOM.GEOM_Object, containing the result shape. def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2): + """ + Perform a chamfer on edges + + Parameters: + theShape Shape, to perform chamfer on. + theD1 Chamfer size along theFace1. + theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees). + theFace1,theFace2 Global indices of two faces of theShape. + + Note: + Global index of sub-shape can be obtained, using method geompy.GetSubShapeID + + Returns: + New GEOM.GEOM_Object, containing the result shape. + + Example of usage: + prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"]) + f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0]) + f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1]) + ang = 30 + chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2) + """ flag = False if isinstance(theAngle,str): flag = True @@ -3355,11 +6113,29 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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 geompy.GetSubShapeID(). - # @return New GEOM_Object, containing the result shape. + # \note Global index of sub-shape can be obtained, using method GetSubShapeID(). + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_chamfer "Example" def MakeChamferFaces(self,theShape, theD1, theD2, theFaces): + """ + Perform a chamfer on all edges of the specified faces, + with distance D1 on the first specified face (if several for one edge) + + Parameters: + theShape Shape, to perform chamfer on. + theD1 Chamfer size along face from theFaces. If both faces, + connected to the edge, are in theFaces, theD1 + will be get along face, which is nearer to theFaces beginning. + theD2 Chamfer size along another of two faces, connected to the edge. + theFaces Sequence of global indices of faces of theShape. + + + Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_TestAll.py theD1,theD2,Parameters = ParseParameters(theD1,theD2) anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces) @@ -3367,11 +6143,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj.SetParameters(Parameters) return anObj - ## The Same that MakeChamferFaces but with params theD is chamfer lenght and + ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and # theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) # # @ref swig_FilletChamfer "Example" def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces): + """ + The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and + theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) + """ flag = False if isinstance(theAngle,str): flag = True @@ -3388,19 +6168,35 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Shape, to perform chamfer on. # @param theD1,theD2 Chamfer size # @param theEdges Sequence of edges of \a theShape. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref swig_FilletChamfer "Example" def MakeChamferEdges(self, theShape, theD1, theD2, theEdges): + """ + Perform a chamfer on edges, + with distance D1 on the first specified face (if several for one edge) + + Parameters: + theShape Shape, to perform chamfer on. + theD1,theD2 Chamfer size + theEdges Sequence of edges of theShape. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ theD1,theD2,Parameters = ParseParameters(theD1,theD2) anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges) RaiseIfFailed("MakeChamferEdges", self.LocalOp) anObj.SetParameters(Parameters) return anObj - ## The Same that MakeChamferEdges but with params theD is chamfer lenght and + ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and # theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges): + """ + The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and + theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees) + """ flag = False if isinstance(theAngle,str): flag = True @@ -3412,10 +6208,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj.SetParameters(Parameters) return anObj - ## Shortcut to MakeChamferEdge() and MakeChamferFaces() + ## /sa MakeChamferEdge() and MakeChamferFaces() # # @ref swig_MakeChamfer "Example" def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape): + """ + See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information. + """ # Example: see GEOM_TestOthers.py anObj = None if aShapeType == ShapeType["EDGE"]: @@ -3436,11 +6235,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theWeight Weight og the shape. # @param theWaterDensity Density of the water. # @param theMeshDeflection Deflection of the mesh, using to compute the section. - # @return New GEOM_Object, containing a section of \a theShape + # @return New GEOM.GEOM_Object, containing a section of \a theShape # by a plane, corresponding to water level. # # @ref tui_archimede "Example" def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection): + """ + Perform an Archimde operation on the given shape with given parameters. + The object presenting the resulting face is returned. + + Parameters: + theShape Shape to be put in water. + theWeight Weight og the shape. + theWaterDensity Density of the water. + theMeshDeflection Deflection of the mesh, using to compute the section. + + Returns: + New GEOM.GEOM_Object, containing a section of theShape + by a plane, corresponding to water level. + """ # Example: see GEOM_TestAll.py theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters( theWeight,theWaterDensity,theMeshDeflection) @@ -3460,6 +6273,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def PointCoordinates(self,Point): + """ + Get point coordinates + + Returns: + [x, y, z] + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.PointCoordinates(Point) RaiseIfFailed("PointCoordinates", self.MeasuOp) @@ -3468,13 +6287,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get summarized length of all wires, # area of surface and volume of the given shape. # @param theShape Shape to define properties of. - # @return [theLength, theSurfArea, theVolume] - # theLength: Summarized length of all wires of the given shape. - # theSurfArea: Area of surface of the given shape. + # @return [theLength, theSurfArea, theVolume]\n + # theLength: Summarized length of all wires of the given shape.\n + # theSurfArea: Area of surface of the given shape.\n # theVolume: Volume of the given shape. # # @ref tui_measurement_tools_page "Example" def BasicProperties(self,theShape): + """ + Get summarized length of all wires, + area of surface and volume of the given shape. + + Parameters: + theShape Shape to define properties of. + + Returns: + [theLength, theSurfArea, theVolume] + theLength: Summarized length of all wires of the given shape. + theSurfArea: Area of surface of the given shape. + theVolume: Volume of the given shape. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetBasicProperties(theShape) RaiseIfFailed("GetBasicProperties", self.MeasuOp) @@ -3489,6 +6321,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def BoundingBox(self,theShape): + """ + Get parameters of bounding box of the given shape + + Parameters: + theShape Shape to obtain bounding box of. + + Returns: + [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] + Xmin,Xmax: Limits of shape along OX axis. + Ymin,Ymax: Limits of shape along OY axis. + Zmin,Zmax: Limits of shape along OZ axis. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetBoundingBox(theShape) RaiseIfFailed("GetBoundingBox", self.MeasuOp) @@ -3502,6 +6346,17 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def Inertia(self,theShape): + """ + Get inertia matrix and moments of inertia of theShape. + + Parameters: + theShape Shape to calculate inertia of. + + Returns: + [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] + I(1-3)(1-3): Components of the inertia matrix of the given shape. + Ix,Iy,Iz: Moments of inertia of the given shape. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetInertia(theShape) RaiseIfFailed("GetInertia", self.MeasuOp) @@ -3513,6 +6368,17 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param tolerance to be used (default is 1.0e-7) # @return list_of_boolean = [res1, res2, ...] def AreCoordsInside(self, theShape, coords, tolerance=1.e-7): + """ + Get if coords are included in the shape (ST_IN or ST_ON) + + Parameters: + theShape Shape + coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...] + tolerance to be used (default is 1.0e-7) + + Returns: + list_of_boolean = [res1, res2, ...] + """ return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance) ## Get minimal distance between the given shapes. @@ -3521,6 +6387,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def MinDistance(self, theShape1, theShape2): + """ + Get minimal distance between the given shapes. + + Parameters: + theShape1,theShape2 Shapes to find minimal distance between. + + Returns: + Value of the minimal distance between the given shapes. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2) RaiseIfFailed("GetMinDistance", self.MeasuOp) @@ -3532,6 +6407,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_all_measure "Example" def MinDistanceComponents(self, theShape1, theShape2): + """ + Get minimal distance between the given shapes. + + Parameters: + theShape1,theShape2 Shapes to find minimal distance between. + + Returns: + Value of the minimal distance between the given shapes. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2) RaiseIfFailed("GetMinDistance", self.MeasuOp) @@ -3546,6 +6430,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def GetAngle(self, theShape1, theShape2): + """ + Get angle between the given shapes in degrees. + + Parameters: + theShape1,theShape2 Lines or linear edges to find angle between. + + Note: + If both arguments are vectors, the angle is computed in accordance + with their orientations, otherwise the minimum angle is computed. + + Returns: + Value of the angle between the given shapes in degrees. + """ # Example: see GEOM_TestMeasures.py anAngle = self.MeasuOp.GetAngle(theShape1, theShape2) RaiseIfFailed("GetAngle", self.MeasuOp) @@ -3559,6 +6456,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def GetAngleRadians(self, theShape1, theShape2): + """ + Get angle between the given shapes in radians. + + Parameters: + theShape1,theShape2 Lines or linear edges to find angle between. + + + Note: + If both arguments are vectors, the angle is computed in accordance + with their orientations, otherwise the minimum angle is computed. + + Returns: + Value of the angle between the given shapes in radians. + """ # Example: see GEOM_TestMeasures.py anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180. RaiseIfFailed("GetAngle", self.MeasuOp) @@ -3570,16 +6481,44 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## @{ ## Measure curvature of a curve at a point, set by parameter. + # @param theCurve a curve. + # @param theParam parameter. + # @return radius of curvature of \a theCurve. + # # @ref swig_todo "Example" def CurveCurvatureByParam(self, theCurve, theParam): + """ + Measure curvature of a curve at a point, set by parameter. + + Parameters: + theCurve a curve. + theParam parameter. + + Returns: + radius of curvature of theCurve. + """ # Example: see GEOM_TestMeasures.py aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam) RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp) return aCurv - ## @details + ## Measure curvature of a curve at a point. + # @param theCurve a curve. + # @param thePoint given point. + # @return radius of curvature of \a theCurve. + # # @ref swig_todo "Example" def CurveCurvatureByPoint(self, theCurve, thePoint): + """ + Measure curvature of a curve at a point. + + Parameters: + theCurve a curve. + thePoint given point. + + Returns: + radius of curvature of theCurve. + """ aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint) RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp) return aCurv @@ -3590,31 +6529,91 @@ class geompyDC(GEOM._objref_GEOM_Gen): # in the given point ## @{ - ## @details + ## Measure max radius of curvature of surface. + # @param theSurf the given surface. + # @param theUParam Value of U-parameter on the referenced surface. + # @param theVParam Value of V-parameter on the referenced surface. + # @return max radius of curvature of theSurf. + # ## @ref swig_todo "Example" def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam): + """ + Measure max radius of curvature of surface. + + Parameters: + theSurf the given surface. + theUParam Value of U-parameter on the referenced surface. + theVParam Value of V-parameter on the referenced surface. + + Returns: + max radius of curvature of theSurf. + """ # Example: see GEOM_TestMeasures.py aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam) RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp) return aSurf - ## @details + ## Measure max radius of curvature of surface in the given point + # @param theSurf the given surface. + # @param thePoint given point. + # @return max radius of curvature of theSurf. + # ## @ref swig_todo "Example" def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint): + """ + Measure max radius of curvature of surface in the given point. + + Parameters: + theSurf the given surface. + thePoint given point. + + Returns: + max radius of curvature of theSurf. + """ aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint) RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp) return aSurf - ## @details + ## Measure min radius of curvature of surface. + # @param theSurf the given surface. + # @param theUParam Value of U-parameter on the referenced surface. + # @param theVParam Value of V-parameter on the referenced surface. + # @return min radius of curvature of theSurf. + # ## @ref swig_todo "Example" def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam): + """ + Measure min radius of curvature of surface. + + Parameters: + theSurf the given surface. + theUParam Value of U-parameter on the referenced surface. + theVParam Value of V-parameter on the referenced surface. + + Returns: + Min radius of curvature of theSurf. + """ aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam) RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp) return aSurf - ## @details + ## Measure min radius of curvature of surface in the given point + # @param theSurf the given surface. + # @param thePoint given point. + # @return min radius of curvature of theSurf. + # ## @ref swig_todo "Example" def MinSurfaceCurvatureByPoint(self, theSurf, thePoint): + """ + Measure min radius of curvature of surface in the given point. + + Parameters: + theSurf the given surface. + thePoint given point. + + Returns: + Min radius of curvature of theSurf. + """ aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint) RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp) return aSurf @@ -3622,13 +6621,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get min and max tolerances of sub-shapes of theShape # @param theShape Shape, to get tolerances of. - # @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax] - # FaceMin,FaceMax: Min and max tolerances of the faces. - # EdgeMin,EdgeMax: Min and max tolerances of the edges. + # @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n + # FaceMin,FaceMax: Min and max tolerances of the faces.\n + # EdgeMin,EdgeMax: Min and max tolerances of the edges.\n # VertMin,VertMax: Min and max tolerances of the vertices. # # @ref tui_measurement_tools_page "Example" def Tolerance(self,theShape): + """ + Get min and max tolerances of sub-shapes of theShape + + Parameters: + theShape Shape, to get tolerances of. + + Returns: + [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax] + FaceMin,FaceMax: Min and max tolerances of the faces. + EdgeMin,EdgeMax: Min and max tolerances of the edges. + VertMin,VertMax: Min and max tolerances of the vertices. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetTolerance(theShape) RaiseIfFailed("GetTolerance", self.MeasuOp) @@ -3640,6 +6651,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def WhatIs(self,theShape): + """ + Obtain description of the given shape (number of sub-shapes of each type) + + Parameters: + theShape Shape to be described. + + Returns: + Description of the given shape. + """ # Example: see GEOM_TestMeasures.py aDescr = self.MeasuOp.WhatIs(theShape) RaiseIfFailed("WhatIs", self.MeasuOp) @@ -3648,10 +6668,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Obtain quantity of shapes of the given type in \a theShape. # If \a theShape is of type \a theType, it is also counted. # @param theShape Shape to be described. + # @param theType the given ShapeType(). # @return Quantity of shapes of type \a theType in \a theShape. # # @ref tui_measurement_tools_page "Example" def NbShapes (self, theShape, theType): + """ + Obtain quantity of shapes of the given type in theShape. + If theShape is of type theType, it is also counted. + + Parameters: + theShape Shape to be described. + theType the given geompy.ShapeType + + Returns: + Quantity of shapes of type theType in theShape. + """ # Example: see GEOM_TestMeasures.py listSh = self.SubShapeAllIDs(theShape, theType) Nb = len(listSh) @@ -3665,10 +6697,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Obtain quantity of shapes of each type in \a theShape. # The \a theShape is also counted. # @param theShape Shape to be described. - # @return Dictionary of shape types with bound quantities of shapes. + # @return Dictionary of ShapeType() with bound quantities of shapes. # # @ref tui_measurement_tools_page "Example" def ShapeInfo (self, theShape): + """ + Obtain quantity of shapes of each type in theShape. + The theShape is also counted. + + Parameters: + theShape Shape to be described. + + Returns: + Dictionary of geompy.ShapeType with bound quantities of shapes. + """ # Example: see GEOM_TestMeasures.py aDict = {} for typeSh in ShapeType: @@ -3684,10 +6726,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get a point, situated at the centre of mass of theShape. # @param theShape Shape to define centre of mass of. - # @return New GEOM_Object, containing the created point. + # @return New GEOM.GEOM_Object, containing the created point. # # @ref tui_measurement_tools_page "Example" def MakeCDG(self,theShape): + """ + Get a point, situated at the centre of mass of theShape. + + Parameters: + theShape Shape to define centre of mass of. + + Returns: + New GEOM.GEOM_Object, containing the created point. + """ # Example: see GEOM_TestMeasures.py anObj = self.MeasuOp.GetCentreOfMass(theShape) RaiseIfFailed("GetCentreOfMass", self.MeasuOp) @@ -3696,10 +6747,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get a vertex sub-shape by index depended with orientation. # @param theShape Shape to find sub-shape. # @param theIndex Index to find vertex by this index (starting from zero) - # @return New GEOM_Object, containing the created vertex. + # @return New GEOM.GEOM_Object, containing the created vertex. # # @ref tui_measurement_tools_page "Example" def GetVertexByIndex(self,theShape, theIndex): + """ + Get a vertex sub-shape by index depended with orientation. + + Parameters: + theShape Shape to find sub-shape. + theIndex Index to find vertex by this index (starting from zero) + + Returns: + New GEOM.GEOM_Object, containing the created vertex. + """ # Example: see GEOM_TestMeasures.py anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex) RaiseIfFailed("GetVertexByIndex", self.MeasuOp) @@ -3707,10 +6768,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get the first vertex of wire/edge depended orientation. # @param theShape Shape to find first vertex. - # @return New GEOM_Object, containing the created vertex. + # @return New GEOM.GEOM_Object, containing the created vertex. # # @ref tui_measurement_tools_page "Example" def GetFirstVertex(self,theShape): + """ + Get the first vertex of wire/edge depended orientation. + + Parameters: + theShape Shape to find first vertex. + + Returns: + New GEOM.GEOM_Object, containing the created vertex. + """ # Example: see GEOM_TestMeasures.py anObj = self.GetVertexByIndex(theShape, 0) RaiseIfFailed("GetFirstVertex", self.MeasuOp) @@ -3718,10 +6788,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get the last vertex of wire/edge depended orientation. # @param theShape Shape to find last vertex. - # @return New GEOM_Object, containing the created vertex. + # @return New GEOM.GEOM_Object, containing the created vertex. # # @ref tui_measurement_tools_page "Example" def GetLastVertex(self,theShape): + """ + Get the last vertex of wire/edge depended orientation. + + Parameters: + theShape Shape to find last vertex. + + Returns: + New GEOM.GEOM_Object, containing the created vertex. + """ # Example: see GEOM_TestMeasures.py nb_vert = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"]) anObj = self.GetVertexByIndex(theShape, (nb_vert-1)) @@ -3732,10 +6811,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # the normale is calculated at the center of mass. # @param theFace Face to define normale of. # @param theOptionalPoint Point to compute the normale at. - # @return New GEOM_Object, containing the created vector. + # @return New GEOM.GEOM_Object, containing the created vector. # # @ref swig_todo "Example" def GetNormal(self, theFace, theOptionalPoint = None): + """ + Get a normale to the given face. If the point is not given, + the normale is calculated at the center of mass. + + Parameters: + theFace Face to define normale of. + theOptionalPoint Point to compute the normale at. + + Returns: + New GEOM.GEOM_Object, containing the created vector. + """ # Example: see GEOM_TestMeasures.py anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint) RaiseIfFailed("GetNormal", self.MeasuOp) @@ -3743,13 +6833,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Check a topology of the given shape. # @param theShape Shape to check validity of. - # @param theIsCheckGeom If FALSE, only the shape's topology will be checked, + # @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n # if TRUE, the shape's geometry will be checked also. # @return TRUE, if the shape "seems to be valid". # If theShape is invalid, prints a description of problem. # # @ref tui_measurement_tools_page "Example" def CheckShape(self,theShape, theIsCheckGeom = 0): + """ + Check a topology of the given shape. + + Parameters: + theShape Shape to check validity of. + theIsCheckGeom If FALSE, only the shape's topology will be checked, + if TRUE, the shape's geometry will be checked also. + + Returns: + TRUE, if the shape "seems to be valid". + If theShape is invalid, prints a description of problem. + """ # Example: see GEOM_TestMeasures.py if theIsCheckGeom: (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape) @@ -3767,6 +6869,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_measurement_tools_page "Example" def CheckSelfIntersections (self, theShape): + """ + Detect self-intersections in the given shape. + + Parameters: + theShape Shape to check. + + Returns: + TRUE, if the shape contains no self-intersections. + """ # Example: see GEOM_TestMeasures.py (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape) RaiseIfFailed("CheckSelfIntersections", self.MeasuOp) @@ -3786,6 +6897,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_todo "Example" def GetPosition(self,theShape): + """ + Get position (LCS) of theShape. + Origin of the LCS is situated at the shape's center of mass. + Axes of the LCS are obtained from shape's location or, + if the shape is a planar face, from position of its plane. + + Parameters: + theShape Shape to calculate position of. + + Returns: + [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. + Ox,Oy,Oz: Coordinates of shape's LCS origin. + Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. + Xx,Xy,Xz: Coordinates of shape's LCS X direction. + """ # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetPosition(theShape) RaiseIfFailed("GetPosition", self.MeasuOp) @@ -3794,53 +6920,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get kind of theShape. # # @param theShape Shape to get a kind of. - # @return Returns a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration + # @return Returns a kind of shape in terms of GEOM.GEOM_IKindOfShape.shape_kind enumeration # and a list of parameters, describing the shape. # @note Concrete meaning of each value, returned via \a theIntegers - # or \a theDoubles list depends on the kind of the shape. - # The full list of possible outputs is: - # - # - geompy.kind.COMPOUND nb_solids nb_faces nb_edges nb_vertices - # - geompy.kind.COMPSOLID nb_solids nb_faces nb_edges nb_vertices - # - # - geompy.kind.SHELL geompy.info.CLOSED nb_faces nb_edges nb_vertices - # - geompy.kind.SHELL geompy.info.UNCLOSED nb_faces nb_edges nb_vertices - # - # - geompy.kind.WIRE geompy.info.CLOSED nb_edges nb_vertices - # - geompy.kind.WIRE geompy.info.UNCLOSED nb_edges nb_vertices - # - # - geompy.kind.SPHERE xc yc zc R - # - geompy.kind.CYLINDER xb yb zb dx dy dz R H - # - geompy.kind.BOX xc yc zc ax ay az - # - geompy.kind.ROTATED_BOX xc yc zc zx zy zz xx xy xz ax ay az - # - geompy.kind.TORUS xc yc zc dx dy dz R_1 R_2 - # - geompy.kind.CONE xb yb zb dx dy dz R_1 R_2 H - # - geompy.kind.POLYHEDRON nb_faces nb_edges nb_vertices - # - geompy.kind.SOLID nb_faces nb_edges nb_vertices - # - # - geompy.kind.SPHERE2D xc yc zc R - # - geompy.kind.CYLINDER2D xb yb zb dx dy dz R H - # - geompy.kind.TORUS2D xc yc zc dx dy dz R_1 R_2 - # - geompy.kind.CONE2D xc yc zc dx dy dz R_1 R_2 H - # - geompy.kind.DISK_CIRCLE xc yc zc dx dy dz R - # - geompy.kind.DISK_ELLIPSE xc yc zc dx dy dz R_1 R_2 - # - geompy.kind.POLYGON xo yo zo dx dy dz nb_edges nb_vertices - # - geompy.kind.PLANE xo yo zo dx dy dz - # - geompy.kind.PLANAR xo yo zo dx dy dz nb_edges nb_vertices - # - geompy.kind.FACE nb_edges nb_vertices - # - # - geompy.kind.CIRCLE xc yc zc dx dy dz R - # - geompy.kind.ARC_CIRCLE xc yc zc dx dy dz R x1 y1 z1 x2 y2 z2 - # - geompy.kind.ELLIPSE xc yc zc dx dy dz R_1 R_2 - # - geompy.kind.ARC_ELLIPSE xc yc zc dx dy dz R_1 R_2 x1 y1 z1 x2 y2 z2 - # - geompy.kind.LINE xo yo zo dx dy dz - # - geompy.kind.SEGMENT x1 y1 z1 x2 y2 z2 - # - geompy.kind.EDGE nb_vertices - # - # - geompy.kind.VERTEX x y z + # or \a theDoubles list depends on the kind() of the shape. # # @ref swig_todo "Example" def KindOfShape(self,theShape): + """ + Get kind of theShape. + + Parameters: + theShape Shape to get a kind of. + + Returns: + a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration + and a list of parameters, describing the shape. + Note: + Concrete meaning of each value, returned via theIntegers + or theDoubles list depends on the geompy.kind of the shape + """ # Example: see GEOM_TestMeasures.py aRoughTuple = self.MeasuOp.KindOfShape(theShape) RaiseIfFailed("KindOfShape", self.MeasuOp) @@ -3873,17 +6972,34 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Available formats can be obtained with InsertOp.ImportTranslators() method. # If format 'IGES_SCALE' is used instead 'IGES' length unit will be # set to 'meter' and result model will be scaled. - # @return New GEOM_Object, containing the imported shape. + # @return New GEOM.GEOM_Object, containing the imported shape. # # @ref swig_Import_Export "Example" def ImportFile(self,theFileName, theFormatName): + """ + Import a shape from the BREP or IGES or STEP file + (depends on given format) with given name. + + Parameters: + theFileName The file, containing the shape. + theFormatName Specify format for the file reading. + Available formats can be obtained with geompy.InsertOp.ImportTranslators() method. + If format 'IGES_SCALE' is used instead 'IGES' length unit will be + set to 'meter' and result model will be scaled. + + Returns: + New GEOM.GEOM_Object, containing the imported shape. + """ # Example: see GEOM_TestOthers.py anObj = self.InsertOp.ImportFile(theFileName, theFormatName) RaiseIfFailed("Import", self.InsertOp) return anObj - ## Deprecated analog of ImportFile + ## Deprecated analog of ImportFile() def Import(self,theFileName, theFormatName): + """ + Deprecated analog of geompy.ImportFile + """ print "WARNING: Function Import is deprecated, use ImportFile instead" anObj = self.InsertOp.ImportFile(theFileName, theFormatName) RaiseIfFailed("Import", self.InsertOp) @@ -3893,6 +7009,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ImportBREP(self,theFileName): + """ + geompy.ImportFile(...) function for BREP format + """ # Example: see GEOM_TestOthers.py return self.ImportFile(theFileName, "BREP") @@ -3900,6 +7019,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ImportIGES(self,theFileName): + """ + geompy.ImportFile(...) function for IGES format + """ # Example: see GEOM_TestOthers.py return self.ImportFile(theFileName, "IGES") @@ -3907,6 +7029,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def GetIGESUnit(self,theFileName): + """ + Return length unit from given IGES file + """ # Example: see GEOM_TestOthers.py anObj = self.InsertOp.ImportFile(theFileName, "IGES_UNIT") #RaiseIfFailed("Import", self.InsertOp) @@ -3928,6 +7053,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ImportSTEP(self,theFileName): + """ + geompy.ImportFile(...) function for STEP format + """ # Example: see GEOM_TestOthers.py return self.ImportFile(theFileName, "STEP") @@ -3939,6 +7067,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def Export(self,theObject, theFileName, theFormatName): + """ + Export the given shape into a file with given name. + + Parameters: + theObject Shape to be stored in the file. + theFileName Name of the file to store the given shape in. + theFormatName Specify format for the shape storage. + Available formats can be obtained with geompy.InsertOp.ImportTranslators() method. + """ # Example: see GEOM_TestOthers.py self.InsertOp.Export(theObject, theFileName, theFormatName) if self.InsertOp.IsDone() == 0: @@ -3950,6 +7087,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ExportBREP(self,theObject, theFileName): + """ + geompy.Export(...) function for BREP format + """ # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "BREP") @@ -3957,6 +7097,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ExportIGES(self,theObject, theFileName): + """ + geompy.Export(...) function for IGES format + """ # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "IGES") @@ -3964,6 +7107,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_Import_Export "Example" def ExportSTEP(self,theObject, theFileName): + """ + geompy.Export(...) function for STEP format + """ # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "STEP") @@ -3976,10 +7122,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a quadrangle face from four edges. Order of Edges is not # important. It is not necessary that edges share the same vertex. # @param E1,E2,E3,E4 Edges for the face bound. - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_building_by_blocks_page "Example" def MakeQuad(self,E1, E2, E3, E4): + """ + Create a quadrangle face from four edges. Order of Edges is not + important. It is not necessary that edges share the same vertex. + + Parameters: + E1,E2,E3,E4 Edges for the face bound. + + Returns: + New GEOM.GEOM_Object, containing the created face. + + Example of usage: + qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4) + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4) RaiseIfFailed("MakeQuad", self.BlocksOp) @@ -3988,10 +7147,32 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a quadrangle face on two edges. # The missing edges will be built by creating the shortest ones. # @param E1,E2 Two opposite edges for the face. - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_building_by_blocks_page "Example" def MakeQuad2Edges(self,E1, E2): + """ + Create a quadrangle face on two edges. + The missing edges will be built by creating the shortest ones. + + Parameters: + E1,E2 Two opposite edges for the face. + + Returns: + New GEOM.GEOM_Object, containing the created face. + + Example of usage: + # create vertices + p1 = geompy.MakeVertex( 0., 0., 0.) + p2 = geompy.MakeVertex(150., 30., 0.) + p3 = geompy.MakeVertex( 0., 120., 50.) + p4 = geompy.MakeVertex( 0., 40., 70.) + # create edges + edge1 = geompy.MakeEdge(p1, p2) + edge2 = geompy.MakeEdge(p3, p4) + # create a quadrangle face from two edges + qface2 = geompy.MakeQuad2Edges(edge1, edge2) + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad2Edges(E1, E2) RaiseIfFailed("MakeQuad2Edges", self.BlocksOp) @@ -4000,11 +7181,30 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a quadrangle face with specified corners. # The missing edges will be built by creating the shortest ones. # @param V1,V2,V3,V4 Corner vertices for the face. - # @return New GEOM_Object, containing the created face. + # @return New GEOM.GEOM_Object, containing the created face. # # @ref tui_building_by_blocks_page "Example 1" # \n @ref swig_MakeQuad4Vertices "Example 2" def MakeQuad4Vertices(self,V1, V2, V3, V4): + """ + Create a quadrangle face with specified corners. + The missing edges will be built by creating the shortest ones. + + Parameters: + V1,V2,V3,V4 Corner vertices for the face. + + Returns: + New GEOM.GEOM_Object, containing the created face. + + Example of usage: + # create vertices + p1 = geompy.MakeVertex( 0., 0., 0.) + p2 = geompy.MakeVertex(150., 30., 0.) + p3 = geompy.MakeVertex( 0., 120., 50.) + p4 = geompy.MakeVertex( 0., 40., 70.) + # create a quadrangle from four points in its corners + qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4) + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4) RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp) @@ -4013,11 +7213,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid. - # @return New GEOM_Object, containing the created solid. + # @return New GEOM.GEOM_Object, containing the created solid. # # @ref tui_building_by_blocks_page "Example 1" # \n @ref swig_MakeHexa "Example 2" def MakeHexa(self,F1, F2, F3, F4, F5, F6): + """ + 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. + + Parameters: + F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid. + + Returns: + New GEOM.GEOM_Object, containing the created solid. + + Example of usage: + solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6) + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6) RaiseIfFailed("MakeHexa", self.BlocksOp) @@ -4026,11 +7239,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create a hexahedral solid between two given faces. # The missing faces will be built by creating the smallest ones. # @param F1,F2 Two opposite faces for the hexahedral solid. - # @return New GEOM_Object, containing the created solid. + # @return New GEOM.GEOM_Object, containing the created solid. # # @ref tui_building_by_blocks_page "Example 1" # \n @ref swig_MakeHexa2Faces "Example 2" def MakeHexa2Faces(self,F1, F2): + """ + Create a hexahedral solid between two given faces. + The missing faces will be built by creating the smallest ones. + + Parameters: + F1,F2 Two opposite faces for the hexahedral solid. + + Returns: + New GEOM.GEOM_Object, containing the created solid. + + Example of usage: + solid1 = geompy.MakeHexa2Faces(qface1, qface2) + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeHexa2Faces(F1, F2) RaiseIfFailed("MakeHexa2Faces", self.BlocksOp) @@ -4047,10 +7273,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the found vertex. # # @ref swig_GetPoint "Example" def GetPoint(self, theShape, theX, theY, theZ, theEpsilon): + """ + Get a vertex, found in the given shape by its coordinates. + + Parameters: + theShape Block or a compound of blocks. + theX,theY,theZ Coordinates of the sought vertex. + theEpsilon Maximum allowed distance between the resulting + vertex and point with the given coordinates. + + Returns: + New GEOM.GEOM_Object, containing the found vertex. + + Example of usage: + pnt = geompy.GetPoint(shape, -50, 50, 50, 0.01) + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon) RaiseIfFailed("GetPoint", self.BlocksOp) @@ -4059,10 +7300,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## 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. + # @return New GEOM.GEOM_Object, containing the found vertex. # # @ref swig_GetVertexNearPoint "Example" def GetVertexNearPoint(self, theShape, thePoint): + """ + Find a vertex of the given shape, which has minimal distance to the given point. + + Parameters: + theShape Any shape. + thePoint Point, close to the desired vertex. + + Returns: + New GEOM.GEOM_Object, containing the found vertex. + + Example of usage: + pmidle = geompy.MakeVertex(50, 0, 50) + edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle) + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint) RaiseIfFailed("GetVertexNearPoint", self.BlocksOp) @@ -4071,10 +7326,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get an edge, found in the given shape by two given vertices. # @param theShape Block or a compound of blocks. # @param thePoint1,thePoint2 Points, close to the ends of the desired edge. - # @return New GEOM_Object, containing the found edge. + # @return New GEOM.GEOM_Object, containing the found edge. # # @ref swig_GetEdge "Example" def GetEdge(self, theShape, thePoint1, thePoint2): + """ + Get an edge, found in the given shape by two given vertices. + + Parameters: + theShape Block or a compound of blocks. + thePoint1,thePoint2 Points, close to the ends of the desired edge. + + Returns: + New GEOM.GEOM_Object, containing the found edge. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2) RaiseIfFailed("GetEdge", self.BlocksOp) @@ -4083,10 +7348,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Find an edge of the given shape, which has minimal distance to the given point. # @param theShape Block or a compound of blocks. # @param thePoint Point, close to the desired edge. - # @return New GEOM_Object, containing the found edge. + # @return New GEOM.GEOM_Object, containing the found edge. # # @ref swig_GetEdgeNearPoint "Example" def GetEdgeNearPoint(self, theShape, thePoint): + """ + Find an edge of the given shape, which has minimal distance to the given point. + + Parameters: + theShape Block or a compound of blocks. + thePoint Point, close to the desired edge. + + Returns: + New GEOM.GEOM_Object, containing the found edge. + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint) RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp) @@ -4095,10 +7370,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Returns a face, found in the given shape by four given corner vertices. # @param theShape Block or a compound of blocks. # @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face. - # @return New GEOM_Object, containing the found face. + # @return New GEOM.GEOM_Object, containing the found face. # # @ref swig_todo "Example" def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4): + """ + Returns a face, found in the given shape by four given corner vertices. + + Parameters: + theShape Block or a compound of blocks. + thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face. + + Returns: + New GEOM.GEOM_Object, containing the found face. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4) RaiseIfFailed("GetFaceByPoints", self.BlocksOp) @@ -4107,10 +7392,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get a face of block, found in the given shape by two given edges. # @param theShape Block or a compound of blocks. # @param theEdge1,theEdge2 Edges, close to the edges of the desired face. - # @return New GEOM_Object, containing the found face. + # @return New GEOM.GEOM_Object, containing the found face. # # @ref swig_todo "Example" def GetFaceByEdges(self,theShape, theEdge1, theEdge2): + """ + Get a face of block, found in the given shape by two given edges. + + Parameters: + theShape Block or a compound of blocks. + theEdge1,theEdge2 Edges, close to the edges of the desired face. + + Returns: + New GEOM.GEOM_Object, containing the found face. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2) RaiseIfFailed("GetFaceByEdges", self.BlocksOp) @@ -4119,10 +7414,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Find a face, opposite to the given one in the given block. # @param theBlock Must be a hexahedral solid. # @param theFace Face of \a theBlock, opposite to the desired face. - # @return New GEOM_Object, containing the found face. + # @return New GEOM.GEOM_Object, containing the found face. # # @ref swig_GetOppositeFace "Example" def GetOppositeFace(self,theBlock, theFace): + """ + Find a face, opposite to the given one in the given block. + + Parameters: + theBlock Must be a hexahedral solid. + theFace Face of theBlock, opposite to the desired face. + + Returns: + New GEOM.GEOM_Object, containing the found face. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace) RaiseIfFailed("GetOppositeFace", self.BlocksOp) @@ -4131,10 +7436,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Find a face of the given shape, which has minimal distance to the given point. # @param theShape Block or a compound of blocks. # @param thePoint Point, close to the desired face. - # @return New GEOM_Object, containing the found face. + # @return New GEOM.GEOM_Object, containing the found face. # # @ref swig_GetFaceNearPoint "Example" def GetFaceNearPoint(self, theShape, thePoint): + """ + Find a face of the given shape, which has minimal distance to the given point. + + Parameters: + theShape Block or a compound of blocks. + thePoint Point, close to the desired face. + + Returns: + New GEOM.GEOM_Object, containing the found face. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint) RaiseIfFailed("GetFaceNearPoint", self.BlocksOp) @@ -4143,10 +7458,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Find a face of block, whose outside normale has minimal angle with the given vector. # @param theBlock Block or a compound of blocks. # @param theVector Vector, close to the normale of the desired face. - # @return New GEOM_Object, containing the found face. + # @return New GEOM.GEOM_Object, containing the found face. # # @ref swig_todo "Example" def GetFaceByNormale(self, theBlock, theVector): + """ + Find a face of block, whose outside normale has minimal angle with the given vector. + + Parameters: + theBlock Block or a compound of blocks. + theVector Vector, close to the normale of the desired face. + + Returns: + New GEOM.GEOM_Object, containing the found face. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector) RaiseIfFailed("GetFaceByNormale", self.BlocksOp) @@ -4156,7 +7481,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 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 theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type # @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. @@ -4164,6 +7489,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetShapesNearPoint "Example" def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07): + """ + Find all sub-shapes of type theShapeType of the given shape, + which have minimal distance to the given point. + + Parameters: + theShape Any shape. + thePoint Point, close to the desired shape. + theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type) + theTolerance The tolerance for distances comparison. All shapes + with distances to the given point in interval + [minimal_distance, minimal_distance + theTolerance] will be gathered. + + Returns: + New GEOM_Object, containing a group of all found shapes. + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance) RaiseIfFailed("GetShapesNearPoint", self.BlocksOp) @@ -4189,6 +7529,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @ref tui_measurement_tools_page "Example 1" # \n @ref swig_CheckCompoundOfBlocks "Example 2" def CheckCompoundOfBlocks(self,theCompound): + """ + Check, if the compound of blocks is given. + To be considered as a compound of blocks, the + given shape must satisfy the following conditions: + - Each element of the compound should be a Block (6 faces and 12 edges). + - A connection between two Blocks should be an entire quadrangle face or an entire edge. + - The compound should be connexe. + - The glue between two quadrangle faces should be applied. + + Parameters: + theCompound The compound to check. + + Returns: + TRUE, if the given shape is a compound of blocks. + If theCompound is not valid, prints all discovered errors. + """ # Example: see GEOM_Spanner.py (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound) RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp) @@ -4207,6 +7563,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_RemoveExtraEdges "Example" def RemoveExtraEdges(self, theShape, doUnionFaces=False): + """ + Remove all seam and degenerated edges from theShape. + Unite faces and edges, sharing one surface. It means that + this faces must have references to one C++ surface object (handle). + + Parameters: + theShape The compound or single solid to remove irregular edges from. + doUnionFaces If True, then unite faces. If False (the default value), + do not unite faces. + + Returns: + Improved shape. + """ # Example: see GEOM_TestOthers.py nbFacesOptimum = -1 # -1 means do not unite faces if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces @@ -4222,6 +7591,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_CheckAndImprove "Example" def CheckAndImprove(self,theShape): + """ + Check, if the given shape is a blocks compound. + Fix all detected errors. + + Note: + Single block can be also fixed by this method. + + Parameters: + theShape The compound to check and improve. + + Returns: + Improved compound. + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.CheckAndImprove(theShape) RaiseIfFailed("CheckAndImprove", self.BlocksOp) @@ -4238,11 +7620,25 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theMinNbFaces If solid has lower number of faces, it is not a block. # @param theMaxNbFaces If solid has higher number of faces, it is not a block. # \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. - # @return List of GEOM_Objects, containing the retrieved blocks. + # @return List of GEOM.GEOM_Object, containing the retrieved blocks. # # @ref tui_explode_on_blocks "Example 1" # \n @ref swig_MakeBlockExplode "Example 2" def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces): + """ + Get all the blocks, contained in the given compound. + + Parameters: + theCompound The compound to explode. + theMinNbFaces If solid has lower number of faces, it is not a block. + 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. + + Returns: + List of GEOM.GEOM_Object, containing the retrieved blocks. + """ # Example: see GEOM_TestOthers.py theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces) aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces) @@ -4256,10 +7652,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @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. + # @return New GEOM.GEOM_Object, containing the found block. # # @ref swig_todo "Example" def GetBlockNearPoint(self,theCompound, thePoint): + """ + Find block, containing the given point inside its volume or on boundary. + + Parameters: + theCompound Compound, to find block in. + thePoint Point, close to the desired block. If the point lays on + boundary between some blocks, we return block with nearest center. + + Returns: + New GEOM.GEOM_Object, containing the found block. + """ # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint) RaiseIfFailed("GetBlockNearPoint", self.BlocksOp) @@ -4268,10 +7675,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Find block, containing all the elements, passed as the parts, or maximum quantity of them. # @param theCompound Compound, to find block in. # @param theParts List of faces and/or edges and/or vertices to be parts of the found block. - # @return New GEOM_Object, containing the found block. + # @return New GEOM.GEOM_Object, containing the found block. # # @ref swig_GetBlockByParts "Example" def GetBlockByParts(self,theCompound, theParts): + """ + Find block, containing all the elements, passed as the parts, or maximum quantity of them. + + Parameters: + theCompound Compound, to find block in. + theParts List of faces and/or edges and/or vertices to be parts of the found block. + + Returns: + New GEOM_Object, containing the found block. + """ # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts) RaiseIfFailed("GetBlockByParts", self.BlocksOp) @@ -4280,10 +7697,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Return all blocks, containing all the elements, passed as the parts. # @param theCompound Compound, to find blocks in. # @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks. - # @return List of GEOM_Objects, containing the found blocks. + # @return List of GEOM.GEOM_Object, containing the found blocks. # # @ref swig_todo "Example" def GetBlocksByParts(self,theCompound, theParts): + """ + Return all blocks, containing all the elements, passed as the parts. + + Parameters: + theCompound Compound, to find blocks in. + theParts List of faces and/or edges and/or vertices to be parts of the found blocks. + + Returns: + List of GEOM.GEOM_Object, containing the found blocks. + """ # Example: see GEOM_Spanner.py aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts) RaiseIfFailed("GetBlocksByParts", self.BlocksOp) @@ -4296,10 +7723,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param DirFace2 ID of Second direction face. # @param NbTimes Quantity of transformations to be done. # \note Unique ID of sub-shape can be obtained, using method GetSubShapeID(). - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_multi_transformation "Example" def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes): + """ + Multi-transformate block and glue the result. + Transformation is defined so, as to superpose direction faces. + + Parameters: + Block Hexahedral solid to be multi-transformed. + DirFace1 ID of First direction face. + DirFace2 ID of Second direction face. + NbTimes Quantity of transformations to be done. + + Note: + Unique ID of sub-shape can be obtained, using method GetSubShapeID(). + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_Spanner.py DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes) anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes) @@ -4312,11 +7755,23 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation. # @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation. # @param NbTimesU,NbTimesV Quantity of transformations to be done. - # @return New GEOM_Object, containing the result shape. + # @return New GEOM.GEOM_Object, containing the result shape. # # @ref tui_multi_transformation "Example" def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU, DirFace1V, DirFace2V, NbTimesV): + """ + Multi-transformate block and glue the result. + + Parameters: + Block Hexahedral solid to be multi-transformed. + DirFace1U,DirFace2U IDs of Direction faces for the first transformation. + DirFace1V,DirFace2V IDs of Direction faces for the second transformation. + NbTimesU,NbTimesV Quantity of transformations to be done. + + Returns: + New GEOM.GEOM_Object, containing the result shape. + """ # Example: see GEOM_Spanner.py DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters( DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV) @@ -4331,10 +7786,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # edge of this group directly or through other opposite edges. # Notion of Opposite Edge make sence only on quadrangle face. # @param theShape Shape to build propagation groups on. - # @return List of GEOM_Objects, each of them is a propagation group. + # @return List of GEOM.GEOM_Object, each of them is a propagation group. # # @ref swig_Propagate "Example" def Propagate(self,theShape): + """ + Build all possible propagation groups. + Propagation group is a set of all edges, opposite to one (main) + edge of this group directly or through other opposite edges. + Notion of Opposite Edge make sence only on quadrangle face. + + Parameters: + theShape Shape to build propagation groups on. + + Returns: + List of GEOM.GEOM_Object, each of them is a propagation group. + """ # Example: see GEOM_TestOthers.py listChains = self.BlocksOp.Propagate(theShape) RaiseIfFailed("Propagate", self.BlocksOp) @@ -4348,12 +7815,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Creates a new group which will store sub-shapes of theMainShape # @param theMainShape is a GEOM object on which the group is selected - # @param theShapeType defines a shape type of the group + # @param theShapeType defines a shape type of the group (see GEOM::shape_type) # @return a newly created GEOM group # # @ref tui_working_with_groups_page "Example 1" # \n @ref swig_CreateGroup "Example 2" def CreateGroup(self,theMainShape, theShapeType): + """ + Creates a new group which will store sub-shapes of theMainShape + + Parameters: + theMainShape is a GEOM object on which the group is selected + theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID", + "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE". + + Returns: + a newly created GEOM group + + Example of usage: + group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"]) + + """ # Example: see GEOM_TestOthers.py anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType) RaiseIfFailed("CreateGroup", self.GroupOp) @@ -4366,6 +7848,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_working_with_groups_page "Example" def AddObject(self,theGroup, theSubShapeID): + """ + Adds a sub-object with ID theSubShapeId to the group + + Parameters: + theGroup is a GEOM group to which the new sub-shape is added + theSubShapeID is a sub-shape ID in the main object. + + Note: + Use method GetSubShapeID() to get an unique ID of the sub-shape + """ # Example: see GEOM_TestOthers.py self.GroupOp.AddObject(theGroup, theSubShapeID) if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT": @@ -4380,6 +7872,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_working_with_groups_page "Example" def RemoveObject(self,theGroup, theSubShapeID): + """ + Removes a sub-object with ID theSubShapeId from the group + + Parameters: + theGroup is a GEOM group from which the new sub-shape is removed + theSubShapeID is a sub-shape ID in the main object. + + Note: + Use method GetSubShapeID() to get an unique ID of the sub-shape + """ # Example: see GEOM_TestOthers.py self.GroupOp.RemoveObject(theGroup, theSubShapeID) RaiseIfFailed("RemoveObject", self.GroupOp) @@ -4391,16 +7893,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_working_with_groups_page "Example" def UnionList (self,theGroup, theSubShapes): + """ + Adds to the group all the given shapes. No errors, if some shapes are alredy included. + + Parameters: + theGroup is a GEOM group to which the new sub-shapes are added. + theSubShapes is a list of sub-shapes to be added. + """ # Example: see GEOM_TestOthers.py self.GroupOp.UnionList(theGroup, theSubShapes) RaiseIfFailed("UnionList", self.GroupOp) pass - ## Works like the above method, but argument - # theSubShapes here is a list of sub-shapes indices + ## 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 indices of sub-shapes to be added. # # @ref swig_UnionIDs "Example" def UnionIDs(self,theGroup, theSubShapes): + """ + Adds to the group all the given shapes. No errors, if some shapes are alredy included. + + Parameters: + theGroup is a GEOM group to which the new sub-shapes are added. + theSubShapes is a list of indices of sub-shapes to be added. + """ # Example: see GEOM_TestOthers.py self.GroupOp.UnionIDs(theGroup, theSubShapes) RaiseIfFailed("UnionIDs", self.GroupOp) @@ -4412,16 +7929,31 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_working_with_groups_page "Example" def DifferenceList (self,theGroup, theSubShapes): + """ + Removes from the group all the given shapes. No errors, if some shapes are not included. + + Parameters: + theGroup is a GEOM group from which the sub-shapes are removed. + theSubShapes is a list of sub-shapes to be removed. + """ # Example: see GEOM_TestOthers.py self.GroupOp.DifferenceList(theGroup, theSubShapes) RaiseIfFailed("DifferenceList", self.GroupOp) pass - ## Works like the above method, but argument - # theSubShapes here is a list of sub-shapes indices + ## 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 indices of sub-shapes to be removed. # # @ref swig_DifferenceIDs "Example" def DifferenceIDs(self,theGroup, theSubShapes): + """ + Removes from the group all the given shapes. No errors, if some shapes are not included. + + Parameters: + theGroup is a GEOM group from which the sub-shapes are removed. + theSubShapes is a list of indices of sub-shapes to be removed. + """ # Example: see GEOM_TestOthers.py self.GroupOp.DifferenceIDs(theGroup, theSubShapes) RaiseIfFailed("DifferenceIDs", self.GroupOp) @@ -4432,6 +7964,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetObjectIDs "Example" def GetObjectIDs(self,theGroup): + """ + Returns a list of sub-objects ID stored in the group + + Parameters: + theGroup is a GEOM group for which a list of IDs is requested + """ # Example: see GEOM_TestOthers.py ListIDs = self.GroupOp.GetObjects(theGroup) RaiseIfFailed("GetObjects", self.GroupOp) @@ -4442,6 +7980,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetType "Example" def GetType(self,theGroup): + """ + Returns a type of sub-objects stored in the group + + Parameters: + theGroup is a GEOM group which type is returned. + """ # Example: see GEOM_TestOthers.py aType = self.GroupOp.GetType(theGroup) RaiseIfFailed("GetType", self.GroupOp) @@ -4449,9 +7993,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Convert a type of geom object from id to string value # @param theId is a GEOM obect type id. - # + # @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... ) # @ref swig_GetType "Example" def ShapeIdToType(self, theId): + """ + Convert a type of geom object from id to string value + + Parameters: + theId is a GEOM obect type id. + + Returns: + type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... ) + """ if theId == 0: return "COPY" if theId == 1: @@ -4554,6 +8107,17 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref swig_GetMainShape "Example" def GetMainShape(self,theGroup): + """ + Returns a main shape associated with the group + + Parameters: + theGroup is a GEOM group for which a main shape object is requested + + Returns: + a GEOM object which is a main shape for theGroup + + Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup) + """ # Example: see GEOM_TestOthers.py anObj = self.GroupOp.GetMainShape(theGroup) RaiseIfFailed("GetMainShape", self.GroupOp) @@ -4561,9 +8125,28 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create group of edges of theShape, whose length is in range [min_length, max_length]. # If include_min/max == 0, edges with length == min/max_length will not be included in result. - # - # @ref swig_todo "Example" + # @param theShape given shape (see GEOM.GEOM_Object) + # @param min_length minimum length of edges of theShape + # @param max_length maximum length of edges of theShape + # @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) + # @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) + # @return a newly created GEOM group of edges + # @@ref swig_todo "Example" def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1): + """ + Create group of edges of theShape, whose length is in range [min_length, max_length]. + If include_min/max == 0, edges with length == min/max_length will not be included in result. + + Parameters: + theShape given shape + min_length minimum length of edges of theShape + max_length maximum length of edges of theShape + include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) + include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) + + Returns: + a newly created GEOM group of edges. + """ edges = self.SubShapeAll(theShape, ShapeType["EDGE"]) edges_in_range = [] for edge in edges: @@ -4588,9 +8171,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Create group of edges of selected shape, whose length is in range [min_length, max_length]. # If include_min/max == 0, edges with length == min/max_length will not be included in result. - # + # @param min_length minimum length of edges of selected shape + # @param max_length maximum length of edges of selected shape + # @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) + # @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) + # @return a newly created GEOM group of edges # @ref swig_todo "Example" def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1): + """ + Create group of edges of selected shape, whose length is in range [min_length, max_length]. + If include_min/max == 0, edges with length == min/max_length will not be included in result. + + Parameters: + min_length minimum length of edges of selected shape + max_length maximum length of edges of selected shape + include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1) + include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1) + + Returns: + a newly created GEOM group of edges. + """ nb_selected = sg.SelectedCount() if nb_selected < 1: print "Select a shape before calling this function, please." @@ -4638,11 +8238,40 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theP1 1st junction point of main pipe # @param theP2 2nd junction point of main pipe # @param theP3 Junction point of incident pipe - # @return List of GEOM_Objects, containing the created shape and propagation groups. + # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # # @ref tui_creation_pipetshape "Example" def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None): - theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2) + """ + Create a T-shape object with specified caracteristics for the main + and the incident pipes (radius, width, half-length). + The extremities of the main pipe are located on junctions points P1 and P2. + The extremity of the incident pipe is located on junction point P3. + If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and + the main plane of the T-shape is XOY. + + Paremeters: + theR1 Internal radius of main pipe + theW1 Width of main pipe + theL1 Half-length of main pipe + theR2 Internal radius of incident pipe (R2 < R1) + theW2 Width of incident pipe (R2+W2 < R1+W1) + theL2 Half-length of incident pipe + theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True) + theP1 1st junction point of main pipe + theP2 2nd junction point of main pipe + theP3 Junction point of incident pipe + + Returns: + List of GEOM_Object, containing the created shape and propagation groups. + + Example of usage: + # create PipeTShape object + pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0) + # create PipeTShape object with position + pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3) + """ + theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2) if (theP1 and theP2 and theP3): anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3) else: @@ -4670,10 +8299,42 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theP1 1st junction point of main pipe # @param theP2 2nd junction point of main pipe # @param theP3 Junction point of incident pipe - # @return List of GEOM_Objects, containing the created shape and propagation groups. + # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # # @ref tui_creation_pipetshape "Example" def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None): + """ + Create a T-shape object with chamfer and with specified caracteristics for the main + and the incident pipes (radius, width, half-length). The chamfer is + created on the junction of the pipes. + The extremities of the main pipe are located on junctions points P1 and P2. + The extremity of the incident pipe is located on junction point P3. + If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and + the main plane of the T-shape is XOY. + + Paremeters: + theR1 Internal radius of main pipe + theW1 Width of main pipe + theL1 Half-length of main pipe + theR2 Internal radius of incident pipe (R2 < R1) + theW2 Width of incident pipe (R2+W2 < R1+W1) + theL2 Half-length of incident pipe + theH Height of the chamfer. + theW Width of the chamfer. + theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True) + theP1 1st junction point of main pipe + theP2 2nd junction point of main pipe + theP3 Junction point of incident pipe + + Returns: + List of GEOM_Object, containing the created shape and propagation groups. + + Example of usage: + # create PipeTShape with chamfer object + pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0) + # create PipeTShape with chamfer object with position + pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3) + """ theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW) if (theP1 and theP2 and theP3): anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3) @@ -4701,10 +8362,42 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theP1 1st junction point of main pipe # @param theP2 2nd junction point of main pipe # @param theP3 Junction point of incident pipe - # @return List of GEOM_Objects, containing the created shape and propagation groups. + # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # # @ref tui_creation_pipetshape "Example" def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None): + """ + Create a T-shape object with fillet and with specified caracteristics for the main + and the incident pipes (radius, width, half-length). The fillet is + created on the junction of the pipes. + The extremities of the main pipe are located on junctions points P1 and P2. + The extremity of the incident pipe is located on junction point P3. + + Paremeters: + If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and + the main plane of the T-shape is XOY. + theR1 Internal radius of main pipe + theW1 Width of main pipe + heL1 Half-length of main pipe + theR2 Internal radius of incident pipe (R2 < R1) + theW2 Width of incident pipe (R2+W2 < R1+W1) + theL2 Half-length of incident pipe + theRF Radius of curvature of fillet. + theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True) + theP1 1st junction point of main pipe + theP2 2nd junction point of main pipe + theP3 Junction point of incident pipe + + Returns: + List of GEOM_Object, containing the created shape and propagation groups. + + Example of usage: + # create PipeTShape with fillet object + pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0) + # create PipeTShape with fillet object with position + pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3) + + """ theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF) if (theP1 and theP2 and theP3): anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3) @@ -4720,18 +8413,38 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## @} ## Create a copy of the given object - # @ingroup l1_geompy_auxiliary # + # @param theOriginal geometry object for copy + # @return unique object identifier + # @ingroup l1_geompy_auxiliary # @ref swig_all_advanced "Example" def MakeCopy(self,theOriginal): + """ + Create a copy of the given object + + Paremeters: + theOriginal geometry object for copy + + Returns: + unique object identifier + + Example of usage: Copy = geompy.MakeCopy(Box) + """ # Example: see GEOM_TestAll.py anObj = self.InsertOp.MakeCopy(theOriginal) RaiseIfFailed("MakeCopy", self.InsertOp) return anObj ## Add Path to load python scripts from + # @param Path a path to load python scripts from # @ingroup l1_geompy_auxiliary def addPath(self,Path): + """ + Add Path to load python scripts from + + Parameters: + Path a path to load python scripts from + """ if (sys.path.count(Path) < 1): sys.path.append(Path) pass @@ -4742,6 +8455,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return unique texture identifier # @ingroup l1_geompy_auxiliary def LoadTexture(self, Path): + """ + Load marker texture from the file + + Parameters: + Path a path to the texture file + + Returns: + unique texture identifier + """ # Example: see GEOM_TestAll.py ID = self.InsertOp.LoadTexture(Path) RaiseIfFailed("LoadTexture", self.InsertOp) @@ -4752,6 +8474,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return unique object identifier # @ingroup l1_geompy_auxiliary def getObjectID(self, obj): + """ + Get entry of the object + + Parameters: + obj geometry object + + Returns: + unique object identifier + """ ID = "" entry = salome.ObjectToID(obj) if entry is not None: @@ -4774,9 +8505,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param Height texture height in pixels # @param Texture texture data # @param RowData if @c True, @a Texture data are packed in the byte stream + # @return unique texture identifier # @ingroup l1_geompy_auxiliary def AddTexture(self, Width, Height, Texture, RowData=False): - # Example: see GEOM_TestAll.py + """ + Add marker texture. Width and Height parameters + specify width and height of the texture in pixels. + If RowData is True, Texture parameter should represent texture data + packed into the byte array. If RowData is False (default), Texture + parameter should be unpacked string, in which '1' symbols represent opaque + pixels and '0' represent transparent pixels of the texture bitmap. + + Parameters: + Width texture width in pixels + Height texture height in pixels + Texture texture data + RowData if True, Texture data are packed in the byte stream + + Returns: + return unique texture identifier + """ if not RowData: Texture = PackData(Texture) ID = self.InsertOp.AddTexture(Width, Height, Texture) RaiseIfFailed("AddTexture", self.InsertOp)