Back to index

salome-geom  6.5.0
geompyDC.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # This library is free software; you can redistribute it and/or
00005 # modify it under the terms of the GNU Lesser General Public
00006 # License as published by the Free Software Foundation; either
00007 # version 2.1 of the License.
00008 #
00009 # This library is distributed in the hope that it will be useful,
00010 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 # Lesser General Public License for more details.
00013 #
00014 # You should have received a copy of the GNU Lesser General Public
00015 # License along with this library; if not, write to the Free Software
00016 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 #
00018 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 #
00020 #  File   : geompy.py
00021 #  Author : Paul RASCLE, EDF
00022 #  Module : GEOM
00023 
00024 """
00025     \namespace geompy
00026     \brief Module geompy
00027 """
00028 
00029 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
00030 
00031 ## @defgroup l1_geompy_purpose   All package methods, grouped by their purpose
00032 ## @{
00033 ##   @defgroup l2_import_export Importing/exporting geometrical objects
00034 ##   @defgroup l2_creating      Creating geometrical objects
00035 ##   @{
00036 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
00037 ##     @{
00038 ##       @defgroup l4_curves        Creating Curves
00039 
00040 ##     @}
00041 ##     @defgroup l3_3d_primitives Creating 3D Primitives
00042 ##     @defgroup l3_complex       Creating Complex Objects
00043 ##     @defgroup l3_groups        Working with groups
00044 ##     @defgroup l3_blocks        Building by blocks
00045 ##     @{
00046 ##       @defgroup l4_blocks_measure Check and Improve
00047 
00048 ##     @}
00049 ##     @defgroup l3_sketcher      Sketcher
00050 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
00051 ##     @{
00052 ##       @defgroup l4_decompose     Decompose objects
00053 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
00054 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
00055 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
00056 ##       @defgroup l4_advanced      Advanced objects creation functions
00057 
00058 ##     @}
00059 
00060 ##   @}
00061 ##   @defgroup l2_transforming  Transforming geometrical objects
00062 ##   @{
00063 ##     @defgroup l3_basic_op      Basic Operations
00064 ##     @defgroup l3_boolean       Boolean Operations
00065 ##     @defgroup l3_transform     Transformation Operations
00066 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
00067 ##     @defgroup l3_blocks_op     Blocks Operations
00068 ##     @defgroup l3_healing       Repairing Operations
00069 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
00070 
00071 ##   @}
00072 ##   @defgroup l2_measure       Using measurement tools
00073 
00074 ## @}
00075 
00076 import salome
00077 salome.salome_init()
00078 from salome import *
00079 
00080 from salome_notebook import *
00081 
00082 import GEOM
00083 import math
00084 import os
00085 
00086 ## Enumeration ShapeType as a dictionary. \n
00087 ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
00088 #  @ingroup l1_geompy_auxiliary
00089 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
00090 
00091 ## Raise an Error, containing the Method_name, if Operation is Failed
00092 ## @ingroup l1_geompy_auxiliary
00093 def RaiseIfFailed (Method_name, Operation):
00094     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
00095         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
00096 
00097 ## Return list of variables value from salome notebook
00098 ## @ingroup l1_geompy_auxiliary
00099 def ParseParameters(*parameters):
00100     Result = []
00101     StringResult = []
00102     for parameter in parameters:
00103         if isinstance(parameter, list):
00104             lResults = ParseParameters(*parameter)
00105             if len(lResults) > 0:
00106                 Result.append(lResults[:-1])
00107                 StringResult += lResults[-1].split(":")
00108                 pass
00109             pass
00110         else:
00111             if isinstance(parameter,str):
00112                 if notebook.isVariable(parameter):
00113                     Result.append(notebook.get(parameter))
00114                 else:
00115                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
00116                 pass
00117             else:
00118                 Result.append(parameter)
00119                 pass
00120             StringResult.append(str(parameter))
00121             pass
00122         pass
00123     if Result:
00124         Result.append(":".join(StringResult))
00125     else:
00126         Result = ":".join(StringResult)
00127     return Result
00128 
00129 ## Return list of variables value from salome notebook
00130 ## @ingroup l1_geompy_auxiliary
00131 def ParseList(list):
00132     Result = []
00133     StringResult = ""
00134     for parameter in list:
00135         if isinstance(parameter,str) and notebook.isVariable(parameter):
00136             Result.append(str(notebook.get(parameter)))
00137             pass
00138         else:
00139             Result.append(str(parameter))
00140             pass
00141 
00142         StringResult = StringResult + str(parameter)
00143         StringResult = StringResult + ":"
00144         pass
00145     StringResult = StringResult[:len(StringResult)-1]
00146     return Result, StringResult
00147 
00148 ## Return list of variables value from salome notebook
00149 ## @ingroup l1_geompy_auxiliary
00150 def ParseSketcherCommand(command):
00151     Result = ""
00152     StringResult = ""
00153     sections = command.split(":")
00154     for section in sections:
00155         parameters = section.split(" ")
00156         paramIndex = 1
00157         for parameter in parameters:
00158             if paramIndex > 1 and parameter.find("'") != -1:
00159                 parameter = parameter.replace("'","")
00160                 if notebook.isVariable(parameter):
00161                     Result = Result + str(notebook.get(parameter)) + " "
00162                     pass
00163                 else:
00164                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
00165                     pass
00166                 pass
00167             else:
00168                 Result = Result + str(parameter) + " "
00169                 pass
00170             if paramIndex > 1:
00171                 StringResult = StringResult + parameter
00172                 StringResult = StringResult + ":"
00173                 pass
00174             paramIndex = paramIndex + 1
00175             pass
00176         Result = Result[:len(Result)-1] + ":"
00177         pass
00178     Result = Result[:len(Result)-1]
00179     return Result, StringResult
00180 
00181 ## Helper function which can be used to pack the passed string to the byte data.
00182 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
00183 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
00184 ## For example,
00185 ## \code
00186 ## val = PackData("10001110") # val = 0xAE
00187 ## val = PackData("1")        # val = 0x80
00188 ## \endcode
00189 ## @param data unpacked data - a string containing '1' and '0' symbols
00190 ## @return data packed to the byte stream
00191 ## @ingroup l1_geompy_auxiliary
00192 def PackData(data):
00193     """
00194     Helper function which can be used to pack the passed string to the byte data.
00195     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
00196     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
00197 
00198     Parameters:
00199         data unpacked data - a string containing '1' and '0' symbols
00200 
00201     Returns:
00202         data packed to the byte stream
00203         
00204     Example of usage:
00205         val = PackData("10001110") # val = 0xAE
00206         val = PackData("1")        # val = 0x80
00207     """
00208     bytes = len(data)/8
00209     if len(data)%8: bytes += 1
00210     res = ""
00211     for b in range(bytes):
00212         d = data[b*8:(b+1)*8]
00213         val = 0
00214         for i in range(8):
00215             val *= 2
00216             if i < len(d):
00217                 if d[i] == "1": val += 1
00218                 elif d[i] != "0":
00219                     raise "Invalid symbol %s" % d[i]
00220                 pass
00221             pass
00222         res += chr(val)
00223         pass
00224     return res
00225 
00226 ## Read bitmap texture from the text file.
00227 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
00228 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
00229 ## The function returns width and height of the pixmap in pixels and byte stream representing
00230 ## texture bitmap itself.
00231 ##
00232 ## This function can be used to read the texture to the byte stream in order to pass it to
00233 ## the AddTexture() function of geompy class.
00234 ## For example,
00235 ## \code
00236 ## import geompy
00237 ## geompy.init_geom(salome.myStudy)
00238 ## texture = geompy.readtexture('mytexture.dat')
00239 ## texture = geompy.AddTexture(*texture)
00240 ## obj.SetMarkerTexture(texture)
00241 ## \endcode
00242 ## @param fname texture file name
00243 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
00244 ## @ingroup l1_geompy_auxiliary
00245 def ReadTexture(fname):
00246     """
00247     Read bitmap texture from the text file.
00248     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
00249     A zero symbol ('0') represents transparent pixel of the texture bitmap.
00250     The function returns width and height of the pixmap in pixels and byte stream representing
00251     texture bitmap itself.
00252     This function can be used to read the texture to the byte stream in order to pass it to
00253     the AddTexture() function of geompy class.
00254     
00255     Parameters:
00256         fname texture file name
00257 
00258     Returns:
00259         sequence of tree values: texture's width, height in pixels and its byte stream
00260     
00261     Example of usage:
00262         import geompy
00263         geompy.init_geom(salome.myStudy)
00264         texture = geompy.readtexture('mytexture.dat')
00265         texture = geompy.AddTexture(*texture)
00266         obj.SetMarkerTexture(texture)
00267     """
00268     try:
00269         f = open(fname)
00270         lines = [ l.strip() for l in f.readlines()]
00271         f.close()
00272         maxlen = 0
00273         if lines: maxlen = max([len(x) for x in lines])
00274         lenbytes = maxlen/8
00275         if maxlen%8: lenbytes += 1
00276         bytedata=""
00277         for line in lines:
00278             if len(line)%8:
00279                 lenline = (len(line)/8+1)*8
00280                 pass
00281             else:
00282                 lenline = (len(line)/8)*8
00283                 pass
00284             for i in range(lenline/8):
00285                 byte=""
00286                 for j in range(8):
00287                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
00288                     else: byte += "0"
00289                     pass
00290                 bytedata += PackData(byte)
00291                 pass
00292             for i in range(lenline/8, lenbytes):
00293                 bytedata += PackData("0")
00294             pass
00295         return lenbytes*8, len(lines), bytedata
00296     except:
00297         pass
00298     return 0, 0, ""
00299 
00300 ## Returns a long value from enumeration type
00301 #  Can be used for CORBA enumerator types like GEOM.shape_type
00302 #  @param theItem enumeration type
00303 #  @ingroup l1_geompy_auxiliary
00304 def EnumToLong(theItem):
00305     """
00306     Returns a long value from enumeration type
00307     Can be used for CORBA enumerator types like geompy.ShapeType
00308 
00309     Parameters:
00310         theItem enumeration type
00311     """
00312     ret = theItem
00313     if hasattr(theItem, "_v"): ret = theItem._v
00314     return ret
00315 
00316 ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
00317 #  and a list of parameters, describing the shape.
00318 #  List of parameters, describing the shape:
00319 #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
00320 #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
00321 #
00322 #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
00323 #
00324 #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
00325 #
00326 #  - SPHERE:       [xc yc zc            R]
00327 #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
00328 #  - BOX:          [xc yc zc                      ax ay az]
00329 #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
00330 #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
00331 #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
00332 #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
00333 #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
00334 #
00335 #  - SPHERE2D:     [xc yc zc            R]
00336 #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
00337 #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
00338 #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
00339 #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
00340 #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
00341 #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
00342 #  - PLANE:        [xo yo zo  dx dy dz]
00343 #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
00344 #  - FACE:                                       [nb_edges  nb_vertices]
00345 #
00346 #  - CIRCLE:       [xc yc zc  dx dy dz  R]
00347 #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
00348 #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
00349 #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
00350 #  - LINE:         [xo yo zo  dx dy dz]
00351 #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
00352 #  - EDGE:                                                 [nb_vertices]
00353 #
00354 #  - VERTEX:       [x  y  z]
00355 #  @ingroup l1_geompy_auxiliary
00356 kind = GEOM.GEOM_IKindOfShape
00357 
00358 ## Information about closed/unclosed state of shell or wire
00359 #  @ingroup l1_geompy_auxiliary
00360 class info:
00361     """
00362     Information about closed/unclosed state of shell or wire
00363     """
00364     UNKNOWN  = 0
00365     CLOSED   = 1
00366     UNCLOSED = 2
00367 
00368 class geompyDC(GEOM._objref_GEOM_Gen):
00369 
00370         def __init__(self):
00371             GEOM._objref_GEOM_Gen.__init__(self)
00372             self.myBuilder = None
00373             self.myStudyId = 0
00374             self.father    = None
00375 
00376             self.BasicOp  = None
00377             self.CurvesOp = None
00378             self.PrimOp   = None
00379             self.ShapesOp = None
00380             self.HealOp   = None
00381             self.InsertOp = None
00382             self.BoolOp   = None
00383             self.TrsfOp   = None
00384             self.LocalOp  = None
00385             self.MeasuOp  = None
00386             self.BlocksOp = None
00387             self.GroupOp  = None
00388             self.AdvOp    = None
00389             pass
00390 
00391         ## @addtogroup l1_geompy_auxiliary
00392         ## @{
00393         def init_geom(self,theStudy):
00394             self.myStudy = theStudy
00395             self.myStudyId = self.myStudy._get_StudyId()
00396             self.myBuilder = self.myStudy.NewBuilder()
00397             self.father = self.myStudy.FindComponent("GEOM")
00398             if self.father is None:
00399                 self.father = self.myBuilder.NewComponent("GEOM")
00400                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
00401                 FName = A1._narrow(SALOMEDS.AttributeName)
00402                 FName.SetValue("Geometry")
00403                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
00404                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
00405                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
00406                 self.myBuilder.DefineComponentInstance(self.father,self)
00407                 pass
00408             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
00409             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
00410             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
00411             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
00412             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
00413             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
00414             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
00415             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
00416             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
00417             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
00418             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
00419             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
00420             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
00421             pass
00422 
00423         ## Dump component to the Python script
00424         #  This method overrides IDL function to allow default values for the parameters.
00425         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
00426             """
00427             Dump component to the Python script
00428             This method overrides IDL function to allow default values for the parameters.
00429             """
00430             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
00431 
00432         ## Get name for sub-shape aSubObj of shape aMainObj
00433         #
00434         # @ref swig_SubShapeName "Example"
00435         def SubShapeName(self,aSubObj, aMainObj):
00436             """
00437             Get name for sub-shape aSubObj of shape aMainObj
00438             """
00439             # Example: see GEOM_TestAll.py
00440 
00441             #aSubId  = orb.object_to_string(aSubObj)
00442             #aMainId = orb.object_to_string(aMainObj)
00443             #index = gg.getIndexTopology(aSubId, aMainId)
00444             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
00445             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
00446             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
00447             return name
00448 
00449         ## Publish in study aShape with name aName
00450         #
00451         #  \param aShape the shape to be published
00452         #  \param aName  the name for the shape
00453         #  \param doRestoreSubShapes if True, finds and publishes also
00454         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
00455         #         and published sub-shapes of arguments
00456         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
00457         #                                                  these arguments description
00458         #  \return study entry of the published shape in form of string
00459         #
00460         #  @ref swig_all_addtostudy "Example"
00461         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
00462                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
00463             """
00464             Publish in study aShape with name aName
00465 
00466             Parameters:
00467                 aShape the shape to be published
00468                 aName  the name for the shape
00469                 doRestoreSubShapes if True, finds and publishes also
00470                                    sub-shapes of aShape, corresponding to its arguments
00471                                    and published sub-shapes of arguments
00472                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
00473                                                          these arguments description
00474 
00475             Returns:
00476                 study entry of the published shape in form of string
00477 
00478             Example of usage:
00479                 id_block1 = geompy.addToStudy(Block1, "Block 1")
00480             """
00481             # Example: see GEOM_TestAll.py
00482             try:
00483                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
00484                 if doRestoreSubShapes:
00485                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
00486                                             theFindMethod, theInheritFirstArg, True )
00487             except:
00488                 print "addToStudy() failed"
00489                 return ""
00490             return aShape.GetStudyEntry()
00491 
00492         ## Publish in study aShape with name aName as sub-object of previously published aFather
00493         #  \param aFather previously published object
00494         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
00495         #  \param aName  the name for the shape
00496         #
00497         #  \return study entry of the published shape in form of string
00498         #  @ref swig_all_addtostudyInFather "Example"
00499         def addToStudyInFather(self, aFather, aShape, aName):
00500             """
00501             Publish in study aShape with name aName as sub-object of previously published aFather
00502 
00503             Parameters:
00504                 aFather previously published object
00505                 aShape the shape to be published as sub-object of aFather
00506                 aName  the name for the shape
00507 
00508             Returns:
00509                 study entry of the published shape in form of string
00510             """
00511             # Example: see GEOM_TestAll.py
00512             try:
00513                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
00514             except:
00515                 print "addToStudyInFather() failed"
00516                 return ""
00517             return aShape.GetStudyEntry()
00518 
00519         ## Unpublish object in study
00520         #
00521         #  \param obj the object to be unpublished
00522         def hideInStudy(self, obj):
00523             """
00524             Unpublish object in study
00525 
00526             Parameters:
00527                 obj the object to be unpublished
00528             """
00529             ior = salome.orb.object_to_string(obj)
00530             aSObject = self.myStudy.FindObjectIOR(ior)
00531             if aSObject is not None:
00532                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
00533                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
00534                 drwAttribute.SetDrawable(False)
00535                 pass
00536 
00537         # end of l1_geompy_auxiliary
00538         ## @}
00539 
00540         ## @addtogroup l3_restore_ss
00541         ## @{
00542 
00543         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
00544         #  To be used from python scripts out of addToStudy() (non-default usage)
00545         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
00546         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00547         #                   If this list is empty, all operation arguments will be published
00548         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
00549         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
00550         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
00551         #                            Do not publish sub-shapes in place of arguments, but only
00552         #                            in place of sub-shapes of the first argument,
00553         #                            because the whole shape corresponds to the first argument.
00554         #                            Mainly to be used after transformations, but it also can be
00555         #                            usefull after partition with one object shape, and some other
00556         #                            operations, where only the first argument has to be considered.
00557         #                            If theObject has only one argument shape, this flag is automatically
00558         #                            considered as True, not regarding really passed value.
00559         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
00560         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00561         #  \return list of published sub-shapes
00562         #
00563         #  @ref tui_restore_prs_params "Example"
00564         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
00565                               theInheritFirstArg=False, theAddPrefix=True):
00566             """
00567             Publish sub-shapes, standing for arguments and sub-shapes of arguments
00568             To be used from python scripts out of geompy.addToStudy (non-default usage)
00569 
00570             Parameters:
00571                 theObject published GEOM.GEOM_Object, arguments of which will be published
00572                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00573                           If this list is empty, all operation arguments will be published
00574                 theFindMethod method to search sub-shapes, corresponding to arguments and
00575                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
00576                 theInheritFirstArg set properties of the first argument for theObject.
00577                                    Do not publish sub-shapes in place of arguments, but only
00578                                    in place of sub-shapes of the first argument,
00579                                    because the whole shape corresponds to the first argument.
00580                                    Mainly to be used after transformations, but it also can be
00581                                    usefull after partition with one object shape, and some other
00582                                    operations, where only the first argument has to be considered.
00583                                    If theObject has only one argument shape, this flag is automatically
00584                                    considered as True, not regarding really passed value.
00585                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
00586                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00587             Returns:
00588                 list of published sub-shapes
00589             """
00590             # Example: see GEOM_TestAll.py
00591             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
00592                                           theFindMethod, theInheritFirstArg, theAddPrefix)
00593 
00594         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
00595         #  To be used from python scripts out of addToStudy() (non-default usage)
00596         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
00597         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00598         #                   If this list is empty, all operation arguments will be published
00599         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
00600         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
00601         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
00602         #                            Do not publish sub-shapes in place of arguments, but only
00603         #                            in place of sub-shapes of the first argument,
00604         #                            because the whole shape corresponds to the first argument.
00605         #                            Mainly to be used after transformations, but it also can be
00606         #                            usefull after partition with one object shape, and some other
00607         #                            operations, where only the first argument has to be considered.
00608         #                            If theObject has only one argument shape, this flag is automatically
00609         #                            considered as True, not regarding really passed value.
00610         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
00611         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00612         #  \return list of published sub-shapes
00613         #
00614         #  @ref tui_restore_prs_params "Example"
00615         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
00616                                    theInheritFirstArg=False, theAddPrefix=True):
00617             """
00618             Publish sub-shapes, standing for arguments and sub-shapes of arguments
00619             To be used from python scripts out of geompy.addToStudy() (non-default usage)
00620 
00621             Parameters:
00622                 theObject published GEOM.GEOM_Object, arguments of which will be published
00623                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
00624                           If this list is empty, all operation arguments will be published
00625                 theFindMethod method to search sub-shapes, corresponding to arguments and
00626                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
00627                 theInheritFirstArg set properties of the first argument for theObject.
00628                                    Do not publish sub-shapes in place of arguments, but only
00629                                    in place of sub-shapes of the first argument,
00630                                    because the whole shape corresponds to the first argument.
00631                                    Mainly to be used after transformations, but it also can be
00632                                    usefull after partition with one object shape, and some other
00633                                    operations, where only the first argument has to be considered.
00634                                    If theObject has only one argument shape, this flag is automatically
00635                                    considered as True, not regarding really passed value.
00636                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
00637                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
00638 
00639             Returns: 
00640                 list of published sub-shapes
00641             """
00642             # Example: see GEOM_TestAll.py
00643             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
00644                                                theFindMethod, theInheritFirstArg, theAddPrefix)
00645 
00646         # end of l3_restore_ss
00647         ## @}
00648 
00649         ## @addtogroup l3_basic_go
00650         ## @{
00651 
00652         ## Create point by three coordinates.
00653         #  @param theX The X coordinate of the point.
00654         #  @param theY The Y coordinate of the point.
00655         #  @param theZ The Z coordinate of the point.
00656         #  @return New GEOM.GEOM_Object, containing the created point.
00657         #
00658         #  @ref tui_creation_point "Example"
00659         def MakeVertex(self, theX, theY, theZ):
00660             """
00661             Create point by three coordinates.
00662 
00663             Parameters:
00664                 theX The X coordinate of the point.
00665                 theY The Y coordinate of the point.
00666                 theZ The Z coordinate of the point.
00667                 
00668             Returns: 
00669                 New GEOM.GEOM_Object, containing the created point.
00670             """
00671             # Example: see GEOM_TestAll.py
00672             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
00673             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
00674             RaiseIfFailed("MakePointXYZ", self.BasicOp)
00675             anObj.SetParameters(Parameters)
00676             return anObj
00677 
00678         ## Create a point, distant from the referenced point
00679         #  on the given distances along the coordinate axes.
00680         #  @param theReference The referenced point.
00681         #  @param theX Displacement from the referenced point along OX axis.
00682         #  @param theY Displacement from the referenced point along OY axis.
00683         #  @param theZ Displacement from the referenced point along OZ axis.
00684         #  @return New GEOM.GEOM_Object, containing the created point.
00685         #
00686         #  @ref tui_creation_point "Example"
00687         def MakeVertexWithRef(self,theReference, theX, theY, theZ):
00688             """
00689             Create a point, distant from the referenced point
00690             on the given distances along the coordinate axes.
00691 
00692             Parameters:
00693                 theReference The referenced point.
00694                 theX Displacement from the referenced point along OX axis.
00695                 theY Displacement from the referenced point along OY axis.
00696                 theZ Displacement from the referenced point along OZ axis.
00697 
00698             Returns:
00699                 New GEOM.GEOM_Object, containing the created point.
00700             """
00701             # Example: see GEOM_TestAll.py
00702             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
00703             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
00704             RaiseIfFailed("MakePointWithReference", self.BasicOp)
00705             anObj.SetParameters(Parameters)
00706             return anObj
00707 
00708         ## Create a point, corresponding to the given parameter on the given curve.
00709         #  @param theRefCurve The referenced curve.
00710         #  @param theParameter Value of parameter on the referenced curve.
00711         #  @return New GEOM.GEOM_Object, containing the created point.
00712         #
00713         #  @ref tui_creation_point "Example"
00714         def MakeVertexOnCurve(self,theRefCurve, theParameter):
00715             """
00716             Create a point, corresponding to the given parameter on the given curve.
00717 
00718             Parameters:
00719                 theRefCurve The referenced curve.
00720                 theParameter Value of parameter on the referenced curve.
00721 
00722             Returns:
00723                 New GEOM.GEOM_Object, containing the created point.
00724 
00725             Example of usage:
00726                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
00727             """
00728             # Example: see GEOM_TestAll.py
00729             theParameter, Parameters = ParseParameters(theParameter)
00730             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
00731             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
00732             anObj.SetParameters(Parameters)
00733             return anObj
00734 
00735         ## Create a point by projection give coordinates on the given curve
00736         #  @param theRefCurve The referenced curve.
00737         #  @param theX X-coordinate in 3D space
00738         #  @param theY Y-coordinate in 3D space
00739         #  @param theZ Z-coordinate in 3D space
00740         #  @return New GEOM.GEOM_Object, containing the created point.
00741         #
00742         #  @ref tui_creation_point "Example"
00743         def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ):
00744             """
00745             Create a point by projection give coordinates on the given curve
00746             
00747             Parameters:
00748                 theRefCurve The referenced curve.
00749                 theX X-coordinate in 3D space
00750                 theY Y-coordinate in 3D space
00751                 theZ Z-coordinate in 3D space
00752 
00753             Returns:
00754                 New GEOM.GEOM_Object, containing the created point.
00755 
00756             Example of usage:
00757                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
00758             """
00759             # Example: see GEOM_TestAll.py
00760             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
00761             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
00762             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
00763             anObj.SetParameters(Parameters)
00764             return anObj
00765 
00766         ## Create a point, corresponding to the given length on the given curve.
00767         #  @param theRefCurve The referenced curve.
00768         #  @param theLength Length on the referenced curve. It can be negative.
00769         #  @param theStartPoint Point allowing to choose the direction for the calculation
00770         #                       of the length. If None, start from the first point of theRefCurve.
00771         #  @return New GEOM.GEOM_Object, containing the created point.
00772         #
00773         #  @ref tui_creation_point "Example"
00774         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
00775             """
00776             Create a point, corresponding to the given length on the given curve.
00777 
00778             Parameters:
00779                 theRefCurve The referenced curve.
00780                 theLength Length on the referenced curve. It can be negative.
00781                 theStartPoint Point allowing to choose the direction for the calculation
00782                               of the length. If None, start from the first point of theRefCurve.
00783 
00784             Returns:
00785                 New GEOM.GEOM_Object, containing the created point.
00786             """
00787             # Example: see GEOM_TestAll.py
00788             theLength, Parameters = ParseParameters(theLength)
00789             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
00790             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
00791             anObj.SetParameters(Parameters)
00792             return anObj
00793 
00794         ## Create a point, corresponding to the given parameters on the
00795         #    given surface.
00796         #  @param theRefSurf The referenced surface.
00797         #  @param theUParameter Value of U-parameter on the referenced surface.
00798         #  @param theVParameter Value of V-parameter on the referenced surface.
00799         #  @return New GEOM.GEOM_Object, containing the created point.
00800         #
00801         #  @ref swig_MakeVertexOnSurface "Example"
00802         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
00803             """
00804             Create a point, corresponding to the given parameters on the
00805             given surface.
00806 
00807             Parameters:
00808                 theRefSurf The referenced surface.
00809                 theUParameter Value of U-parameter on the referenced surface.
00810                 theVParameter Value of V-parameter on the referenced surface.
00811 
00812             Returns:
00813                 New GEOM.GEOM_Object, containing the created point.
00814 
00815             Example of usage:
00816                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8) #(GEOM_Object, Double, Double)->GEOM_Object
00817             """
00818             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
00819             # Example: see GEOM_TestAll.py
00820             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
00821             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
00822             anObj.SetParameters(Parameters);
00823             return anObj
00824 
00825         ## Create a point by projection give coordinates on the given surface
00826         #  @param theRefSurf The referenced surface.
00827         #  @param theX X-coordinate in 3D space
00828         #  @param theY Y-coordinate in 3D space
00829         #  @param theZ Z-coordinate in 3D space
00830         #  @return New GEOM.GEOM_Object, containing the created point.
00831         #
00832         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
00833         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ):
00834             """
00835             Create a point by projection give coordinates on the given surface
00836 
00837             Parameters:
00838                 theRefSurf The referenced surface.
00839                 theX X-coordinate in 3D space
00840                 theY Y-coordinate in 3D space
00841                 theZ Z-coordinate in 3D space
00842 
00843             Returns:
00844                 New GEOM.GEOM_Object, containing the created point.
00845 
00846             Example of usage:
00847                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.) #(GEOM_Object, Double, Double, Double)->GEOM_Object
00848             """
00849             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
00850             # Example: see GEOM_TestAll.py
00851             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
00852             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
00853             anObj.SetParameters(Parameters);
00854             return anObj
00855 
00856         ## Create a point on intersection of two lines.
00857         #  @param theRefLine1, theRefLine2 The referenced lines.
00858         #  @return New GEOM.GEOM_Object, containing the created point.
00859         #
00860         #  @ref swig_MakeVertexOnLinesIntersection "Example"
00861         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2):
00862             """
00863             Create a point on intersection of two lines.
00864 
00865             Parameters:
00866                 theRefLine1, theRefLine2 The referenced lines.
00867 
00868             Returns:
00869                 New GEOM.GEOM_Object, containing the created point.
00870             """
00871             # Example: see GEOM_TestAll.py
00872             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
00873             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
00874             return anObj
00875 
00876         ## Create a tangent, corresponding to the given parameter on the given curve.
00877         #  @param theRefCurve The referenced curve.
00878         #  @param theParameter Value of parameter on the referenced curve.
00879         #  @return New GEOM.GEOM_Object, containing the created tangent.
00880         #
00881         #  @ref swig_MakeTangentOnCurve "Example"
00882         def MakeTangentOnCurve(self, theRefCurve, theParameter):
00883             """
00884             Create a tangent, corresponding to the given parameter on the given curve.
00885 
00886             Parameters:
00887                 theRefCurve The referenced curve.
00888                 theParameter Value of parameter on the referenced curve.
00889 
00890             Returns:
00891                 New GEOM.GEOM_Object, containing the created tangent.
00892 
00893             Example of usage:
00894                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object, Double)->GEOM_Object
00895             """
00896             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
00897             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
00898             return anObj
00899 
00900         ## Create a tangent plane, corresponding to the given parameter on the given face.
00901         #  @param theFace The face for which tangent plane should be built.
00902         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
00903         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
00904         #  @param theTrimSize the size of plane.
00905         #  @return New GEOM.GEOM_Object, containing the created tangent.
00906         #
00907         #  @ref swig_MakeTangentPlaneOnFace "Example"
00908         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize):
00909             """
00910             Create a tangent plane, corresponding to the given parameter on the given face.
00911 
00912             Parameters:
00913                 theFace The face for which tangent plane should be built.
00914                 theParameterV vertical value of the center point (0.0 - 1.0).
00915                 theParameterU horisontal value of the center point (0.0 - 1.0).
00916                 theTrimSize the size of plane.
00917 
00918            Returns: 
00919                 New GEOM.GEOM_Object, containing the created tangent.
00920 
00921            Example of usage:
00922                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
00923             """
00924             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
00925             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
00926             return anObj
00927 
00928         ## Create a vector with the given components.
00929         #  @param theDX X component of the vector.
00930         #  @param theDY Y component of the vector.
00931         #  @param theDZ Z component of the vector.
00932         #  @return New GEOM.GEOM_Object, containing the created vector.
00933         #
00934         #  @ref tui_creation_vector "Example"
00935         def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
00936             """
00937             Create a vector with the given components.
00938 
00939             Parameters:
00940                 theDX X component of the vector.
00941                 theDY Y component of the vector.
00942                 theDZ Z component of the vector.
00943 
00944             Returns:     
00945                 New GEOM.GEOM_Object, containing the created vector.
00946             """
00947             # Example: see GEOM_TestAll.py
00948             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
00949             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
00950             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
00951             anObj.SetParameters(Parameters)
00952             return anObj
00953 
00954         ## Create a vector between two points.
00955         #  @param thePnt1 Start point for the vector.
00956         #  @param thePnt2 End point for the vector.
00957         #  @return New GEOM.GEOM_Object, containing the created vector.
00958         #
00959         #  @ref tui_creation_vector "Example"
00960         def MakeVector(self,thePnt1, thePnt2):
00961             """
00962             Create a vector between two points.
00963 
00964             Parameters:
00965                 thePnt1 Start point for the vector.
00966                 thePnt2 End point for the vector.
00967 
00968             Returns:        
00969                 New GEOM.GEOM_Object, containing the created vector.
00970             """
00971             # Example: see GEOM_TestAll.py
00972             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
00973             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
00974             return anObj
00975 
00976         ## Create a line, passing through the given point
00977         #  and parrallel to the given direction
00978         #  @param thePnt Point. The resulting line will pass through it.
00979         #  @param theDir Direction. The resulting line will be parallel to it.
00980         #  @return New GEOM.GEOM_Object, containing the created line.
00981         #
00982         #  @ref tui_creation_line "Example"
00983         def MakeLine(self,thePnt, theDir):
00984             """
00985             Create a line, passing through the given point
00986             and parrallel to the given direction
00987 
00988             Parameters:
00989                 thePnt Point. The resulting line will pass through it.
00990                 theDir Direction. The resulting line will be parallel to it.
00991 
00992             Returns:
00993                 New GEOM.GEOM_Object, containing the created line.
00994             """
00995             # Example: see GEOM_TestAll.py
00996             anObj = self.BasicOp.MakeLine(thePnt, theDir)
00997             RaiseIfFailed("MakeLine", self.BasicOp)
00998             return anObj
00999 
01000         ## Create a line, passing through the given points
01001         #  @param thePnt1 First of two points, defining the line.
01002         #  @param thePnt2 Second of two points, defining the line.
01003         #  @return New GEOM.GEOM_Object, containing the created line.
01004         #
01005         #  @ref tui_creation_line "Example"
01006         def MakeLineTwoPnt(self,thePnt1, thePnt2):
01007             """
01008             Create a line, passing through the given points
01009 
01010             Parameters:
01011                 thePnt1 First of two points, defining the line.
01012                 thePnt2 Second of two points, defining the line.
01013 
01014             Returns:
01015                 New GEOM.GEOM_Object, containing the created line.
01016             """
01017             # Example: see GEOM_TestAll.py
01018             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
01019             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
01020             return anObj
01021 
01022         ## Create a line on two faces intersection.
01023         #  @param theFace1 First of two faces, defining the line.
01024         #  @param theFace2 Second of two faces, defining the line.
01025         #  @return New GEOM.GEOM_Object, containing the created line.
01026         #
01027         #  @ref swig_MakeLineTwoFaces "Example"
01028         def MakeLineTwoFaces(self, theFace1, theFace2):
01029             """
01030             Create a line on two faces intersection.
01031 
01032             Parameters:
01033                 theFace1 First of two faces, defining the line.
01034                 theFace2 Second of two faces, defining the line.
01035 
01036             Returns:
01037                 New GEOM.GEOM_Object, containing the created line.
01038             """
01039             # Example: see GEOM_TestAll.py
01040             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
01041             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
01042             return anObj
01043 
01044         ## Create a plane, passing through the given point
01045         #  and normal to the given vector.
01046         #  @param thePnt Point, the plane has to pass through.
01047         #  @param theVec Vector, defining the plane normal direction.
01048         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
01049         #  @return New GEOM.GEOM_Object, containing the created plane.
01050         #
01051         #  @ref tui_creation_plane "Example"
01052         def MakePlane(self,thePnt, theVec, theTrimSize):
01053             """
01054             Create a plane, passing through the given point
01055             and normal to the given vector.
01056 
01057             Parameters:
01058                 thePnt Point, the plane has to pass through.
01059                 theVec Vector, defining the plane normal direction.
01060                 theTrimSize Half size of a side of quadrangle face, representing the plane.
01061 
01062             Returns:    
01063                 New GEOM.GEOM_Object, containing the created plane.
01064             """
01065             # Example: see GEOM_TestAll.py
01066             theTrimSize, Parameters = ParseParameters(theTrimSize);
01067             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
01068             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
01069             anObj.SetParameters(Parameters)
01070             return anObj
01071 
01072         ## Create a plane, passing through the three given points
01073         #  @param thePnt1 First of three points, defining the plane.
01074         #  @param thePnt2 Second of three points, defining the plane.
01075         #  @param thePnt3 Fird of three points, defining the plane.
01076         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
01077         #  @return New GEOM.GEOM_Object, containing the created plane.
01078         #
01079         #  @ref tui_creation_plane "Example"
01080         def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
01081             """
01082             Create a plane, passing through the three given points
01083 
01084             Parameters:
01085                 thePnt1 First of three points, defining the plane.
01086                 thePnt2 Second of three points, defining the plane.
01087                 thePnt3 Fird of three points, defining the plane.
01088                 theTrimSize Half size of a side of quadrangle face, representing the plane.
01089 
01090             Returns:
01091                 New GEOM.GEOM_Object, containing the created plane.
01092             """
01093             # Example: see GEOM_TestAll.py
01094             theTrimSize, Parameters = ParseParameters(theTrimSize);
01095             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
01096             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
01097             anObj.SetParameters(Parameters)
01098             return anObj
01099 
01100         ## Create a plane, similar to the existing one, but with another size of representing face.
01101         #  @param theFace Referenced plane or LCS(Marker).
01102         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
01103         #  @return New GEOM.GEOM_Object, containing the created plane.
01104         #
01105         #  @ref tui_creation_plane "Example"
01106         def MakePlaneFace(self,theFace, theTrimSize):
01107             """
01108             Create a plane, similar to the existing one, but with another size of representing face.
01109 
01110             Parameters:
01111                 theFace Referenced plane or LCS(Marker).
01112                 theTrimSize New half size of a side of quadrangle face, representing the plane.
01113 
01114             Returns:
01115                 New GEOM.GEOM_Object, containing the created plane.
01116             """
01117             # Example: see GEOM_TestAll.py
01118             theTrimSize, Parameters = ParseParameters(theTrimSize);
01119             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
01120             RaiseIfFailed("MakePlaneFace", self.BasicOp)
01121             anObj.SetParameters(Parameters)
01122             return anObj
01123 
01124         ## Create a plane, passing through the 2 vectors
01125         #  with center in a start point of the first vector.
01126         #  @param theVec1 Vector, defining center point and plane direction.
01127         #  @param theVec2 Vector, defining the plane normal direction.
01128         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
01129         #  @return New GEOM.GEOM_Object, containing the created plane.
01130         #
01131         #  @ref tui_creation_plane "Example"
01132         def MakePlane2Vec(self,theVec1, theVec2, theTrimSize):
01133             """
01134             Create a plane, passing through the 2 vectors
01135             with center in a start point of the first vector.
01136 
01137             Parameters:
01138                 theVec1 Vector, defining center point and plane direction.
01139                 theVec2 Vector, defining the plane normal direction.
01140                 theTrimSize Half size of a side of quadrangle face, representing the plane.
01141 
01142             Returns: 
01143                 New GEOM.GEOM_Object, containing the created plane.
01144             """
01145             # Example: see GEOM_TestAll.py
01146             theTrimSize, Parameters = ParseParameters(theTrimSize);
01147             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
01148             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
01149             anObj.SetParameters(Parameters)
01150             return anObj
01151 
01152         ## Create a plane, based on a Local coordinate system.
01153         #  @param theLCS  coordinate system, defining plane.
01154         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
01155         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
01156         #  @return New GEOM.GEOM_Object, containing the created plane.
01157         #
01158         #  @ref tui_creation_plane "Example"
01159         def MakePlaneLCS(self,theLCS, theTrimSize, theOrientation):
01160             """
01161             Create a plane, based on a Local coordinate system.
01162 
01163            Parameters: 
01164                 theLCS  coordinate system, defining plane.
01165                 theTrimSize Half size of a side of quadrangle face, representing the plane.
01166                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
01167 
01168             Returns: 
01169                 New GEOM.GEOM_Object, containing the created plane.
01170             """
01171             # Example: see GEOM_TestAll.py
01172             theTrimSize, Parameters = ParseParameters(theTrimSize);
01173             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
01174             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
01175             anObj.SetParameters(Parameters)
01176             return anObj
01177 
01178         ## Create a local coordinate system.
01179         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
01180         #  @param XDX,XDY,XDZ Three components of OX direction
01181         #  @param YDX,YDY,YDZ Three components of OY direction
01182         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
01183         #
01184         #  @ref swig_MakeMarker "Example"
01185         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
01186             """
01187             Create a local coordinate system.
01188 
01189             Parameters: 
01190                 OX,OY,OZ Three coordinates of coordinate system origin.
01191                 XDX,XDY,XDZ Three components of OX direction
01192                 YDX,YDY,YDZ Three components of OY direction
01193 
01194             Returns: 
01195                 New GEOM.GEOM_Object, containing the created coordinate system.
01196             """
01197             # Example: see GEOM_TestAll.py
01198             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
01199             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
01200             RaiseIfFailed("MakeMarker", self.BasicOp)
01201             anObj.SetParameters(Parameters)
01202             return anObj
01203 
01204         ## Create a local coordinate system from shape.
01205         #  @param theShape The initial shape to detect the coordinate system.
01206         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
01207         #
01208         #  @ref tui_creation_lcs "Example"
01209         def MakeMarkerFromShape(self, theShape):
01210             """
01211             Create a local coordinate system from shape.
01212 
01213             Parameters:
01214                 theShape The initial shape to detect the coordinate system.
01215                 
01216             Returns: 
01217                 New GEOM.GEOM_Object, containing the created coordinate system.
01218             """
01219             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
01220             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
01221             return anObj
01222 
01223         ## Create a local coordinate system from point and two vectors.
01224         #  @param theOrigin Point of coordinate system origin.
01225         #  @param theXVec Vector of X direction
01226         #  @param theYVec Vector of Y direction
01227         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
01228         #
01229         #  @ref tui_creation_lcs "Example"
01230         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec):
01231             """
01232             Create a local coordinate system from point and two vectors.
01233 
01234             Parameters:
01235                 theOrigin Point of coordinate system origin.
01236                 theXVec Vector of X direction
01237                 theYVec Vector of Y direction
01238 
01239             Returns: 
01240                 New GEOM.GEOM_Object, containing the created coordinate system.
01241 
01242             """
01243             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
01244             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
01245             return anObj
01246 
01247         # end of l3_basic_go
01248         ## @}
01249 
01250         ## @addtogroup l4_curves
01251         ## @{
01252 
01253         ##  Create an arc of circle, passing through three given points.
01254         #  @param thePnt1 Start point of the arc.
01255         #  @param thePnt2 Middle point of the arc.
01256         #  @param thePnt3 End point of the arc.
01257         #  @return New GEOM.GEOM_Object, containing the created arc.
01258         #
01259         #  @ref swig_MakeArc "Example"
01260         def MakeArc(self,thePnt1, thePnt2, thePnt3):
01261             """
01262             Create an arc of circle, passing through three given points.
01263 
01264             Parameters:
01265                 thePnt1 Start point of the arc.
01266                 thePnt2 Middle point of the arc.
01267                 thePnt3 End point of the arc.
01268 
01269             Returns: 
01270                 New GEOM.GEOM_Object, containing the created arc.
01271             """
01272             # Example: see GEOM_TestAll.py
01273             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
01274             RaiseIfFailed("MakeArc", self.CurvesOp)
01275             return anObj
01276 
01277         ##  Create an arc of circle from a center and 2 points.
01278         #  @param thePnt1 Center of the arc
01279         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
01280         #  @param thePnt3 End point of the arc (Gives also a direction)
01281         #  @param theSense Orientation of the arc
01282         #  @return New GEOM.GEOM_Object, containing the created arc.
01283         #
01284         #  @ref swig_MakeArc "Example"
01285         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
01286             """
01287             Create an arc of circle from a center and 2 points.
01288 
01289             Parameters:
01290                 thePnt1 Center of the arc
01291                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
01292                 thePnt3 End point of the arc (Gives also a direction)
01293                 theSense Orientation of the arc
01294 
01295             Returns:
01296                 New GEOM.GEOM_Object, containing the created arc.
01297             """
01298             # Example: see GEOM_TestAll.py
01299             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
01300             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
01301             return anObj
01302 
01303         ##  Create an arc of ellipse, of center and two points.
01304         #  @param theCenter Center of the arc.
01305         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
01306         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
01307         #  @return New GEOM.GEOM_Object, containing the created arc.
01308         #
01309         #  @ref swig_MakeArc "Example"
01310         def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2):
01311             """
01312             Create an arc of ellipse, of center and two points.
01313 
01314             Parameters:
01315                 theCenter Center of the arc.
01316                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
01317                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
01318 
01319             Returns:
01320                 New GEOM.GEOM_Object, containing the created arc.
01321             """
01322             # Example: see GEOM_TestAll.py
01323             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
01324             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
01325             return anObj
01326 
01327         ## Create a circle with given center, normal vector and radius.
01328         #  @param thePnt Circle center.
01329         #  @param theVec Vector, normal to the plane of the circle.
01330         #  @param theR Circle radius.
01331         #  @return New GEOM.GEOM_Object, containing the created circle.
01332         #
01333         #  @ref tui_creation_circle "Example"
01334         def MakeCircle(self, thePnt, theVec, theR):
01335             """
01336             Create a circle with given center, normal vector and radius.
01337 
01338             Parameters:
01339                 thePnt Circle center.
01340                 theVec Vector, normal to the plane of the circle.
01341                 theR Circle radius.
01342 
01343             Returns:
01344                 New GEOM.GEOM_Object, containing the created circle.
01345             """
01346             # Example: see GEOM_TestAll.py
01347             theR, Parameters = ParseParameters(theR)
01348             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
01349             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
01350             anObj.SetParameters(Parameters)
01351             return anObj
01352 
01353         ## Create a circle with given radius.
01354         #  Center of the circle will be in the origin of global
01355         #  coordinate system and normal vector will be codirected with Z axis
01356         #  @param theR Circle radius.
01357         #  @return New GEOM.GEOM_Object, containing the created circle.
01358         def MakeCircleR(self, theR):
01359             """
01360             Create a circle with given radius.
01361             Center of the circle will be in the origin of global
01362             coordinate system and normal vector will be codirected with Z axis
01363 
01364             Parameters:
01365                 theR Circle radius.
01366 
01367             Returns:
01368                 New GEOM.GEOM_Object, containing the created circle.
01369             """
01370             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
01371             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
01372             return anObj
01373 
01374         ## Create a circle, passing through three given points
01375         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
01376         #  @return New GEOM.GEOM_Object, containing the created circle.
01377         #
01378         #  @ref tui_creation_circle "Example"
01379         def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3):
01380             """
01381             Create a circle, passing through three given points
01382 
01383             Parameters:
01384                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
01385 
01386             Returns:
01387                 New GEOM.GEOM_Object, containing the created circle.
01388             """
01389             # Example: see GEOM_TestAll.py
01390             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
01391             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
01392             return anObj
01393 
01394         ## Create a circle, with given point1 as center,
01395         #  passing through the point2 as radius and laying in the plane,
01396         #  defined by all three given points.
01397         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
01398         #  @return New GEOM.GEOM_Object, containing the created circle.
01399         #
01400         #  @ref swig_MakeCircle "Example"
01401         def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
01402             """
01403             Create a circle, with given point1 as center,
01404             passing through the point2 as radius and laying in the plane,
01405             defined by all three given points.
01406 
01407             Parameters:
01408                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
01409 
01410             Returns:
01411                 New GEOM.GEOM_Object, containing the created circle.
01412             """
01413             # Example: see GEOM_example6.py
01414             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
01415             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
01416             return anObj
01417 
01418         ## Create an ellipse with given center, normal vector and radiuses.
01419         #  @param thePnt Ellipse center.
01420         #  @param theVec Vector, normal to the plane of the ellipse.
01421         #  @param theRMajor Major ellipse radius.
01422         #  @param theRMinor Minor ellipse radius.
01423         #  @param theVecMaj Vector, direction of the ellipse's main axis.
01424         #  @return New GEOM.GEOM_Object, containing the created ellipse.
01425         #
01426         #  @ref tui_creation_ellipse "Example"
01427         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None):
01428             """
01429             Create an ellipse with given center, normal vector and radiuses.
01430 
01431             Parameters:
01432                 thePnt Ellipse center.
01433                 theVec Vector, normal to the plane of the ellipse.
01434                 theRMajor Major ellipse radius.
01435                 theRMinor Minor ellipse radius.
01436                 theVecMaj Vector, direction of the ellipse's main axis.
01437 
01438             Returns:    
01439                 New GEOM.GEOM_Object, containing the created ellipse.
01440             """
01441             # Example: see GEOM_TestAll.py
01442             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
01443             if theVecMaj is not None:
01444                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
01445             else:
01446                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
01447                 pass
01448             RaiseIfFailed("MakeEllipse", self.CurvesOp)
01449             anObj.SetParameters(Parameters)
01450             return anObj
01451 
01452         ## Create an ellipse with given radiuses.
01453         #  Center of the ellipse will be in the origin of global
01454         #  coordinate system and normal vector will be codirected with Z axis
01455         #  @param theRMajor Major ellipse radius.
01456         #  @param theRMinor Minor ellipse radius.
01457         #  @return New GEOM.GEOM_Object, containing the created ellipse.
01458         def MakeEllipseRR(self, theRMajor, theRMinor):
01459             """
01460             Create an ellipse with given radiuses.
01461             Center of the ellipse will be in the origin of global
01462             coordinate system and normal vector will be codirected with Z axis
01463 
01464             Parameters:
01465                 theRMajor Major ellipse radius.
01466                 theRMinor Minor ellipse radius.
01467 
01468             Returns:
01469                 New GEOM.GEOM_Object, containing the created ellipse.
01470             """
01471             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
01472             RaiseIfFailed("MakeEllipse", self.CurvesOp)
01473             return anObj
01474 
01475         ## Create a polyline on the set of points.
01476         #  @param thePoints Sequence of points for the polyline.
01477         #  @param theIsClosed If True, build a closed wire.
01478         #  @return New GEOM.GEOM_Object, containing the created polyline.
01479         #
01480         #  @ref tui_creation_curve "Example"
01481         def MakePolyline(self, thePoints, theIsClosed=False):
01482             """
01483             Create a polyline on the set of points.
01484 
01485             Parameters:
01486                 thePoints Sequence of points for the polyline.
01487                 theIsClosed If True, build a closed wire.
01488 
01489             Returns:
01490                 New GEOM.GEOM_Object, containing the created polyline.
01491             """
01492             # Example: see GEOM_TestAll.py
01493             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
01494             RaiseIfFailed("MakePolyline", self.CurvesOp)
01495             return anObj
01496 
01497         ## Create bezier curve on the set of points.
01498         #  @param thePoints Sequence of points for the bezier curve.
01499         #  @param theIsClosed If True, build a closed curve.
01500         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
01501         #
01502         #  @ref tui_creation_curve "Example"
01503         def MakeBezier(self, thePoints, theIsClosed=False):
01504             """
01505             Create bezier curve on the set of points.
01506 
01507             Parameters:
01508                 thePoints Sequence of points for the bezier curve.
01509                 theIsClosed If True, build a closed curve.
01510 
01511             Returns:
01512                 New GEOM.GEOM_Object, containing the created bezier curve.
01513             """
01514             # Example: see GEOM_TestAll.py
01515             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
01516             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
01517             return anObj
01518 
01519         ## Create B-Spline curve on the set of points.
01520         #  @param thePoints Sequence of points for the B-Spline curve.
01521         #  @param theIsClosed If True, build a closed curve.
01522         #  @param theDoReordering If TRUE, the algo does not follow the order of
01523         #                         \a thePoints but searches for the closest vertex.
01524         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
01525         #
01526         #  @ref tui_creation_curve "Example"
01527         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False):
01528             """
01529             Create B-Spline curve on the set of points.
01530 
01531             Parameters:
01532                 thePoints Sequence of points for the B-Spline curve.
01533                 theIsClosed If True, build a closed curve.
01534                 theDoReordering If True, the algo does not follow the order of
01535                                 thePoints but searches for the closest vertex.
01536 
01537             Returns:                     
01538                 New GEOM.GEOM_Object, containing the created B-Spline curve.
01539             """
01540             # Example: see GEOM_TestAll.py
01541             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
01542             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
01543             return anObj
01544 
01545 
01546         ## Creates a curve using the parametric definition of the basic points.
01547         #  @param thexExpr parametric equation of the coordinates X.
01548         #  @param theyExpr parametric equation of the coordinates Y.
01549         #  @param thezExpr parametric equation of the coordinates Z.
01550         #  @param theParamMin the minimal value of the parameter.
01551         #  @param theParamMax the maximum value of the parameter.
01552         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
01553         #  @param theCurveType the type of the curve.
01554         #  @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.
01555         #  @return New GEOM.GEOM_Object, containing the created curve.
01556         #
01557         #  @ref tui_creation_curve "Example"
01558         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
01559                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False ):
01560             """
01561             Creates a curve using the parametric definition of the basic points.
01562 
01563             Parameters:
01564                 thexExpr parametric equation of the coordinates X.
01565                 theyExpr parametric equation of the coordinates Y.
01566                 thezExpr parametric equation of the coordinates Z.
01567                 theParamMin the minimal value of the parameter.
01568                 theParamMax the maximum value of the parameter.
01569                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
01570                 theCurveType the type of the curve.
01571                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
01572                              method is used which can lead to a bug.
01573 
01574             Returns:
01575                 New GEOM.GEOM_Object, containing the created curve.
01576             """
01577             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
01578             if theNewMethod:
01579               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
01580             else:
01581               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
01582             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
01583             anObj.SetParameters(Parameters)
01584             return anObj
01585             
01586 
01587 
01588         # end of l4_curves
01589         ## @}
01590 
01591         ## @addtogroup l3_sketcher
01592         ## @{
01593 
01594         ## Create a sketcher (wire or face), following the textual description,
01595         #  passed through <VAR>theCommand</VAR> argument. \n
01596         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
01597         #  Format of the description string have to be the following:
01598         #
01599         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
01600         #
01601         #  Where:
01602         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
01603         #  - CMD is one of
01604         #     - "R angle" : Set the direction by angle
01605         #     - "D dx dy" : Set the direction by DX & DY
01606         #     .
01607         #       \n
01608         #     - "TT x y" : Create segment by point at X & Y
01609         #     - "T dx dy" : Create segment by point with DX & DY
01610         #     - "L length" : Create segment by direction & Length
01611         #     - "IX x" : Create segment by direction & Intersect. X
01612         #     - "IY y" : Create segment by direction & Intersect. Y
01613         #     .
01614         #       \n
01615         #     - "C radius length" : Create arc by direction, radius and length(in degree)
01616         #     - "AA x y": Create arc by point at X & Y
01617         #     - "A dx dy" : Create arc by point with DX & DY
01618         #     - "A dx dy" : Create arc by point with DX & DY
01619         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
01620         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
01621         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
01622         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
01623         #     .
01624         #       \n
01625         #     - "WW" : Close Wire (to finish)
01626         #     - "WF" : Close Wire and build face (to finish)
01627         #     .
01628         #        \n
01629         #  - Flag1 (= reverse) is 0 or 2 ...
01630         #     - if 0 the drawn arc is the one of lower angle (< Pi)
01631         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
01632         #     .
01633         #        \n
01634         #  - Flag2 (= control tolerance) is 0 or 1 ...
01635         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
01636         #     - if 1 the wire is built only if the end point is on the arc
01637         #       with a tolerance of 10^-7 on the distance else the creation fails
01638         #
01639         #  @param theCommand String, defining the sketcher in local
01640         #                    coordinates of the working plane.
01641         #  @param theWorkingPlane Nine double values, defining origin,
01642         #                         OZ and OX directions of the working plane.
01643         #  @return New GEOM.GEOM_Object, containing the created wire.
01644         #
01645         #  @ref tui_sketcher_page "Example"
01646         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]):
01647             """
01648             Create a sketcher (wire or face), following the textual description, passed
01649             through theCommand argument.
01650             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
01651             Format of the description string have to be the following:
01652                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
01653             Where:
01654             - x1, y1 are coordinates of the first sketcher point (zero by default),
01655             - CMD is one of
01656                - "R angle" : Set the direction by angle
01657                - "D dx dy" : Set the direction by DX & DY
01658                
01659                - "TT x y" : Create segment by point at X & Y
01660                - "T dx dy" : Create segment by point with DX & DY
01661                - "L length" : Create segment by direction & Length
01662                - "IX x" : Create segment by direction & Intersect. X
01663                - "IY y" : Create segment by direction & Intersect. Y
01664 
01665                - "C radius length" : Create arc by direction, radius and length(in degree)
01666                - "AA x y": Create arc by point at X & Y
01667                - "A dx dy" : Create arc by point with DX & DY
01668                - "A dx dy" : Create arc by point with DX & DY
01669                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
01670                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
01671                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
01672                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
01673 
01674                - "WW" : Close Wire (to finish)
01675                - "WF" : Close Wire and build face (to finish)
01676             
01677             - Flag1 (= reverse) is 0 or 2 ...
01678                - if 0 the drawn arc is the one of lower angle (< Pi)
01679                - if 2 the drawn arc ius the one of greater angle (> Pi)
01680         
01681             - Flag2 (= control tolerance) is 0 or 1 ...
01682                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
01683                - if 1 the wire is built only if the end point is on the arc
01684                  with a tolerance of 10^-7 on the distance else the creation fails
01685 
01686             Parameters:
01687                 theCommand String, defining the sketcher in local
01688                            coordinates of the working plane.
01689                 theWorkingPlane Nine double values, defining origin,
01690                                 OZ and OX directions of the working plane.
01691 
01692             Returns:
01693                 New GEOM.GEOM_Object, containing the created wire.
01694             """
01695             # Example: see GEOM_TestAll.py
01696             theCommand,Parameters = ParseSketcherCommand(theCommand)
01697             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
01698             RaiseIfFailed("MakeSketcher", self.CurvesOp)
01699             anObj.SetParameters(Parameters)
01700             return anObj
01701 
01702         ## Create a sketcher (wire or face), following the textual description,
01703         #  passed through <VAR>theCommand</VAR> argument. \n
01704         #  For format of the description string see MakeSketcher() method.\n
01705         #  @param theCommand String, defining the sketcher in local
01706         #                    coordinates of the working plane.
01707         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
01708         #  @return New GEOM.GEOM_Object, containing the created wire.
01709         #
01710         #  @ref tui_sketcher_page "Example"
01711         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane):
01712             """
01713             Create a sketcher (wire or face), following the textual description,
01714             passed through theCommand argument.
01715             For format of the description string see geompy.MakeSketcher() method.
01716 
01717             Parameters:
01718                 theCommand String, defining the sketcher in local
01719                            coordinates of the working plane.
01720                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
01721 
01722             Returns:
01723                 New GEOM.GEOM_Object, containing the created wire.
01724             """
01725             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
01726             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
01727             return anObj
01728 
01729         ## Create a sketcher wire, following the numerical description,
01730         #  passed through <VAR>theCoordinates</VAR> argument. \n
01731         #  @param theCoordinates double values, defining points to create a wire,
01732         #                                                      passing from it.
01733         #  @return New GEOM.GEOM_Object, containing the created wire.
01734         #
01735         #  @ref tui_sketcher_page "Example"
01736         def Make3DSketcher(self, theCoordinates):
01737             """
01738             Create a sketcher wire, following the numerical description,
01739             passed through theCoordinates argument.
01740 
01741             Parameters:
01742                 theCoordinates double values, defining points to create a wire,
01743                                passing from it.
01744 
01745             Returns:
01746                 New GEOM_Object, containing the created wire.
01747             """
01748             theCoordinates,Parameters = ParseParameters(theCoordinates)
01749             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
01750             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
01751             anObj.SetParameters(Parameters)
01752             return anObj
01753 
01754         # end of l3_sketcher
01755         ## @}
01756 
01757         ## @addtogroup l3_3d_primitives
01758         ## @{
01759 
01760         ## Create a box by coordinates of two opposite vertices.
01761         #
01762         #  @param x1,y1,z1 double values, defining first point it.
01763         #  @param x2,y2,z2 double values, defining first point it.
01764         #
01765         #  @return New GEOM.GEOM_Object, containing the created box.
01766         #  @ref tui_creation_box "Example"
01767         def MakeBox(self,x1,y1,z1,x2,y2,z2):
01768             """
01769             Create a box by coordinates of two opposite vertices.
01770             
01771             Parameters:
01772                 x1,y1,z1 double values, defining first point.
01773                 x2,y2,z2 double values, defining second point.
01774                 
01775             Returns:
01776                 New GEOM.GEOM_Object, containing the created box.
01777             """
01778             # Example: see GEOM_TestAll.py
01779             pnt1 = self.MakeVertex(x1,y1,z1)
01780             pnt2 = self.MakeVertex(x2,y2,z2)
01781             return self.MakeBoxTwoPnt(pnt1,pnt2)
01782 
01783         ## Create a box with specified dimensions along the coordinate axes
01784         #  and with edges, parallel to the coordinate axes.
01785         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
01786         #  @param theDX Length of Box edges, parallel to OX axis.
01787         #  @param theDY Length of Box edges, parallel to OY axis.
01788         #  @param theDZ Length of Box edges, parallel to OZ axis.
01789         #  @return New GEOM.GEOM_Object, containing the created box.
01790         #
01791         #  @ref tui_creation_box "Example"
01792         def MakeBoxDXDYDZ(self,theDX, theDY, theDZ):
01793             """
01794             Create a box with specified dimensions along the coordinate axes
01795             and with edges, parallel to the coordinate axes.
01796             Center of the box will be at point (DX/2, DY/2, DZ/2).
01797 
01798             Parameters:
01799                 theDX Length of Box edges, parallel to OX axis.
01800                 theDY Length of Box edges, parallel to OY axis.
01801                 theDZ Length of Box edges, parallel to OZ axis.
01802 
01803             Returns:   
01804                 New GEOM.GEOM_Object, containing the created box.
01805             """
01806             # Example: see GEOM_TestAll.py
01807             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
01808             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
01809             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
01810             anObj.SetParameters(Parameters)
01811             return anObj
01812 
01813         ## Create a box with two specified opposite vertices,
01814         #  and with edges, parallel to the coordinate axes
01815         #  @param thePnt1 First of two opposite vertices.
01816         #  @param thePnt2 Second of two opposite vertices.
01817         #  @return New GEOM.GEOM_Object, containing the created box.
01818         #
01819         #  @ref tui_creation_box "Example"
01820         def MakeBoxTwoPnt(self,thePnt1, thePnt2):
01821             """
01822             Create a box with two specified opposite vertices,
01823             and with edges, parallel to the coordinate axes
01824 
01825             Parameters:
01826                 thePnt1 First of two opposite vertices.
01827                 thePnt2 Second of two opposite vertices.
01828 
01829             Returns:
01830                 New GEOM.GEOM_Object, containing the created box.
01831             """
01832             # Example: see GEOM_TestAll.py
01833             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
01834             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
01835             return anObj
01836 
01837         ## Create a face with specified dimensions with edges parallel to coordinate axes.
01838         #  @param theH height of Face.
01839         #  @param theW width of Face.
01840         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
01841         #  @return New GEOM.GEOM_Object, containing the created face.
01842         #
01843         #  @ref tui_creation_face "Example"
01844         def MakeFaceHW(self,theH, theW, theOrientation):
01845             """
01846             Create a face with specified dimensions with edges parallel to coordinate axes.
01847 
01848             Parameters:
01849                 theH height of Face.
01850                 theW width of Face.
01851                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
01852 
01853             Returns:
01854                 New GEOM.GEOM_Object, containing the created face.
01855             """
01856             # Example: see GEOM_TestAll.py
01857             theH,theW,Parameters = ParseParameters(theH, theW)
01858             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
01859             RaiseIfFailed("MakeFaceHW", self.PrimOp)
01860             anObj.SetParameters(Parameters)
01861             return anObj
01862 
01863         ## Create a face from another plane and two sizes,
01864         #  vertical size and horisontal size.
01865         #  @param theObj   Normale vector to the creating face or
01866         #  the face object.
01867         #  @param theH     Height (vertical size).
01868         #  @param theW     Width (horisontal size).
01869         #  @return New GEOM.GEOM_Object, containing the created face.
01870         #
01871         #  @ref tui_creation_face "Example"
01872         def MakeFaceObjHW(self, theObj, theH, theW):
01873             """
01874             Create a face from another plane and two sizes,
01875             vertical size and horisontal size.
01876 
01877             Parameters:
01878                 theObj   Normale vector to the creating face or
01879                          the face object.
01880                 theH     Height (vertical size).
01881                 theW     Width (horisontal size).
01882 
01883             Returns:
01884                 New GEOM_Object, containing the created face.
01885             """
01886             # Example: see GEOM_TestAll.py
01887             theH,theW,Parameters = ParseParameters(theH, theW)
01888             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
01889             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
01890             anObj.SetParameters(Parameters)
01891             return anObj
01892 
01893         ## Create a disk with given center, normal vector and radius.
01894         #  @param thePnt Disk center.
01895         #  @param theVec Vector, normal to the plane of the disk.
01896         #  @param theR Disk radius.
01897         #  @return New GEOM.GEOM_Object, containing the created disk.
01898         #
01899         #  @ref tui_creation_disk "Example"
01900         def MakeDiskPntVecR(self,thePnt, theVec, theR):
01901             """
01902             Create a disk with given center, normal vector and radius.
01903 
01904             Parameters:
01905                 thePnt Disk center.
01906                 theVec Vector, normal to the plane of the disk.
01907                 theR Disk radius.
01908 
01909             Returns:    
01910                 New GEOM.GEOM_Object, containing the created disk.
01911             """
01912             # Example: see GEOM_TestAll.py
01913             theR,Parameters = ParseParameters(theR)
01914             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
01915             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
01916             anObj.SetParameters(Parameters)
01917             return anObj
01918 
01919         ## Create a disk, passing through three given points
01920         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
01921         #  @return New GEOM.GEOM_Object, containing the created disk.
01922         #
01923         #  @ref tui_creation_disk "Example"
01924         def MakeDiskThreePnt(self,thePnt1, thePnt2, thePnt3):
01925             """
01926             Create a disk, passing through three given points
01927 
01928             Parameters:
01929                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
01930 
01931             Returns:    
01932                 New GEOM.GEOM_Object, containing the created disk.
01933             """
01934             # Example: see GEOM_TestAll.py
01935             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
01936             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
01937             return anObj
01938 
01939         ## Create a disk with specified dimensions along OX-OY coordinate axes.
01940         #  @param theR Radius of Face.
01941         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
01942         #  @return New GEOM.GEOM_Object, containing the created disk.
01943         #
01944         #  @ref tui_creation_face "Example"
01945         def MakeDiskR(self,theR, theOrientation):
01946             """
01947             Create a disk with specified dimensions along OX-OY coordinate axes.
01948 
01949             Parameters:
01950                 theR Radius of Face.
01951                 theOrientation set the orientation belong axis OXY or OYZ or OZX
01952 
01953             Returns: 
01954                 New GEOM.GEOM_Object, containing the created disk.
01955 
01956             Example of usage:
01957                 Disk3 = geompy.MakeDiskR(100., 1)   #(1 Doubles, 1 Int)->GEOM_Object
01958             """
01959             # Example: see GEOM_TestAll.py
01960             theR,Parameters = ParseParameters(theR)
01961             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
01962             RaiseIfFailed("MakeDiskR", self.PrimOp)
01963             anObj.SetParameters(Parameters)
01964             return anObj
01965 
01966         ## Create a cylinder with given base point, axis, radius and height.
01967         #  @param thePnt Central point of cylinder base.
01968         #  @param theAxis Cylinder axis.
01969         #  @param theR Cylinder radius.
01970         #  @param theH Cylinder height.
01971         #  @return New GEOM.GEOM_Object, containing the created cylinder.
01972         #
01973         #  @ref tui_creation_cylinder "Example"
01974         def MakeCylinder(self,thePnt, theAxis, theR, theH):
01975             """
01976             Create a cylinder with given base point, axis, radius and height.
01977 
01978             Parameters:
01979                 thePnt Central point of cylinder base.
01980                 theAxis Cylinder axis.
01981                 theR Cylinder radius.
01982                 theH Cylinder height.
01983 
01984             Returns: 
01985                 New GEOM.GEOM_Object, containing the created cylinder.
01986             """
01987             # Example: see GEOM_TestAll.py
01988             theR,theH,Parameters = ParseParameters(theR, theH)
01989             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
01990             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
01991             anObj.SetParameters(Parameters)
01992             return anObj
01993 
01994         ## Create a cylinder with given radius and height at
01995         #  the origin of coordinate system. Axis of the cylinder
01996         #  will be collinear to the OZ axis of the coordinate system.
01997         #  @param theR Cylinder radius.
01998         #  @param theH Cylinder height.
01999         #  @return New GEOM.GEOM_Object, containing the created cylinder.
02000         #
02001         #  @ref tui_creation_cylinder "Example"
02002         def MakeCylinderRH(self,theR, theH):
02003             """
02004             Create a cylinder with given radius and height at
02005             the origin of coordinate system. Axis of the cylinder
02006             will be collinear to the OZ axis of the coordinate system.
02007 
02008             Parameters:
02009                 theR Cylinder radius.
02010                 theH Cylinder height.
02011 
02012             Returns:    
02013                 New GEOM.GEOM_Object, containing the created cylinder.
02014             """
02015             # Example: see GEOM_TestAll.py
02016             theR,theH,Parameters = ParseParameters(theR, theH)
02017             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
02018             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
02019             anObj.SetParameters(Parameters)
02020             return anObj
02021 
02022         ## Create a sphere with given center and radius.
02023         #  @param thePnt Sphere center.
02024         #  @param theR Sphere radius.
02025         #  @return New GEOM.GEOM_Object, containing the created sphere.
02026         #
02027         #  @ref tui_creation_sphere "Example"
02028         def MakeSpherePntR(self, thePnt, theR):
02029             """
02030             Create a sphere with given center and radius.
02031 
02032             Parameters:
02033                 thePnt Sphere center.
02034                 theR Sphere radius.
02035 
02036             Returns:    
02037                 New GEOM.GEOM_Object, containing the created sphere.            
02038             """
02039             # Example: see GEOM_TestAll.py
02040             theR,Parameters = ParseParameters(theR)
02041             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
02042             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
02043             anObj.SetParameters(Parameters)
02044             return anObj
02045 
02046         ## Create a sphere with given center and radius.
02047         #  @param x,y,z Coordinates of sphere center.
02048         #  @param theR Sphere radius.
02049         #  @return New GEOM.GEOM_Object, containing the created sphere.
02050         #
02051         #  @ref tui_creation_sphere "Example"
02052         def MakeSphere(self, x, y, z, theR):
02053             """
02054             Create a sphere with given center and radius.
02055 
02056             Parameters: 
02057                 x,y,z Coordinates of sphere center.
02058                 theR Sphere radius.
02059 
02060             Returns:
02061                 New GEOM.GEOM_Object, containing the created sphere.
02062             """
02063             # Example: see GEOM_TestAll.py
02064             point = self.MakeVertex(x, y, z)
02065             anObj = self.MakeSpherePntR(point, theR)
02066             return anObj
02067 
02068         ## Create a sphere with given radius at the origin of coordinate system.
02069         #  @param theR Sphere radius.
02070         #  @return New GEOM.GEOM_Object, containing the created sphere.
02071         #
02072         #  @ref tui_creation_sphere "Example"
02073         def MakeSphereR(self, theR):
02074             """
02075             Create a sphere with given radius at the origin of coordinate system.
02076 
02077             Parameters: 
02078                 theR Sphere radius.
02079 
02080             Returns:
02081                 New GEOM.GEOM_Object, containing the created sphere.            
02082             """
02083             # Example: see GEOM_TestAll.py
02084             theR,Parameters = ParseParameters(theR)
02085             anObj = self.PrimOp.MakeSphereR(theR)
02086             RaiseIfFailed("MakeSphereR", self.PrimOp)
02087             anObj.SetParameters(Parameters)
02088             return anObj
02089 
02090         ## Create a cone with given base point, axis, height and radiuses.
02091         #  @param thePnt Central point of the first cone base.
02092         #  @param theAxis Cone axis.
02093         #  @param theR1 Radius of the first cone base.
02094         #  @param theR2 Radius of the second cone base.
02095         #    \note If both radiuses are non-zero, the cone will be truncated.
02096         #    \note If the radiuses are equal, a cylinder will be created instead.
02097         #  @param theH Cone height.
02098         #  @return New GEOM.GEOM_Object, containing the created cone.
02099         #
02100         #  @ref tui_creation_cone "Example"
02101         def MakeCone(self,thePnt, theAxis, theR1, theR2, theH):
02102             """
02103             Create a cone with given base point, axis, height and radiuses.
02104 
02105             Parameters: 
02106                 thePnt Central point of the first cone base.
02107                 theAxis Cone axis.
02108                 theR1 Radius of the first cone base.
02109                 theR2 Radius of the second cone base.
02110                 theH Cone height.
02111 
02112            Note:
02113                 If both radiuses are non-zero, the cone will be truncated.
02114                 If the radiuses are equal, a cylinder will be created instead.
02115 
02116            Returns:
02117                 New GEOM.GEOM_Object, containing the created cone.
02118             """
02119             # Example: see GEOM_TestAll.py
02120             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
02121             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
02122             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
02123             anObj.SetParameters(Parameters)
02124             return anObj
02125 
02126         ## Create a cone with given height and radiuses at
02127         #  the origin of coordinate system. Axis of the cone will
02128         #  be collinear to the OZ axis of the coordinate system.
02129         #  @param theR1 Radius of the first cone base.
02130         #  @param theR2 Radius of the second cone base.
02131         #    \note If both radiuses are non-zero, the cone will be truncated.
02132         #    \note If the radiuses are equal, a cylinder will be created instead.
02133         #  @param theH Cone height.
02134         #  @return New GEOM.GEOM_Object, containing the created cone.
02135         #
02136         #  @ref tui_creation_cone "Example"
02137         def MakeConeR1R2H(self,theR1, theR2, theH):
02138             """
02139             Create a cone with given height and radiuses at
02140             the origin of coordinate system. Axis of the cone will
02141             be collinear to the OZ axis of the coordinate system.
02142 
02143             Parameters: 
02144                 theR1 Radius of the first cone base.
02145                 theR2 Radius of the second cone base.
02146                 theH Cone height.
02147 
02148             Note:
02149                 If both radiuses are non-zero, the cone will be truncated.
02150                 If the radiuses are equal, a cylinder will be created instead.
02151 
02152            Returns:
02153                 New GEOM.GEOM_Object, containing the created cone.
02154             """
02155             # Example: see GEOM_TestAll.py
02156             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
02157             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
02158             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
02159             anObj.SetParameters(Parameters)
02160             return anObj
02161 
02162         ## Create a torus with given center, normal vector and radiuses.
02163         #  @param thePnt Torus central point.
02164         #  @param theVec Torus axis of symmetry.
02165         #  @param theRMajor Torus major radius.
02166         #  @param theRMinor Torus minor radius.
02167         #  @return New GEOM.GEOM_Object, containing the created torus.
02168         #
02169         #  @ref tui_creation_torus "Example"
02170         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor):
02171             """
02172             Create a torus with given center, normal vector and radiuses.
02173 
02174             Parameters: 
02175                 thePnt Torus central point.
02176                 theVec Torus axis of symmetry.
02177                 theRMajor Torus major radius.
02178                 theRMinor Torus minor radius.
02179 
02180            Returns:
02181                 New GEOM.GEOM_Object, containing the created torus.
02182             """
02183             # Example: see GEOM_TestAll.py
02184             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
02185             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
02186             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
02187             anObj.SetParameters(Parameters)
02188             return anObj
02189 
02190         ## Create a torus with given radiuses at the origin of coordinate system.
02191         #  @param theRMajor Torus major radius.
02192         #  @param theRMinor Torus minor radius.
02193         #  @return New GEOM.GEOM_Object, containing the created torus.
02194         #
02195         #  @ref tui_creation_torus "Example"
02196         def MakeTorusRR(self, theRMajor, theRMinor):
02197             """
02198            Create a torus with given radiuses at the origin of coordinate system.
02199 
02200            Parameters: 
02201                 theRMajor Torus major radius.
02202                 theRMinor Torus minor radius.
02203 
02204            Returns:
02205                 New GEOM.GEOM_Object, containing the created torus.            
02206             """
02207             # Example: see GEOM_TestAll.py
02208             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
02209             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
02210             RaiseIfFailed("MakeTorusRR", self.PrimOp)
02211             anObj.SetParameters(Parameters)
02212             return anObj
02213 
02214         # end of l3_3d_primitives
02215         ## @}
02216 
02217         ## @addtogroup l3_complex
02218         ## @{
02219 
02220         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
02221         #  @param theBase Base shape to be extruded.
02222         #  @param thePoint1 First end of extrusion vector.
02223         #  @param thePoint2 Second end of extrusion vector.
02224         #  @param theScaleFactor Use it to make prism with scaled second base.
02225         #                        Nagative value means not scaled second base.
02226         #  @return New GEOM.GEOM_Object, containing the created prism.
02227         #
02228         #  @ref tui_creation_prism "Example"
02229         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0):
02230             """
02231             Create a shape by extrusion of the base shape along a vector, defined by two points.
02232 
02233             Parameters: 
02234                 theBase Base shape to be extruded.
02235                 thePoint1 First end of extrusion vector.
02236                 thePoint2 Second end of extrusion vector.
02237                 theScaleFactor Use it to make prism with scaled second base.
02238                                Nagative value means not scaled second base.
02239 
02240             Returns:
02241                 New GEOM.GEOM_Object, containing the created prism.
02242             """
02243             # Example: see GEOM_TestAll.py
02244             anObj = None
02245             Parameters = ""
02246             if theScaleFactor > 0:
02247                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
02248                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
02249             else:
02250                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
02251             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
02252             anObj.SetParameters(Parameters)
02253             return anObj
02254 
02255         ## Create a shape by extrusion of the base shape along a
02256         #  vector, defined by two points, in 2 Ways (forward/backward).
02257         #  @param theBase Base shape to be extruded.
02258         #  @param thePoint1 First end of extrusion vector.
02259         #  @param thePoint2 Second end of extrusion vector.
02260         #  @return New GEOM.GEOM_Object, containing the created prism.
02261         #
02262         #  @ref tui_creation_prism "Example"
02263         def MakePrism2Ways(self, theBase, thePoint1, thePoint2):
02264             """
02265             Create a shape by extrusion of the base shape along a
02266             vector, defined by two points, in 2 Ways (forward/backward).
02267 
02268             Parameters: 
02269                 theBase Base shape to be extruded.
02270                 thePoint1 First end of extrusion vector.
02271                 thePoint2 Second end of extrusion vector.
02272 
02273             Returns:
02274                 New GEOM.GEOM_Object, containing the created prism.
02275             """
02276             # Example: see GEOM_TestAll.py
02277             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
02278             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
02279             return anObj
02280 
02281         ## Create a shape by extrusion of the base shape along the vector,
02282         #  i.e. all the space, transfixed by the base shape during its translation
02283         #  along the vector on the given distance.
02284         #  @param theBase Base shape to be extruded.
02285         #  @param theVec Direction of extrusion.
02286         #  @param theH Prism dimension along theVec.
02287         #  @param theScaleFactor Use it to make prism with scaled second base.
02288         #                        Negative value means not scaled second base.
02289         #  @return New GEOM.GEOM_Object, containing the created prism.
02290         #
02291         #  @ref tui_creation_prism "Example"
02292         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0):
02293             """
02294             Create a shape by extrusion of the base shape along the vector,
02295             i.e. all the space, transfixed by the base shape during its translation
02296             along the vector on the given distance.
02297 
02298             Parameters: 
02299                 theBase Base shape to be extruded.
02300                 theVec Direction of extrusion.
02301                 theH Prism dimension along theVec.
02302                 theScaleFactor Use it to make prism with scaled second base.
02303                                Negative value means not scaled second base.
02304 
02305             Returns:
02306                 New GEOM.GEOM_Object, containing the created prism.
02307             """
02308             # Example: see GEOM_TestAll.py
02309             anObj = None
02310             Parameters = ""
02311             if theScaleFactor > 0:
02312                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
02313                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
02314             else:
02315                 theH,Parameters = ParseParameters(theH)
02316                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
02317             RaiseIfFailed("MakePrismVecH", self.PrimOp)
02318             anObj.SetParameters(Parameters)
02319             return anObj
02320 
02321         ## Create a shape by extrusion of the base shape along the vector,
02322         #  i.e. all the space, transfixed by the base shape during its translation
02323         #  along the vector on the given distance in 2 Ways (forward/backward).
02324         #  @param theBase Base shape to be extruded.
02325         #  @param theVec Direction of extrusion.
02326         #  @param theH Prism dimension along theVec in forward direction.
02327         #  @return New GEOM.GEOM_Object, containing the created prism.
02328         #
02329         #  @ref tui_creation_prism "Example"
02330         def MakePrismVecH2Ways(self, theBase, theVec, theH):
02331             """
02332             Create a shape by extrusion of the base shape along the vector,
02333             i.e. all the space, transfixed by the base shape during its translation
02334             along the vector on the given distance in 2 Ways (forward/backward).
02335 
02336             Parameters:
02337                 theBase Base shape to be extruded.
02338                 theVec Direction of extrusion.
02339                 theH Prism dimension along theVec in forward direction.
02340 
02341             Returns:
02342                 New GEOM.GEOM_Object, containing the created prism.
02343             """
02344             # Example: see GEOM_TestAll.py
02345             theH,Parameters = ParseParameters(theH)
02346             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
02347             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
02348             anObj.SetParameters(Parameters)
02349             return anObj
02350 
02351         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
02352         #  @param theBase Base shape to be extruded.
02353         #  @param theDX, theDY, theDZ Directions of extrusion.
02354         #  @param theScaleFactor Use it to make prism with scaled second base.
02355         #                        Nagative value means not scaled second base.
02356         #  @return New GEOM.GEOM_Object, containing the created prism.
02357         #
02358         #  @ref tui_creation_prism "Example"
02359         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0):
02360             """
02361             Create a shape by extrusion of the base shape along the dx, dy, dz direction
02362 
02363             Parameters:
02364                 theBase Base shape to be extruded.
02365                 theDX, theDY, theDZ Directions of extrusion.
02366                 theScaleFactor Use it to make prism with scaled second base.
02367                                Nagative value means not scaled second base.
02368 
02369             Returns: 
02370                 New GEOM.GEOM_Object, containing the created prism.
02371             """
02372             # Example: see GEOM_TestAll.py
02373             anObj = None
02374             Parameters = ""
02375             if theScaleFactor > 0:
02376                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
02377                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
02378             else:
02379                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
02380                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
02381             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
02382             anObj.SetParameters(Parameters)
02383             return anObj
02384 
02385         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
02386         #  i.e. all the space, transfixed by the base shape during its translation
02387         #  along the vector on the given distance in 2 Ways (forward/backward).
02388         #  @param theBase Base shape to be extruded.
02389         #  @param theDX, theDY, theDZ Directions of extrusion.
02390         #  @return New GEOM.GEOM_Object, containing the created prism.
02391         #
02392         #  @ref tui_creation_prism "Example"
02393         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ):
02394             """
02395             Create a shape by extrusion of the base shape along the dx, dy, dz direction
02396             i.e. all the space, transfixed by the base shape during its translation
02397             along the vector on the given distance in 2 Ways (forward/backward).
02398 
02399             Parameters:
02400                 theBase Base shape to be extruded.
02401                 theDX, theDY, theDZ Directions of extrusion.
02402 
02403             Returns:
02404                 New GEOM.GEOM_Object, containing the created prism.
02405             """
02406             # Example: see GEOM_TestAll.py
02407             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
02408             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
02409             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
02410             anObj.SetParameters(Parameters)
02411             return anObj
02412 
02413         ## Create a shape by revolution of the base shape around the axis
02414         #  on the given angle, i.e. all the space, transfixed by the base
02415         #  shape during its rotation around the axis on the given angle.
02416         #  @param theBase Base shape to be rotated.
02417         #  @param theAxis Rotation axis.
02418         #  @param theAngle Rotation angle in radians.
02419         #  @return New GEOM.GEOM_Object, containing the created revolution.
02420         #
02421         #  @ref tui_creation_revolution "Example"
02422         def MakeRevolution(self, theBase, theAxis, theAngle):
02423             """
02424             Create a shape by revolution of the base shape around the axis
02425             on the given angle, i.e. all the space, transfixed by the base
02426             shape during its rotation around the axis on the given angle.
02427 
02428             Parameters:
02429                 theBase Base shape to be rotated.
02430                 theAxis Rotation axis.
02431                 theAngle Rotation angle in radians.
02432 
02433             Returns: 
02434                 New GEOM.GEOM_Object, containing the created revolution.
02435             """
02436             # Example: see GEOM_TestAll.py
02437             theAngle,Parameters = ParseParameters(theAngle)
02438             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
02439             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
02440             anObj.SetParameters(Parameters)
02441             return anObj
02442 
02443         ## Create a shape by revolution of the base shape around the axis
02444         #  on the given angle, i.e. all the space, transfixed by the base
02445         #  shape during its rotation around the axis on the given angle in
02446         #  both directions (forward/backward)
02447         #  @param theBase Base shape to be rotated.
02448         #  @param theAxis Rotation axis.
02449         #  @param theAngle Rotation angle in radians.
02450         #  @return New GEOM.GEOM_Object, containing the created revolution.
02451         #
02452         #  @ref tui_creation_revolution "Example"
02453         def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
02454             """
02455             Create a shape by revolution of the base shape around the axis
02456             on the given angle, i.e. all the space, transfixed by the base
02457             shape during its rotation around the axis on the given angle in
02458             both directions (forward/backward).
02459 
02460             Parameters:
02461                 theBase Base shape to be rotated.
02462                 theAxis Rotation axis.
02463                 theAngle Rotation angle in radians.
02464 
02465             Returns: 
02466                 New GEOM.GEOM_Object, containing the created revolution.
02467             """
02468             theAngle,Parameters = ParseParameters(theAngle)
02469             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
02470             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
02471             anObj.SetParameters(Parameters)
02472             return anObj
02473 
02474         ## Create a filling from the given compound of contours.
02475         #  @param theShape the compound of contours
02476         #  @param theMinDeg a minimal degree of BSpline surface to create
02477         #  @param theMaxDeg a maximal degree of BSpline surface to create
02478         #  @param theTol2D a 2d tolerance to be reached
02479         #  @param theTol3D a 3d tolerance to be reached
02480         #  @param theNbIter a number of iteration of approximation algorithm
02481         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
02482         #  @param isApprox if True, BSpline curves are generated in the process
02483         #                  of surface construction. By default it is False, that means
02484         #                  the surface is created using Besier curves. The usage of
02485         #                  Approximation makes the algorithm work slower, but allows
02486         #                  building the surface for rather complex cases
02487         #  @return New GEOM.GEOM_Object, containing the created filling surface.
02488         #
02489         #  @ref tui_creation_filling "Example"
02490         def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D,
02491                         theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0):
02492             """
02493             Create a filling from the given compound of contours.
02494 
02495             Parameters:
02496                 theShape the compound of contours
02497                 theMinDeg a minimal degree of BSpline surface to create
02498                 theMaxDeg a maximal degree of BSpline surface to create
02499                 theTol2D a 2d tolerance to be reached
02500                 theTol3D a 3d tolerance to be reached
02501                 theNbIter a number of iteration of approximation algorithm
02502                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
02503                 isApprox if True, BSpline curves are generated in the process
02504                          of surface construction. By default it is False, that means
02505                          the surface is created using Besier curves. The usage of
02506                          Approximation makes the algorithm work slower, but allows
02507                          building the surface for rather complex cases
02508 
02509             Returns: 
02510                 New GEOM.GEOM_Object, containing the created filling surface.
02511 
02512             Example of usage:
02513                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
02514             """
02515             # Example: see GEOM_TestAll.py
02516             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
02517             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
02518                                             theTol2D, theTol3D, theNbIter,
02519                                             theMethod, isApprox)
02520             RaiseIfFailed("MakeFilling", self.PrimOp)
02521             anObj.SetParameters(Parameters)
02522             return anObj
02523 
02524         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
02525         #  @param theSeqSections - set of specified sections.
02526         #  @param theModeSolid - mode defining building solid or shell
02527         #  @param thePreci - precision 3D used for smoothing
02528         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
02529         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
02530         #
02531         #  @ref swig_todo "Example"
02532         def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
02533             """
02534             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
02535 
02536             Parameters:
02537                 theSeqSections - set of specified sections.
02538                 theModeSolid - mode defining building solid or shell
02539                 thePreci - precision 3D used for smoothing
02540                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
02541 
02542             Returns:
02543                 New GEOM.GEOM_Object, containing the created shell or solid.
02544             """
02545             # Example: see GEOM_TestAll.py
02546             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
02547             RaiseIfFailed("MakeThruSections", self.PrimOp)
02548             return anObj
02549 
02550         ## Create a shape by extrusion of the base shape along
02551         #  the path shape. The path shape can be a wire or an edge.
02552         #  @param theBase Base shape to be extruded.
02553         #  @param thePath Path shape to extrude the base shape along it.
02554         #  @return New GEOM.GEOM_Object, containing the created pipe.
02555         #
02556         #  @ref tui_creation_pipe "Example"
02557         def MakePipe(self,theBase, thePath):
02558             """
02559             Create a shape by extrusion of the base shape along
02560             the path shape. The path shape can be a wire or an edge.
02561 
02562             Parameters:
02563                 theBase Base shape to be extruded.
02564                 thePath Path shape to extrude the base shape along it.
02565 
02566             Returns:
02567                 New GEOM.GEOM_Object, containing the created pipe.
02568             """
02569             # Example: see GEOM_TestAll.py
02570             anObj = self.PrimOp.MakePipe(theBase, thePath)
02571             RaiseIfFailed("MakePipe", self.PrimOp)
02572             return anObj
02573 
02574         ## Create a shape by extrusion of the profile shape along
02575         #  the path shape. The path shape can be a wire or an edge.
02576         #  the several profiles can be specified in the several locations of path.
02577         #  @param theSeqBases - list of  Bases shape to be extruded.
02578         #  @param theLocations - list of locations on the path corresponding
02579         #                        specified list of the Bases shapes. Number of locations
02580         #                        should be equal to number of bases or list of locations can be empty.
02581         #  @param thePath - Path shape to extrude the base shape along it.
02582         #  @param theWithContact - the mode defining that the section is translated to be in
02583         #                          contact with the spine.
02584         #  @param theWithCorrection - defining that the section is rotated to be
02585         #                             orthogonal to the spine tangent in the correspondent point
02586         #  @return New GEOM.GEOM_Object, containing the created pipe.
02587         #
02588         #  @ref tui_creation_pipe_with_diff_sec "Example"
02589         def MakePipeWithDifferentSections(self, theSeqBases,
02590                                           theLocations, thePath,
02591                                           theWithContact, theWithCorrection):
02592             """
02593             Create a shape by extrusion of the profile shape along
02594             the path shape. The path shape can be a wire or an edge.
02595             the several profiles can be specified in the several locations of path.
02596 
02597             Parameters:
02598                 theSeqBases - list of  Bases shape to be extruded.
02599                 theLocations - list of locations on the path corresponding
02600                                specified list of the Bases shapes. Number of locations
02601                                should be equal to number of bases or list of locations can be empty.
02602                 thePath - Path shape to extrude the base shape along it.
02603                 theWithContact - the mode defining that the section is translated to be in
02604                                  contact with the spine(0/1)
02605                 theWithCorrection - defining that the section is rotated to be
02606                                     orthogonal to the spine tangent in the correspondent point (0/1)
02607 
02608             Returns:
02609                 New GEOM.GEOM_Object, containing the created pipe.
02610             """
02611             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
02612                                                               theLocations, thePath,
02613                                                               theWithContact, theWithCorrection)
02614             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
02615             return anObj
02616 
02617         ## Create a shape by extrusion of the profile shape along
02618         #  the path shape. The path shape can be a wire or a edge.
02619         #  the several profiles can be specified in the several locations of path.
02620         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
02621         #                       shell or face. If number of faces in neighbour sections
02622         #                       aren't coincided result solid between such sections will
02623         #                       be created using external boundaries of this shells.
02624         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
02625         #                          This list is used for searching correspondences between
02626         #                          faces in the sections. Size of this list must be equal
02627         #                          to size of list of base shapes.
02628         #  @param theLocations - list of locations on the path corresponding
02629         #                        specified list of the Bases shapes. Number of locations
02630         #                        should be equal to number of bases. First and last
02631         #                        locations must be coincided with first and last vertexes
02632         #                        of path correspondingly.
02633         #  @param thePath - Path shape to extrude the base shape along it.
02634         #  @param theWithContact - the mode defining that the section is translated to be in
02635         #                          contact with the spine.
02636         #  @param theWithCorrection - defining that the section is rotated to be
02637         #                             orthogonal to the spine tangent in the correspondent point
02638         #  @return New GEOM.GEOM_Object, containing the created solids.
02639         #
02640         #  @ref tui_creation_pipe_with_shell_sec "Example"
02641         def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
02642                                       theLocations, thePath,
02643                                       theWithContact, theWithCorrection):
02644             """
02645             Create a shape by extrusion of the profile shape along
02646             the path shape. The path shape can be a wire or a edge.
02647             the several profiles can be specified in the several locations of path.
02648 
02649             Parameters:
02650                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
02651                               shell or face. If number of faces in neighbour sections
02652                               aren't coincided result solid between such sections will
02653                               be created using external boundaries of this shells.
02654                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
02655                                  This list is used for searching correspondences between
02656                                  faces in the sections. Size of this list must be equal
02657                                  to size of list of base shapes.
02658                 theLocations - list of locations on the path corresponding
02659                                specified list of the Bases shapes. Number of locations
02660                                should be equal to number of bases. First and last
02661                                locations must be coincided with first and last vertexes
02662                                of path correspondingly.
02663                 thePath - Path shape to extrude the base shape along it.
02664                 theWithContact - the mode defining that the section is translated to be in
02665                                  contact with the spine (0/1)
02666                 theWithCorrection - defining that the section is rotated to be
02667                                     orthogonal to the spine tangent in the correspondent point (0/1)
02668 
02669             Returns:                           
02670                 New GEOM.GEOM_Object, containing the created solids.
02671             """
02672             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
02673                                                           theLocations, thePath,
02674                                                           theWithContact, theWithCorrection)
02675             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
02676             return anObj
02677 
02678         ## Create a shape by extrusion of the profile shape along
02679         #  the path shape. This function is used only for debug pipe
02680         #  functionality - it is a version of function MakePipeWithShellSections()
02681         #  which give a possibility to recieve information about
02682         #  creating pipe between each pair of sections step by step.
02683         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
02684                                              theLocations, thePath,
02685                                              theWithContact, theWithCorrection):
02686             """
02687             Create a shape by extrusion of the profile shape along
02688             the path shape. This function is used only for debug pipe
02689             functionality - it is a version of previous function
02690             geompy.MakePipeWithShellSections() which give a possibility to
02691             recieve information about creating pipe between each pair of
02692             sections step by step.
02693             """
02694             res = []
02695             nbsect = len(theSeqBases)
02696             nbsubsect = len(theSeqSubBases)
02697             #print "nbsect = ",nbsect
02698             for i in range(1,nbsect):
02699                 #print "  i = ",i
02700                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
02701                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
02702                 tmpSeqSubBases = []
02703                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
02704                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
02705                                                               tmpLocations, thePath,
02706                                                               theWithContact, theWithCorrection)
02707                 if self.PrimOp.IsDone() == 0:
02708                     print "Problems with pipe creation between ",i," and ",i+1," sections"
02709                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
02710                     break
02711                 else:
02712                     print "Pipe between ",i," and ",i+1," sections is OK"
02713                     res.append(anObj)
02714                     pass
02715                 pass
02716 
02717             resc = self.MakeCompound(res)
02718             #resc = self.MakeSewing(res, 0.001)
02719             #print "resc: ",resc
02720             return resc
02721 
02722         ## Create solids between given sections
02723         #  @param theSeqBases - list of sections (shell or face).
02724         #  @param theLocations - list of corresponding vertexes
02725         #  @return New GEOM.GEOM_Object, containing the created solids.
02726         #
02727         #  @ref tui_creation_pipe_without_path "Example"
02728         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
02729             """
02730             Create solids between given sections
02731 
02732             Parameters:
02733                 theSeqBases - list of sections (shell or face).
02734                 theLocations - list of corresponding vertexes
02735 
02736             Returns:
02737                 New GEOM.GEOM_Object, containing the created solids.
02738             """
02739             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
02740             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
02741             return anObj
02742 
02743         ## Create a shape by extrusion of the base shape along
02744         #  the path shape with constant bi-normal direction along the given vector.
02745         #  The path shape can be a wire or an edge.
02746         #  @param theBase Base shape to be extruded.
02747         #  @param thePath Path shape to extrude the base shape along it.
02748         #  @param theVec Vector defines a constant binormal direction to keep the
02749         #                same angle beetween the direction and the sections
02750         #                along the sweep surface.
02751         #  @return New GEOM.GEOM_Object, containing the created pipe.
02752         #
02753         #  @ref tui_creation_pipe "Example"
02754         def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
02755             """
02756             Create a shape by extrusion of the base shape along
02757             the path shape with constant bi-normal direction along the given vector.
02758             The path shape can be a wire or an edge.
02759 
02760             Parameters:
02761                 theBase Base shape to be extruded.
02762                 thePath Path shape to extrude the base shape along it.
02763                 theVec Vector defines a constant binormal direction to keep the
02764                        same angle beetween the direction and the sections
02765                        along the sweep surface.
02766 
02767             Returns:              
02768                 New GEOM.GEOM_Object, containing the created pipe.
02769             """
02770             # Example: see GEOM_TestAll.py
02771             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
02772             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
02773             return anObj
02774 
02775         # end of l3_complex
02776         ## @}
02777 
02778         ## @addtogroup l3_advanced
02779         ## @{
02780 
02781         ## Create a linear edge with specified ends.
02782         #  @param thePnt1 Point for the first end of edge.
02783         #  @param thePnt2 Point for the second end of edge.
02784         #  @return New GEOM.GEOM_Object, containing the created edge.
02785         #
02786         #  @ref tui_creation_edge "Example"
02787         def MakeEdge(self,thePnt1, thePnt2):
02788             """
02789             Create a linear edge with specified ends.
02790 
02791             Parameters:
02792                 thePnt1 Point for the first end of edge.
02793                 thePnt2 Point for the second end of edge.
02794 
02795             Returns:           
02796                 New GEOM.GEOM_Object, containing the created edge.
02797             """
02798             # Example: see GEOM_TestAll.py
02799             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
02800             RaiseIfFailed("MakeEdge", self.ShapesOp)
02801             return anObj
02802 
02803         ## Create a new edge, corresponding to the given length on the given curve.
02804         #  @param theRefCurve The referenced curve (edge).
02805         #  @param theLength Length on the referenced curve. It can be negative.
02806         #  @param theStartPoint Any point can be selected for it, the new edge will begin
02807         #                       at the end of \a theRefCurve, close to the selected point.
02808         #                       If None, start from the first point of \a theRefCurve.
02809         #  @return New GEOM.GEOM_Object, containing the created edge.
02810         #
02811         #  @ref tui_creation_edge "Example"
02812         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
02813             """
02814             Create a new edge, corresponding to the given length on the given curve.
02815 
02816             Parameters:
02817                 theRefCurve The referenced curve (edge).
02818                 theLength Length on the referenced curve. It can be negative.
02819                 theStartPoint Any point can be selected for it, the new edge will begin
02820                               at the end of theRefCurve, close to the selected point.
02821                               If None, start from the first point of theRefCurve.
02822 
02823             Returns:              
02824                 New GEOM.GEOM_Object, containing the created edge.
02825             """
02826             # Example: see GEOM_TestAll.py
02827             theLength, Parameters = ParseParameters(theLength)
02828             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
02829             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
02830             anObj.SetParameters(Parameters)
02831             return anObj
02832 
02833         ## Create an edge from specified wire.
02834         #  @param theWire source Wire
02835         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
02836         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
02837         #  @return New GEOM.GEOM_Object, containing the created edge.
02838         #
02839         #  @ref tui_creation_edge "Example"
02840         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
02841             """
02842             Create an edge from specified wire.
02843 
02844             Parameters:
02845                 theWire source Wire
02846                 theLinearTolerance linear tolerance value (default = 1e-07)
02847                 theAngularTolerance angular tolerance value (default = 1e-12)
02848 
02849             Returns:
02850                 New GEOM.GEOM_Object, containing the created edge.
02851             """
02852             # Example: see GEOM_TestAll.py
02853             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
02854             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
02855             return anObj
02856 
02857         ## Create a wire from the set of edges and wires.
02858         #  @param theEdgesAndWires List of edges and/or wires.
02859         #  @param theTolerance Maximum distance between vertices, that will be merged.
02860         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
02861         #  @return New GEOM.GEOM_Object, containing the created wire.
02862         #
02863         #  @ref tui_creation_wire "Example"
02864         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
02865             """
02866             Create a wire from the set of edges and wires.
02867 
02868             Parameters:
02869                 theEdgesAndWires List of edges and/or wires.
02870                 theTolerance Maximum distance between vertices, that will be merged.
02871                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
02872 
02873             Returns:                    
02874                 New GEOM.GEOM_Object, containing the created wire.
02875             """
02876             # Example: see GEOM_TestAll.py
02877             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
02878             RaiseIfFailed("MakeWire", self.ShapesOp)
02879             return anObj
02880 
02881         ## Create a face on the given wire.
02882         #  @param theWire closed Wire or Edge to build the face on.
02883         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02884         #                        If the tolerance of the obtained planar face is less
02885         #                        than 1e-06, this face will be returned, otherwise the
02886         #                        algorithm tries to build any suitable face on the given
02887         #                        wire and prints a warning message.
02888         #  @return New GEOM.GEOM_Object, containing the created face.
02889         #
02890         #  @ref tui_creation_face "Example"
02891         def MakeFace(self, theWire, isPlanarWanted):
02892             """
02893             Create a face on the given wire.
02894 
02895             Parameters:
02896                 theWire closed Wire or Edge to build the face on.
02897                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02898                                If the tolerance of the obtained planar face is less
02899                                than 1e-06, this face will be returned, otherwise the
02900                                algorithm tries to build any suitable face on the given
02901                                wire and prints a warning message.
02902 
02903             Returns:
02904                 New GEOM.GEOM_Object, containing the created face.
02905             """
02906             # Example: see GEOM_TestAll.py
02907             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
02908             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
02909                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
02910             else:
02911                 RaiseIfFailed("MakeFace", self.ShapesOp)
02912             return anObj
02913 
02914         ## Create a face on the given wires set.
02915         #  @param theWires List of closed wires or edges to build the face on.
02916         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02917         #                        If the tolerance of the obtained planar face is less
02918         #                        than 1e-06, this face will be returned, otherwise the
02919         #                        algorithm tries to build any suitable face on the given
02920         #                        wire and prints a warning message.
02921         #  @return New GEOM.GEOM_Object, containing the created face.
02922         #
02923         #  @ref tui_creation_face "Example"
02924         def MakeFaceWires(self, theWires, isPlanarWanted):
02925             """
02926             Create a face on the given wires set.
02927 
02928             Parameters:
02929                 theWires List of closed wires or edges to build the face on.
02930                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02931                                If the tolerance of the obtained planar face is less
02932                                than 1e-06, this face will be returned, otherwise the
02933                                algorithm tries to build any suitable face on the given
02934                                wire and prints a warning message.
02935 
02936             Returns: 
02937                 New GEOM.GEOM_Object, containing the created face.
02938             """
02939             # Example: see GEOM_TestAll.py
02940             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
02941             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
02942                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
02943             else:
02944                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
02945             return anObj
02946 
02947         ## See MakeFaceWires() method for details.
02948         #
02949         #  @ref tui_creation_face "Example 1"
02950         #  \n @ref swig_MakeFaces  "Example 2"
02951         def MakeFaces(self, theWires, isPlanarWanted):
02952             """
02953             See geompy.MakeFaceWires() method for details.
02954             """
02955             # Example: see GEOM_TestOthers.py
02956             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
02957             return anObj
02958 
02959         ## Create a shell from the set of faces and shells.
02960         #  @param theFacesAndShells List of faces and/or shells.
02961         #  @return New GEOM.GEOM_Object, containing the created shell.
02962         #
02963         #  @ref tui_creation_shell "Example"
02964         def MakeShell(self,theFacesAndShells):
02965             """
02966             Create a shell from the set of faces and shells.
02967 
02968             Parameters:
02969                 theFacesAndShells List of faces and/or shells.
02970 
02971             Returns:
02972                 New GEOM.GEOM_Object, containing the created shell.
02973             """
02974             # Example: see GEOM_TestAll.py
02975             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
02976             RaiseIfFailed("MakeShell", self.ShapesOp)
02977             return anObj
02978 
02979         ## Create a solid, bounded by the given shells.
02980         #  @param theShells Sequence of bounding shells.
02981         #  @return New GEOM.GEOM_Object, containing the created solid.
02982         #
02983         #  @ref tui_creation_solid "Example"
02984         def MakeSolid(self,theShells):
02985             """
02986             Create a solid, bounded by the given shells.
02987 
02988             Parameters:
02989                 theShells Sequence of bounding shells.
02990 
02991             Returns:
02992                 New GEOM.GEOM_Object, containing the created solid.
02993             """
02994             # Example: see GEOM_TestAll.py
02995             anObj = self.ShapesOp.MakeSolidShells(theShells)
02996             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
02997             return anObj
02998 
02999         ## Create a compound of the given shapes.
03000         #  @param theShapes List of shapes to put in compound.
03001         #  @return New GEOM.GEOM_Object, containing the created compound.
03002         #
03003         #  @ref tui_creation_compound "Example"
03004         def MakeCompound(self,theShapes):
03005             """
03006             Create a compound of the given shapes.
03007 
03008             Parameters:
03009                 theShapes List of shapes to put in compound.
03010 
03011             Returns:
03012                 New GEOM.GEOM_Object, containing the created compound.
03013             """
03014             # Example: see GEOM_TestAll.py
03015             anObj = self.ShapesOp.MakeCompound(theShapes)
03016             RaiseIfFailed("MakeCompound", self.ShapesOp)
03017             return anObj
03018 
03019         # end of l3_advanced
03020         ## @}
03021 
03022         ## @addtogroup l2_measure
03023         ## @{
03024 
03025         ## Gives quantity of faces in the given shape.
03026         #  @param theShape Shape to count faces of.
03027         #  @return Quantity of faces.
03028         #
03029         #  @ref swig_NumberOf "Example"
03030         def NumberOfFaces(self, theShape):
03031             """
03032             Gives quantity of faces in the given shape.
03033 
03034             Parameters:
03035                 theShape Shape to count faces of.
03036 
03037             Returns:    
03038                 Quantity of faces.
03039             """
03040             # Example: see GEOM_TestOthers.py
03041             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
03042             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
03043             return nb_faces
03044 
03045         ## Gives quantity of edges in the given shape.
03046         #  @param theShape Shape to count edges of.
03047         #  @return Quantity of edges.
03048         #
03049         #  @ref swig_NumberOf "Example"
03050         def NumberOfEdges(self, theShape):
03051             """
03052             Gives quantity of edges in the given shape.
03053 
03054             Parameters:
03055                 theShape Shape to count edges of.
03056 
03057             Returns:    
03058                 Quantity of edges.
03059             """
03060             # Example: see GEOM_TestOthers.py
03061             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
03062             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
03063             return nb_edges
03064 
03065         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
03066         #  @param theShape Shape to count sub-shapes of.
03067         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
03068         #  @return Quantity of sub-shapes of given type.
03069         #
03070         #  @ref swig_NumberOf "Example"
03071         def NumberOfSubShapes(self, theShape, theShapeType):
03072             """
03073             Gives quantity of sub-shapes of type theShapeType in the given shape.
03074 
03075             Parameters:
03076                 theShape Shape to count sub-shapes of.
03077                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
03078 
03079             Returns:
03080                 Quantity of sub-shapes of given type.
03081             """
03082             # Example: see GEOM_TestOthers.py
03083             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
03084             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
03085             return nb_ss
03086 
03087         ## Gives quantity of solids in the given shape.
03088         #  @param theShape Shape to count solids in.
03089         #  @return Quantity of solids.
03090         #
03091         #  @ref swig_NumberOf "Example"
03092         def NumberOfSolids(self, theShape):
03093             """
03094             Gives quantity of solids in the given shape.
03095 
03096             Parameters:
03097                 theShape Shape to count solids in.
03098 
03099             Returns:
03100                 Quantity of solids.
03101             """
03102             # Example: see GEOM_TestOthers.py
03103             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
03104             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
03105             return nb_solids
03106 
03107         # end of l2_measure
03108         ## @}
03109 
03110         ## @addtogroup l3_healing
03111         ## @{
03112 
03113         ## Reverses an orientation the given shape.
03114         #  @param theShape Shape to be reversed.
03115         #  @return The reversed copy of theShape.
03116         #
03117         #  @ref swig_ChangeOrientation "Example"
03118         def ChangeOrientation(self,theShape):
03119             """
03120             Reverses an orientation the given shape.
03121 
03122             Parameters:
03123                 theShape Shape to be reversed.
03124 
03125             Returns:   
03126                 The reversed copy of theShape.
03127             """
03128             # Example: see GEOM_TestAll.py
03129             anObj = self.ShapesOp.ChangeOrientation(theShape)
03130             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
03131             return anObj
03132 
03133         ## See ChangeOrientation() method for details.
03134         #
03135         #  @ref swig_OrientationChange "Example"
03136         def OrientationChange(self,theShape):
03137             """
03138             See geompy.ChangeOrientation method for details.
03139             """
03140             # Example: see GEOM_TestOthers.py
03141             anObj = self.ChangeOrientation(theShape)
03142             return anObj
03143 
03144         # end of l3_healing
03145         ## @}
03146 
03147         ## @addtogroup l4_obtain
03148         ## @{
03149 
03150         ## Retrieve all free faces from the given shape.
03151         #  Free face is a face, which is not shared between two shells of the shape.
03152         #  @param theShape Shape to find free faces in.
03153         #  @return List of IDs of all free faces, contained in theShape.
03154         #
03155         #  @ref tui_measurement_tools_page "Example"
03156         def GetFreeFacesIDs(self,theShape):
03157             """
03158             Retrieve all free faces from the given shape.
03159             Free face is a face, which is not shared between two shells of the shape.
03160 
03161             Parameters:
03162                 theShape Shape to find free faces in.
03163 
03164             Returns:
03165                 List of IDs of all free faces, contained in theShape.
03166             """
03167             # Example: see GEOM_TestOthers.py
03168             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
03169             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
03170             return anIDs
03171 
03172         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
03173         #  @param theShape1 Shape to find sub-shapes in.
03174         #  @param theShape2 Shape to find shared sub-shapes with.
03175         #  @param theShapeType Type of sub-shapes to be retrieved.
03176         #  @return List of sub-shapes of theShape1, shared with theShape2.
03177         #
03178         #  @ref swig_GetSharedShapes "Example"
03179         def GetSharedShapes(self,theShape1, theShape2, theShapeType):
03180             """
03181             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
03182 
03183             Parameters:
03184                 theShape1 Shape to find sub-shapes in.
03185                 theShape2 Shape to find shared sub-shapes with.
03186                 theShapeType Type of sub-shapes to be retrieved.
03187 
03188             Returns:
03189                 List of sub-shapes of theShape1, shared with theShape2.
03190             """
03191             # Example: see GEOM_TestOthers.py
03192             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
03193             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
03194             return aList
03195 
03196         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
03197         #  @param theShapes Shapes to find common sub-shapes of.
03198         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03199         #  @return List of objects, that are sub-shapes of all given shapes.
03200         #
03201         #  @ref swig_GetSharedShapes "Example"
03202         def GetSharedShapesMulti(self, theShapes, theShapeType):
03203             """
03204             Get all sub-shapes, shared by all shapes in the list theShapes.
03205 
03206             Parameters:
03207                 theShapes Shapes to find common sub-shapes of.
03208                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03209 
03210             Returns:    
03211                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
03212             """
03213             # Example: see GEOM_TestOthers.py
03214             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
03215             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
03216             return aList
03217 
03218         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
03219         #  situated relatively the specified plane by the certain way,
03220         #  defined through <VAR>theState</VAR> parameter.
03221         #  @param theShape Shape to find sub-shapes of.
03222         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03223         #  @param theAx1 Vector (or line, or linear edge), specifying normal
03224         #                direction and location of the plane to find shapes on.
03225         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03226         #  @return List of all found sub-shapes.
03227         #
03228         #  @ref swig_GetShapesOnPlane "Example"
03229         def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
03230             """
03231             Find in theShape all sub-shapes of type theShapeType,
03232             situated relatively the specified plane by the certain way,
03233             defined through theState parameter.
03234 
03235             Parameters:
03236                 theShape Shape to find sub-shapes of.
03237                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03238                 theAx1 Vector (or line, or linear edge), specifying normal
03239                        direction and location of the plane to find shapes on.
03240                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03241 
03242             Returns:
03243                 List of all found sub-shapes.
03244             """
03245             # Example: see GEOM_TestOthers.py
03246             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
03247             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
03248             return aList
03249 
03250         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
03251         #  situated relatively the specified plane by the certain way,
03252         #  defined through <VAR>theState</VAR> parameter.
03253         #  @param theShape Shape to find sub-shapes of.
03254         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03255         #  @param theAx1 Vector (or line, or linear edge), specifying normal
03256         #                direction and location of the plane to find shapes on.
03257         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03258         #  @return List of all found sub-shapes indices.
03259         #
03260         #  @ref swig_GetShapesOnPlaneIDs "Example"
03261         def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
03262             """
03263             Find in theShape all sub-shapes of type theShapeType,
03264             situated relatively the specified plane by the certain way,
03265             defined through theState parameter.
03266 
03267             Parameters:
03268                 theShape Shape to find sub-shapes of.
03269                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03270                 theAx1 Vector (or line, or linear edge), specifying normal
03271                        direction and location of the plane to find shapes on.
03272                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03273 
03274             Returns:
03275                 List of all found sub-shapes indices.
03276             """
03277             # Example: see GEOM_TestOthers.py
03278             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
03279             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
03280             return aList
03281 
03282         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
03283         #  situated relatively the specified plane by the certain way,
03284         #  defined through <VAR>theState</VAR> parameter.
03285         #  @param theShape Shape to find sub-shapes of.
03286         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03287         #  @param theAx1 Vector (or line, or linear edge), specifying normal
03288         #                direction of the plane to find shapes on.
03289         #  @param thePnt Point specifying location of the plane to find shapes on.
03290         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03291         #  @return List of all found sub-shapes.
03292         #
03293         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
03294         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState):
03295             """
03296             Find in theShape all sub-shapes of type theShapeType,
03297             situated relatively the specified plane by the certain way,
03298             defined through theState parameter.
03299 
03300             Parameters:
03301                 theShape Shape to find sub-shapes of.
03302                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03303                 theAx1 Vector (or line, or linear edge), specifying normal
03304                        direction and location of the plane to find shapes on.
03305                 thePnt Point specifying location of the plane to find shapes on.
03306                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03307 
03308             Returns:
03309                 List of all found sub-shapes.
03310             """
03311             # Example: see GEOM_TestOthers.py
03312             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
03313                                                                theAx1, thePnt, theState)
03314             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
03315             return aList
03316 
03317         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
03318         #  situated relatively the specified plane by the certain way,
03319         #  defined through <VAR>theState</VAR> parameter.
03320         #  @param theShape Shape to find sub-shapes of.
03321         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03322         #  @param theAx1 Vector (or line, or linear edge), specifying normal
03323         #                direction of the plane to find shapes on.
03324         #  @param thePnt Point specifying location of the plane to find shapes on.
03325         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03326         #  @return List of all found sub-shapes indices.
03327         #
03328         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
03329         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
03330             """
03331             Find in theShape all sub-shapes of type theShapeType,
03332             situated relatively the specified plane by the certain way,
03333             defined through theState parameter.
03334 
03335             Parameters:
03336                 theShape Shape to find sub-shapes of.
03337                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03338                 theAx1 Vector (or line, or linear edge), specifying normal
03339                        direction and location of the plane to find shapes on.
03340                 thePnt Point specifying location of the plane to find shapes on.
03341                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03342 
03343             Returns:
03344                 List of all found sub-shapes indices.
03345             """
03346             # Example: see GEOM_TestOthers.py
03347             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
03348                                                                   theAx1, thePnt, theState)
03349             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
03350             return aList
03351 
03352         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03353         #  the specified cylinder by the certain way, defined through \a theState parameter.
03354         #  @param theShape Shape to find sub-shapes of.
03355         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03356         #  @param theAxis Vector (or line, or linear edge), specifying
03357         #                 axis of the cylinder to find shapes on.
03358         #  @param theRadius Radius of the cylinder to find shapes on.
03359         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03360         #  @return List of all found sub-shapes.
03361         #
03362         #  @ref swig_GetShapesOnCylinder "Example"
03363         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
03364             """
03365             Find in theShape all sub-shapes of type theShapeType, situated relatively
03366             the specified cylinder by the certain way, defined through theState parameter.
03367 
03368             Parameters:
03369                 theShape Shape to find sub-shapes of.
03370                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03371                 theAxis Vector (or line, or linear edge), specifying
03372                         axis of the cylinder to find shapes on.
03373                 theRadius Radius of the cylinder to find shapes on.
03374                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03375 
03376             Returns:
03377                 List of all found sub-shapes.
03378             """
03379             # Example: see GEOM_TestOthers.py
03380             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
03381             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
03382             return aList
03383 
03384         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03385         #  the specified cylinder by the certain way, defined through \a theState parameter.
03386         #  @param theShape Shape to find sub-shapes of.
03387         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03388         #  @param theAxis Vector (or line, or linear edge), specifying
03389         #                 axis of the cylinder to find shapes on.
03390         #  @param theRadius Radius of the cylinder to find shapes on.
03391         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03392         #  @return List of all found sub-shapes indices.
03393         #
03394         #  @ref swig_GetShapesOnCylinderIDs "Example"
03395         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
03396             """
03397             Find in theShape all sub-shapes of type theShapeType, situated relatively
03398             the specified cylinder by the certain way, defined through theState parameter.
03399 
03400             Parameters:
03401                 theShape Shape to find sub-shapes of.
03402                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03403                 theAxis Vector (or line, or linear edge), specifying
03404                         axis of the cylinder to find shapes on.
03405                 theRadius Radius of the cylinder to find shapes on.
03406                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03407 
03408             Returns:
03409                 List of all found sub-shapes indices.
03410             """
03411             # Example: see GEOM_TestOthers.py
03412             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
03413             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
03414             return aList
03415 
03416         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03417         #  the specified cylinder by the certain way, defined through \a theState parameter.
03418         #  @param theShape Shape to find sub-shapes of.
03419         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03420         #  @param theAxis Vector (or line, or linear edge), specifying
03421         #                 axis of the cylinder to find shapes on.
03422         #  @param thePnt Point specifying location of the bottom of the cylinder.
03423         #  @param theRadius Radius of the cylinder to find shapes on.
03424         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03425         #  @return List of all found sub-shapes.
03426         #
03427         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
03428         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
03429             """
03430             Find in theShape all sub-shapes of type theShapeType, situated relatively
03431             the specified cylinder by the certain way, defined through theState parameter.
03432 
03433             Parameters:
03434                 theShape Shape to find sub-shapes of.
03435                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03436                 theAxis Vector (or line, or linear edge), specifying
03437                         axis of the cylinder to find shapes on.
03438                 theRadius Radius of the cylinder to find shapes on.
03439                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03440 
03441             Returns:
03442                 List of all found sub-shapes.
03443             """
03444             # Example: see GEOM_TestOthers.py
03445             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
03446             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
03447             return aList
03448 
03449         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03450         #  the specified cylinder by the certain way, defined through \a theState parameter.
03451         #  @param theShape Shape to find sub-shapes of.
03452         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03453         #  @param theAxis Vector (or line, or linear edge), specifying
03454         #                 axis of the cylinder to find shapes on.
03455         #  @param thePnt Point specifying location of the bottom of the cylinder.
03456         #  @param theRadius Radius of the cylinder to find shapes on.
03457         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03458         #  @return List of all found sub-shapes indices
03459         #
03460         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
03461         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
03462             """
03463             Find in theShape all sub-shapes of type theShapeType, situated relatively
03464             the specified cylinder by the certain way, defined through theState parameter.
03465 
03466             Parameters:
03467                 theShape Shape to find sub-shapes of.
03468                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03469                 theAxis Vector (or line, or linear edge), specifying
03470                         axis of the cylinder to find shapes on.
03471                 theRadius Radius of the cylinder to find shapes on.
03472                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03473 
03474             Returns:
03475                 List of all found sub-shapes indices.            
03476             """
03477             # Example: see GEOM_TestOthers.py
03478             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
03479             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
03480             return aList
03481 
03482         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03483         #  the specified sphere by the certain way, defined through \a theState parameter.
03484         #  @param theShape Shape to find sub-shapes of.
03485         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03486         #  @param theCenter Point, specifying center of the sphere to find shapes on.
03487         #  @param theRadius Radius of the sphere to find shapes on.
03488         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03489         #  @return List of all found sub-shapes.
03490         #
03491         #  @ref swig_GetShapesOnSphere "Example"
03492         def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
03493             """
03494             Find in theShape all sub-shapes of type theShapeType, situated relatively
03495             the specified sphere by the certain way, defined through theState parameter.
03496 
03497             Parameters:
03498                 theShape Shape to find sub-shapes of.
03499                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03500                 theCenter Point, specifying center of the sphere to find shapes on.
03501                 theRadius Radius of the sphere to find shapes on.
03502                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03503 
03504             Returns:
03505                 List of all found sub-shapes.
03506             """
03507             # Example: see GEOM_TestOthers.py
03508             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
03509             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
03510             return aList
03511 
03512         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03513         #  the specified sphere by the certain way, defined through \a theState parameter.
03514         #  @param theShape Shape to find sub-shapes of.
03515         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03516         #  @param theCenter Point, specifying center of the sphere to find shapes on.
03517         #  @param theRadius Radius of the sphere to find shapes on.
03518         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03519         #  @return List of all found sub-shapes indices.
03520         #
03521         #  @ref swig_GetShapesOnSphereIDs "Example"
03522         def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
03523             """
03524             Find in theShape all sub-shapes of type theShapeType, situated relatively
03525             the specified sphere by the certain way, defined through theState parameter.
03526 
03527             Parameters:
03528                 theShape Shape to find sub-shapes of.
03529                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03530                 theCenter Point, specifying center of the sphere to find shapes on.
03531                 theRadius Radius of the sphere to find shapes on.
03532                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03533 
03534             Returns:
03535                 List of all found sub-shapes indices.
03536             """
03537             # Example: see GEOM_TestOthers.py
03538             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
03539             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
03540             return aList
03541 
03542         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03543         #  the specified quadrangle by the certain way, defined through \a theState parameter.
03544         #  @param theShape Shape to find sub-shapes of.
03545         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03546         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
03547         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
03548         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
03549         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
03550         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03551         #  @return List of all found sub-shapes.
03552         #
03553         #  @ref swig_GetShapesOnQuadrangle "Example"
03554         def GetShapesOnQuadrangle(self, theShape, theShapeType,
03555                                   theTopLeftPoint, theTopRigthPoint,
03556                                   theBottomLeftPoint, theBottomRigthPoint, theState):
03557             """
03558             Find in theShape all sub-shapes of type theShapeType, situated relatively
03559             the specified quadrangle by the certain way, defined through theState parameter.
03560 
03561             Parameters:
03562                 theShape Shape to find sub-shapes of.
03563                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03564                 theTopLeftPoint Point, specifying top left corner of a quadrangle
03565                 theTopRigthPoint Point, specifying top right corner of a quadrangle
03566                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
03567                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
03568                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03569 
03570             Returns:
03571                 List of all found sub-shapes.
03572             """
03573             # Example: see GEOM_TestOthers.py
03574             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
03575                                                         theTopLeftPoint, theTopRigthPoint,
03576                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
03577             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
03578             return aList
03579 
03580         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03581         #  the specified quadrangle by the certain way, defined through \a theState parameter.
03582         #  @param theShape Shape to find sub-shapes of.
03583         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03584         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
03585         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
03586         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
03587         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
03588         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03589         #  @return List of all found sub-shapes indices.
03590         #
03591         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
03592         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
03593                                      theTopLeftPoint, theTopRigthPoint,
03594                                      theBottomLeftPoint, theBottomRigthPoint, theState):
03595             """
03596             Find in theShape all sub-shapes of type theShapeType, situated relatively
03597             the specified quadrangle by the certain way, defined through theState parameter.
03598 
03599             Parameters:
03600                 theShape Shape to find sub-shapes of.
03601                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03602                 theTopLeftPoint Point, specifying top left corner of a quadrangle
03603                 theTopRigthPoint Point, specifying top right corner of a quadrangle
03604                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
03605                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
03606                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03607 
03608             Returns:
03609                 List of all found sub-shapes indices.
03610             """
03611 
03612             # Example: see GEOM_TestOthers.py
03613             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
03614                                                            theTopLeftPoint, theTopRigthPoint,
03615                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
03616             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
03617             return aList
03618 
03619         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03620         #  the specified \a theBox by the certain way, defined through \a theState parameter.
03621         #  @param theBox Shape for relative comparing.
03622         #  @param theShape Shape to find sub-shapes of.
03623         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03624         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03625         #  @return List of all found sub-shapes.
03626         #
03627         #  @ref swig_GetShapesOnBox "Example"
03628         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
03629             """
03630             Find in theShape all sub-shapes of type theShapeType, situated relatively
03631             the specified theBox by the certain way, defined through theState parameter.
03632 
03633             Parameters:
03634                 theBox Shape for relative comparing.
03635                 theShape Shape to find sub-shapes of.
03636                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03637                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03638 
03639             Returns:
03640                 List of all found sub-shapes.
03641             """
03642             # Example: see GEOM_TestOthers.py
03643             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
03644             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
03645             return aList
03646 
03647         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
03648         #  the specified \a theBox by the certain way, defined through \a theState parameter.
03649         #  @param theBox Shape for relative comparing.
03650         #  @param theShape Shape to find sub-shapes of.
03651         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03652         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03653         #  @return List of all found sub-shapes indices.
03654         #
03655         #  @ref swig_GetShapesOnBoxIDs "Example"
03656         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
03657             """
03658             Find in theShape all sub-shapes of type theShapeType, situated relatively
03659             the specified theBox by the certain way, defined through theState parameter.
03660 
03661             Parameters:
03662                 theBox Shape for relative comparing.
03663                 theShape Shape to find sub-shapes of.
03664                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03665                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03666 
03667             Returns:
03668                 List of all found sub-shapes indices.
03669             """
03670             # Example: see GEOM_TestOthers.py
03671             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
03672             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
03673             return aList
03674 
03675         ## Find in \a theShape all sub-shapes of type \a theShapeType,
03676         #  situated relatively the specified \a theCheckShape by the
03677         #  certain way, defined through \a theState parameter.
03678         #  @param theCheckShape Shape for relative comparing. It must be a solid.
03679         #  @param theShape Shape to find sub-shapes of.
03680         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
03681         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03682         #  @return List of all found sub-shapes.
03683         #
03684         #  @ref swig_GetShapesOnShape "Example"
03685         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
03686             """
03687             Find in theShape all sub-shapes of type theShapeType,
03688             situated relatively the specified theCheckShape by the
03689             certain way, defined through theState parameter.
03690 
03691             Parameters:
03692                 theCheckShape Shape for relative comparing. It must be a solid.
03693                 theShape Shape to find sub-shapes of.
03694                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03695                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03696 
03697             Returns:
03698                 List of all found sub-shapes.
03699             """
03700             # Example: see GEOM_TestOthers.py
03701             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
03702                                                    theShapeType, theState)
03703             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
03704             return aList
03705 
03706         ## Find in \a theShape all sub-shapes of type \a theShapeType,
03707         #  situated relatively the specified \a theCheckShape by the
03708         #  certain way, defined through \a theState parameter.
03709         #  @param theCheckShape Shape for relative comparing. It must be a solid.
03710         #  @param theShape Shape to find sub-shapes of.
03711         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03712         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03713         #  @return All found sub-shapes as compound.
03714         #
03715         #  @ref swig_GetShapesOnShapeAsCompound "Example"
03716         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
03717             """
03718             Find in theShape all sub-shapes of type theShapeType,
03719             situated relatively the specified theCheckShape by the
03720             certain way, defined through theState parameter.
03721 
03722             Parameters:
03723                 theCheckShape Shape for relative comparing. It must be a solid.
03724                 theShape Shape to find sub-shapes of.
03725                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03726                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03727 
03728             Returns:
03729                 All found sub-shapes as compound.
03730             """
03731             # Example: see GEOM_TestOthers.py
03732             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
03733                                                              theShapeType, theState)
03734             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
03735             return anObj
03736 
03737         ## Find in \a theShape all sub-shapes of type \a theShapeType,
03738         #  situated relatively the specified \a theCheckShape by the
03739         #  certain way, defined through \a theState parameter.
03740         #  @param theCheckShape Shape for relative comparing. It must be a solid.
03741         #  @param theShape Shape to find sub-shapes of.
03742         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
03743         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
03744         #  @return List of all found sub-shapes indices.
03745         #
03746         #  @ref swig_GetShapesOnShapeIDs "Example"
03747         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
03748             """
03749             Find in theShape all sub-shapes of type theShapeType,
03750             situated relatively the specified theCheckShape by the
03751             certain way, defined through theState parameter.
03752 
03753             Parameters:
03754                 theCheckShape Shape for relative comparing. It must be a solid.
03755                 theShape Shape to find sub-shapes of.
03756                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
03757                 theState The state of the sub-shapes to find (see GEOM::shape_state)
03758 
03759             Returns:
03760                 List of all found sub-shapes indices.
03761             """
03762             # Example: see GEOM_TestOthers.py
03763             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
03764                                                       theShapeType, theState)
03765             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
03766             return aList
03767 
03768         ## Get sub-shape(s) of theShapeWhere, which are
03769         #  coincident with \a theShapeWhat or could be a part of it.
03770         #  @param theShapeWhere Shape to find sub-shapes of.
03771         #  @param theShapeWhat Shape, specifying what to find.
03772         #  @param isNewImplementation implementation of GetInPlace functionality
03773         #             (default = False, old alghorithm based on shape properties)
03774         #  @return Group of all found sub-shapes or a single found sub-shape.
03775         #
03776         #  @note This function has a restriction on argument shapes.
03777         #        If \a theShapeWhere has curved parts with significantly
03778         #        outstanding centres (i.e. the mass centre of a part is closer to
03779         #        \a theShapeWhat than to the part), such parts will not be found.
03780         #        @image html get_in_place_lost_part.png
03781         #
03782         #  @ref swig_GetInPlace "Example"
03783         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False):
03784             """
03785             Get sub-shape(s) of theShapeWhere, which are
03786             coincident with  theShapeWhat or could be a part of it.
03787 
03788             Parameters:
03789                 theShapeWhere Shape to find sub-shapes of.
03790                 theShapeWhat Shape, specifying what to find.
03791                 isNewImplementation Implementation of GetInPlace functionality
03792                                     (default = False, old alghorithm based on shape properties)
03793 
03794             Returns:
03795                 Group of all found sub-shapes or a single found sub-shape.
03796 
03797                 
03798             Note:
03799                 This function has a restriction on argument shapes.
03800                 If theShapeWhere has curved parts with significantly
03801                 outstanding centres (i.e. the mass centre of a part is closer to
03802                 theShapeWhat than to the part), such parts will not be found.
03803             """
03804             # Example: see GEOM_TestOthers.py
03805             anObj = None
03806             if isNewImplementation:
03807                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
03808             else:
03809                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
03810                 pass
03811             RaiseIfFailed("GetInPlace", self.ShapesOp)
03812             return anObj
03813 
03814         ## Get sub-shape(s) of \a theShapeWhere, which are
03815         #  coincident with \a theShapeWhat or could be a part of it.
03816         #
03817         #  Implementation of this method is based on a saved history of an operation,
03818         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
03819         #  arguments (an argument shape or a sub-shape of an argument shape).
03820         #  The operation could be the Partition or one of boolean operations,
03821         #  performed on simple shapes (not on compounds).
03822         #
03823         #  @param theShapeWhere Shape to find sub-shapes of.
03824         #  @param theShapeWhat Shape, specifying what to find (must be in the
03825         #                      building history of the ShapeWhere).
03826         #  @return Group of all found sub-shapes or a single found sub-shape.
03827         #
03828         #  @ref swig_GetInPlace "Example"
03829         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
03830             """
03831             Implementation of this method is based on a saved history of an operation,
03832             produced theShapeWhere. The theShapeWhat must be among this operation's
03833             arguments (an argument shape or a sub-shape of an argument shape).
03834             The operation could be the Partition or one of boolean operations,
03835             performed on simple shapes (not on compounds).
03836 
03837             Parameters:
03838                 theShapeWhere Shape to find sub-shapes of.
03839                 theShapeWhat Shape, specifying what to find (must be in the
03840                                 building history of the ShapeWhere).
03841 
03842             Returns:
03843                 Group of all found sub-shapes or a single found sub-shape.
03844             """
03845             # Example: see GEOM_TestOthers.py
03846             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
03847             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
03848             return anObj
03849 
03850         ## Get sub-shape of theShapeWhere, which is
03851         #  equal to \a theShapeWhat.
03852         #  @param theShapeWhere Shape to find sub-shape of.
03853         #  @param theShapeWhat Shape, specifying what to find.
03854         #  @return New GEOM.GEOM_Object for found sub-shape.
03855         #
03856         #  @ref swig_GetSame "Example"
03857         def GetSame(self,theShapeWhere, theShapeWhat):
03858             """
03859             Get sub-shape of theShapeWhere, which is
03860             equal to theShapeWhat.
03861 
03862             Parameters:
03863                 theShapeWhere Shape to find sub-shape of.
03864                 theShapeWhat Shape, specifying what to find.
03865 
03866             Returns:
03867                 New GEOM.GEOM_Object for found sub-shape.
03868             """
03869             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
03870             RaiseIfFailed("GetSame", self.ShapesOp)
03871             return anObj
03872 
03873 
03874         ## Get sub-shape indices of theShapeWhere, which is
03875         #  equal to \a theShapeWhat.
03876         #  @param theShapeWhere Shape to find sub-shape of.
03877         #  @param theShapeWhat Shape, specifying what to find.
03878         #  @return List of all found sub-shapes indices. 
03879         #
03880         #  @ref swig_GetSame "Example"
03881         def GetSameIDs(self,theShapeWhere, theShapeWhat):
03882             """
03883             Get sub-shape indices of theShapeWhere, which is
03884             equal to theShapeWhat.
03885 
03886             Parameters:
03887                 theShapeWhere Shape to find sub-shape of.
03888                 theShapeWhat Shape, specifying what to find.
03889 
03890             Returns:
03891                 List of all found sub-shapes indices.
03892             """
03893             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
03894             RaiseIfFailed("GetSameIDs", self.ShapesOp)
03895             return anObj
03896 
03897 
03898         # end of l4_obtain
03899         ## @}
03900 
03901         ## @addtogroup l4_access
03902         ## @{
03903 
03904         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
03905         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
03906         #  @param aShape Shape to get sub-shape of.
03907         #  @param ListOfID List of sub-shapes indices.
03908         #  @return Found sub-shape.
03909         #
03910         #  @ref swig_all_decompose "Example"
03911         def GetSubShape(self, aShape, ListOfID):
03912             """
03913             Obtain a composite sub-shape of aShape, composed from sub-shapes
03914             of aShape, selected by their unique IDs inside aShape
03915 
03916             Parameters:
03917                aShape Shape to get sub-shape of.
03918                ListOfID List of sub-shapes indices.
03919 
03920             Returns:
03921                 Found sub-shape.
03922             """
03923             # Example: see GEOM_TestAll.py
03924             anObj = self.AddSubShape(aShape,ListOfID)
03925             return anObj
03926 
03927         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
03928         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
03929         #  @param aShape Shape to get sub-shape of.
03930         #  @param aSubShape Sub-shapes of aShape.
03931         #  @return ID of found sub-shape.
03932         #
03933         #  @ref swig_all_decompose "Example"
03934         def GetSubShapeID(self, aShape, aSubShape):
03935             """
03936             Obtain unique ID of sub-shape aSubShape inside aShape
03937             of aShape, selected by their unique IDs inside aShape
03938 
03939             Parameters:
03940                aShape Shape to get sub-shape of.
03941                aSubShape Sub-shapes of aShape.
03942 
03943             Returns:
03944                ID of found sub-shape.
03945             """
03946             # Example: see GEOM_TestAll.py
03947             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
03948             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
03949             return anID
03950 
03951         # end of l4_access
03952         ## @}
03953 
03954         ## @addtogroup l4_decompose
03955         ## @{
03956 
03957         ## Get all sub-shapes and groups of \a theShape,
03958         #  that were created already by any other methods.
03959         #  @param theShape Any shape.
03960         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
03961         #                       returned, else all found sub-shapes and groups.
03962         #  @return List of existing sub-objects of \a theShape.
03963         #
03964         #  @ref swig_all_decompose "Example"
03965         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
03966             """
03967             Get all sub-shapes and groups of theShape,
03968             that were created already by any other methods.
03969 
03970             Parameters:
03971                 theShape Any shape.
03972                 theGroupsOnly If this parameter is TRUE, only groups will be
03973                                  returned, else all found sub-shapes and groups.
03974 
03975             Returns:
03976                 List of existing sub-objects of theShape.
03977             """
03978             # Example: see GEOM_TestAll.py
03979             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
03980             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
03981             return ListObj
03982 
03983         ## Get all groups of \a theShape,
03984         #  that were created already by any other methods.
03985         #  @param theShape Any shape.
03986         #  @return List of existing groups of \a theShape.
03987         #
03988         #  @ref swig_all_decompose "Example"
03989         def GetGroups(self, theShape):
03990             """
03991             Get all groups of theShape,
03992             that were created already by any other methods.
03993 
03994             Parameters:
03995                 theShape Any shape.
03996 
03997             Returns:
03998                 List of existing groups of theShape.
03999             """
04000             # Example: see GEOM_TestAll.py
04001             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
04002             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
04003             return ListObj
04004 
04005         ## Explode a shape on sub-shapes of a given type.
04006         #  If the shape itself matches the type, it is also returned.
04007         #  @param aShape Shape to be exploded.
04008         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
04009         #  @return List of sub-shapes of type theShapeType, contained in theShape.
04010         #
04011         #  @ref swig_all_decompose "Example"
04012         def SubShapeAll(self, aShape, aType):
04013             """
04014             Explode a shape on sub-shapes of a given type.
04015             If the shape itself matches the type, it is also returned.
04016 
04017             Parameters:
04018                 aShape Shape to be exploded.
04019                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
04020 
04021             Returns:
04022                 List of sub-shapes of type theShapeType, contained in theShape.
04023             """
04024             # Example: see GEOM_TestAll.py
04025             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
04026             RaiseIfFailed("SubShapeAll", self.ShapesOp)
04027             return ListObj
04028 
04029         ## Explode a shape on sub-shapes of a given type.
04030         #  @param aShape Shape to be exploded.
04031         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
04032         #  @return List of IDs of sub-shapes.
04033         #
04034         #  @ref swig_all_decompose "Example"
04035         def SubShapeAllIDs(self, aShape, aType):
04036             """
04037             Explode a shape on sub-shapes of a given type.
04038 
04039             Parameters:
04040                 aShape Shape to be exploded (see geompy.ShapeType) 
04041                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
04042 
04043             Returns:
04044                 List of IDs of sub-shapes.
04045             """
04046             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
04047             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
04048             return ListObj
04049 
04050         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
04051         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
04052         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
04053         #  @param aShape Shape to get sub-shape of.
04054         #  @param ListOfInd List of sub-shapes indices.
04055         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
04056         #  @return A compound of sub-shapes of aShape.
04057         #
04058         #  @ref swig_all_decompose "Example"
04059         def SubShape(self, aShape, aType, ListOfInd):
04060             """
04061             Obtain a compound of sub-shapes of aShape,
04062             selected by they indices in list of all sub-shapes of type aType.
04063             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
04064             
04065             Parameters:
04066                 aShape Shape to get sub-shape of.
04067                 ListOfID List of sub-shapes indices.
04068                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
04069 
04070             Returns:
04071                 A compound of sub-shapes of aShape.
04072             """
04073             # Example: see GEOM_TestAll.py
04074             ListOfIDs = []
04075             AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
04076             for ind in ListOfInd:
04077                 ListOfIDs.append(AllShapeIDsList[ind - 1])
04078             anObj = self.GetSubShape(aShape, ListOfIDs)
04079             return anObj
04080 
04081         ## Explode a shape on sub-shapes of a given type.
04082         #  Sub-shapes will be sorted by coordinates of their gravity centers.
04083         #  If the shape itself matches the type, it is also returned.
04084         #  @param aShape Shape to be exploded.
04085         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
04086         #  @return List of sub-shapes of type theShapeType, contained in theShape.
04087         #
04088         #  @ref swig_SubShapeAllSorted "Example"
04089         def SubShapeAllSortedCentres(self, aShape, aType):
04090             """
04091             Explode a shape on sub-shapes of a given type.
04092             Sub-shapes will be sorted by coordinates of their gravity centers.
04093             If the shape itself matches the type, it is also returned.
04094 
04095             Parameters: 
04096                 aShape Shape to be exploded.
04097                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
04098 
04099             Returns: 
04100                 List of sub-shapes of type theShapeType, contained in theShape.
04101             """
04102             # Example: see GEOM_TestAll.py
04103             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
04104             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
04105             return ListObj
04106 
04107         ## Explode a shape on sub-shapes of a given type.
04108         #  Sub-shapes will be sorted by coordinates of their gravity centers.
04109         #  @param aShape Shape to be exploded.
04110         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
04111         #  @return List of IDs of sub-shapes.
04112         #
04113         #  @ref swig_all_decompose "Example"
04114         def SubShapeAllSortedCentresIDs(self, aShape, aType):
04115             """
04116             Explode a shape on sub-shapes of a given type.
04117             Sub-shapes will be sorted by coordinates of their gravity centers.
04118 
04119             Parameters: 
04120                 aShape Shape to be exploded.
04121                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
04122 
04123             Returns: 
04124                 List of IDs of sub-shapes.
04125             """
04126             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
04127             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
04128             return ListIDs
04129 
04130         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
04131         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
04132         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
04133         #  @param aShape Shape to get sub-shape of.
04134         #  @param ListOfInd List of sub-shapes indices.
04135         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
04136         #  @return A compound of sub-shapes of aShape.
04137         #
04138         #  @ref swig_all_decompose "Example"
04139         def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
04140             """
04141             Obtain a compound of sub-shapes of aShape,
04142             selected by they indices in sorted list of all sub-shapes of type aType.
04143             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
04144 
04145             Parameters:
04146                 aShape Shape to get sub-shape of.
04147                 ListOfID List of sub-shapes indices.
04148                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
04149 
04150             Returns:
04151                 A compound of sub-shapes of aShape.
04152             """
04153             # Example: see GEOM_TestAll.py
04154             ListOfIDs = []
04155             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
04156             for ind in ListOfInd:
04157                 ListOfIDs.append(AllShapeIDsList[ind - 1])
04158             anObj = self.GetSubShape(aShape, ListOfIDs)
04159             return anObj
04160 
04161         ## Extract shapes (excluding the main shape) of given type.
04162         #  @param aShape The shape.
04163         #  @param aType  The shape type (see ShapeType())
04164         #  @param isSorted Boolean flag to switch sorting on/off.
04165         #  @return List of sub-shapes of type aType, contained in aShape.
04166         #
04167         #  @ref swig_FilletChamfer "Example"
04168         def ExtractShapes(self, aShape, aType, isSorted = False):
04169             """
04170             Extract shapes (excluding the main shape) of given type.
04171 
04172             Parameters:
04173                 aShape The shape.
04174                 aType  The shape type (see geompy.ShapeType)
04175                 isSorted Boolean flag to switch sorting on/off.
04176 
04177             Returns:     
04178                 List of sub-shapes of type aType, contained in aShape.
04179             """
04180             # Example: see GEOM_TestAll.py
04181             ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted)
04182             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
04183             return ListObj
04184 
04185         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
04186         #  @param aShape Main shape.
04187         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
04188         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
04189         #
04190         #  @ref swig_all_decompose "Example"
04191         def SubShapes(self, aShape, anIDs):
04192             """
04193             Get a set of sub-shapes defined by their unique IDs inside theMainShape
04194 
04195             Parameters:
04196                 aShape Main shape.
04197                 anIDs List of unique IDs of sub-shapes inside theMainShape.
04198 
04199             Returns:      
04200                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
04201             """
04202             # Example: see GEOM_TestAll.py
04203             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
04204             RaiseIfFailed("SubShapes", self.ShapesOp)
04205             return ListObj
04206 
04207         # end of l4_decompose
04208         ## @}
04209 
04210         ## @addtogroup l4_decompose_d
04211         ## @{
04212 
04213         ## Deprecated method
04214         #  It works like SubShapeAllSortedCentres(), but wrongly
04215         #  defines centres of faces, shells and solids.
04216         def SubShapeAllSorted(self, aShape, aType):
04217             """
04218             Deprecated method
04219             It works like geompy.SubShapeAllSortedCentres, but wrongly
04220             defines centres of faces, shells and solids.
04221             """
04222             ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
04223             RaiseIfFailed("MakeExplode", self.ShapesOp)
04224             return ListObj
04225 
04226         ## Deprecated method
04227         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
04228         #  defines centres of faces, shells and solids.
04229         def SubShapeAllSortedIDs(self, aShape, aType):
04230             """
04231             Deprecated method
04232             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
04233             defines centres of faces, shells and solids.
04234             """
04235             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
04236             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
04237             return ListIDs
04238 
04239         ## Deprecated method
04240         #  It works like SubShapeSortedCentres(), but has a bug
04241         #  (wrongly defines centres of faces, shells and solids).
04242         def SubShapeSorted(self, aShape, aType, ListOfInd):
04243             """
04244             Deprecated method
04245             It works like geompy.SubShapeSortedCentres, but has a bug
04246             (wrongly defines centres of faces, shells and solids).
04247             """
04248             ListOfIDs = []
04249             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
04250             for ind in ListOfInd:
04251                 ListOfIDs.append(AllShapeIDsList[ind - 1])
04252             anObj = self.GetSubShape(aShape, ListOfIDs)
04253             return anObj
04254 
04255         # end of l4_decompose_d
04256         ## @}
04257 
04258         ## @addtogroup l3_healing
04259         ## @{
04260 
04261         ## Apply a sequence of Shape Healing operators to the given object.
04262         #  @param theShape Shape to be processed.
04263         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
04264         #  @param theParameters List of names of parameters
04265         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
04266         #  @param theValues List of values of parameters, in the same order
04267         #                    as parameters are listed in <VAR>theParameters</VAR> list.
04268         #
04269         #
04270         #  <b> Operators and Parameters: </b> \n
04271         #
04272         #  * \b FixShape - corrects invalid shapes. \n
04273         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
04274         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
04275         #
04276         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
04277         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
04278         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
04279         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
04280         #
04281         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
04282         #    surfaces in segments using a certain angle. \n
04283         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
04284         #    if Angle=180, four if Angle=90, etc). \n
04285         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
04286         #
04287         #  * \b SplitClosedFaces - splits closed faces in segments.
04288         #    The number of segments depends on the number of splitting points.\n
04289         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
04290         #
04291         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
04292         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
04293         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
04294         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
04295         #   This and the previous parameters can take the following values:\n
04296         #   \b Parametric \b Continuity \n
04297         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
04298         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
04299         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
04300         #    ruling out sharp edges).\n
04301         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
04302         #       are of the same magnitude).\n
04303         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
04304         #    or surfaces (d/du C(u)) are the same at junction. \n
04305         #   \b Geometric \b Continuity \n
04306         #   \b G1: first derivatives are proportional at junction.\n
04307         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
04308         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
04309         #   \b G2: first and second derivatives are proportional at junction.
04310         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
04311         #    continuity requires that the underlying parameterization was continuous as well.
04312         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
04313         #
04314         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
04315         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
04316         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
04317         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
04318         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
04319         #       with the specified parameters.\n
04320         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
04321         #       with the specified parameters.\n
04322         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
04323         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
04324         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
04325         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
04326         #
04327         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
04328         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
04329         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
04330         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
04331         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
04332         #
04333         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
04334         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
04335         #
04336         #
04337         #  @return New GEOM.GEOM_Object, containing processed shape.
04338         #
04339         #  \n @ref tui_shape_processing "Example"
04340         def ProcessShape(self, theShape, theOperators, theParameters, theValues):
04341             """
04342             Apply a sequence of Shape Healing operators to the given object.
04343 
04344             Parameters:
04345                 theShape Shape to be processed.
04346                 theValues List of values of parameters, in the same order
04347                           as parameters are listed in theParameters list.
04348                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
04349                 theParameters List of names of parameters
04350                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
04351                  Operators and Parameters:
04352 
04353                  * FixShape - corrects invalid shapes.
04354                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
04355                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
04356                  * FixFaceSize - removes small faces, such as spots and strips.
04357                      * FixFaceSize.Tolerance - defines minimum possible face size.
04358                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
04359                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
04360                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
04361                                 in segments using a certain angle.
04362                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
04363                                           if Angle=180, four if Angle=90, etc).
04364                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
04365                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
04366                                       splitting points.
04367                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
04368                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
04369                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
04370                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
04371                      * SplitContinuity.CurveContinuity - required continuity for curves.
04372                        This and the previous parameters can take the following values:
04373                        
04374                        Parametric Continuity:
04375                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
04376                                                    coincidental. The curves or surfaces may still meet at an angle,
04377                                                    giving rise to a sharp corner or edge).
04378                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
04379                                                    are parallel, ruling out sharp edges).
04380                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
04381                                                   or surfaces are of the same magnitude).
04382                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
04383                           curves or surfaces (d/du C(u)) are the same at junction.
04384                           
04385                        Geometric Continuity:
04386                        G1: first derivatives are proportional at junction.
04387                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
04388                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
04389                        G2: first and second derivatives are proportional at junction. As the names imply,
04390                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
04391                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
04392                            geometric continuity of order n, but not vice-versa.
04393                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
04394                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
04395                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
04396                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
04397                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
04398                                                         the specified parameters.
04399                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
04400                                                         the specified parameters.
04401                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
04402                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
04403                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
04404                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
04405                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
04406                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
04407                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
04408                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
04409                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
04410                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
04411                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
04412 
04413             Returns:
04414                 New GEOM.GEOM_Object, containing processed shape.
04415 
04416             Note: For more information look through SALOME Geometry User's Guide->
04417                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
04418             """
04419             # Example: see GEOM_TestHealing.py
04420             theValues,Parameters = ParseList(theValues)
04421             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
04422             # To avoid script failure in case of good argument shape
04423             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
04424                 return theShape
04425             RaiseIfFailed("ProcessShape", self.HealOp)
04426             for string in (theOperators + theParameters):
04427                 Parameters = ":" + Parameters
04428                 pass
04429             anObj.SetParameters(Parameters)
04430             return anObj
04431 
04432         ## Remove faces from the given object (shape).
04433         #  @param theObject Shape to be processed.
04434         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
04435         #                  removes ALL faces of the given object.
04436         #  @return New GEOM.GEOM_Object, containing processed shape.
04437         #
04438         #  @ref tui_suppress_faces "Example"
04439         def SuppressFaces(self,theObject, theFaces):
04440             """
04441             Remove faces from the given object (shape).
04442 
04443             Parameters:
04444                 theObject Shape to be processed.
04445                 theFaces Indices of faces to be removed, if EMPTY then the method
04446                          removes ALL faces of the given object.
04447 
04448             Returns:
04449                 New GEOM.GEOM_Object, containing processed shape.
04450             """
04451             # Example: see GEOM_TestHealing.py
04452             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
04453             RaiseIfFailed("SuppressFaces", self.HealOp)
04454             return anObj
04455 
04456         ## Sewing of some shapes into single shape.
04457         #  @param ListShape Shapes to be processed.
04458         #  @param theTolerance Required tolerance value.
04459         #  @return New GEOM.GEOM_Object, containing processed shape.
04460         #
04461         #  @ref tui_sewing "Example"
04462         def MakeSewing(self, ListShape, theTolerance):
04463             """
04464             Sewing of some shapes into single shape.
04465 
04466             Parameters:
04467                 ListShape Shapes to be processed.
04468                 theTolerance Required tolerance value.
04469 
04470             Returns:
04471                 New GEOM.GEOM_Object, containing processed shape.
04472             """
04473             # Example: see GEOM_TestHealing.py
04474             comp = self.MakeCompound(ListShape)
04475             anObj = self.Sew(comp, theTolerance)
04476             return anObj
04477 
04478         ## Sewing of the given object.
04479         #  @param theObject Shape to be processed.
04480         #  @param theTolerance Required tolerance value.
04481         #  @return New GEOM.GEOM_Object, containing processed shape.
04482         def Sew(self, theObject, theTolerance):
04483             """
04484             Sewing of the given object.
04485 
04486             Parameters:
04487                 theObject Shape to be processed.
04488                 theTolerance Required tolerance value.
04489 
04490             Returns:
04491                 New GEOM.GEOM_Object, containing processed shape.
04492             """
04493             # Example: see MakeSewing() above
04494             theTolerance,Parameters = ParseParameters(theTolerance)
04495             anObj = self.HealOp.Sew(theObject, theTolerance)
04496             RaiseIfFailed("Sew", self.HealOp)
04497             anObj.SetParameters(Parameters)
04498             return anObj
04499 
04500         ## Remove internal wires and edges from the given object (face).
04501         #  @param theObject Shape to be processed.
04502         #  @param theWires Indices of wires to be removed, if EMPTY then the method
04503         #                  removes ALL internal wires of the given object.
04504         #  @return New GEOM.GEOM_Object, containing processed shape.
04505         #
04506         #  @ref tui_suppress_internal_wires "Example"
04507         def SuppressInternalWires(self,theObject, theWires):
04508             """
04509             Remove internal wires and edges from the given object (face).
04510 
04511             Parameters:
04512                 theObject Shape to be processed.
04513                 theWires Indices of wires to be removed, if EMPTY then the method
04514                          removes ALL internal wires of the given object.
04515 
04516             Returns:                
04517                 New GEOM.GEOM_Object, containing processed shape.
04518             """
04519             # Example: see GEOM_TestHealing.py
04520             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
04521             RaiseIfFailed("RemoveIntWires", self.HealOp)
04522             return anObj
04523 
04524         ## Remove internal closed contours (holes) from the given object.
04525         #  @param theObject Shape to be processed.
04526         #  @param theWires Indices of wires to be removed, if EMPTY then the method
04527         #                  removes ALL internal holes of the given object
04528         #  @return New GEOM.GEOM_Object, containing processed shape.
04529         #
04530         #  @ref tui_suppress_holes "Example"
04531         def SuppressHoles(self,theObject, theWires):
04532             """
04533             Remove internal closed contours (holes) from the given object.
04534 
04535             Parameters:
04536                 theObject Shape to be processed.
04537                 theWires Indices of wires to be removed, if EMPTY then the method
04538                          removes ALL internal holes of the given object
04539 
04540             Returns:    
04541                 New GEOM.GEOM_Object, containing processed shape.
04542             """
04543             # Example: see GEOM_TestHealing.py
04544             anObj = self.HealOp.FillHoles(theObject, theWires)
04545             RaiseIfFailed("FillHoles", self.HealOp)
04546             return anObj
04547 
04548         ## Close an open wire.
04549         #  @param theObject Shape to be processed.
04550         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
04551         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
04552         #  @param isCommonVertex If True  : closure by creation of a common vertex,
04553         #                        If False : closure by creation of an edge between ends.
04554         #  @return New GEOM.GEOM_Object, containing processed shape.
04555         #
04556         #  @ref tui_close_contour "Example"
04557         def CloseContour(self,theObject, theWires, isCommonVertex):
04558             """
04559             Close an open wire.
04560 
04561             Parameters: 
04562                 theObject Shape to be processed.
04563                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
04564                          if [ ], then theObject itself is a wire.
04565                 isCommonVertex If True  : closure by creation of a common vertex,
04566                                If False : closure by creation of an edge between ends.
04567 
04568             Returns:                      
04569                 New GEOM.GEOM_Object, containing processed shape. 
04570             """
04571             # Example: see GEOM_TestHealing.py
04572             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
04573             RaiseIfFailed("CloseContour", self.HealOp)
04574             return anObj
04575 
04576         ## Addition of a point to a given edge object.
04577         #  @param theObject Shape to be processed.
04578         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
04579         #                      if -1, then theObject itself is the edge.
04580         #  @param theValue Value of parameter on edge or length parameter,
04581         #                  depending on \a isByParameter.
04582         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
04583         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
04584         #  @return New GEOM.GEOM_Object, containing processed shape.
04585         #
04586         #  @ref tui_add_point_on_edge "Example"
04587         def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter):
04588             """
04589             Addition of a point to a given edge object.
04590 
04591             Parameters: 
04592                 theObject Shape to be processed.
04593                 theEdgeIndex Index of edge to be divided within theObject's shape,
04594                              if -1, then theObject itself is the edge.
04595                 theValue Value of parameter on edge or length parameter,
04596                          depending on isByParameter.
04597                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
04598                               if FALSE : theValue is treated as a length parameter [0..1]
04599 
04600             Returns:  
04601                 New GEOM.GEOM_Object, containing processed shape.
04602             """
04603             # Example: see GEOM_TestHealing.py
04604             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
04605             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
04606             RaiseIfFailed("DivideEdge", self.HealOp)
04607             anObj.SetParameters(Parameters)
04608             return anObj
04609 
04610         ## Change orientation of the given object. Updates given shape.
04611         #  @param theObject Shape to be processed.
04612         #  @return Updated <var>theObject</var>
04613         #
04614         #  @ref swig_todo "Example"
04615         def ChangeOrientationShell(self,theObject):
04616             """
04617             Change orientation of the given object. Updates given shape.
04618 
04619             Parameters: 
04620                 theObject Shape to be processed.
04621 
04622             Returns:  
04623                 Updated theObject
04624             """
04625             theObject = self.HealOp.ChangeOrientation(theObject)
04626             RaiseIfFailed("ChangeOrientation", self.HealOp)
04627             pass
04628 
04629         ## Change orientation of the given object.
04630         #  @param theObject Shape to be processed.
04631         #  @return New GEOM.GEOM_Object, containing processed shape.
04632         #
04633         #  @ref swig_todo "Example"
04634         def ChangeOrientationShellCopy(self, theObject):
04635             """
04636             Change orientation of the given object.
04637 
04638             Parameters:
04639                 theObject Shape to be processed.
04640 
04641             Returns:   
04642                 New GEOM.GEOM_Object, containing processed shape.
04643             """
04644             anObj = self.HealOp.ChangeOrientationCopy(theObject)
04645             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
04646             return anObj
04647 
04648         ## Try to limit tolerance of the given object by value \a theTolerance.
04649         #  @param theObject Shape to be processed.
04650         #  @param theTolerance Required tolerance value.
04651         #  @return New GEOM.GEOM_Object, containing processed shape.
04652         #
04653         #  @ref tui_limit_tolerance "Example"
04654         def LimitTolerance(self, theObject, theTolerance = 1e-07):
04655             """
04656             Try to limit tolerance of the given object by value theTolerance.
04657 
04658             Parameters:
04659                 theObject Shape to be processed.
04660                 theTolerance Required tolerance value.
04661 
04662             Returns:   
04663                 New GEOM.GEOM_Object, containing processed shape.
04664             """
04665             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
04666             RaiseIfFailed("LimitTolerance", self.HealOp)
04667             return anObj
04668 
04669         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
04670         #  that constitute a free boundary of the given shape.
04671         #  @param theObject Shape to get free boundary of.
04672         #  @return [\a status, \a theClosedWires, \a theOpenWires]
04673         #  \n \a status: FALSE, if an error(s) occured during the method execution.
04674         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
04675         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
04676         #
04677         #  @ref tui_measurement_tools_page "Example"
04678         def GetFreeBoundary(self, theObject):
04679             """
04680             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
04681             that constitute a free boundary of the given shape.
04682 
04683             Parameters:
04684                 theObject Shape to get free boundary of.
04685 
04686             Returns: 
04687                 [status, theClosedWires, theOpenWires]
04688                  status: FALSE, if an error(s) occured during the method execution.
04689                  theClosedWires: Closed wires on the free boundary of the given shape.
04690                  theOpenWires: Open wires on the free boundary of the given shape.
04691             """
04692             # Example: see GEOM_TestHealing.py
04693             anObj = self.HealOp.GetFreeBoundary(theObject)
04694             RaiseIfFailed("GetFreeBoundary", self.HealOp)
04695             return anObj
04696 
04697         ## Replace coincident faces in theShape by one face.
04698         #  @param theShape Initial shape.
04699         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
04700         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
04701         #                         otherwise all initial shapes.
04702         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
04703         #
04704         #  @ref tui_glue_faces "Example"
04705         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True):
04706             """
04707             Replace coincident faces in theShape by one face.
04708 
04709             Parameters:
04710                 theShape Initial shape.
04711                 theTolerance Maximum distance between faces, which can be considered as coincident.
04712                 doKeepNonSolids If FALSE, only solids will present in the result,
04713                                 otherwise all initial shapes.
04714 
04715             Returns:
04716                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
04717             """
04718             # Example: see GEOM_Spanner.py
04719             theTolerance,Parameters = ParseParameters(theTolerance)
04720             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
04721             if anObj is None:
04722                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
04723             anObj.SetParameters(Parameters)
04724             return anObj
04725 
04726         ## Find coincident faces in theShape for possible gluing.
04727         #  @param theShape Initial shape.
04728         #  @param theTolerance Maximum distance between faces,
04729         #                      which can be considered as coincident.
04730         #  @return GEOM.ListOfGO
04731         #
04732         #  @ref tui_glue_faces "Example"
04733         def GetGlueFaces(self, theShape, theTolerance):
04734             """
04735             Find coincident faces in theShape for possible gluing.
04736 
04737             Parameters:
04738                 theShape Initial shape.
04739                 theTolerance Maximum distance between faces,
04740                              which can be considered as coincident.
04741 
04742             Returns:                    
04743                 GEOM.ListOfGO
04744             """
04745             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
04746             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
04747             return anObj
04748 
04749         ## Replace coincident faces in theShape by one face
04750         #  in compliance with given list of faces
04751         #  @param theShape Initial shape.
04752         #  @param theTolerance Maximum distance between faces,
04753         #                      which can be considered as coincident.
04754         #  @param theFaces List of faces for gluing.
04755         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
04756         #                         otherwise all initial shapes.
04757         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
04758         #                        will be glued, otherwise only the edges,
04759         #                        belonging to <VAR>theFaces</VAR>.
04760         #  @return New GEOM.GEOM_Object, containing a copy of theShape
04761         #          without some faces.
04762         #
04763         #  @ref tui_glue_faces "Example"
04764         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
04765                                 doKeepNonSolids=True, doGlueAllEdges=True):
04766             """
04767             Replace coincident faces in theShape by one face
04768             in compliance with given list of faces
04769 
04770             Parameters:
04771                 theShape Initial shape.
04772                 theTolerance Maximum distance between faces,
04773                              which can be considered as coincident.
04774                 theFaces List of faces for gluing.
04775                 doKeepNonSolids If FALSE, only solids will present in the result,
04776                                 otherwise all initial shapes.
04777                 doGlueAllEdges If TRUE, all coincident edges of theShape
04778                                will be glued, otherwise only the edges,
04779                                belonging to theFaces.
04780 
04781             Returns:
04782                 New GEOM.GEOM_Object, containing a copy of theShape
04783                     without some faces.
04784             """
04785             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
04786                                                       doKeepNonSolids, doGlueAllEdges)
04787             if anObj is None:
04788                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
04789             return anObj
04790 
04791         ## Replace coincident edges in theShape by one edge.
04792         #  @param theShape Initial shape.
04793         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
04794         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
04795         #
04796         #  @ref tui_glue_edges "Example"
04797         def MakeGlueEdges(self, theShape, theTolerance):
04798             """
04799             Replace coincident edges in theShape by one edge.
04800 
04801             Parameters:
04802                 theShape Initial shape.
04803                 theTolerance Maximum distance between edges, which can be considered as coincident.
04804 
04805             Returns:    
04806                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
04807             """
04808             theTolerance,Parameters = ParseParameters(theTolerance)
04809             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
04810             if anObj is None:
04811                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
04812             anObj.SetParameters(Parameters)
04813             return anObj
04814 
04815         ## Find coincident edges in theShape for possible gluing.
04816         #  @param theShape Initial shape.
04817         #  @param theTolerance Maximum distance between edges,
04818         #                      which can be considered as coincident.
04819         #  @return GEOM.ListOfGO
04820         #
04821         #  @ref tui_glue_edges "Example"
04822         def GetGlueEdges(self, theShape, theTolerance):
04823             """
04824             Find coincident edges in theShape for possible gluing.
04825 
04826             Parameters:
04827                 theShape Initial shape.
04828                 theTolerance Maximum distance between edges,
04829                              which can be considered as coincident.
04830 
04831             Returns:                         
04832                 GEOM.ListOfGO
04833             """
04834             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
04835             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
04836             return anObj
04837 
04838         ## Replace coincident edges in theShape by one edge
04839         #  in compliance with given list of edges.
04840         #  @param theShape Initial shape.
04841         #  @param theTolerance Maximum distance between edges,
04842         #                      which can be considered as coincident.
04843         #  @param theEdges List of edges for gluing.
04844         #  @return New GEOM.GEOM_Object, containing a copy of theShape
04845         #          without some edges.
04846         #
04847         #  @ref tui_glue_edges "Example"
04848         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges):
04849             """
04850             Replace coincident edges in theShape by one edge
04851             in compliance with given list of edges.
04852 
04853             Parameters:
04854                 theShape Initial shape.
04855                 theTolerance Maximum distance between edges,
04856                              which can be considered as coincident.
04857                 theEdges List of edges for gluing.
04858 
04859             Returns:  
04860                 New GEOM.GEOM_Object, containing a copy of theShape
04861                 without some edges.
04862             """
04863             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
04864             if anObj is None:
04865                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
04866             return anObj
04867 
04868         # end of l3_healing
04869         ## @}
04870 
04871         ## @addtogroup l3_boolean Boolean Operations
04872         ## @{
04873 
04874         # -----------------------------------------------------------------------------
04875         # Boolean (Common, Cut, Fuse, Section)
04876         # -----------------------------------------------------------------------------
04877 
04878         ## Perform one of boolean operations on two given shapes.
04879         #  @param theShape1 First argument for boolean operation.
04880         #  @param theShape2 Second argument for boolean operation.
04881         #  @param theOperation Indicates the operation to be done:\n
04882         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
04883         #  @return New GEOM.GEOM_Object, containing the result shape.
04884         #
04885         #  @ref tui_fuse "Example"
04886         def MakeBoolean(self,theShape1, theShape2, theOperation):
04887             """
04888             Perform one of boolean operations on two given shapes.
04889 
04890             Parameters: 
04891                 theShape1 First argument for boolean operation.
04892                 theShape2 Second argument for boolean operation.
04893                 theOperation Indicates the operation to be done:
04894                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
04895 
04896             Returns:   
04897                 New GEOM.GEOM_Object, containing the result shape.
04898             """
04899             # Example: see GEOM_TestAll.py
04900             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
04901             RaiseIfFailed("MakeBoolean", self.BoolOp)
04902             return anObj
04903 
04904         ## Perform Common boolean operation on two given shapes.
04905         #  @param theShape1 First argument for boolean operation.
04906         #  @param theShape2 Second argument for boolean operation.
04907         #  @return New GEOM.GEOM_Object, containing the result shape.
04908         #
04909         #  @ref tui_common "Example 1"
04910         #  \n @ref swig_MakeCommon "Example 2"
04911         def MakeCommon(self, theShape1, theShape2):
04912             """
04913             Perform Common boolean operation on two given shapes.
04914 
04915             Parameters: 
04916                 theShape1 First argument for boolean operation.
04917                 theShape2 Second argument for boolean operation.
04918  
04919             Returns:   
04920                 New GEOM.GEOM_Object, containing the result shape.
04921             """
04922             # Example: see GEOM_TestOthers.py
04923             return self.MakeBoolean(theShape1, theShape2, 1)
04924 
04925         ## Perform Cut boolean operation on two given shapes.
04926         #  @param theShape1 First argument for boolean operation.
04927         #  @param theShape2 Second argument for boolean operation.
04928         #  @return New GEOM.GEOM_Object, containing the result shape.
04929         #
04930         #  @ref tui_cut "Example 1"
04931         #  \n @ref swig_MakeCommon "Example 2"
04932         def MakeCut(self, theShape1, theShape2):
04933             """
04934             Perform Cut boolean operation on two given shapes.
04935 
04936             Parameters: 
04937                 theShape1 First argument for boolean operation.
04938                 theShape2 Second argument for boolean operation.
04939  
04940             Returns:   
04941                 New GEOM.GEOM_Object, containing the result shape.
04942             
04943             """
04944             # Example: see GEOM_TestOthers.py
04945             return self.MakeBoolean(theShape1, theShape2, 2)
04946 
04947         ## Perform Fuse boolean operation on two given shapes.
04948         #  @param theShape1 First argument for boolean operation.
04949         #  @param theShape2 Second argument for boolean operation.
04950         #  @return New GEOM.GEOM_Object, containing the result shape.
04951         #
04952         #  @ref tui_fuse "Example 1"
04953         #  \n @ref swig_MakeCommon "Example 2"
04954         def MakeFuse(self, theShape1, theShape2):
04955             """
04956             Perform Fuse boolean operation on two given shapes.
04957 
04958             Parameters: 
04959                 theShape1 First argument for boolean operation.
04960                 theShape2 Second argument for boolean operation.
04961  
04962             Returns:   
04963                 New GEOM.GEOM_Object, containing the result shape.
04964             
04965             """
04966             # Example: see GEOM_TestOthers.py
04967             return self.MakeBoolean(theShape1, theShape2, 3)
04968 
04969         ## Perform Section boolean operation on two given shapes.
04970         #  @param theShape1 First argument for boolean operation.
04971         #  @param theShape2 Second argument for boolean operation.
04972         #  @return New GEOM.GEOM_Object, containing the result shape.
04973         #
04974         #  @ref tui_section "Example 1"
04975         #  \n @ref swig_MakeCommon "Example 2"
04976         def MakeSection(self, theShape1, theShape2):
04977             """
04978             Perform Section boolean operation on two given shapes.
04979 
04980             Parameters: 
04981                 theShape1 First argument for boolean operation.
04982                 theShape2 Second argument for boolean operation.
04983  
04984             Returns:   
04985                 New GEOM.GEOM_Object, containing the result shape.
04986             
04987             """
04988             # Example: see GEOM_TestOthers.py
04989             return self.MakeBoolean(theShape1, theShape2, 4)
04990 
04991         # end of l3_boolean
04992         ## @}
04993 
04994         ## @addtogroup l3_basic_op
04995         ## @{
04996 
04997         ## Perform partition operation.
04998         #  @param ListShapes Shapes to be intersected.
04999         #  @param ListTools Shapes to intersect theShapes.
05000         #  @param Limit Type of resulting shapes (see ShapeType()).\n
05001         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
05002         #         type will be detected automatically.
05003         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
05004         #                             target type (equal to Limit) are kept in the result,
05005         #                             else standalone shapes of lower dimension
05006         #                             are kept also (if they exist).
05007         #  @note Each compound from ListShapes and ListTools will be exploded
05008         #        in order to avoid possible intersection between shapes from this compound.
05009         #
05010         #  After implementation new version of PartitionAlgo (October 2006)
05011         #  other parameters are ignored by current functionality. They are kept
05012         #  in this function only for support old versions.
05013         #      @param ListKeepInside Shapes, outside which the results will be deleted.
05014         #         Each shape from theKeepInside must belong to theShapes also.
05015         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
05016         #         Each shape from theRemoveInside must belong to theShapes also.
05017         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
05018         #      @param ListMaterials Material indices for each shape. Make sence,
05019         #         only if theRemoveWebs is TRUE.
05020         #
05021         #  @return New GEOM.GEOM_Object, containing the result shapes.
05022         #
05023         #  @ref tui_partition "Example"
05024         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
05025                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
05026                           KeepNonlimitShapes=0):
05027             """
05028             Perform partition operation.
05029 
05030             Parameters: 
05031                 ListShapes Shapes to be intersected.
05032                 ListTools Shapes to intersect theShapes.
05033                 Limit Type of resulting shapes (see geompy.ShapeType)
05034                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
05035                       type will be detected automatically.
05036                 KeepNonlimitShapes if this parameter == 0, then only shapes of
05037                                     target type (equal to Limit) are kept in the result,
05038                                     else standalone shapes of lower dimension
05039                                     are kept also (if they exist).
05040             Note:
05041                     Each compound from ListShapes and ListTools will be exploded
05042                     in order to avoid possible intersection between shapes from
05043                     this compound.
05044                     
05045             After implementation new version of PartitionAlgo (October 2006) other
05046             parameters are ignored by current functionality. They are kept in this
05047             function only for support old versions.
05048             
05049             Ignored parameters:
05050                 ListKeepInside Shapes, outside which the results will be deleted.
05051                                Each shape from theKeepInside must belong to theShapes also.
05052                 ListRemoveInside Shapes, inside which the results will be deleted.
05053                                  Each shape from theRemoveInside must belong to theShapes also.
05054                 RemoveWebs If TRUE, perform Glue 3D algorithm.
05055                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
05056 
05057             Returns:   
05058                 New GEOM.GEOM_Object, containing the result shapes.
05059             """
05060             # Example: see GEOM_TestAll.py
05061             if Limit == ShapeType["AUTO"]:
05062                 # automatic detection of the most appropriate shape limit type
05063                 lim = GEOM.SHAPE
05064                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
05065                 Limit = EnumToLong(lim)
05066                 pass
05067             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
05068                                               ListKeepInside, ListRemoveInside,
05069                                               Limit, RemoveWebs, ListMaterials,
05070                                               KeepNonlimitShapes);
05071             RaiseIfFailed("MakePartition", self.BoolOp)
05072             return anObj
05073 
05074         ## Perform partition operation.
05075         #  This method may be useful if it is needed to make a partition for
05076         #  compound contains nonintersected shapes. Performance will be better
05077         #  since intersection between shapes from compound is not performed.
05078         #
05079         #  Description of all parameters as in previous method MakePartition()
05080         #
05081         #  @note Passed compounds (via ListShapes or via ListTools)
05082         #           have to consist of nonintersecting shapes.
05083         #
05084         #  @return New GEOM.GEOM_Object, containing the result shapes.
05085         #
05086         #  @ref swig_todo "Example"
05087         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
05088                                                  ListKeepInside=[], ListRemoveInside=[],
05089                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
05090                                                  ListMaterials=[], KeepNonlimitShapes=0):
05091             """
05092             Perform partition operation.
05093             This method may be useful if it is needed to make a partition for
05094             compound contains nonintersected shapes. Performance will be better
05095             since intersection between shapes from compound is not performed.
05096 
05097             Parameters: 
05098                 Description of all parameters as in method geompy.MakePartition
05099         
05100             NOTE:
05101                 Passed compounds (via ListShapes or via ListTools)
05102                 have to consist of nonintersecting shapes.
05103 
05104             Returns:   
05105                 New GEOM.GEOM_Object, containing the result shapes.
05106             """
05107             if Limit == ShapeType["AUTO"]:
05108                 # automatic detection of the most appropriate shape limit type
05109                 lim = GEOM.SHAPE
05110                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
05111                 Limit = EnumToLong(lim)
05112                 pass
05113             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
05114                                                                      ListKeepInside, ListRemoveInside,
05115                                                                      Limit, RemoveWebs, ListMaterials,
05116                                                                      KeepNonlimitShapes);
05117             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
05118             return anObj
05119 
05120         ## See method MakePartition() for more information.
05121         #
05122         #  @ref tui_partition "Example 1"
05123         #  \n @ref swig_Partition "Example 2"
05124         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
05125                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
05126                       KeepNonlimitShapes=0):
05127             """
05128             See method geompy.MakePartition for more information.
05129             """
05130             # Example: see GEOM_TestOthers.py
05131             anObj = self.MakePartition(ListShapes, ListTools,
05132                                        ListKeepInside, ListRemoveInside,
05133                                        Limit, RemoveWebs, ListMaterials,
05134                                        KeepNonlimitShapes);
05135             return anObj
05136 
05137         ## Perform partition of the Shape with the Plane
05138         #  @param theShape Shape to be intersected.
05139         #  @param thePlane Tool shape, to intersect theShape.
05140         #  @return New GEOM.GEOM_Object, containing the result shape.
05141         #
05142         #  @ref tui_partition "Example"
05143         def MakeHalfPartition(self,theShape, thePlane):
05144             """
05145             Perform partition of the Shape with the Plane
05146 
05147             Parameters: 
05148                 theShape Shape to be intersected.
05149                 thePlane Tool shape, to intersect theShape.
05150 
05151             Returns:  
05152                 New GEOM.GEOM_Object, containing the result shape.
05153             """
05154             # Example: see GEOM_TestAll.py
05155             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
05156             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
05157             return anObj
05158 
05159         # end of l3_basic_op
05160         ## @}
05161 
05162         ## @addtogroup l3_transform
05163         ## @{
05164 
05165         ## Translate the given object along the vector, specified
05166         #  by its end points, creating its copy before the translation.
05167         #  @param theObject The object to be translated.
05168         #  @param thePoint1 Start point of translation vector.
05169         #  @param thePoint2 End point of translation vector.
05170         #  @return New GEOM.GEOM_Object, containing the translated object.
05171         #
05172         #  @ref tui_translation "Example 1"
05173         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
05174         def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
05175             """
05176             Translate the given object along the vector, specified
05177             by its end points, creating its copy before the translation.
05178 
05179             Parameters: 
05180                 theObject The object to be translated.
05181                 thePoint1 Start point of translation vector.
05182                 thePoint2 End point of translation vector.
05183 
05184             Returns:  
05185                 New GEOM.GEOM_Object, containing the translated object.
05186             """
05187             # Example: see GEOM_TestAll.py
05188             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
05189             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
05190             return anObj
05191 
05192         ## Translate the given object along the vector, specified by its components.
05193         #  @param theObject The object to be translated.
05194         #  @param theDX,theDY,theDZ Components of translation vector.
05195         #  @return Translated GEOM.GEOM_Object.
05196         #
05197         #  @ref tui_translation "Example"
05198         def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ):
05199             """
05200             Translate the given object along the vector, specified by its components.
05201 
05202             Parameters: 
05203                 theObject The object to be translated.
05204                 theDX,theDY,theDZ Components of translation vector.
05205 
05206             Returns: 
05207                 Translated GEOM.GEOM_Object.
05208             """
05209             # Example: see GEOM_TestAll.py
05210             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
05211             anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
05212             anObj.SetParameters(Parameters)
05213             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
05214             return anObj
05215 
05216         ## Translate the given object along the vector, specified
05217         #  by its components, creating its copy before the translation.
05218         #  @param theObject The object to be translated.
05219         #  @param theDX,theDY,theDZ Components of translation vector.
05220         #  @return New GEOM.GEOM_Object, containing the translated object.
05221         #
05222         #  @ref tui_translation "Example"
05223         def MakeTranslation(self,theObject, theDX, theDY, theDZ):
05224             """
05225             Translate the given object along the vector, specified
05226             by its components, creating its copy before the translation.
05227 
05228             Parameters: 
05229                 theObject The object to be translated.
05230                 theDX,theDY,theDZ Components of translation vector.
05231 
05232             Returns: 
05233                 New GEOM.GEOM_Object, containing the translated object.
05234             """
05235             # Example: see GEOM_TestAll.py
05236             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
05237             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
05238             anObj.SetParameters(Parameters)
05239             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
05240             return anObj
05241 
05242         ## Translate the given object along the given vector,
05243         #  creating its copy before the translation.
05244         #  @param theObject The object to be translated.
05245         #  @param theVector The translation vector.
05246         #  @return New GEOM.GEOM_Object, containing the translated object.
05247         #
05248         #  @ref tui_translation "Example"
05249         def MakeTranslationVector(self,theObject, theVector):
05250             """
05251             Translate the given object along the given vector,
05252             creating its copy before the translation.
05253 
05254             Parameters: 
05255                 theObject The object to be translated.
05256                 theVector The translation vector.
05257 
05258             Returns: 
05259                 New GEOM.GEOM_Object, containing the translated object.
05260             """
05261             # Example: see GEOM_TestAll.py
05262             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
05263             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
05264             return anObj
05265 
05266         ## Translate the given object along the given vector on given distance.
05267         #  @param theObject The object to be translated.
05268         #  @param theVector The translation vector.
05269         #  @param theDistance The translation distance.
05270         #  @param theCopy Flag used to translate object itself or create a copy.
05271         #  @return New GEOM.GEOM_Object, containing the translated object.
05272         #
05273         #  @ref tui_translation "Example"
05274         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy):
05275             """
05276             Translate the given object along the given vector on given distance.
05277 
05278             Parameters: 
05279                 theObject The object to be translated.
05280                 theVector The translation vector.
05281                 theDistance The translation distance.
05282                 theCopy Flag used to translate object itself or create a copy.
05283 
05284             Returns: 
05285                 New GEOM.GEOM_Object, containing the translated object.
05286             """
05287             # Example: see GEOM_TestAll.py
05288             theDistance,Parameters = ParseParameters(theDistance)
05289             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
05290             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
05291             anObj.SetParameters(Parameters)
05292             return anObj
05293 
05294         ## Translate the given object along the given vector on given distance,
05295         #  creating its copy before the translation.
05296         #  @param theObject The object to be translated.
05297         #  @param theVector The translation vector.
05298         #  @param theDistance The translation distance.
05299         #  @return New GEOM.GEOM_Object, containing the translated object.
05300         #
05301         #  @ref tui_translation "Example"
05302         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance):
05303             """
05304             Translate the given object along the given vector on given distance,
05305             creating its copy before the translation.
05306 
05307             Parameters:
05308                 theObject The object to be translated.
05309                 theVector The translation vector.
05310                 theDistance The translation distance.
05311 
05312             Returns: 
05313                 New GEOM.GEOM_Object, containing the translated object.
05314             """
05315             # Example: see GEOM_TestAll.py
05316             theDistance,Parameters = ParseParameters(theDistance)
05317             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
05318             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
05319             anObj.SetParameters(Parameters)
05320             return anObj
05321 
05322         ## Rotate the given object around the given axis on the given angle.
05323         #  @param theObject The object to be rotated.
05324         #  @param theAxis Rotation axis.
05325         #  @param theAngle Rotation angle in radians.
05326         #  @return New GEOM.GEOM_Object, containing the rotated object.
05327         #
05328         #  @ref tui_rotation "Example"
05329         def Rotate(self,theObject, theAxis, theAngle):
05330             """
05331             Rotate the given object around the given axis on the given angle.
05332 
05333             Parameters:
05334                 theObject The object to be rotated.
05335                 theAxis Rotation axis.
05336                 theAngle Rotation angle in radians.
05337 
05338             Returns: 
05339                 New GEOM.GEOM_Object, containing the rotated object.
05340             """
05341             # Example: see GEOM_TestAll.py
05342             flag = False
05343             if isinstance(theAngle,str):
05344                 flag = True
05345             theAngle, Parameters = ParseParameters(theAngle)
05346             if flag:
05347                 theAngle = theAngle*math.pi/180.0
05348             anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
05349             RaiseIfFailed("RotateCopy", self.TrsfOp)
05350             anObj.SetParameters(Parameters)
05351             return anObj
05352 
05353         ## Rotate the given object around the given axis
05354         #  on the given angle, creating its copy before the rotatation.
05355         #  @param theObject The object to be rotated.
05356         #  @param theAxis Rotation axis.
05357         #  @param theAngle Rotation angle in radians.
05358         #  @return New GEOM.GEOM_Object, containing the rotated object.
05359         #
05360         #  @ref tui_rotation "Example"
05361         def MakeRotation(self,theObject, theAxis, theAngle):
05362             """
05363             Rotate the given object around the given axis
05364             on the given angle, creating its copy before the rotatation.
05365 
05366             Parameters:
05367                 theObject The object to be rotated.
05368                 theAxis Rotation axis.
05369                 theAngle Rotation angle in radians.
05370 
05371             Returns:
05372                 New GEOM.GEOM_Object, containing the rotated object.
05373             """
05374             # Example: see GEOM_TestAll.py
05375             flag = False
05376             if isinstance(theAngle,str):
05377                 flag = True
05378             theAngle, Parameters = ParseParameters(theAngle)
05379             if flag:
05380                 theAngle = theAngle*math.pi/180.0
05381             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
05382             RaiseIfFailed("RotateCopy", self.TrsfOp)
05383             anObj.SetParameters(Parameters)
05384             return anObj
05385 
05386         ## Rotate given object around vector perpendicular to plane
05387         #  containing three points, creating its copy before the rotatation.
05388         #  @param theObject The object to be rotated.
05389         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
05390         #  containing the three points.
05391         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
05392         #  @return New GEOM.GEOM_Object, containing the rotated object.
05393         #
05394         #  @ref tui_rotation "Example"
05395         def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2):
05396             """
05397             Rotate given object around vector perpendicular to plane
05398             containing three points, creating its copy before the rotatation.
05399 
05400             Parameters:
05401                 theObject The object to be rotated.
05402                 theCentPoint central point  the axis is the vector perpendicular to the plane
05403                              containing the three points.
05404                 thePoint1,thePoint2  in a perpendicular plane of the axis.
05405 
05406             Returns:
05407                 New GEOM.GEOM_Object, containing the rotated object.
05408             """
05409             # Example: see GEOM_TestAll.py
05410             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
05411             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
05412             return anObj
05413 
05414         ## Scale the given object by the factor, creating its copy before the scaling.
05415         #  @param theObject The object to be scaled.
05416         #  @param thePoint Center point for scaling.
05417         #                  Passing None for it means scaling relatively the origin of global CS.
05418         #  @param theFactor Scaling factor value.
05419         #  @return New GEOM.GEOM_Object, containing the scaled shape.
05420         #
05421         #  @ref tui_scale "Example"
05422         def MakeScaleTransform(self, theObject, thePoint, theFactor):
05423             """
05424             Scale the given object by the factor, creating its copy before the scaling.
05425 
05426             Parameters:
05427                 theObject The object to be scaled.
05428                 thePoint Center point for scaling.
05429                          Passing None for it means scaling relatively the origin of global CS.
05430                 theFactor Scaling factor value.
05431 
05432             Returns:    
05433                 New GEOM.GEOM_Object, containing the scaled shape.
05434             """
05435             # Example: see GEOM_TestAll.py
05436             theFactor, Parameters = ParseParameters(theFactor)
05437             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
05438             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
05439             anObj.SetParameters(Parameters)
05440             return anObj
05441 
05442         ## Scale the given object by different factors along coordinate axes,
05443         #  creating its copy before the scaling.
05444         #  @param theObject The object to be scaled.
05445         #  @param thePoint Center point for scaling.
05446         #                  Passing None for it means scaling relatively the origin of global CS.
05447         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
05448         #  @return New GEOM.GEOM_Object, containing the scaled shape.
05449         #
05450         #  @ref swig_scale "Example"
05451         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ):
05452             """
05453             Scale the given object by different factors along coordinate axes,
05454             creating its copy before the scaling.
05455 
05456             Parameters:
05457                 theObject The object to be scaled.
05458                 thePoint Center point for scaling.
05459                             Passing None for it means scaling relatively the origin of global CS.
05460                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
05461 
05462             Returns:
05463                 New GEOM.GEOM_Object, containing the scaled shape.
05464             """
05465             # Example: see GEOM_TestAll.py
05466             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
05467             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
05468                                                         theFactorX, theFactorY, theFactorZ)
05469             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
05470             anObj.SetParameters(Parameters)
05471             return anObj
05472 
05473         ## Create an object, symmetrical
05474         #  to the given one relatively the given plane.
05475         #  @param theObject The object to be mirrored.
05476         #  @param thePlane Plane of symmetry.
05477         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
05478         #
05479         #  @ref tui_mirror "Example"
05480         def MakeMirrorByPlane(self,theObject, thePlane):
05481             """
05482             Create an object, symmetrical to the given one relatively the given plane.
05483 
05484             Parameters:
05485                 theObject The object to be mirrored.
05486                 thePlane Plane of symmetry.
05487 
05488             Returns:
05489                 New GEOM.GEOM_Object, containing the mirrored shape.
05490             """
05491             # Example: see GEOM_TestAll.py
05492             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
05493             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
05494             return anObj
05495 
05496         ## Create an object, symmetrical
05497         #  to the given one relatively the given axis.
05498         #  @param theObject The object to be mirrored.
05499         #  @param theAxis Axis of symmetry.
05500         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
05501         #
05502         #  @ref tui_mirror "Example"
05503         def MakeMirrorByAxis(self,theObject, theAxis):
05504             """
05505             Create an object, symmetrical to the given one relatively the given axis.
05506 
05507             Parameters:
05508                 theObject The object to be mirrored.
05509                 theAxis Axis of symmetry.
05510 
05511             Returns: 
05512                 New GEOM.GEOM_Object, containing the mirrored shape.
05513             """
05514             # Example: see GEOM_TestAll.py
05515             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
05516             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
05517             return anObj
05518 
05519         ## Create an object, symmetrical
05520         #  to the given one relatively the given point.
05521         #  @param theObject The object to be mirrored.
05522         #  @param thePoint Point of symmetry.
05523         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
05524         #
05525         #  @ref tui_mirror "Example"
05526         def MakeMirrorByPoint(self,theObject, thePoint):
05527             """
05528             Create an object, symmetrical
05529             to the given one relatively the given point.
05530 
05531             Parameters:
05532                 theObject The object to be mirrored.
05533                 thePoint Point of symmetry.
05534 
05535             Returns:  
05536                 New GEOM.GEOM_Object, containing the mirrored shape.
05537             """
05538             # Example: see GEOM_TestAll.py
05539             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
05540             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
05541             return anObj
05542 
05543         ## Modify the Location of the given object by LCS,
05544         #  creating its copy before the setting.
05545         #  @param theObject The object to be displaced.
05546         #  @param theStartLCS Coordinate system to perform displacement from it.\n
05547         #                     If \a theStartLCS is NULL, displacement
05548         #                     will be performed from global CS.\n
05549         #                     If \a theObject itself is used as \a theStartLCS,
05550         #                     its location will be changed to \a theEndLCS.
05551         #  @param theEndLCS Coordinate system to perform displacement to it.
05552         #  @return New GEOM.GEOM_Object, containing the displaced shape.
05553         #
05554         #  @ref tui_modify_location "Example"
05555         def MakePosition(self,theObject, theStartLCS, theEndLCS):
05556             """
05557             Modify the Location of the given object by LCS, creating its copy before the setting.
05558 
05559             Parameters:
05560                 theObject The object to be displaced.
05561                 theStartLCS Coordinate system to perform displacement from it.
05562                             If theStartLCS is NULL, displacement
05563                             will be performed from global CS.
05564                             If theObject itself is used as theStartLCS,
05565                             its location will be changed to theEndLCS.
05566                 theEndLCS Coordinate system to perform displacement to it.
05567 
05568             Returns:  
05569                 New GEOM.GEOM_Object, containing the displaced shape.
05570 
05571             Example of usage:
05572                 # create local coordinate systems
05573                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
05574                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
05575                 # modify the location of the given object
05576                 position = geompy.MakePosition(cylinder, cs1, cs2)
05577             """
05578             # Example: see GEOM_TestAll.py
05579             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
05580             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
05581             return anObj
05582 
05583         ## Modify the Location of the given object by Path,
05584         #  @param  theObject The object to be displaced.
05585         #  @param  thePath Wire or Edge along that the object will be translated.
05586         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
05587         #  @param  theCopy is to create a copy objects if true.
05588         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
05589         #  @return New GEOM.GEOM_Object, containing the displaced shape.
05590         #
05591         #  @ref tui_modify_location "Example"
05592         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
05593             """
05594             Modify the Location of the given object by Path
05595 
05596             Parameters:
05597                  theObject The object to be displaced.
05598                  thePath Wire or Edge along that the object will be translated.
05599                  theDistance progress of Path (0 = start location, 1 = end of path location).
05600                  theCopy is to create a copy objects if true.
05601                  theReverse  0 - for usual direction, 1 - to reverse path direction.
05602 
05603             Returns:  
05604                 New GEOM.GEOM_Object, containing the displaced shape.
05605 
05606             Example of usage:
05607                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
05608             """
05609             # Example: see GEOM_TestAll.py
05610             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
05611             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
05612             return anObj
05613 
05614         ## Create new object as offset of the given one.
05615         #  @param theObject The base object for the offset.
05616         #  @param theOffset Offset value.
05617         #  @return New GEOM.GEOM_Object, containing the offset object.
05618         #
05619         #  @ref tui_offset "Example"
05620         def MakeOffset(self,theObject, theOffset):
05621             """
05622             Create new object as offset of the given one.
05623 
05624             Parameters:
05625                 theObject The base object for the offset.
05626                 theOffset Offset value.
05627 
05628             Returns:  
05629                 New GEOM.GEOM_Object, containing the offset object.
05630 
05631             Example of usage:
05632                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
05633                  # create a new object as offset of the given object
05634                  offset = geompy.MakeOffset(box, 70.)
05635             """
05636             # Example: see GEOM_TestAll.py
05637             theOffset, Parameters = ParseParameters(theOffset)
05638             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
05639             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
05640             anObj.SetParameters(Parameters)
05641             return anObj
05642 
05643         ## Create new object as projection of the given one on a 2D surface.
05644         #  @param theSource The source object for the projection. It can be a point, edge or wire.
05645         #  @param theTarget The target object. It can be planar or cylindrical face.
05646         #  @return New GEOM.GEOM_Object, containing the projection.
05647         #
05648         #  @ref tui_projection "Example"
05649         def MakeProjection(self, theSource, theTarget):
05650             """
05651             Create new object as projection of the given one on a 2D surface.
05652 
05653             Parameters:
05654                 theSource The source object for the projection. It can be a point, edge or wire.
05655                 theTarget The target object. It can be planar or cylindrical face.
05656 
05657             Returns:  
05658                 New GEOM.GEOM_Object, containing the projection.
05659             """
05660             # Example: see GEOM_TestAll.py
05661             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
05662             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
05663             return anObj
05664 
05665         # -----------------------------------------------------------------------------
05666         # Patterns
05667         # -----------------------------------------------------------------------------
05668 
05669         ## Translate the given object along the given vector a given number times
05670         #  @param theObject The object to be translated.
05671         #  @param theVector Direction of the translation.
05672         #  @param theStep Distance to translate on.
05673         #  @param theNbTimes Quantity of translations to be done.
05674         #  @return New GEOM.GEOM_Object, containing compound of all
05675         #          the shapes, obtained after each translation.
05676         #
05677         #  @ref tui_multi_translation "Example"
05678         def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes):
05679             """
05680             Translate the given object along the given vector a given number times
05681 
05682             Parameters:
05683                 theObject The object to be translated.
05684                 theVector Direction of the translation.
05685                 theStep Distance to translate on.
05686                 theNbTimes Quantity of translations to be done.
05687 
05688             Returns:     
05689                 New GEOM.GEOM_Object, containing compound of all
05690                 the shapes, obtained after each translation.
05691 
05692             Example of usage:
05693                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
05694             """
05695             # Example: see GEOM_TestAll.py
05696             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
05697             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
05698             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
05699             anObj.SetParameters(Parameters)
05700             return anObj
05701 
05702         ## Conseqently apply two specified translations to theObject specified number of times.
05703         #  @param theObject The object to be translated.
05704         #  @param theVector1 Direction of the first translation.
05705         #  @param theStep1 Step of the first translation.
05706         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
05707         #  @param theVector2 Direction of the second translation.
05708         #  @param theStep2 Step of the second translation.
05709         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
05710         #  @return New GEOM.GEOM_Object, containing compound of all
05711         #          the shapes, obtained after each translation.
05712         #
05713         #  @ref tui_multi_translation "Example"
05714         def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1,
05715                                    theVector2, theStep2, theNbTimes2):
05716             """
05717             Conseqently apply two specified translations to theObject specified number of times.
05718 
05719             Parameters:
05720                 theObject The object to be translated.
05721                 theVector1 Direction of the first translation.
05722                 theStep1 Step of the first translation.
05723                 theNbTimes1 Quantity of translations to be done along theVector1.
05724                 theVector2 Direction of the second translation.
05725                 theStep2 Step of the second translation.
05726                 theNbTimes2 Quantity of translations to be done along theVector2.
05727 
05728             Returns:
05729                 New GEOM.GEOM_Object, containing compound of all
05730                 the shapes, obtained after each translation.
05731 
05732             Example of usage:
05733                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
05734             """
05735             # Example: see GEOM_TestAll.py
05736             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
05737             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
05738                                                  theVector2, theStep2, theNbTimes2)
05739             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
05740             anObj.SetParameters(Parameters)
05741             return anObj
05742 
05743         ## Rotate the given object around the given axis a given number times.
05744         #  Rotation angle will be 2*PI/theNbTimes.
05745         #  @param theObject The object to be rotated.
05746         #  @param theAxis The rotation axis.
05747         #  @param theNbTimes Quantity of rotations to be done.
05748         #  @return New GEOM.GEOM_Object, containing compound of all the
05749         #          shapes, obtained after each rotation.
05750         #
05751         #  @ref tui_multi_rotation "Example"
05752         def MultiRotate1D(self,theObject, theAxis, theNbTimes):
05753             """
05754             Rotate the given object around the given axis a given number times.
05755             Rotation angle will be 2*PI/theNbTimes.
05756 
05757             Parameters:
05758                 theObject The object to be rotated.
05759                 theAxis The rotation axis.
05760                 theNbTimes Quantity of rotations to be done.
05761 
05762             Returns:     
05763                 New GEOM.GEOM_Object, containing compound of all the
05764                 shapes, obtained after each rotation.
05765 
05766             Example of usage:
05767                 rot1d = geompy.MultiRotate1D(prism, vect, 4)
05768             """
05769             # Example: see GEOM_TestAll.py
05770             theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
05771             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
05772             RaiseIfFailed("MultiRotate1D", self.TrsfOp)
05773             anObj.SetParameters(Parameters)
05774             return anObj
05775 
05776         ## Rotate the given object around the
05777         #  given axis on the given angle a given number
05778         #  times and multi-translate each rotation result.
05779         #  Translation direction passes through center of gravity
05780         #  of rotated shape and its projection on the rotation axis.
05781         #  @param theObject The object to be rotated.
05782         #  @param theAxis Rotation axis.
05783         #  @param theAngle Rotation angle in graduces.
05784         #  @param theNbTimes1 Quantity of rotations to be done.
05785         #  @param theStep Translation distance.
05786         #  @param theNbTimes2 Quantity of translations to be done.
05787         #  @return New GEOM.GEOM_Object, containing compound of all the
05788         #          shapes, obtained after each transformation.
05789         #
05790         #  @ref tui_multi_rotation "Example"
05791         def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2):
05792             """
05793             Rotate the given object around the
05794             given axis on the given angle a given number
05795             times and multi-translate each rotation result.
05796             Translation direction passes through center of gravity
05797             of rotated shape and its projection on the rotation axis.
05798 
05799             Parameters:
05800                 theObject The object to be rotated.
05801                 theAxis Rotation axis.
05802                 theAngle Rotation angle in graduces.
05803                 theNbTimes1 Quantity of rotations to be done.
05804                 theStep Translation distance.
05805                 theNbTimes2 Quantity of translations to be done.
05806 
05807             Returns:    
05808                 New GEOM.GEOM_Object, containing compound of all the
05809                 shapes, obtained after each transformation.
05810 
05811             Example of usage:
05812                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
05813             """
05814             # Example: see GEOM_TestAll.py
05815             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
05816             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
05817             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
05818             anObj.SetParameters(Parameters)
05819             return anObj
05820 
05821         ## The same, as MultiRotate1D(), but axis is given by direction and point
05822         #
05823         #  @ref swig_MakeMultiRotation "Example"
05824         def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
05825             """
05826             The same, as geompy.MultiRotate1D, but axis is given by direction and point
05827 
05828             Example of usage:
05829                 pz = geompy.MakeVertex(0, 0, 100)
05830                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
05831                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
05832             """
05833             # Example: see GEOM_TestOthers.py
05834             aVec = self.MakeLine(aPoint,aDir)
05835             anObj = self.MultiRotate1D(aShape,aVec,aNbTimes)
05836             return anObj
05837 
05838         ## The same, as MultiRotate2D(), but axis is given by direction and point
05839         #
05840         #  @ref swig_MakeMultiRotation "Example"
05841         def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
05842             """
05843             The same, as MultiRotate2D(), but axis is given by direction and point
05844             
05845             Example of usage:
05846                 pz = geompy.MakeVertex(0, 0, 100)
05847                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
05848                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
05849             """
05850             # Example: see GEOM_TestOthers.py
05851             aVec = self.MakeLine(aPoint,aDir)
05852             anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2)
05853             return anObj
05854 
05855         # end of l3_transform
05856         ## @}
05857 
05858         ## @addtogroup l3_local
05859         ## @{
05860 
05861         ## Perform a fillet on all edges of the given shape.
05862         #  @param theShape Shape, to perform fillet on.
05863         #  @param theR Fillet radius.
05864         #  @return New GEOM.GEOM_Object, containing the result shape.
05865         #
05866         #  @ref tui_fillet "Example 1"
05867         #  \n @ref swig_MakeFilletAll "Example 2"
05868         def MakeFilletAll(self,theShape, theR):
05869             """
05870             Perform a fillet on all edges of the given shape.
05871 
05872             Parameters:
05873                 theShape Shape, to perform fillet on.
05874                 theR Fillet radius.
05875 
05876             Returns: 
05877                 New GEOM.GEOM_Object, containing the result shape.
05878 
05879             Example of usage: 
05880                filletall = geompy.MakeFilletAll(prism, 10.) 
05881             """
05882             # Example: see GEOM_TestOthers.py
05883             theR,Parameters = ParseParameters(theR)
05884             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
05885             RaiseIfFailed("MakeFilletAll", self.LocalOp)
05886             anObj.SetParameters(Parameters)
05887             return anObj
05888 
05889         ## Perform a fillet on the specified edges/faces of the given shape
05890         #  @param theShape Shape, to perform fillet on.
05891         #  @param theR Fillet radius.
05892         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
05893         #  @param theListShapes Global indices of edges/faces to perform fillet on.
05894         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
05895         #  @return New GEOM.GEOM_Object, containing the result shape.
05896         #
05897         #  @ref tui_fillet "Example"
05898         def MakeFillet(self,theShape, theR, theShapeType, theListShapes):
05899             """
05900             Perform a fillet on the specified edges/faces of the given shape
05901 
05902             Parameters:
05903                 theShape Shape, to perform fillet on.
05904                 theR Fillet radius.
05905                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
05906                 theListShapes Global indices of edges/faces to perform fillet on.
05907 
05908             Note:
05909                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
05910 
05911             Returns: 
05912                 New GEOM.GEOM_Object, containing the result shape.
05913 
05914             Example of usage:
05915                 # get the list of IDs (IDList) for the fillet
05916                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
05917                 IDlist_e = []
05918                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
05919                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
05920                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
05921                 # make a fillet on the specified edges of the given shape
05922                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
05923             """
05924             # Example: see GEOM_TestAll.py
05925             theR,Parameters = ParseParameters(theR)
05926             anObj = None
05927             if theShapeType == ShapeType["EDGE"]:
05928                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
05929                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
05930             else:
05931                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
05932                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
05933             anObj.SetParameters(Parameters)
05934             return anObj
05935 
05936         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
05937         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
05938             """
05939             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
05940 
05941             Example of usage:
05942                 # get the list of IDs (IDList) for the fillet
05943                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
05944                 IDlist_e = []
05945                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
05946                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
05947                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
05948                 # make a fillet on the specified edges of the given shape
05949                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
05950             """
05951             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
05952             anObj = None
05953             if theShapeType == ShapeType["EDGE"]:
05954                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
05955                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
05956             else:
05957                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
05958                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
05959             anObj.SetParameters(Parameters)
05960             return anObj
05961 
05962         ## Perform a fillet on the specified edges of the given shape
05963         #  @param theShape  Wire Shape to perform fillet on.
05964         #  @param theR  Fillet radius.
05965         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
05966         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
05967         #    \note The list of vertices could be empty,
05968         #          in this case fillet will done done at all vertices in wire
05969         #  @return New GEOM.GEOM_Object, containing the result shape.
05970         #
05971         #  @ref tui_fillet2d "Example"
05972         def MakeFillet1D(self,theShape, theR, theListOfVertexes):
05973             """
05974             Perform a fillet on the specified edges of the given shape
05975 
05976             Parameters:
05977                 theShape  Wire Shape to perform fillet on.
05978                 theR  Fillet radius.
05979                 theListOfVertexes Global indices of vertexes to perform fillet on.
05980             Note:
05981                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
05982 
05983                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
05984 
05985             Returns: 
05986                 New GEOM.GEOM_Object, containing the result shape.
05987 
05988             Example of usage:  
05989                 # create wire
05990                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
05991                 # make fillet at given wire vertices with giver radius
05992                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
05993             """
05994             # Example: see GEOM_TestAll.py
05995             theR,Parameters = ParseParameters(theR)
05996             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes)
05997             RaiseIfFailed("MakeFillet1D", self.LocalOp)
05998             anObj.SetParameters(Parameters)
05999             return anObj
06000 
06001         ## Perform a fillet at the specified vertices of the given face/shell.
06002         #  @param theShape Face or Shell shape to perform fillet on.
06003         #  @param theR Fillet radius.
06004         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
06005         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
06006         #  @return New GEOM.GEOM_Object, containing the result shape.
06007         #
06008         #  @ref tui_fillet2d "Example"
06009         def MakeFillet2D(self, theShape, theR, theListOfVertexes):
06010             """
06011             Perform a fillet at the specified vertices of the given face/shell.
06012 
06013             Parameters:
06014                 theShape  Face or Shell shape to perform fillet on.
06015                 theR  Fillet radius.
06016                 theListOfVertexes Global indices of vertexes to perform fillet on.
06017             Note:
06018                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
06019 
06020             Returns: 
06021                 New GEOM.GEOM_Object, containing the result shape.
06022 
06023             Example of usage:
06024                 face = geompy.MakeFaceHW(100, 100, 1)
06025                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
06026             """
06027             # Example: see GEOM_TestAll.py
06028             theR,Parameters = ParseParameters(theR)
06029             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
06030             RaiseIfFailed("MakeFillet2D", self.LocalOp)
06031             anObj.SetParameters(Parameters)
06032             return anObj
06033 
06034         ## Perform a symmetric chamfer on all edges of the given shape.
06035         #  @param theShape Shape, to perform chamfer on.
06036         #  @param theD Chamfer size along each face.
06037         #  @return New GEOM.GEOM_Object, containing the result shape.
06038         #
06039         #  @ref tui_chamfer "Example 1"
06040         #  \n @ref swig_MakeChamferAll "Example 2"
06041         def MakeChamferAll(self,theShape, theD):
06042             """
06043             Perform a symmetric chamfer on all edges of the given shape.
06044 
06045             Parameters:
06046                 theShape Shape, to perform chamfer on.
06047                 theD Chamfer size along each face.
06048 
06049             Returns:     
06050                 New GEOM.GEOM_Object, containing the result shape.
06051 
06052             Example of usage:
06053                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
06054             """
06055             # Example: see GEOM_TestOthers.py
06056             theD,Parameters = ParseParameters(theD)
06057             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
06058             RaiseIfFailed("MakeChamferAll", self.LocalOp)
06059             anObj.SetParameters(Parameters)
06060             return anObj
06061 
06062         ## Perform a chamfer on edges, common to the specified faces,
06063         #  with distance D1 on the Face1
06064         #  @param theShape Shape, to perform chamfer on.
06065         #  @param theD1 Chamfer size along \a theFace1.
06066         #  @param theD2 Chamfer size along \a theFace2.
06067         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
06068         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
06069         #  @return New GEOM.GEOM_Object, containing the result shape.
06070         #
06071         #  @ref tui_chamfer "Example"
06072         def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2):
06073             """
06074             Perform a chamfer on edges, common to the specified faces,
06075             with distance D1 on the Face1
06076 
06077             Parameters:
06078                 theShape Shape, to perform chamfer on.
06079                 theD1 Chamfer size along theFace1.
06080                 theD2 Chamfer size along theFace2.
06081                 theFace1,theFace2 Global indices of two faces of theShape.
06082 
06083             Note:
06084                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
06085 
06086             Returns:      
06087                 New GEOM.GEOM_Object, containing the result shape.
06088 
06089             Example of usage:
06090                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
06091                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
06092                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
06093                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
06094             """
06095             # Example: see GEOM_TestAll.py
06096             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
06097             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
06098             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
06099             anObj.SetParameters(Parameters)
06100             return anObj
06101 
06102         ## Perform a chamfer on edges
06103         #  @param theShape Shape, to perform chamfer on.
06104         #  @param theD Chamfer length
06105         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
06106         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
06107         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
06108         #  @return New GEOM.GEOM_Object, containing the result shape.
06109         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
06110             """
06111             Perform a chamfer on edges
06112 
06113             Parameters:
06114                 theShape Shape, to perform chamfer on.
06115                 theD1 Chamfer size along theFace1.
06116                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
06117                 theFace1,theFace2 Global indices of two faces of theShape.
06118 
06119             Note:
06120                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
06121 
06122             Returns:      
06123                 New GEOM.GEOM_Object, containing the result shape.
06124 
06125             Example of usage:
06126                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
06127                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
06128                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
06129                 ang = 30
06130                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
06131             """
06132             flag = False
06133             if isinstance(theAngle,str):
06134                 flag = True
06135             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
06136             if flag:
06137                 theAngle = theAngle*math.pi/180.0
06138             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
06139             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
06140             anObj.SetParameters(Parameters)
06141             return anObj
06142 
06143         ## Perform a chamfer on all edges of the specified faces,
06144         #  with distance D1 on the first specified face (if several for one edge)
06145         #  @param theShape Shape, to perform chamfer on.
06146         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
06147         #               connected to the edge, are in \a theFaces, \a theD1
06148         #               will be get along face, which is nearer to \a theFaces beginning.
06149         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
06150         #  @param theFaces Sequence of global indices of faces of \a theShape.
06151         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
06152         #  @return New GEOM.GEOM_Object, containing the result shape.
06153         #
06154         #  @ref tui_chamfer "Example"
06155         def MakeChamferFaces(self,theShape, theD1, theD2, theFaces):
06156             """
06157             Perform a chamfer on all edges of the specified faces,
06158             with distance D1 on the first specified face (if several for one edge)
06159 
06160             Parameters:
06161                 theShape Shape, to perform chamfer on.
06162                 theD1 Chamfer size along face from  theFaces. If both faces,
06163                       connected to the edge, are in theFaces, theD1
06164                       will be get along face, which is nearer to theFaces beginning.
06165                 theD2 Chamfer size along another of two faces, connected to the edge.
06166                 theFaces Sequence of global indices of faces of theShape.
06167 
06168                 
06169             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
06170 
06171             Returns:  
06172                 New GEOM.GEOM_Object, containing the result shape.
06173             """
06174             # Example: see GEOM_TestAll.py
06175             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
06176             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
06177             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
06178             anObj.SetParameters(Parameters)
06179             return anObj
06180 
06181         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
06182         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
06183         #
06184         #  @ref swig_FilletChamfer "Example"
06185         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
06186             """
06187             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
06188             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
06189             """
06190             flag = False
06191             if isinstance(theAngle,str):
06192                 flag = True
06193             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
06194             if flag:
06195                 theAngle = theAngle*math.pi/180.0
06196             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
06197             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
06198             anObj.SetParameters(Parameters)
06199             return anObj
06200 
06201         ## Perform a chamfer on edges,
06202         #  with distance D1 on the first specified face (if several for one edge)
06203         #  @param theShape Shape, to perform chamfer on.
06204         #  @param theD1,theD2 Chamfer size
06205         #  @param theEdges Sequence of edges of \a theShape.
06206         #  @return New GEOM.GEOM_Object, containing the result shape.
06207         #
06208         #  @ref swig_FilletChamfer "Example"
06209         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
06210             """
06211             Perform a chamfer on edges,
06212             with distance D1 on the first specified face (if several for one edge)
06213             
06214             Parameters:
06215                 theShape Shape, to perform chamfer on.
06216                 theD1,theD2 Chamfer size
06217                 theEdges Sequence of edges of theShape.
06218 
06219             Returns:
06220                 New GEOM.GEOM_Object, containing the result shape.
06221             """
06222             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
06223             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
06224             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
06225             anObj.SetParameters(Parameters)
06226             return anObj
06227 
06228         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
06229         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
06230         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
06231             """
06232             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
06233             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
06234             """
06235             flag = False
06236             if isinstance(theAngle,str):
06237                 flag = True
06238             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
06239             if flag:
06240                 theAngle = theAngle*math.pi/180.0
06241             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
06242             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
06243             anObj.SetParameters(Parameters)
06244             return anObj
06245 
06246         ## /sa MakeChamferEdge() and MakeChamferFaces()
06247         #
06248         #  @ref swig_MakeChamfer "Example"
06249         def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
06250             """
06251             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
06252             """
06253             # Example: see GEOM_TestOthers.py
06254             anObj = None
06255             if aShapeType == ShapeType["EDGE"]:
06256                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1])
06257             else:
06258                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
06259             return anObj
06260             
06261         ## Remove material from a solid by extrusion of the base shape on the given distance.
06262         #  @param theInit Shape to remove material from. It must be a solid or 
06263         #  a compound made of a single solid.
06264         #  @param theBase Closed edge or wire defining the base shape to be extruded.
06265         #  @param theH Prism dimension along the normal to theBase
06266         #  @param theAngle Draft angle in degrees.
06267         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
06268         #
06269         #  @ref tui_creation_prism "Example"
06270         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle):
06271             """
06272             Add material to a solid by extrusion of the base shape on the given distance.
06273 
06274             Parameters:
06275                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
06276                 theBase Closed edge or wire defining the base shape to be extruded.
06277                 theH Prism dimension along the normal  to theBase
06278                 theAngle Draft angle in degrees.
06279 
06280             Returns:
06281                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
06282             """
06283             # Example: see GEOM_TestAll.py
06284             #theH,Parameters = ParseParameters(theH)
06285             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
06286             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
06287             #anObj.SetParameters(Parameters)
06288             return anObj   
06289             
06290         ## Add material to a solid by extrusion of the base shape on the given distance.
06291         #  @param theInit Shape to add material to. It must be a solid or 
06292         #  a compound made of a single solid.
06293         #  @param theBase Closed edge or wire defining the base shape to be extruded.
06294         #  @param theH Prism dimension along the normal to theBase
06295         #  @param theAngle Draft angle in degrees.
06296         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
06297         #
06298         #  @ref tui_creation_prism "Example"
06299         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle):
06300             """
06301             Add material to a solid by extrusion of the base shape on the given distance.
06302 
06303             Parameters:
06304                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
06305                 theBase Closed edge or wire defining the base shape to be extruded.
06306                 theH Prism dimension along the normal  to theBase
06307                 theAngle Draft angle in degrees.
06308 
06309             Returns:
06310                 New GEOM.GEOM_Object,  containing the initial shape with added material.
06311             """
06312             # Example: see GEOM_TestAll.py
06313             #theH,Parameters = ParseParameters(theH)
06314             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
06315             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
06316             #anObj.SetParameters(Parameters)
06317             return anObj   
06318 
06319         # end of l3_local
06320         ## @}
06321 
06322         ## @addtogroup l3_basic_op
06323         ## @{
06324 
06325         ## Perform an Archimde operation on the given shape with given parameters.
06326         #  The object presenting the resulting face is returned.
06327         #  @param theShape Shape to be put in water.
06328         #  @param theWeight Weight og the shape.
06329         #  @param theWaterDensity Density of the water.
06330         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
06331         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
06332         #          by a plane, corresponding to water level.
06333         #
06334         #  @ref tui_archimede "Example"
06335         def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection):
06336             """
06337             Perform an Archimde operation on the given shape with given parameters.
06338             The object presenting the resulting face is returned.
06339 
06340             Parameters: 
06341                 theShape Shape to be put in water.
06342                 theWeight Weight og the shape.
06343                 theWaterDensity Density of the water.
06344                 theMeshDeflection Deflection of the mesh, using to compute the section.
06345 
06346             Returns: 
06347                 New GEOM.GEOM_Object, containing a section of theShape
06348                 by a plane, corresponding to water level.
06349             """
06350             # Example: see GEOM_TestAll.py
06351             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
06352               theWeight,theWaterDensity,theMeshDeflection)
06353             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
06354             RaiseIfFailed("MakeArchimede", self.LocalOp)
06355             anObj.SetParameters(Parameters)
06356             return anObj
06357 
06358         # end of l3_basic_op
06359         ## @}
06360 
06361         ## @addtogroup l2_measure
06362         ## @{
06363 
06364         ## Get point coordinates
06365         #  @return [x, y, z]
06366         #
06367         #  @ref tui_measurement_tools_page "Example"
06368         def PointCoordinates(self,Point):
06369             """
06370             Get point coordinates
06371 
06372             Returns:
06373                 [x, y, z]
06374             """
06375             # Example: see GEOM_TestMeasures.py
06376             aTuple = self.MeasuOp.PointCoordinates(Point)
06377             RaiseIfFailed("PointCoordinates", self.MeasuOp)
06378             return aTuple
06379 
06380         ## Get summarized length of all wires,
06381         #  area of surface and volume of the given shape.
06382         #  @param theShape Shape to define properties of.
06383         #  @return [theLength, theSurfArea, theVolume]\n
06384         #  theLength:   Summarized length of all wires of the given shape.\n
06385         #  theSurfArea: Area of surface of the given shape.\n
06386         #  theVolume:   Volume of the given shape.
06387         #
06388         #  @ref tui_measurement_tools_page "Example"
06389         def BasicProperties(self,theShape):
06390             """
06391             Get summarized length of all wires,
06392             area of surface and volume of the given shape.
06393 
06394             Parameters: 
06395                 theShape Shape to define properties of.
06396 
06397             Returns:
06398                 [theLength, theSurfArea, theVolume]
06399                  theLength:   Summarized length of all wires of the given shape.
06400                  theSurfArea: Area of surface of the given shape.
06401                  theVolume:   Volume of the given shape.
06402             """
06403             # Example: see GEOM_TestMeasures.py
06404             aTuple = self.MeasuOp.GetBasicProperties(theShape)
06405             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
06406             return aTuple
06407 
06408         ## Get parameters of bounding box of the given shape
06409         #  @param theShape Shape to obtain bounding box of.
06410         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
06411         #  Xmin,Xmax: Limits of shape along OX axis.
06412         #  Ymin,Ymax: Limits of shape along OY axis.
06413         #  Zmin,Zmax: Limits of shape along OZ axis.
06414         #
06415         #  @ref tui_measurement_tools_page "Example"
06416         def BoundingBox(self,theShape):
06417             """
06418             Get parameters of bounding box of the given shape
06419 
06420             Parameters: 
06421                 theShape Shape to obtain bounding box of.
06422 
06423             Returns:
06424                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
06425                  Xmin,Xmax: Limits of shape along OX axis.
06426                  Ymin,Ymax: Limits of shape along OY axis.
06427                  Zmin,Zmax: Limits of shape along OZ axis.
06428             """
06429             # Example: see GEOM_TestMeasures.py
06430             aTuple = self.MeasuOp.GetBoundingBox(theShape)
06431             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
06432             return aTuple
06433 
06434         ## Get inertia matrix and moments of inertia of theShape.
06435         #  @param theShape Shape to calculate inertia of.
06436         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
06437         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
06438         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
06439         #
06440         #  @ref tui_measurement_tools_page "Example"
06441         def Inertia(self,theShape):
06442             """
06443             Get inertia matrix and moments of inertia of theShape.
06444 
06445             Parameters: 
06446                 theShape Shape to calculate inertia of.
06447 
06448             Returns:
06449                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
06450                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
06451                  Ix,Iy,Iz:    Moments of inertia of the given shape.
06452             """
06453             # Example: see GEOM_TestMeasures.py
06454             aTuple = self.MeasuOp.GetInertia(theShape)
06455             RaiseIfFailed("GetInertia", self.MeasuOp)
06456             return aTuple
06457 
06458         ## Get if coords are included in the shape (ST_IN or ST_ON)
06459         #  @param theShape Shape
06460         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
06461         #  @param tolerance to be used (default is 1.0e-7)
06462         #  @return list_of_boolean = [res1, res2, ...]
06463         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
06464             """
06465             Get if coords are included in the shape (ST_IN or ST_ON)
06466             
06467             Parameters: 
06468                 theShape Shape
06469                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
06470                 tolerance to be used (default is 1.0e-7)
06471 
06472             Returns:
06473                 list_of_boolean = [res1, res2, ...]
06474             """
06475             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
06476 
06477         ## Get minimal distance between the given shapes.
06478         #  @param theShape1,theShape2 Shapes to find minimal distance between.
06479         #  @return Value of the minimal distance between the given shapes.
06480         #
06481         #  @ref tui_measurement_tools_page "Example"
06482         def MinDistance(self, theShape1, theShape2):
06483             """
06484             Get minimal distance between the given shapes.
06485             
06486             Parameters: 
06487                 theShape1,theShape2 Shapes to find minimal distance between.
06488 
06489             Returns:    
06490                 Value of the minimal distance between the given shapes.
06491             """
06492             # Example: see GEOM_TestMeasures.py
06493             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
06494             RaiseIfFailed("GetMinDistance", self.MeasuOp)
06495             return aTuple[0]
06496 
06497         ## Get minimal distance between the given shapes.
06498         #  @param theShape1,theShape2 Shapes to find minimal distance between.
06499         #  @return Value of the minimal distance between the given shapes.
06500         #
06501         #  @ref swig_all_measure "Example"
06502         def MinDistanceComponents(self, theShape1, theShape2):
06503             """
06504             Get minimal distance between the given shapes.
06505 
06506             Parameters: 
06507                 theShape1,theShape2 Shapes to find minimal distance between.
06508 
06509             Returns:  
06510                 Value of the minimal distance between the given shapes.
06511             """
06512             # Example: see GEOM_TestMeasures.py
06513             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
06514             RaiseIfFailed("GetMinDistance", self.MeasuOp)
06515             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
06516             return aRes
06517 
06518         ## Get angle between the given shapes in degrees.
06519         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
06520         #  @note If both arguments are vectors, the angle is computed in accordance
06521         #        with their orientations, otherwise the minimum angle is computed.
06522         #  @return Value of the angle between the given shapes in degrees.
06523         #
06524         #  @ref tui_measurement_tools_page "Example"
06525         def GetAngle(self, theShape1, theShape2):
06526             """
06527             Get angle between the given shapes in degrees.
06528 
06529             Parameters: 
06530                 theShape1,theShape2 Lines or linear edges to find angle between.
06531 
06532             Note:
06533                 If both arguments are vectors, the angle is computed in accordance
06534                 with their orientations, otherwise the minimum angle is computed.
06535 
06536             Returns:  
06537                 Value of the angle between the given shapes in degrees.
06538             """
06539             # Example: see GEOM_TestMeasures.py
06540             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
06541             RaiseIfFailed("GetAngle", self.MeasuOp)
06542             return anAngle
06543 
06544         ## Get angle between the given shapes in radians.
06545         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
06546         #  @note If both arguments are vectors, the angle is computed in accordance
06547         #        with their orientations, otherwise the minimum angle is computed.
06548         #  @return Value of the angle between the given shapes in radians.
06549         #
06550         #  @ref tui_measurement_tools_page "Example"
06551         def GetAngleRadians(self, theShape1, theShape2):
06552             """
06553             Get angle between the given shapes in radians.
06554 
06555             Parameters: 
06556                 theShape1,theShape2 Lines or linear edges to find angle between.
06557 
06558                 
06559             Note:
06560                 If both arguments are vectors, the angle is computed in accordance
06561                 with their orientations, otherwise the minimum angle is computed.
06562 
06563             Returns:  
06564                 Value of the angle between the given shapes in radians.
06565             """
06566             # Example: see GEOM_TestMeasures.py
06567             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
06568             RaiseIfFailed("GetAngle", self.MeasuOp)
06569             return anAngle
06570 
06571         ## @name Curve Curvature Measurement
06572         #  Methods for receiving radius of curvature of curves
06573         #  in the given point
06574         ## @{
06575 
06576         ## Measure curvature of a curve at a point, set by parameter.
06577         #  @param theCurve a curve.
06578         #  @param theParam parameter.
06579         #  @return radius of curvature of \a theCurve.
06580         #
06581         #  @ref swig_todo "Example"
06582         def CurveCurvatureByParam(self, theCurve, theParam):
06583             """
06584             Measure curvature of a curve at a point, set by parameter.
06585 
06586             Parameters: 
06587                 theCurve a curve.
06588                 theParam parameter.
06589 
06590             Returns: 
06591                 radius of curvature of theCurve.
06592             """
06593             # Example: see GEOM_TestMeasures.py
06594             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
06595             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
06596             return aCurv
06597 
06598         ## Measure curvature of a curve at a point.
06599         #  @param theCurve a curve.
06600         #  @param thePoint given point.
06601         #  @return radius of curvature of \a theCurve.
06602         #
06603         #  @ref swig_todo "Example"
06604         def CurveCurvatureByPoint(self, theCurve, thePoint):
06605             """
06606             Measure curvature of a curve at a point.
06607 
06608             Parameters: 
06609                 theCurve a curve.
06610                 thePoint given point.
06611 
06612             Returns: 
06613                 radius of curvature of theCurve.           
06614             """
06615             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
06616             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
06617             return aCurv
06618         ## @}
06619 
06620         ## @name Surface Curvature Measurement
06621         #  Methods for receiving max and min radius of curvature of surfaces
06622         #  in the given point
06623         ## @{
06624 
06625         ## Measure max radius of curvature of surface.
06626         #  @param theSurf the given surface.
06627         #  @param theUParam Value of U-parameter on the referenced surface.
06628         #  @param theVParam Value of V-parameter on the referenced surface.
06629         #  @return max radius of curvature of theSurf.
06630         #
06631         ## @ref swig_todo "Example"
06632         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
06633             """
06634             Measure max radius of curvature of surface.
06635 
06636             Parameters: 
06637                 theSurf the given surface.
06638                 theUParam Value of U-parameter on the referenced surface.
06639                 theVParam Value of V-parameter on the referenced surface.
06640                 
06641             Returns:     
06642                 max radius of curvature of theSurf.
06643             """
06644             # Example: see GEOM_TestMeasures.py
06645             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
06646             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
06647             return aSurf
06648 
06649         ## Measure max radius of curvature of surface in the given point
06650         #  @param theSurf the given surface.
06651         #  @param thePoint given point.
06652         #  @return max radius of curvature of theSurf.
06653         #
06654         ## @ref swig_todo "Example"
06655         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
06656             """
06657             Measure max radius of curvature of surface in the given point.
06658 
06659             Parameters: 
06660                 theSurf the given surface.
06661                 thePoint given point.
06662                 
06663             Returns:     
06664                 max radius of curvature of theSurf.          
06665             """
06666             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
06667             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
06668             return aSurf
06669 
06670         ## Measure min radius of curvature of surface.
06671         #  @param theSurf the given surface.
06672         #  @param theUParam Value of U-parameter on the referenced surface.
06673         #  @param theVParam Value of V-parameter on the referenced surface.
06674         #  @return min radius of curvature of theSurf.
06675         #   
06676         ## @ref swig_todo "Example"
06677         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
06678             """
06679             Measure min radius of curvature of surface.
06680 
06681             Parameters: 
06682                 theSurf the given surface.
06683                 theUParam Value of U-parameter on the referenced surface.
06684                 theVParam Value of V-parameter on the referenced surface.
06685                 
06686             Returns:     
06687                 Min radius of curvature of theSurf.
06688             """
06689             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
06690             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
06691             return aSurf
06692 
06693         ## Measure min radius of curvature of surface in the given point
06694         #  @param theSurf the given surface.
06695         #  @param thePoint given point.
06696         #  @return min radius of curvature of theSurf.
06697         #
06698         ## @ref swig_todo "Example"
06699         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
06700             """
06701             Measure min radius of curvature of surface in the given point.
06702 
06703             Parameters: 
06704                 theSurf the given surface.
06705                 thePoint given point.
06706                 
06707             Returns:     
06708                 Min radius of curvature of theSurf.          
06709             """
06710             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
06711             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
06712             return aSurf
06713         ## @}
06714 
06715         ## Get min and max tolerances of sub-shapes of theShape
06716         #  @param theShape Shape, to get tolerances of.
06717         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
06718         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
06719         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
06720         #  VertMin,VertMax: Min and max tolerances of the vertices.
06721         #
06722         #  @ref tui_measurement_tools_page "Example"
06723         def Tolerance(self,theShape):
06724             """
06725             Get min and max tolerances of sub-shapes of theShape
06726 
06727             Parameters: 
06728                 theShape Shape, to get tolerances of.
06729 
06730             Returns:    
06731                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
06732                  FaceMin,FaceMax: Min and max tolerances of the faces.
06733                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
06734                  VertMin,VertMax: Min and max tolerances of the vertices.
06735             """
06736             # Example: see GEOM_TestMeasures.py
06737             aTuple = self.MeasuOp.GetTolerance(theShape)
06738             RaiseIfFailed("GetTolerance", self.MeasuOp)
06739             return aTuple
06740 
06741         ## Obtain description of the given shape (number of sub-shapes of each type)
06742         #  @param theShape Shape to be described.
06743         #  @return Description of the given shape.
06744         #
06745         #  @ref tui_measurement_tools_page "Example"
06746         def WhatIs(self,theShape):
06747             """
06748             Obtain description of the given shape (number of sub-shapes of each type)
06749 
06750             Parameters:
06751                 theShape Shape to be described.
06752 
06753             Returns:
06754                 Description of the given shape.
06755             """
06756             # Example: see GEOM_TestMeasures.py
06757             aDescr = self.MeasuOp.WhatIs(theShape)
06758             RaiseIfFailed("WhatIs", self.MeasuOp)
06759             return aDescr
06760 
06761         ## Obtain quantity of shapes of the given type in \a theShape.
06762         #  If \a theShape is of type \a theType, it is also counted.
06763         #  @param theShape Shape to be described.
06764         #  @param theType the given ShapeType().
06765         #  @return Quantity of shapes of type \a theType in \a theShape.
06766         #
06767         #  @ref tui_measurement_tools_page "Example"
06768         def NbShapes (self, theShape, theType):
06769             """
06770             Obtain quantity of shapes of the given type in theShape.
06771             If theShape is of type theType, it is also counted.
06772 
06773             Parameters:
06774                 theShape Shape to be described.
06775                 theType the given geompy.ShapeType
06776 
06777             Returns:
06778                 Quantity of shapes of type theType in theShape.
06779             """
06780             # Example: see GEOM_TestMeasures.py
06781             listSh = self.SubShapeAllIDs(theShape, theType)
06782             Nb = len(listSh)
06783             t       = EnumToLong(theShape.GetShapeType())
06784             theType = EnumToLong(theType)
06785             if t == theType:
06786                 Nb = Nb + 1
06787                 pass
06788             return Nb
06789 
06790         ## Obtain quantity of shapes of each type in \a theShape.
06791         #  The \a theShape is also counted.
06792         #  @param theShape Shape to be described.
06793         #  @return Dictionary of ShapeType() with bound quantities of shapes.
06794         #
06795         #  @ref tui_measurement_tools_page "Example"
06796         def ShapeInfo (self, theShape):
06797             """
06798             Obtain quantity of shapes of each type in theShape.
06799             The theShape is also counted.
06800 
06801             Parameters:
06802                 theShape Shape to be described.
06803 
06804             Returns:
06805                 Dictionary of geompy.ShapeType with bound quantities of shapes.
06806             """
06807             # Example: see GEOM_TestMeasures.py
06808             aDict = {}
06809             for typeSh in ShapeType:
06810                 if typeSh in ( "AUTO", "SHAPE" ): continue
06811                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
06812                 Nb = len(listSh)
06813                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
06814                     Nb = Nb + 1
06815                     pass
06816                 aDict[typeSh] = Nb
06817                 pass
06818             return aDict
06819 
06820         ## Get a point, situated at the centre of mass of theShape.
06821         #  @param theShape Shape to define centre of mass of.
06822         #  @return New GEOM.GEOM_Object, containing the created point.
06823         #
06824         #  @ref tui_measurement_tools_page "Example"
06825         def MakeCDG(self,theShape):
06826             """
06827             Get a point, situated at the centre of mass of theShape.
06828 
06829             Parameters:
06830                 theShape Shape to define centre of mass of.
06831 
06832             Returns:
06833                 New GEOM.GEOM_Object, containing the created point.
06834             """
06835             # Example: see GEOM_TestMeasures.py
06836             anObj = self.MeasuOp.GetCentreOfMass(theShape)
06837             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
06838             return anObj
06839 
06840         ## Get a vertex sub-shape by index depended with orientation.
06841         #  @param theShape Shape to find sub-shape.
06842         #  @param theIndex Index to find vertex by this index (starting from zero)
06843         #  @return New GEOM.GEOM_Object, containing the created vertex.
06844         #
06845         #  @ref tui_measurement_tools_page "Example"
06846         def GetVertexByIndex(self,theShape, theIndex):
06847             """
06848             Get a vertex sub-shape by index depended with orientation.
06849 
06850             Parameters:
06851                 theShape Shape to find sub-shape.
06852                 theIndex Index to find vertex by this index (starting from zero)
06853 
06854             Returns:
06855                 New GEOM.GEOM_Object, containing the created vertex.
06856             """
06857             # Example: see GEOM_TestMeasures.py
06858             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
06859             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
06860             return anObj
06861 
06862         ## Get the first vertex of wire/edge depended orientation.
06863         #  @param theShape Shape to find first vertex.
06864         #  @return New GEOM.GEOM_Object, containing the created vertex.
06865         #
06866         #  @ref tui_measurement_tools_page "Example"
06867         def GetFirstVertex(self,theShape):
06868             """
06869             Get the first vertex of wire/edge depended orientation.
06870 
06871             Parameters:
06872                 theShape Shape to find first vertex.
06873 
06874             Returns:    
06875                 New GEOM.GEOM_Object, containing the created vertex.
06876             """
06877             # Example: see GEOM_TestMeasures.py
06878             anObj = self.GetVertexByIndex(theShape, 0)
06879             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
06880             return anObj
06881 
06882         ## Get the last vertex of wire/edge depended orientation.
06883         #  @param theShape Shape to find last vertex.
06884         #  @return New GEOM.GEOM_Object, containing the created vertex.
06885         #
06886         #  @ref tui_measurement_tools_page "Example"
06887         def GetLastVertex(self,theShape):
06888             """
06889             Get the last vertex of wire/edge depended orientation.
06890 
06891             Parameters: 
06892                 theShape Shape to find last vertex.
06893 
06894             Returns:   
06895                 New GEOM.GEOM_Object, containing the created vertex.
06896             """
06897             # Example: see GEOM_TestMeasures.py
06898             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
06899             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
06900             RaiseIfFailed("GetLastVertex", self.MeasuOp)
06901             return anObj
06902 
06903         ## Get a normale to the given face. If the point is not given,
06904         #  the normale is calculated at the center of mass.
06905         #  @param theFace Face to define normale of.
06906         #  @param theOptionalPoint Point to compute the normale at.
06907         #  @return New GEOM.GEOM_Object, containing the created vector.
06908         #
06909         #  @ref swig_todo "Example"
06910         def GetNormal(self, theFace, theOptionalPoint = None):
06911             """
06912             Get a normale to the given face. If the point is not given,
06913             the normale is calculated at the center of mass.
06914             
06915             Parameters: 
06916                 theFace Face to define normale of.
06917                 theOptionalPoint Point to compute the normale at.
06918 
06919             Returns:   
06920                 New GEOM.GEOM_Object, containing the created vector.
06921             """
06922             # Example: see GEOM_TestMeasures.py
06923             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
06924             RaiseIfFailed("GetNormal", self.MeasuOp)
06925             return anObj
06926 
06927         ## Check a topology of the given shape.
06928         #  @param theShape Shape to check validity of.
06929         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
06930         #                        if TRUE, the shape's geometry will be checked also.
06931         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
06932         #                        of problem is printed.
06933         #                        if TRUE and if theShape is invalid, the description 
06934         #                        of problem is also returned.
06935         #  @return TRUE, if the shape "seems to be valid".
06936         #
06937         #  @ref tui_measurement_tools_page "Example"
06938         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
06939             """
06940             Check a topology of the given shape.
06941 
06942             Parameters: 
06943                 theShape Shape to check validity of.
06944                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
06945                                if TRUE, the shape's geometry will be checked also.
06946                 theReturnStatus If FALSE and if theShape is invalid, a description
06947                                 of problem is printed.
06948                                 if TRUE and if theShape is invalid, the description 
06949                                 of problem is returned.
06950 
06951             Returns:   
06952                 TRUE, if the shape "seems to be valid".
06953                 If theShape is invalid, prints a description of problem.
06954                 This description can also be returned.
06955             """
06956             # Example: see GEOM_TestMeasures.py
06957             if theIsCheckGeom:
06958                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
06959                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
06960             else:
06961                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
06962                 RaiseIfFailed("CheckShape", self.MeasuOp)
06963             if IsValid == 0:
06964                 if theReturnStatus == 0:
06965                     print Status
06966             if theReturnStatus == 1:
06967               return (IsValid, Status)
06968             return IsValid
06969 
06970         ## Detect self-intersections in the given shape.
06971         #  @param theShape Shape to check.
06972         #  @return TRUE, if the shape contains no self-intersections.
06973         #
06974         #  @ref tui_measurement_tools_page "Example"
06975         def CheckSelfIntersections(self, theShape):
06976             """
06977             Detect self-intersections in the given shape.
06978 
06979             Parameters: 
06980                 theShape Shape to check.
06981 
06982             Returns:   
06983                 TRUE, if the shape contains no self-intersections.
06984             """
06985             # Example: see GEOM_TestMeasures.py
06986             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
06987             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
06988             return IsValid
06989 
06990         ## Get position (LCS) of theShape.
06991         #
06992         #  Origin of the LCS is situated at the shape's center of mass.
06993         #  Axes of the LCS are obtained from shape's location or,
06994         #  if the shape is a planar face, from position of its plane.
06995         #
06996         #  @param theShape Shape to calculate position of.
06997         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
06998         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
06999         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
07000         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
07001         #
07002         #  @ref swig_todo "Example"
07003         def GetPosition(self,theShape):
07004             """
07005             Get position (LCS) of theShape.
07006             Origin of the LCS is situated at the shape's center of mass.
07007             Axes of the LCS are obtained from shape's location or,
07008             if the shape is a planar face, from position of its plane.
07009 
07010             Parameters: 
07011                 theShape Shape to calculate position of.
07012 
07013             Returns:  
07014                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
07015                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
07016                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
07017                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
07018             """
07019             # Example: see GEOM_TestMeasures.py
07020             aTuple = self.MeasuOp.GetPosition(theShape)
07021             RaiseIfFailed("GetPosition", self.MeasuOp)
07022             return aTuple
07023 
07024         ## Get kind of theShape.
07025         #
07026         #  @param theShape Shape to get a kind of.
07027         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
07028         #          and a list of parameters, describing the shape.
07029         #  @note  Concrete meaning of each value, returned via \a theIntegers
07030         #         or \a theDoubles list depends on the kind() of the shape.
07031         #
07032         #  @ref swig_todo "Example"
07033         def KindOfShape(self,theShape):
07034             """
07035             Get kind of theShape.
07036          
07037             Parameters: 
07038                 theShape Shape to get a kind of.
07039 
07040             Returns:
07041                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
07042                     and a list of parameters, describing the shape.
07043             Note:
07044                 Concrete meaning of each value, returned via theIntegers
07045                 or theDoubles list depends on the geompy.kind of the shape
07046             """
07047             # Example: see GEOM_TestMeasures.py
07048             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
07049             RaiseIfFailed("KindOfShape", self.MeasuOp)
07050 
07051             aKind  = aRoughTuple[0]
07052             anInts = aRoughTuple[1]
07053             aDbls  = aRoughTuple[2]
07054 
07055             # Now there is no exception from this rule:
07056             aKindTuple = [aKind] + aDbls + anInts
07057 
07058             # If they are we will regroup parameters for such kind of shape.
07059             # For example:
07060             #if aKind == kind.SOME_KIND:
07061             #    #  SOME_KIND     int int double int double double
07062             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
07063 
07064             return aKindTuple
07065 
07066         # end of l2_measure
07067         ## @}
07068 
07069         ## @addtogroup l2_import_export
07070         ## @{
07071 
07072         ## Import a shape from the BREP or IGES or STEP file
07073         #  (depends on given format) with given name.
07074         #  @param theFileName The file, containing the shape.
07075         #  @param theFormatName Specify format for the file reading.
07076         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
07077         #         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
07078         #         set to 'meter' and result model will be scaled.
07079         #  @return New GEOM.GEOM_Object, containing the imported shape.
07080         #
07081         #  @ref swig_Import_Export "Example"
07082         def ImportFile(self,theFileName, theFormatName):
07083             """
07084             Import a shape from the BREP or IGES or STEP file
07085             (depends on given format) with given name.
07086 
07087             Parameters: 
07088                 theFileName The file, containing the shape.
07089                 theFormatName Specify format for the file reading.
07090                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
07091                               If format 'IGES_SCALE' is used instead 'IGES' length unit will be
07092                               set to 'meter' and result model will be scaled.
07093 
07094             Returns:
07095                 New GEOM.GEOM_Object, containing the imported shape.
07096             """
07097             # Example: see GEOM_TestOthers.py
07098             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
07099             RaiseIfFailed("Import", self.InsertOp)
07100             return anObj
07101 
07102         ## Deprecated analog of ImportFile()
07103         def Import(self,theFileName, theFormatName):
07104             """
07105             Deprecated analog of geompy.ImportFile
07106             """
07107             print "WARNING: Function Import is deprecated, use ImportFile instead"
07108             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
07109             RaiseIfFailed("Import", self.InsertOp)
07110             return anObj
07111 
07112         ## Shortcut to ImportFile() for BREP format
07113         #
07114         #  @ref swig_Import_Export "Example"
07115         def ImportBREP(self,theFileName):
07116             """
07117             geompy.ImportFile(...) function for BREP format
07118             """
07119             # Example: see GEOM_TestOthers.py
07120             return self.ImportFile(theFileName, "BREP")
07121 
07122         ## Shortcut to ImportFile() for IGES format
07123         #
07124         #  @ref swig_Import_Export "Example"
07125         def ImportIGES(self,theFileName):
07126             """
07127             geompy.ImportFile(...) function for IGES format
07128             """
07129             # Example: see GEOM_TestOthers.py
07130             return self.ImportFile(theFileName, "IGES")
07131 
07132         ## Return length unit from given IGES file
07133         #
07134         #  @ref swig_Import_Export "Example"
07135         def GetIGESUnit(self,theFileName):
07136             """
07137             Return length unit from given IGES file
07138             """
07139             # Example: see GEOM_TestOthers.py
07140             anObj = self.InsertOp.ImportFile(theFileName, "IGES_UNIT")
07141             #RaiseIfFailed("Import", self.InsertOp)
07142             # recieve name using returned vertex
07143             UnitName = "M"
07144             if anObj.GetShapeType() == GEOM.VERTEX:
07145                 vertices = [anObj]
07146             else:
07147                 vertices = self.SubShapeAll(anObj,ShapeType["VERTEX"])
07148             if len(vertices)>0:
07149                 p = self.PointCoordinates(vertices[0])
07150                 if abs(p[0]-0.01) < 1.e-6:
07151                     UnitName = "CM"
07152                 elif abs(p[0]-0.001) < 1.e-6:
07153                     UnitName = "MM"
07154             return UnitName
07155 
07156         ## Shortcut to ImportFile() for STEP format
07157         #
07158         #  @ref swig_Import_Export "Example"
07159         def ImportSTEP(self,theFileName):
07160             """
07161             geompy.ImportFile(...) function for STEP format
07162             """
07163             # Example: see GEOM_TestOthers.py
07164             return self.ImportFile(theFileName, "STEP")
07165 
07166         ## Export the given shape into a file with given name.
07167         #  @param theObject Shape to be stored in the file.
07168         #  @param theFileName Name of the file to store the given shape in.
07169         #  @param theFormatName Specify format for the shape storage.
07170         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
07171         #
07172         #  @ref swig_Import_Export "Example"
07173         def Export(self,theObject, theFileName, theFormatName):
07174             """
07175             Export the given shape into a file with given name.
07176 
07177             Parameters: 
07178                 theObject Shape to be stored in the file.
07179                 theFileName Name of the file to store the given shape in.
07180                 theFormatName Specify format for the shape storage.
07181                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
07182             """
07183             # Example: see GEOM_TestOthers.py
07184             self.InsertOp.Export(theObject, theFileName, theFormatName)
07185             if self.InsertOp.IsDone() == 0:
07186                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
07187                 pass
07188             pass
07189 
07190         ## Shortcut to Export() for BREP format
07191         #
07192         #  @ref swig_Import_Export "Example"
07193         def ExportBREP(self,theObject, theFileName):
07194             """
07195             geompy.Export(...) function for BREP format
07196             """
07197             # Example: see GEOM_TestOthers.py
07198             return self.Export(theObject, theFileName, "BREP")
07199 
07200         ## Shortcut to Export() for IGES format
07201         #
07202         #  @ref swig_Import_Export "Example"
07203         def ExportIGES(self,theObject, theFileName):
07204             """
07205             geompy.Export(...) function for IGES format
07206             """
07207             # Example: see GEOM_TestOthers.py
07208             return self.Export(theObject, theFileName, "IGES")
07209 
07210         ## Shortcut to Export() for STEP format
07211         #
07212         #  @ref swig_Import_Export "Example"
07213         def ExportSTEP(self,theObject, theFileName):
07214             """
07215             geompy.Export(...) function for STEP format
07216             """
07217             # Example: see GEOM_TestOthers.py
07218             return self.Export(theObject, theFileName, "STEP")
07219 
07220         # end of l2_import_export
07221         ## @}
07222 
07223         ## @addtogroup l3_blocks
07224         ## @{
07225 
07226         ## Create a quadrangle face from four edges. Order of Edges is not
07227         #  important. It is  not necessary that edges share the same vertex.
07228         #  @param E1,E2,E3,E4 Edges for the face bound.
07229         #  @return New GEOM.GEOM_Object, containing the created face.
07230         #
07231         #  @ref tui_building_by_blocks_page "Example"
07232         def MakeQuad(self,E1, E2, E3, E4):
07233             """
07234             Create a quadrangle face from four edges. Order of Edges is not
07235             important. It is  not necessary that edges share the same vertex.
07236 
07237             Parameters: 
07238                 E1,E2,E3,E4 Edges for the face bound.
07239 
07240             Returns: 
07241                 New GEOM.GEOM_Object, containing the created face.
07242 
07243             Example of usage:               
07244                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
07245             """
07246             # Example: see GEOM_Spanner.py
07247             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
07248             RaiseIfFailed("MakeQuad", self.BlocksOp)
07249             return anObj
07250 
07251         ## Create a quadrangle face on two edges.
07252         #  The missing edges will be built by creating the shortest ones.
07253         #  @param E1,E2 Two opposite edges for the face.
07254         #  @return New GEOM.GEOM_Object, containing the created face.
07255         #
07256         #  @ref tui_building_by_blocks_page "Example"
07257         def MakeQuad2Edges(self,E1, E2):
07258             """
07259             Create a quadrangle face on two edges.
07260             The missing edges will be built by creating the shortest ones.
07261 
07262             Parameters: 
07263                 E1,E2 Two opposite edges for the face.
07264 
07265             Returns: 
07266                 New GEOM.GEOM_Object, containing the created face.
07267             
07268             Example of usage:
07269                 # create vertices
07270                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
07271                 p2 = geompy.MakeVertex(150.,  30.,   0.)
07272                 p3 = geompy.MakeVertex(  0., 120.,  50.)
07273                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
07274                 # create edges
07275                 edge1 = geompy.MakeEdge(p1, p2)
07276                 edge2 = geompy.MakeEdge(p3, p4)
07277                 # create a quadrangle face from two edges
07278                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
07279             """
07280             # Example: see GEOM_Spanner.py
07281             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
07282             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
07283             return anObj
07284 
07285         ## Create a quadrangle face with specified corners.
07286         #  The missing edges will be built by creating the shortest ones.
07287         #  @param V1,V2,V3,V4 Corner vertices for the face.
07288         #  @return New GEOM.GEOM_Object, containing the created face.
07289         #
07290         #  @ref tui_building_by_blocks_page "Example 1"
07291         #  \n @ref swig_MakeQuad4Vertices "Example 2"
07292         def MakeQuad4Vertices(self,V1, V2, V3, V4):
07293             """
07294             Create a quadrangle face with specified corners.
07295             The missing edges will be built by creating the shortest ones.
07296 
07297             Parameters: 
07298                 V1,V2,V3,V4 Corner vertices for the face.
07299 
07300             Returns: 
07301                 New GEOM.GEOM_Object, containing the created face.
07302 
07303             Example of usage:
07304                 # create vertices
07305                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
07306                 p2 = geompy.MakeVertex(150.,  30.,   0.)
07307                 p3 = geompy.MakeVertex(  0., 120.,  50.)
07308                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
07309                 # create a quadrangle from four points in its corners
07310                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
07311             """
07312             # Example: see GEOM_Spanner.py
07313             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
07314             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
07315             return anObj
07316 
07317         ## Create a hexahedral solid, bounded by the six given faces. Order of
07318         #  faces is not important. It is  not necessary that Faces share the same edge.
07319         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
07320         #  @return New GEOM.GEOM_Object, containing the created solid.
07321         #
07322         #  @ref tui_building_by_blocks_page "Example 1"
07323         #  \n @ref swig_MakeHexa "Example 2"
07324         def MakeHexa(self,F1, F2, F3, F4, F5, F6):
07325             """
07326             Create a hexahedral solid, bounded by the six given faces. Order of
07327             faces is not important. It is  not necessary that Faces share the same edge.
07328 
07329             Parameters: 
07330                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
07331 
07332             Returns:    
07333                 New GEOM.GEOM_Object, containing the created solid.
07334 
07335             Example of usage:
07336                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
07337             """
07338             # Example: see GEOM_Spanner.py
07339             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
07340             RaiseIfFailed("MakeHexa", self.BlocksOp)
07341             return anObj
07342 
07343         ## Create a hexahedral solid between two given faces.
07344         #  The missing faces will be built by creating the smallest ones.
07345         #  @param F1,F2 Two opposite faces for the hexahedral solid.
07346         #  @return New GEOM.GEOM_Object, containing the created solid.
07347         #
07348         #  @ref tui_building_by_blocks_page "Example 1"
07349         #  \n @ref swig_MakeHexa2Faces "Example 2"
07350         def MakeHexa2Faces(self,F1, F2):
07351             """
07352             Create a hexahedral solid between two given faces.
07353             The missing faces will be built by creating the smallest ones.
07354 
07355             Parameters: 
07356                 F1,F2 Two opposite faces for the hexahedral solid.
07357 
07358             Returns:
07359                 New GEOM.GEOM_Object, containing the created solid.
07360 
07361             Example of usage:
07362                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
07363             """
07364             # Example: see GEOM_Spanner.py
07365             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
07366             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
07367             return anObj
07368 
07369         # end of l3_blocks
07370         ## @}
07371 
07372         ## @addtogroup l3_blocks_op
07373         ## @{
07374 
07375         ## Get a vertex, found in the given shape by its coordinates.
07376         #  @param theShape Block or a compound of blocks.
07377         #  @param theX,theY,theZ Coordinates of the sought vertex.
07378         #  @param theEpsilon Maximum allowed distance between the resulting
07379         #                    vertex and point with the given coordinates.
07380         #  @return New GEOM.GEOM_Object, containing the found vertex.
07381         #
07382         #  @ref swig_GetPoint "Example"
07383         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon):
07384             """
07385             Get a vertex, found in the given shape by its coordinates.
07386 
07387             Parameters: 
07388                 theShape Block or a compound of blocks.
07389                 theX,theY,theZ Coordinates of the sought vertex.
07390                 theEpsilon Maximum allowed distance between the resulting
07391                            vertex and point with the given coordinates.
07392 
07393             Returns:                  
07394                 New GEOM.GEOM_Object, containing the found vertex.
07395 
07396             Example of usage:
07397                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
07398             """
07399             # Example: see GEOM_TestOthers.py
07400             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
07401             RaiseIfFailed("GetPoint", self.BlocksOp)
07402             return anObj
07403 
07404         ## Find a vertex of the given shape, which has minimal distance to the given point.
07405         #  @param theShape Any shape.
07406         #  @param thePoint Point, close to the desired vertex.
07407         #  @return New GEOM.GEOM_Object, containing the found vertex.
07408         #
07409         #  @ref swig_GetVertexNearPoint "Example"
07410         def GetVertexNearPoint(self, theShape, thePoint):
07411             """
07412             Find a vertex of the given shape, which has minimal distance to the given point.
07413 
07414             Parameters: 
07415                 theShape Any shape.
07416                 thePoint Point, close to the desired vertex.
07417 
07418             Returns:
07419                 New GEOM.GEOM_Object, containing the found vertex.
07420 
07421             Example of usage:
07422                 pmidle = geompy.MakeVertex(50, 0, 50)
07423                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
07424             """
07425             # Example: see GEOM_TestOthers.py
07426             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
07427             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
07428             return anObj
07429 
07430         ## Get an edge, found in the given shape by two given vertices.
07431         #  @param theShape Block or a compound of blocks.
07432         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
07433         #  @return New GEOM.GEOM_Object, containing the found edge.
07434         #
07435         #  @ref swig_GetEdge "Example"
07436         def GetEdge(self, theShape, thePoint1, thePoint2):
07437             """
07438             Get an edge, found in the given shape by two given vertices.
07439 
07440             Parameters: 
07441                 theShape Block or a compound of blocks.
07442                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
07443 
07444             Returns:
07445                 New GEOM.GEOM_Object, containing the found edge.
07446             """
07447             # Example: see GEOM_Spanner.py
07448             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
07449             RaiseIfFailed("GetEdge", self.BlocksOp)
07450             return anObj
07451 
07452         ## Find an edge of the given shape, which has minimal distance to the given point.
07453         #  @param theShape Block or a compound of blocks.
07454         #  @param thePoint Point, close to the desired edge.
07455         #  @return New GEOM.GEOM_Object, containing the found edge.
07456         #
07457         #  @ref swig_GetEdgeNearPoint "Example"
07458         def GetEdgeNearPoint(self, theShape, thePoint):
07459             """
07460             Find an edge of the given shape, which has minimal distance to the given point.
07461 
07462             Parameters: 
07463                 theShape Block or a compound of blocks.
07464                 thePoint Point, close to the desired edge.
07465 
07466             Returns:
07467                 New GEOM.GEOM_Object, containing the found edge.
07468             """
07469             # Example: see GEOM_TestOthers.py
07470             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
07471             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
07472             return anObj
07473 
07474         ## Returns a face, found in the given shape by four given corner vertices.
07475         #  @param theShape Block or a compound of blocks.
07476         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
07477         #  @return New GEOM.GEOM_Object, containing the found face.
07478         #
07479         #  @ref swig_todo "Example"
07480         def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
07481             """
07482             Returns a face, found in the given shape by four given corner vertices.
07483 
07484             Parameters:
07485                 theShape Block or a compound of blocks.
07486                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
07487 
07488             Returns:
07489                 New GEOM.GEOM_Object, containing the found face.
07490             """
07491             # Example: see GEOM_Spanner.py
07492             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
07493             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
07494             return anObj
07495 
07496         ## Get a face of block, found in the given shape by two given edges.
07497         #  @param theShape Block or a compound of blocks.
07498         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
07499         #  @return New GEOM.GEOM_Object, containing the found face.
07500         #
07501         #  @ref swig_todo "Example"
07502         def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
07503             """
07504             Get a face of block, found in the given shape by two given edges.
07505 
07506             Parameters:
07507                 theShape Block or a compound of blocks.
07508                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
07509 
07510             Returns:
07511                 New GEOM.GEOM_Object, containing the found face.
07512             """
07513             # Example: see GEOM_Spanner.py
07514             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
07515             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
07516             return anObj
07517 
07518         ## Find a face, opposite to the given one in the given block.
07519         #  @param theBlock Must be a hexahedral solid.
07520         #  @param theFace Face of \a theBlock, opposite to the desired face.
07521         #  @return New GEOM.GEOM_Object, containing the found face.
07522         #
07523         #  @ref swig_GetOppositeFace "Example"
07524         def GetOppositeFace(self,theBlock, theFace):
07525             """
07526             Find a face, opposite to the given one in the given block.
07527 
07528             Parameters:
07529                 theBlock Must be a hexahedral solid.
07530                 theFace Face of theBlock, opposite to the desired face.
07531 
07532             Returns: 
07533                 New GEOM.GEOM_Object, containing the found face.
07534             """
07535             # Example: see GEOM_Spanner.py
07536             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
07537             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
07538             return anObj
07539 
07540         ## Find a face of the given shape, which has minimal distance to the given point.
07541         #  @param theShape Block or a compound of blocks.
07542         #  @param thePoint Point, close to the desired face.
07543         #  @return New GEOM.GEOM_Object, containing the found face.
07544         #
07545         #  @ref swig_GetFaceNearPoint "Example"
07546         def GetFaceNearPoint(self, theShape, thePoint):
07547             """
07548             Find a face of the given shape, which has minimal distance to the given point.
07549 
07550             Parameters:
07551                 theShape Block or a compound of blocks.
07552                 thePoint Point, close to the desired face.
07553 
07554             Returns:
07555                 New GEOM.GEOM_Object, containing the found face.
07556             """
07557             # Example: see GEOM_Spanner.py
07558             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
07559             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
07560             return anObj
07561 
07562         ## Find a face of block, whose outside normale has minimal angle with the given vector.
07563         #  @param theBlock Block or a compound of blocks.
07564         #  @param theVector Vector, close to the normale of the desired face.
07565         #  @return New GEOM.GEOM_Object, containing the found face.
07566         #
07567         #  @ref swig_todo "Example"
07568         def GetFaceByNormale(self, theBlock, theVector):
07569             """
07570             Find a face of block, whose outside normale has minimal angle with the given vector.
07571 
07572             Parameters:
07573                 theBlock Block or a compound of blocks.
07574                 theVector Vector, close to the normale of the desired face.
07575 
07576             Returns:
07577                 New GEOM.GEOM_Object, containing the found face.
07578             """
07579             # Example: see GEOM_Spanner.py
07580             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
07581             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
07582             return anObj
07583 
07584         ## Find all sub-shapes of type \a theShapeType of the given shape,
07585         #  which have minimal distance to the given point.
07586         #  @param theShape Any shape.
07587         #  @param thePoint Point, close to the desired shape.
07588         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
07589         #  @param theTolerance The tolerance for distances comparison. All shapes
07590         #                      with distances to the given point in interval
07591         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
07592         #  @return New GEOM_Object, containing a group of all found shapes.
07593         #
07594         #  @ref swig_GetShapesNearPoint "Example"
07595         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07):
07596             """
07597             Find all sub-shapes of type theShapeType of the given shape,
07598             which have minimal distance to the given point.
07599 
07600             Parameters:
07601                 theShape Any shape.
07602                 thePoint Point, close to the desired shape.
07603                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
07604                 theTolerance The tolerance for distances comparison. All shapes
07605                                 with distances to the given point in interval
07606                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
07607 
07608             Returns:
07609                 New GEOM_Object, containing a group of all found shapes.
07610             """
07611             # Example: see GEOM_TestOthers.py
07612             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
07613             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
07614             return anObj
07615 
07616         # end of l3_blocks_op
07617         ## @}
07618 
07619         ## @addtogroup l4_blocks_measure
07620         ## @{
07621 
07622         ## Check, if the compound of blocks is given.
07623         #  To be considered as a compound of blocks, the
07624         #  given shape must satisfy the following conditions:
07625         #  - Each element of the compound should be a Block (6 faces and 12 edges).
07626         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
07627         #  - The compound should be connexe.
07628         #  - The glue between two quadrangle faces should be applied.
07629         #  @param theCompound The compound to check.
07630         #  @return TRUE, if the given shape is a compound of blocks.
07631         #  If theCompound is not valid, prints all discovered errors.
07632         #
07633         #  @ref tui_measurement_tools_page "Example 1"
07634         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
07635         def CheckCompoundOfBlocks(self,theCompound):
07636             """
07637             Check, if the compound of blocks is given.
07638             To be considered as a compound of blocks, the
07639             given shape must satisfy the following conditions:
07640             - Each element of the compound should be a Block (6 faces and 12 edges).
07641             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
07642             - The compound should be connexe.
07643             - The glue between two quadrangle faces should be applied.
07644 
07645             Parameters:
07646                 theCompound The compound to check.
07647 
07648             Returns:
07649                 TRUE, if the given shape is a compound of blocks.
07650                 If theCompound is not valid, prints all discovered errors.            
07651             """
07652             # Example: see GEOM_Spanner.py
07653             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
07654             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
07655             if IsValid == 0:
07656                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
07657                 print Descr
07658             return IsValid
07659 
07660         ## Remove all seam and degenerated edges from \a theShape.
07661         #  Unite faces and edges, sharing one surface. It means that
07662         #  this faces must have references to one C++ surface object (handle).
07663         #  @param theShape The compound or single solid to remove irregular edges from.
07664         #  @param doUnionFaces If True, then unite faces. If False (the default value),
07665         #         do not unite faces.
07666         #  @return Improved shape.
07667         #
07668         #  @ref swig_RemoveExtraEdges "Example"
07669         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
07670             """
07671             Remove all seam and degenerated edges from theShape.
07672             Unite faces and edges, sharing one surface. It means that
07673             this faces must have references to one C++ surface object (handle).
07674 
07675             Parameters:
07676                 theShape The compound or single solid to remove irregular edges from.
07677                 doUnionFaces If True, then unite faces. If False (the default value),
07678                              do not unite faces.
07679 
07680             Returns: 
07681                 Improved shape.
07682             """
07683             # Example: see GEOM_TestOthers.py
07684             nbFacesOptimum = -1 # -1 means do not unite faces
07685             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
07686             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
07687             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
07688             return anObj
07689 
07690         ## Check, if the given shape is a blocks compound.
07691         #  Fix all detected errors.
07692         #    \note Single block can be also fixed by this method.
07693         #  @param theShape The compound to check and improve.
07694         #  @return Improved compound.
07695         #
07696         #  @ref swig_CheckAndImprove "Example"
07697         def CheckAndImprove(self,theShape):
07698             """
07699             Check, if the given shape is a blocks compound.
07700             Fix all detected errors.
07701 
07702             Note:
07703                 Single block can be also fixed by this method.
07704 
07705             Parameters:
07706                 theShape The compound to check and improve.
07707 
07708             Returns: 
07709                 Improved compound.
07710             """
07711             # Example: see GEOM_TestOthers.py
07712             anObj = self.BlocksOp.CheckAndImprove(theShape)
07713             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
07714             return anObj
07715 
07716         # end of l4_blocks_measure
07717         ## @}
07718 
07719         ## @addtogroup l3_blocks_op
07720         ## @{
07721 
07722         ## Get all the blocks, contained in the given compound.
07723         #  @param theCompound The compound to explode.
07724         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
07725         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
07726         #    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
07727         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
07728         #
07729         #  @ref tui_explode_on_blocks "Example 1"
07730         #  \n @ref swig_MakeBlockExplode "Example 2"
07731         def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
07732             """
07733             Get all the blocks, contained in the given compound.
07734 
07735             Parameters:
07736                 theCompound The compound to explode.
07737                 theMinNbFaces If solid has lower number of faces, it is not a block.
07738                 theMaxNbFaces If solid has higher number of faces, it is not a block.
07739 
07740             Note:
07741                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
07742 
07743             Returns:  
07744                 List of GEOM.GEOM_Object, containing the retrieved blocks.
07745             """
07746             # Example: see GEOM_TestOthers.py
07747             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
07748             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
07749             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
07750             for anObj in aList:
07751                 anObj.SetParameters(Parameters)
07752                 pass
07753             return aList
07754 
07755         ## Find block, containing the given point inside its volume or on boundary.
07756         #  @param theCompound Compound, to find block in.
07757         #  @param thePoint Point, close to the desired block. If the point lays on
07758         #         boundary between some blocks, we return block with nearest center.
07759         #  @return New GEOM.GEOM_Object, containing the found block.
07760         #
07761         #  @ref swig_todo "Example"
07762         def GetBlockNearPoint(self,theCompound, thePoint):
07763             """
07764             Find block, containing the given point inside its volume or on boundary.
07765 
07766             Parameters:
07767                 theCompound Compound, to find block in.
07768                 thePoint Point, close to the desired block. If the point lays on
07769                          boundary between some blocks, we return block with nearest center.
07770 
07771             Returns:
07772                 New GEOM.GEOM_Object, containing the found block.
07773             """
07774             # Example: see GEOM_Spanner.py
07775             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
07776             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
07777             return anObj
07778 
07779         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
07780         #  @param theCompound Compound, to find block in.
07781         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
07782         #  @return New GEOM.GEOM_Object, containing the found block.
07783         #
07784         #  @ref swig_GetBlockByParts "Example"
07785         def GetBlockByParts(self,theCompound, theParts):
07786             """
07787              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
07788 
07789              Parameters:
07790                 theCompound Compound, to find block in.
07791                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
07792 
07793             Returns: 
07794                 New GEOM_Object, containing the found block.
07795             """
07796             # Example: see GEOM_TestOthers.py
07797             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
07798             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
07799             return anObj
07800 
07801         ## Return all blocks, containing all the elements, passed as the parts.
07802         #  @param theCompound Compound, to find blocks in.
07803         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
07804         #  @return List of GEOM.GEOM_Object, containing the found blocks.
07805         #
07806         #  @ref swig_todo "Example"
07807         def GetBlocksByParts(self,theCompound, theParts):
07808             """
07809             Return all blocks, containing all the elements, passed as the parts.
07810 
07811             Parameters:
07812                 theCompound Compound, to find blocks in.
07813                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
07814 
07815             Returns:
07816                 List of GEOM.GEOM_Object, containing the found blocks.
07817             """
07818             # Example: see GEOM_Spanner.py
07819             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
07820             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
07821             return aList
07822 
07823         ## Multi-transformate block and glue the result.
07824         #  Transformation is defined so, as to superpose direction faces.
07825         #  @param Block Hexahedral solid to be multi-transformed.
07826         #  @param DirFace1 ID of First direction face.
07827         #  @param DirFace2 ID of Second direction face.
07828         #  @param NbTimes Quantity of transformations to be done.
07829         #    \note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
07830         #  @return New GEOM.GEOM_Object, containing the result shape.
07831         #
07832         #  @ref tui_multi_transformation "Example"
07833         def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes):
07834             """
07835             Multi-transformate block and glue the result.
07836             Transformation is defined so, as to superpose direction faces.
07837 
07838             Parameters:
07839                 Block Hexahedral solid to be multi-transformed.
07840                 DirFace1 ID of First direction face.
07841                 DirFace2 ID of Second direction face.
07842                 NbTimes Quantity of transformations to be done.
07843 
07844             Note:
07845                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
07846 
07847             Returns:
07848                 New GEOM.GEOM_Object, containing the result shape.
07849             """
07850             # Example: see GEOM_Spanner.py
07851             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
07852             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
07853             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
07854             anObj.SetParameters(Parameters)
07855             return anObj
07856 
07857         ## Multi-transformate block and glue the result.
07858         #  @param Block Hexahedral solid to be multi-transformed.
07859         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
07860         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
07861         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
07862         #  @return New GEOM.GEOM_Object, containing the result shape.
07863         #
07864         #  @ref tui_multi_transformation "Example"
07865         def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU,
07866                                       DirFace1V, DirFace2V, NbTimesV):
07867             """
07868             Multi-transformate block and glue the result.
07869 
07870             Parameters:
07871                 Block Hexahedral solid to be multi-transformed.
07872                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
07873                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
07874                 NbTimesU,NbTimesV Quantity of transformations to be done.
07875 
07876             Returns:
07877                 New GEOM.GEOM_Object, containing the result shape.
07878             """
07879             # Example: see GEOM_Spanner.py
07880             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
07881               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
07882             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
07883                                                             DirFace1V, DirFace2V, NbTimesV)
07884             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
07885             anObj.SetParameters(Parameters)
07886             return anObj
07887 
07888         ## Build all possible propagation groups.
07889         #  Propagation group is a set of all edges, opposite to one (main)
07890         #  edge of this group directly or through other opposite edges.
07891         #  Notion of Opposite Edge make sence only on quadrangle face.
07892         #  @param theShape Shape to build propagation groups on.
07893         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
07894         #
07895         #  @ref swig_Propagate "Example"
07896         def Propagate(self,theShape):
07897             """
07898             Build all possible propagation groups.
07899             Propagation group is a set of all edges, opposite to one (main)
07900             edge of this group directly or through other opposite edges.
07901             Notion of Opposite Edge make sence only on quadrangle face.
07902 
07903             Parameters:
07904                 theShape Shape to build propagation groups on.
07905 
07906             Returns:
07907                 List of GEOM.GEOM_Object, each of them is a propagation group.
07908             """
07909             # Example: see GEOM_TestOthers.py
07910             listChains = self.BlocksOp.Propagate(theShape)
07911             RaiseIfFailed("Propagate", self.BlocksOp)
07912             return listChains
07913 
07914         # end of l3_blocks_op
07915         ## @}
07916 
07917         ## @addtogroup l3_groups
07918         ## @{
07919 
07920         ## Creates a new group which will store sub-shapes of theMainShape
07921         #  @param theMainShape is a GEOM object on which the group is selected
07922         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
07923         #  @return a newly created GEOM group
07924         #
07925         #  @ref tui_working_with_groups_page "Example 1"
07926         #  \n @ref swig_CreateGroup "Example 2"
07927         def CreateGroup(self,theMainShape, theShapeType):
07928             """
07929             Creates a new group which will store sub-shapes of theMainShape
07930 
07931             Parameters:
07932                theMainShape is a GEOM object on which the group is selected
07933                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
07934                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
07935 
07936             Returns:
07937                a newly created GEOM group
07938 
07939             Example of usage:
07940                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
07941                 
07942             """
07943             # Example: see GEOM_TestOthers.py
07944             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
07945             RaiseIfFailed("CreateGroup", self.GroupOp)
07946             return anObj
07947 
07948         ## Adds a sub-object with ID theSubShapeId to the group
07949         #  @param theGroup is a GEOM group to which the new sub-shape is added
07950         #  @param theSubShapeID is a sub-shape ID in the main object.
07951         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
07952         #
07953         #  @ref tui_working_with_groups_page "Example"
07954         def AddObject(self,theGroup, theSubShapeID):
07955             """
07956             Adds a sub-object with ID theSubShapeId to the group
07957 
07958             Parameters:
07959                 theGroup       is a GEOM group to which the new sub-shape is added
07960                 theSubShapeID  is a sub-shape ID in the main object.
07961 
07962             Note:
07963                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
07964             """
07965             # Example: see GEOM_TestOthers.py
07966             self.GroupOp.AddObject(theGroup, theSubShapeID)
07967             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
07968                 RaiseIfFailed("AddObject", self.GroupOp)
07969                 pass
07970             pass
07971 
07972         ## Removes a sub-object with ID \a theSubShapeId from the group
07973         #  @param theGroup is a GEOM group from which the new sub-shape is removed
07974         #  @param theSubShapeID is a sub-shape ID in the main object.
07975         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
07976         #
07977         #  @ref tui_working_with_groups_page "Example"
07978         def RemoveObject(self,theGroup, theSubShapeID):
07979             """
07980             Removes a sub-object with ID theSubShapeId from the group
07981 
07982             Parameters:
07983                 theGroup is a GEOM group from which the new sub-shape is removed
07984                 theSubShapeID is a sub-shape ID in the main object.
07985 
07986             Note:
07987                 Use method GetSubShapeID() to get an unique ID of the sub-shape
07988             """
07989             # Example: see GEOM_TestOthers.py
07990             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
07991             RaiseIfFailed("RemoveObject", self.GroupOp)
07992             pass
07993 
07994         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
07995         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
07996         #  @param theSubShapes is a list of sub-shapes to be added.
07997         #
07998         #  @ref tui_working_with_groups_page "Example"
07999         def UnionList (self,theGroup, theSubShapes):
08000             """
08001             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
08002 
08003             Parameters:
08004                 theGroup is a GEOM group to which the new sub-shapes are added.
08005                 theSubShapes is a list of sub-shapes to be added.
08006             """
08007             # Example: see GEOM_TestOthers.py
08008             self.GroupOp.UnionList(theGroup, theSubShapes)
08009             RaiseIfFailed("UnionList", self.GroupOp)
08010             pass
08011 
08012         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
08013         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
08014         #  @param theSubShapes is a list of indices of sub-shapes to be added.
08015         #
08016         #  @ref swig_UnionIDs "Example"
08017         def UnionIDs(self,theGroup, theSubShapes):
08018             """
08019             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
08020 
08021             Parameters:
08022                 theGroup is a GEOM group to which the new sub-shapes are added.
08023                 theSubShapes is a list of indices of sub-shapes to be added.
08024             """
08025             # Example: see GEOM_TestOthers.py
08026             self.GroupOp.UnionIDs(theGroup, theSubShapes)
08027             RaiseIfFailed("UnionIDs", self.GroupOp)
08028             pass
08029 
08030         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
08031         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
08032         #  @param theSubShapes is a list of sub-shapes to be removed.
08033         #
08034         #  @ref tui_working_with_groups_page "Example"
08035         def DifferenceList (self,theGroup, theSubShapes):
08036             """
08037             Removes from the group all the given shapes. No errors, if some shapes are not included.
08038 
08039             Parameters:
08040                 theGroup is a GEOM group from which the sub-shapes are removed.
08041                 theSubShapes is a list of sub-shapes to be removed.
08042             """
08043             # Example: see GEOM_TestOthers.py
08044             self.GroupOp.DifferenceList(theGroup, theSubShapes)
08045             RaiseIfFailed("DifferenceList", self.GroupOp)
08046             pass
08047 
08048         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
08049         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
08050         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
08051         #
08052         #  @ref swig_DifferenceIDs "Example"
08053         def DifferenceIDs(self,theGroup, theSubShapes):
08054             """
08055             Removes from the group all the given shapes. No errors, if some shapes are not included.
08056 
08057             Parameters:
08058                 theGroup is a GEOM group from which the sub-shapes are removed.
08059                 theSubShapes is a list of indices of sub-shapes to be removed.
08060             """            
08061             # Example: see GEOM_TestOthers.py
08062             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
08063             RaiseIfFailed("DifferenceIDs", self.GroupOp)
08064             pass
08065 
08066         ## Returns a list of sub-objects ID stored in the group
08067         #  @param theGroup is a GEOM group for which a list of IDs is requested
08068         #
08069         #  @ref swig_GetObjectIDs "Example"
08070         def GetObjectIDs(self,theGroup):
08071             """
08072             Returns a list of sub-objects ID stored in the group
08073 
08074             Parameters:
08075                 theGroup is a GEOM group for which a list of IDs is requested
08076             """
08077             # Example: see GEOM_TestOthers.py
08078             ListIDs = self.GroupOp.GetObjects(theGroup)
08079             RaiseIfFailed("GetObjects", self.GroupOp)
08080             return ListIDs
08081 
08082         ## Returns a type of sub-objects stored in the group
08083         #  @param theGroup is a GEOM group which type is returned.
08084         #
08085         #  @ref swig_GetType "Example"
08086         def GetType(self,theGroup):
08087             """
08088             Returns a type of sub-objects stored in the group
08089 
08090             Parameters:
08091                 theGroup is a GEOM group which type is returned.
08092             """
08093             # Example: see GEOM_TestOthers.py
08094             aType = self.GroupOp.GetType(theGroup)
08095             RaiseIfFailed("GetType", self.GroupOp)
08096             return aType
08097 
08098         ## Convert a type of geom object from id to string value
08099         #  @param theId is a GEOM obect type id.
08100         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
08101         #  @ref swig_GetType "Example"
08102         def ShapeIdToType(self, theId):
08103             """
08104             Convert a type of geom object from id to string value
08105 
08106             Parameters:
08107                 theId is a GEOM obect type id.
08108                 
08109             Returns:
08110                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
08111             """
08112             if theId == 0:
08113                 return "COPY"
08114             if theId == 1:
08115                 return "IMPORT"
08116             if theId == 2:
08117                 return "POINT"
08118             if theId == 3:
08119                 return "VECTOR"
08120             if theId == 4:
08121                 return "PLANE"
08122             if theId == 5:
08123                 return "LINE"
08124             if theId == 6:
08125                 return "TORUS"
08126             if theId == 7:
08127                 return "BOX"
08128             if theId == 8:
08129                 return "CYLINDER"
08130             if theId == 9:
08131                 return "CONE"
08132             if theId == 10:
08133                 return "SPHERE"
08134             if theId == 11:
08135                 return "PRISM"
08136             if theId == 12:
08137                 return "REVOLUTION"
08138             if theId == 13:
08139                 return "BOOLEAN"
08140             if theId == 14:
08141                 return "PARTITION"
08142             if theId == 15:
08143                 return "POLYLINE"
08144             if theId == 16:
08145                 return "CIRCLE"
08146             if theId == 17:
08147                 return "SPLINE"
08148             if theId == 18:
08149                 return "ELLIPSE"
08150             if theId == 19:
08151                 return "CIRC_ARC"
08152             if theId == 20:
08153                 return "FILLET"
08154             if theId == 21:
08155                 return "CHAMFER"
08156             if theId == 22:
08157                 return "EDGE"
08158             if theId == 23:
08159                 return "WIRE"
08160             if theId == 24:
08161                 return "FACE"
08162             if theId == 25:
08163                 return "SHELL"
08164             if theId == 26:
08165                 return "SOLID"
08166             if theId == 27:
08167                 return "COMPOUND"
08168             if theId == 28:
08169                 return "SUBSHAPE"
08170             if theId == 29:
08171                 return "PIPE"
08172             if theId == 30:
08173                 return "ARCHIMEDE"
08174             if theId == 31:
08175                 return "FILLING"
08176             if theId == 32:
08177                 return "EXPLODE"
08178             if theId == 33:
08179                 return "GLUED"
08180             if theId == 34:
08181                 return "SKETCHER"
08182             if theId == 35:
08183                 return "CDG"
08184             if theId == 36:
08185                 return "FREE_BOUNDS"
08186             if theId == 37:
08187                 return "GROUP"
08188             if theId == 38:
08189                 return "BLOCK"
08190             if theId == 39:
08191                 return "MARKER"
08192             if theId == 40:
08193                 return "THRUSECTIONS"
08194             if theId == 41:
08195                 return "COMPOUNDFILTER"
08196             if theId == 42:
08197                 return "SHAPES_ON_SHAPE"
08198             if theId == 43:
08199                 return "ELLIPSE_ARC"
08200             if theId == 44:
08201                 return "3DSKETCHER"
08202             if theId == 45:
08203                 return "FILLET_2D"
08204             if theId == 46:
08205                 return "FILLET_1D"
08206             if theId == 201:
08207                 return "PIPETSHAPE"
08208             return "Shape Id not exist."
08209 
08210         ## Returns a main shape associated with the group
08211         #  @param theGroup is a GEOM group for which a main shape object is requested
08212         #  @return a GEOM object which is a main shape for theGroup
08213         #
08214         #  @ref swig_GetMainShape "Example"
08215         def GetMainShape(self,theGroup):
08216             """
08217             Returns a main shape associated with the group
08218 
08219             Parameters:
08220                 theGroup is a GEOM group for which a main shape object is requested
08221 
08222             Returns:
08223                 a GEOM object which is a main shape for theGroup
08224 
08225             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
08226             """
08227             # Example: see GEOM_TestOthers.py
08228             anObj = self.GroupOp.GetMainShape(theGroup)
08229             RaiseIfFailed("GetMainShape", self.GroupOp)
08230             return anObj
08231 
08232         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
08233         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
08234         #  @param theShape given shape (see GEOM.GEOM_Object)
08235         #  @param min_length minimum length of edges of theShape
08236         #  @param max_length maximum length of edges of theShape
08237         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
08238         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
08239         #  @return a newly created GEOM group of edges
08240         #  @@ref swig_todo "Example"
08241         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
08242             """
08243             Create group of edges of theShape, whose length is in range [min_length, max_length].
08244             If include_min/max == 0, edges with length == min/max_length will not be included in result.
08245 
08246             Parameters:
08247                 theShape given shape
08248                 min_length minimum length of edges of theShape
08249                 max_length maximum length of edges of theShape
08250                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
08251                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
08252 
08253              Returns:
08254                 a newly created GEOM group of edges.
08255             """
08256             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
08257             edges_in_range = []
08258             for edge in edges:
08259                 Props = self.BasicProperties(edge)
08260                 if min_length <= Props[0] and Props[0] <= max_length:
08261                     if (not include_min) and (min_length == Props[0]):
08262                         skip = 1
08263                     else:
08264                         if (not include_max) and (Props[0] == max_length):
08265                             skip = 1
08266                         else:
08267                             edges_in_range.append(edge)
08268 
08269             if len(edges_in_range) <= 0:
08270                 print "No edges found by given criteria"
08271                 return 0
08272 
08273             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"])
08274             self.UnionList(group_edges, edges_in_range)
08275 
08276             return group_edges
08277 
08278         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
08279         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
08280         #  @param min_length minimum length of edges of selected shape
08281         #  @param max_length maximum length of edges of selected shape
08282         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
08283         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
08284         #  @return a newly created GEOM group of edges
08285         #  @ref swig_todo "Example"
08286         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
08287             """
08288             Create group of edges of selected shape, whose length is in range [min_length, max_length].
08289             If include_min/max == 0, edges with length == min/max_length will not be included in result.
08290 
08291             Parameters:
08292                 min_length minimum length of edges of selected shape
08293                 max_length maximum length of edges of selected shape
08294                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
08295                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
08296 
08297              Returns:
08298                 a newly created GEOM group of edges.
08299             """
08300             nb_selected = sg.SelectedCount()
08301             if nb_selected < 1:
08302                 print "Select a shape before calling this function, please."
08303                 return 0
08304             if nb_selected > 1:
08305                 print "Only one shape must be selected"
08306                 return 0
08307 
08308             id_shape = sg.getSelected(0)
08309             shape = IDToObject( id_shape )
08310 
08311             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
08312 
08313             left_str  = " < "
08314             right_str = " < "
08315             if include_min: left_str  = " <= "
08316             if include_max: right_str  = " <= "
08317 
08318             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
08319                                     + left_str + "length" + right_str + `max_length`)
08320 
08321             sg.updateObjBrowser(1)
08322 
08323             return group_edges
08324 
08325         # end of l3_groups
08326         ## @}
08327 
08328         ## @addtogroup l4_advanced
08329         ## @{
08330 
08331         ## Create a T-shape object with specified caracteristics for the main
08332         #  and the incident pipes (radius, width, half-length).
08333         #  The extremities of the main pipe are located on junctions points P1 and P2.
08334         #  The extremity of the incident pipe is located on junction point P3.
08335         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
08336         #  the main plane of the T-shape is XOY.
08337         #  @param theR1 Internal radius of main pipe
08338         #  @param theW1 Width of main pipe
08339         #  @param theL1 Half-length of main pipe
08340         #  @param theR2 Internal radius of incident pipe (R2 < R1)
08341         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
08342         #  @param theL2 Half-length of incident pipe
08343         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
08344         #  @param theP1 1st junction point of main pipe
08345         #  @param theP2 2nd junction point of main pipe
08346         #  @param theP3 Junction point of incident pipe
08347         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
08348         #
08349         #  @ref tui_creation_pipetshape "Example"
08350         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
08351             """
08352             Create a T-shape object with specified caracteristics for the main
08353             and the incident pipes (radius, width, half-length).
08354             The extremities of the main pipe are located on junctions points P1 and P2.
08355             The extremity of the incident pipe is located on junction point P3.
08356             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
08357             the main plane of the T-shape is XOY.
08358 
08359             Paremeters:
08360                 theR1 Internal radius of main pipe
08361                 theW1 Width of main pipe
08362                 theL1 Half-length of main pipe
08363                 theR2 Internal radius of incident pipe (R2 < R1)
08364                 theW2 Width of incident pipe (R2+W2 < R1+W1)
08365                 theL2 Half-length of incident pipe
08366                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
08367                 theP1 1st junction point of main pipe
08368                 theP2 2nd junction point of main pipe
08369                 theP3 Junction point of incident pipe
08370 
08371             Returns:
08372                 List of GEOM_Object, containing the created shape and propagation groups.
08373 
08374             Example of usage:
08375                 # create PipeTShape object
08376                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
08377                 # create PipeTShape object with position
08378                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
08379             """
08380             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)        
08381             if (theP1 and theP2 and theP3):
08382                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
08383             else:
08384                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
08385             RaiseIfFailed("MakePipeTShape", self.AdvOp)
08386             if Parameters: anObj[0].SetParameters(Parameters)
08387             return anObj
08388 
08389         ## Create a T-shape object with chamfer and with specified caracteristics for the main
08390         #  and the incident pipes (radius, width, half-length). The chamfer is
08391         #  created on the junction of the pipes.
08392         #  The extremities of the main pipe are located on junctions points P1 and P2.
08393         #  The extremity of the incident pipe is located on junction point P3.
08394         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
08395         #  the main plane of the T-shape is XOY.
08396