]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geompyDC.py
Salome HOME
Mantis issues 0021432 and 0021404: MakeFace[Wires] should generate exception on attem...
[modules/geom.git] / src / GEOM_SWIG / geompyDC.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 #  File   : geompy.py
21 #  Author : Paul RASCLE, EDF
22 #  Module : GEOM
23
24 """
25     \namespace geompy
26     \brief Module geompy
27 """
28
29 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
30
31 ## @defgroup l1_geompy_purpose   All package methods, grouped by their purpose
32 ## @{
33 ##   @defgroup l2_import_export Importing/exporting geometrical objects
34 ##   @defgroup l2_creating      Creating geometrical objects
35 ##   @{
36 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
37 ##     @{
38 ##       @defgroup l4_curves        Creating Curves
39
40 ##     @}
41 ##     @defgroup l3_3d_primitives Creating 3D Primitives
42 ##     @defgroup l3_complex       Creating Complex Objects
43 ##     @defgroup l3_groups        Working with groups
44 ##     @defgroup l3_blocks        Building by blocks
45 ##     @{
46 ##       @defgroup l4_blocks_measure Check and Improve
47
48 ##     @}
49 ##     @defgroup l3_sketcher      Sketcher
50 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
51 ##     @{
52 ##       @defgroup l4_decompose     Decompose objects
53 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
54 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
55 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
56 ##       @defgroup l4_advanced      Advanced objects creation functions
57
58 ##     @}
59
60 ##   @}
61 ##   @defgroup l2_transforming  Transforming geometrical objects
62 ##   @{
63 ##     @defgroup l3_basic_op      Basic Operations
64 ##     @defgroup l3_boolean       Boolean Operations
65 ##     @defgroup l3_transform     Transformation Operations
66 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
67 ##     @defgroup l3_blocks_op     Blocks Operations
68 ##     @defgroup l3_healing       Repairing Operations
69 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
70
71 ##   @}
72 ##   @defgroup l2_measure       Using measurement tools
73
74 ## @}
75
76 import salome
77 salome.salome_init()
78 from salome import *
79
80 from salome_notebook import *
81
82 import GEOM
83 import math
84 import os
85
86 ## Enumeration ShapeType as a dictionary. \n
87 ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
88 #  @ingroup l1_geompy_auxiliary
89 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
90
91 ## Raise an Error, containing the Method_name, if Operation is Failed
92 ## @ingroup l1_geompy_auxiliary
93 def RaiseIfFailed (Method_name, Operation):
94     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
95         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
96
97 ## Return list of variables value from salome notebook
98 ## @ingroup l1_geompy_auxiliary
99 def ParseParameters(*parameters):
100     Result = []
101     StringResult = []
102     for parameter in parameters:
103         if isinstance(parameter, list):
104             lResults = ParseParameters(*parameter)
105             if len(lResults) > 0:
106                 Result.append(lResults[:-1])
107                 StringResult += lResults[-1].split(":")
108                 pass
109             pass
110         else:
111             if isinstance(parameter,str):
112                 if notebook.isVariable(parameter):
113                     Result.append(notebook.get(parameter))
114                 else:
115                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
116                 pass
117             else:
118                 Result.append(parameter)
119                 pass
120             StringResult.append(str(parameter))
121             pass
122         pass
123     if Result:
124         Result.append(":".join(StringResult))
125     else:
126         Result = ":".join(StringResult)
127     return Result
128
129 ## Return list of variables value from salome notebook
130 ## @ingroup l1_geompy_auxiliary
131 def ParseList(list):
132     Result = []
133     StringResult = ""
134     for parameter in list:
135         if isinstance(parameter,str) and notebook.isVariable(parameter):
136             Result.append(str(notebook.get(parameter)))
137             pass
138         else:
139             Result.append(str(parameter))
140             pass
141
142         StringResult = StringResult + str(parameter)
143         StringResult = StringResult + ":"
144         pass
145     StringResult = StringResult[:len(StringResult)-1]
146     return Result, StringResult
147
148 ## Return list of variables value from salome notebook
149 ## @ingroup l1_geompy_auxiliary
150 def ParseSketcherCommand(command):
151     Result = ""
152     StringResult = ""
153     sections = command.split(":")
154     for section in sections:
155         parameters = section.split(" ")
156         paramIndex = 1
157         for parameter in parameters:
158             if paramIndex > 1 and parameter.find("'") != -1:
159                 parameter = parameter.replace("'","")
160                 if notebook.isVariable(parameter):
161                     Result = Result + str(notebook.get(parameter)) + " "
162                     pass
163                 else:
164                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
165                     pass
166                 pass
167             else:
168                 Result = Result + str(parameter) + " "
169                 pass
170             if paramIndex > 1:
171                 StringResult = StringResult + parameter
172                 StringResult = StringResult + ":"
173                 pass
174             paramIndex = paramIndex + 1
175             pass
176         Result = Result[:len(Result)-1] + ":"
177         pass
178     Result = Result[:len(Result)-1]
179     return Result, StringResult
180
181 ## Helper function which can be used to pack the passed string to the byte data.
182 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
183 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
184 ## For example,
185 ## \code
186 ## val = PackData("10001110") # val = 0xAE
187 ## val = PackData("1")        # val = 0x80
188 ## \endcode
189 ## @param data unpacked data - a string containing '1' and '0' symbols
190 ## @return data packed to the byte stream
191 ## @ingroup l1_geompy_auxiliary
192 def PackData(data):
193     """
194     Helper function which can be used to pack the passed string to the byte data.
195     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
196     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
197
198     Parameters:
199         data unpacked data - a string containing '1' and '0' symbols
200
201     Returns:
202         data packed to the byte stream
203         
204     Example of usage:
205         val = PackData("10001110") # val = 0xAE
206         val = PackData("1")        # val = 0x80
207     """
208     bytes = len(data)/8
209     if len(data)%8: bytes += 1
210     res = ""
211     for b in range(bytes):
212         d = data[b*8:(b+1)*8]
213         val = 0
214         for i in range(8):
215             val *= 2
216             if i < len(d):
217                 if d[i] == "1": val += 1
218                 elif d[i] != "0":
219                     raise "Invalid symbol %s" % d[i]
220                 pass
221             pass
222         res += chr(val)
223         pass
224     return res
225
226 ## Read bitmap texture from the text file.
227 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
228 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
229 ## The function returns width and height of the pixmap in pixels and byte stream representing
230 ## texture bitmap itself.
231 ##
232 ## This function can be used to read the texture to the byte stream in order to pass it to
233 ## the AddTexture() function of geompy class.
234 ## For example,
235 ## \code
236 ## import geompy
237 ## geompy.init_geom(salome.myStudy)
238 ## texture = geompy.readtexture('mytexture.dat')
239 ## texture = geompy.AddTexture(*texture)
240 ## obj.SetMarkerTexture(texture)
241 ## \endcode
242 ## @param fname texture file name
243 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
244 ## @ingroup l1_geompy_auxiliary
245 def ReadTexture(fname):
246     """
247     Read bitmap texture from the text file.
248     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
249     A zero symbol ('0') represents transparent pixel of the texture bitmap.
250     The function returns width and height of the pixmap in pixels and byte stream representing
251     texture bitmap itself.
252     This function can be used to read the texture to the byte stream in order to pass it to
253     the AddTexture() function of geompy class.
254     
255     Parameters:
256         fname texture file name
257
258     Returns:
259         sequence of tree values: texture's width, height in pixels and its byte stream
260     
261     Example of usage:
262         import geompy
263         geompy.init_geom(salome.myStudy)
264         texture = geompy.readtexture('mytexture.dat')
265         texture = geompy.AddTexture(*texture)
266         obj.SetMarkerTexture(texture)
267     """
268     try:
269         f = open(fname)
270         lines = [ l.strip() for l in f.readlines()]
271         f.close()
272         maxlen = 0
273         if lines: maxlen = max([len(x) for x in lines])
274         lenbytes = maxlen/8
275         if maxlen%8: lenbytes += 1
276         bytedata=""
277         for line in lines:
278             if len(line)%8:
279                 lenline = (len(line)/8+1)*8
280                 pass
281             else:
282                 lenline = (len(line)/8)*8
283                 pass
284             for i in range(lenline/8):
285                 byte=""
286                 for j in range(8):
287                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
288                     else: byte += "0"
289                     pass
290                 bytedata += PackData(byte)
291                 pass
292             for i in range(lenline/8, lenbytes):
293                 bytedata += PackData("0")
294             pass
295         return lenbytes*8, len(lines), bytedata
296     except:
297         pass
298     return 0, 0, ""
299
300 ## Returns a long value from enumeration type
301 #  Can be used for CORBA enumerator types like GEOM.shape_type
302 #  @param theItem enumeration type
303 #  @ingroup l1_geompy_auxiliary
304 def EnumToLong(theItem):
305     """
306     Returns a long value from enumeration type
307     Can be used for CORBA enumerator types like geompy.ShapeType
308
309     Parameters:
310         theItem enumeration type
311     """
312     ret = theItem
313     if hasattr(theItem, "_v"): ret = theItem._v
314     return ret
315
316 ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
317 #  and a list of parameters, describing the shape.
318 #  List of parameters, describing the shape:
319 #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
320 #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
321 #
322 #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
323 #
324 #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
325 #
326 #  - SPHERE:       [xc yc zc            R]
327 #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
328 #  - BOX:          [xc yc zc                      ax ay az]
329 #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
330 #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
331 #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
332 #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
333 #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
334 #
335 #  - SPHERE2D:     [xc yc zc            R]
336 #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
337 #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
338 #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
339 #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
340 #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
341 #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
342 #  - PLANE:        [xo yo zo  dx dy dz]
343 #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
344 #  - FACE:                                       [nb_edges  nb_vertices]
345 #
346 #  - CIRCLE:       [xc yc zc  dx dy dz  R]
347 #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
348 #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
349 #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
350 #  - LINE:         [xo yo zo  dx dy dz]
351 #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
352 #  - EDGE:                                                 [nb_vertices]
353 #
354 #  - VERTEX:       [x  y  z]
355 #  @ingroup l1_geompy_auxiliary
356 kind = GEOM.GEOM_IKindOfShape
357
358 ## Information about closed/unclosed state of shell or wire
359 #  @ingroup l1_geompy_auxiliary
360 class info:
361     """
362     Information about closed/unclosed state of shell or wire
363     """
364     UNKNOWN  = 0
365     CLOSED   = 1
366     UNCLOSED = 2
367
368 class geompyDC(GEOM._objref_GEOM_Gen):
369
370         def __init__(self):
371             GEOM._objref_GEOM_Gen.__init__(self)
372             self.myBuilder = None
373             self.myStudyId = 0
374             self.father    = None
375
376             self.BasicOp  = None
377             self.CurvesOp = None
378             self.PrimOp   = None
379             self.ShapesOp = None
380             self.HealOp   = None
381             self.InsertOp = None
382             self.BoolOp   = None
383             self.TrsfOp   = None
384             self.LocalOp  = None
385             self.MeasuOp  = None
386             self.BlocksOp = None
387             self.GroupOp  = None
388             self.AdvOp    = None
389             pass
390
391         ## @addtogroup l1_geompy_auxiliary
392         ## @{
393         def init_geom(self,theStudy):
394             self.myStudy = theStudy
395             self.myStudyId = self.myStudy._get_StudyId()
396             self.myBuilder = self.myStudy.NewBuilder()
397             self.father = self.myStudy.FindComponent("GEOM")
398             if self.father is None:
399                 self.father = self.myBuilder.NewComponent("GEOM")
400                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
401                 FName = A1._narrow(SALOMEDS.AttributeName)
402                 FName.SetValue("Geometry")
403                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
404                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
405                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
406                 self.myBuilder.DefineComponentInstance(self.father,self)
407                 pass
408             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
409             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
410             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
411             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
412             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
413             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
414             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
415             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
416             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
417             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
418             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
419             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
420             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
421             pass
422
423         ## Dump component to the Python script
424         #  This method overrides IDL function to allow default values for the parameters.
425         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
426             """
427             Dump component to the Python script
428             This method overrides IDL function to allow default values for the parameters.
429             """
430             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
431
432         ## Get name for sub-shape aSubObj of shape aMainObj
433         #
434         # @ref swig_SubShapeName "Example"
435         def SubShapeName(self,aSubObj, aMainObj):
436             """
437             Get name for sub-shape aSubObj of shape aMainObj
438             """
439             # Example: see GEOM_TestAll.py
440
441             #aSubId  = orb.object_to_string(aSubObj)
442             #aMainId = orb.object_to_string(aMainObj)
443             #index = gg.getIndexTopology(aSubId, aMainId)
444             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
445             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
446             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
447             return name
448
449         ## Publish in study aShape with name aName
450         #
451         #  \param aShape the shape to be published
452         #  \param aName  the name for the shape
453         #  \param doRestoreSubShapes if True, finds and publishes also
454         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
455         #         and published sub-shapes of arguments
456         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
457         #                                                  these arguments description
458         #  \return study entry of the published shape in form of string
459         #
460         #  @ref swig_all_addtostudy "Example"
461         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
462                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
463             """
464             Publish in study aShape with name aName
465
466             Parameters:
467                 aShape the shape to be published
468                 aName  the name for the shape
469                 doRestoreSubShapes if True, finds and publishes also
470                                    sub-shapes of aShape, corresponding to its arguments
471                                    and published sub-shapes of arguments
472                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
473                                                          these arguments description
474
475             Returns:
476                 study entry of the published shape in form of string
477
478             Example of usage:
479                 id_block1 = geompy.addToStudy(Block1, "Block 1")
480             """
481             # Example: see GEOM_TestAll.py
482             try:
483                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
484                 if doRestoreSubShapes:
485                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
486                                             theFindMethod, theInheritFirstArg, True )
487             except:
488                 print "addToStudy() failed"
489                 return ""
490             return aShape.GetStudyEntry()
491
492         ## Publish in study aShape with name aName as sub-object of previously published aFather
493         #  \param aFather previously published object
494         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
495         #  \param aName  the name for the shape
496         #
497         #  \return study entry of the published shape in form of string
498         #  @ref swig_all_addtostudyInFather "Example"
499         def addToStudyInFather(self, aFather, aShape, aName):
500             """
501             Publish in study aShape with name aName as sub-object of previously published aFather
502
503             Parameters:
504                 aFather previously published object
505                 aShape the shape to be published as sub-object of aFather
506                 aName  the name for the shape
507
508             Returns:
509                 study entry of the published shape in form of string
510             """
511             # Example: see GEOM_TestAll.py
512             try:
513                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
514             except:
515                 print "addToStudyInFather() failed"
516                 return ""
517             return aShape.GetStudyEntry()
518
519         ## Unpublish object in study
520         #
521         #  \param obj the object to be unpublished
522         def hideInStudy(self, obj):
523             """
524             Unpublish object in study
525
526             Parameters:
527                 obj the object to be unpublished
528             """
529             ior = salome.orb.object_to_string(obj)
530             aSObject = self.myStudy.FindObjectIOR(ior)
531             if aSObject is not None:
532                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
533                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
534                 drwAttribute.SetDrawable(False)
535                 pass
536
537         # end of l1_geompy_auxiliary
538         ## @}
539
540         ## @addtogroup l3_restore_ss
541         ## @{
542
543         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
544         #  To be used from python scripts out of addToStudy() (non-default usage)
545         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
546         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
547         #                   If this list is empty, all operation arguments will be published
548         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
549         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
550         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
551         #                            Do not publish sub-shapes in place of arguments, but only
552         #                            in place of sub-shapes of the first argument,
553         #                            because the whole shape corresponds to the first argument.
554         #                            Mainly to be used after transformations, but it also can be
555         #                            usefull after partition with one object shape, and some other
556         #                            operations, where only the first argument has to be considered.
557         #                            If theObject has only one argument shape, this flag is automatically
558         #                            considered as True, not regarding really passed value.
559         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
560         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
561         #  \return list of published sub-shapes
562         #
563         #  @ref tui_restore_prs_params "Example"
564         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
565                               theInheritFirstArg=False, theAddPrefix=True):
566             """
567             Publish sub-shapes, standing for arguments and sub-shapes of arguments
568             To be used from python scripts out of geompy.addToStudy (non-default usage)
569
570             Parameters:
571                 theObject published GEOM.GEOM_Object, arguments of which will be published
572                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
573                           If this list is empty, all operation arguments will be published
574                 theFindMethod method to search sub-shapes, corresponding to arguments and
575                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
576                 theInheritFirstArg set properties of the first argument for theObject.
577                                    Do not publish sub-shapes in place of arguments, but only
578                                    in place of sub-shapes of the first argument,
579                                    because the whole shape corresponds to the first argument.
580                                    Mainly to be used after transformations, but it also can be
581                                    usefull after partition with one object shape, and some other
582                                    operations, where only the first argument has to be considered.
583                                    If theObject has only one argument shape, this flag is automatically
584                                    considered as True, not regarding really passed value.
585                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
586                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
587             Returns:
588                 list of published sub-shapes
589             """
590             # Example: see GEOM_TestAll.py
591             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
592                                           theFindMethod, theInheritFirstArg, theAddPrefix)
593
594         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
595         #  To be used from python scripts out of addToStudy() (non-default usage)
596         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
597         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
598         #                   If this list is empty, all operation arguments will be published
599         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
600         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
601         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
602         #                            Do not publish sub-shapes in place of arguments, but only
603         #                            in place of sub-shapes of the first argument,
604         #                            because the whole shape corresponds to the first argument.
605         #                            Mainly to be used after transformations, but it also can be
606         #                            usefull after partition with one object shape, and some other
607         #                            operations, where only the first argument has to be considered.
608         #                            If theObject has only one argument shape, this flag is automatically
609         #                            considered as True, not regarding really passed value.
610         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
611         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
612         #  \return list of published sub-shapes
613         #
614         #  @ref tui_restore_prs_params "Example"
615         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
616                                    theInheritFirstArg=False, theAddPrefix=True):
617             """
618             Publish sub-shapes, standing for arguments and sub-shapes of arguments
619             To be used from python scripts out of geompy.addToStudy() (non-default usage)
620
621             Parameters:
622                 theObject published GEOM.GEOM_Object, arguments of which will be published
623                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
624                           If this list is empty, all operation arguments will be published
625                 theFindMethod method to search sub-shapes, corresponding to arguments and
626                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
627                 theInheritFirstArg set properties of the first argument for theObject.
628                                    Do not publish sub-shapes in place of arguments, but only
629                                    in place of sub-shapes of the first argument,
630                                    because the whole shape corresponds to the first argument.
631                                    Mainly to be used after transformations, but it also can be
632                                    usefull after partition with one object shape, and some other
633                                    operations, where only the first argument has to be considered.
634                                    If theObject has only one argument shape, this flag is automatically
635                                    considered as True, not regarding really passed value.
636                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
637                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
638
639             Returns: 
640                 list of published sub-shapes
641             """
642             # Example: see GEOM_TestAll.py
643             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
644                                                theFindMethod, theInheritFirstArg, theAddPrefix)
645
646         # end of l3_restore_ss
647         ## @}
648
649         ## @addtogroup l3_basic_go
650         ## @{
651
652         ## Create point by three coordinates.
653         #  @param theX The X coordinate of the point.
654         #  @param theY The Y coordinate of the point.
655         #  @param theZ The Z coordinate of the point.
656         #  @return New GEOM.GEOM_Object, containing the created point.
657         #
658         #  @ref tui_creation_point "Example"
659         def MakeVertex(self, theX, theY, theZ):
660             """
661             Create point by three coordinates.
662
663             Parameters:
664                 theX The X coordinate of the point.
665                 theY The Y coordinate of the point.
666                 theZ The Z coordinate of the point.
667                 
668             Returns: 
669                 New GEOM.GEOM_Object, containing the created point.
670             """
671             # Example: see GEOM_TestAll.py
672             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
673             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
674             RaiseIfFailed("MakePointXYZ", self.BasicOp)
675             anObj.SetParameters(Parameters)
676             return anObj
677
678         ## Create a point, distant from the referenced point
679         #  on the given distances along the coordinate axes.
680         #  @param theReference The referenced point.
681         #  @param theX Displacement from the referenced point along OX axis.
682         #  @param theY Displacement from the referenced point along OY axis.
683         #  @param theZ Displacement from the referenced point along OZ axis.
684         #  @return New GEOM.GEOM_Object, containing the created point.
685         #
686         #  @ref tui_creation_point "Example"
687         def MakeVertexWithRef(self,theReference, theX, theY, theZ):
688             """
689             Create a point, distant from the referenced point
690             on the given distances along the coordinate axes.
691
692             Parameters:
693                 theReference The referenced point.
694                 theX Displacement from the referenced point along OX axis.
695                 theY Displacement from the referenced point along OY axis.
696                 theZ Displacement from the referenced point along OZ axis.
697
698             Returns:
699                 New GEOM.GEOM_Object, containing the created point.
700             """
701             # Example: see GEOM_TestAll.py
702             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
703             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
704             RaiseIfFailed("MakePointWithReference", self.BasicOp)
705             anObj.SetParameters(Parameters)
706             return anObj
707
708         ## Create a point, corresponding to the given parameter on the given curve.
709         #  @param theRefCurve The referenced curve.
710         #  @param theParameter Value of parameter on the referenced curve.
711         #  @return New GEOM.GEOM_Object, containing the created point.
712         #
713         #  @ref tui_creation_point "Example"
714         def MakeVertexOnCurve(self,theRefCurve, theParameter):
715             """
716             Create a point, corresponding to the given parameter on the given curve.
717
718             Parameters:
719                 theRefCurve The referenced curve.
720                 theParameter Value of parameter on the referenced curve.
721
722             Returns:
723                 New GEOM.GEOM_Object, containing the created point.
724
725             Example of usage:
726                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
727             """
728             # Example: see GEOM_TestAll.py
729             theParameter, Parameters = ParseParameters(theParameter)
730             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
731             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
732             anObj.SetParameters(Parameters)
733             return anObj
734
735         ## Create a point by projection give coordinates on the given curve
736         #  @param theRefCurve The referenced curve.
737         #  @param theX X-coordinate in 3D space
738         #  @param theY Y-coordinate in 3D space
739         #  @param theZ Z-coordinate in 3D space
740         #  @return New GEOM.GEOM_Object, containing the created point.
741         #
742         #  @ref tui_creation_point "Example"
743         def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ):
744             """
745             Create a point by projection give coordinates on the given curve
746             
747             Parameters:
748                 theRefCurve The referenced curve.
749                 theX X-coordinate in 3D space
750                 theY Y-coordinate in 3D space
751                 theZ Z-coordinate in 3D space
752
753             Returns:
754                 New GEOM.GEOM_Object, containing the created point.
755
756             Example of usage:
757                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
758             """
759             # Example: see GEOM_TestAll.py
760             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
761             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
762             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
763             anObj.SetParameters(Parameters)
764             return anObj
765
766         ## Create a point, corresponding to the given length on the given curve.
767         #  @param theRefCurve The referenced curve.
768         #  @param theLength Length on the referenced curve. It can be negative.
769         #  @param theStartPoint Point allowing to choose the direction for the calculation
770         #                       of the length. If None, start from the first point of theRefCurve.
771         #  @return New GEOM.GEOM_Object, containing the created point.
772         #
773         #  @ref tui_creation_point "Example"
774         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
775             """
776             Create a point, corresponding to the given length on the given curve.
777
778             Parameters:
779                 theRefCurve The referenced curve.
780                 theLength Length on the referenced curve. It can be negative.
781                 theStartPoint Point allowing to choose the direction for the calculation
782                               of the length. If None, start from the first point of theRefCurve.
783
784             Returns:
785                 New GEOM.GEOM_Object, containing the created point.
786             """
787             # Example: see GEOM_TestAll.py
788             theLength, Parameters = ParseParameters(theLength)
789             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
790             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
791             anObj.SetParameters(Parameters)
792             return anObj
793
794         ## Create a point, corresponding to the given parameters on the
795         #    given surface.
796         #  @param theRefSurf The referenced surface.
797         #  @param theUParameter Value of U-parameter on the referenced surface.
798         #  @param theVParameter Value of V-parameter on the referenced surface.
799         #  @return New GEOM.GEOM_Object, containing the created point.
800         #
801         #  @ref swig_MakeVertexOnSurface "Example"
802         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
803             """
804             Create a point, corresponding to the given parameters on the
805             given surface.
806
807             Parameters:
808                 theRefSurf The referenced surface.
809                 theUParameter Value of U-parameter on the referenced surface.
810                 theVParameter Value of V-parameter on the referenced surface.
811
812             Returns:
813                 New GEOM.GEOM_Object, containing the created point.
814
815             Example of usage:
816                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8) #(GEOM_Object, Double, Double)->GEOM_Object
817             """
818             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
819             # Example: see GEOM_TestAll.py
820             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
821             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
822             anObj.SetParameters(Parameters);
823             return anObj
824
825         ## Create a point by projection give coordinates on the given surface
826         #  @param theRefSurf The referenced surface.
827         #  @param theX X-coordinate in 3D space
828         #  @param theY Y-coordinate in 3D space
829         #  @param theZ Z-coordinate in 3D space
830         #  @return New GEOM.GEOM_Object, containing the created point.
831         #
832         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
833         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ):
834             """
835             Create a point by projection give coordinates on the given surface
836
837             Parameters:
838                 theRefSurf The referenced surface.
839                 theX X-coordinate in 3D space
840                 theY Y-coordinate in 3D space
841                 theZ Z-coordinate in 3D space
842
843             Returns:
844                 New GEOM.GEOM_Object, containing the created point.
845
846             Example of usage:
847                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.) #(GEOM_Object, Double, Double, Double)->GEOM_Object
848             """
849             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
850             # Example: see GEOM_TestAll.py
851             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
852             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
853             anObj.SetParameters(Parameters);
854             return anObj
855
856         ## Create a point on intersection of two lines.
857         #  @param theRefLine1, theRefLine2 The referenced lines.
858         #  @return New GEOM.GEOM_Object, containing the created point.
859         #
860         #  @ref swig_MakeVertexOnLinesIntersection "Example"
861         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2):
862             """
863             Create a point on intersection of two lines.
864
865             Parameters:
866                 theRefLine1, theRefLine2 The referenced lines.
867
868             Returns:
869                 New GEOM.GEOM_Object, containing the created point.
870             """
871             # Example: see GEOM_TestAll.py
872             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
873             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
874             return anObj
875
876         ## Create a tangent, corresponding to the given parameter on the given curve.
877         #  @param theRefCurve The referenced curve.
878         #  @param theParameter Value of parameter on the referenced curve.
879         #  @return New GEOM.GEOM_Object, containing the created tangent.
880         #
881         #  @ref swig_MakeTangentOnCurve "Example"
882         def MakeTangentOnCurve(self, theRefCurve, theParameter):
883             """
884             Create a tangent, corresponding to the given parameter on the given curve.
885
886             Parameters:
887                 theRefCurve The referenced curve.
888                 theParameter Value of parameter on the referenced curve.
889
890             Returns:
891                 New GEOM.GEOM_Object, containing the created tangent.
892
893             Example of usage:
894                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object, Double)->GEOM_Object
895             """
896             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
897             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
898             return anObj
899
900         ## Create a tangent plane, corresponding to the given parameter on the given face.
901         #  @param theFace The face for which tangent plane should be built.
902         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
903         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
904         #  @param theTrimSize the size of plane.
905         #  @return New GEOM.GEOM_Object, containing the created tangent.
906         #
907         #  @ref swig_MakeTangentPlaneOnFace "Example"
908         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize):
909             """
910             Create a tangent plane, corresponding to the given parameter on the given face.
911
912             Parameters:
913                 theFace The face for which tangent plane should be built.
914                 theParameterV vertical value of the center point (0.0 - 1.0).
915                 theParameterU horisontal value of the center point (0.0 - 1.0).
916                 theTrimSize the size of plane.
917
918            Returns: 
919                 New GEOM.GEOM_Object, containing the created tangent.
920
921            Example of usage:
922                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
923             """
924             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
925             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
926             return anObj
927
928         ## Create a vector with the given components.
929         #  @param theDX X component of the vector.
930         #  @param theDY Y component of the vector.
931         #  @param theDZ Z component of the vector.
932         #  @return New GEOM.GEOM_Object, containing the created vector.
933         #
934         #  @ref tui_creation_vector "Example"
935         def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
936             """
937             Create a vector with the given components.
938
939             Parameters:
940                 theDX X component of the vector.
941                 theDY Y component of the vector.
942                 theDZ Z component of the vector.
943
944             Returns:     
945                 New GEOM.GEOM_Object, containing the created vector.
946             """
947             # Example: see GEOM_TestAll.py
948             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
949             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
950             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
951             anObj.SetParameters(Parameters)
952             return anObj
953
954         ## Create a vector between two points.
955         #  @param thePnt1 Start point for the vector.
956         #  @param thePnt2 End point for the vector.
957         #  @return New GEOM.GEOM_Object, containing the created vector.
958         #
959         #  @ref tui_creation_vector "Example"
960         def MakeVector(self,thePnt1, thePnt2):
961             """
962             Create a vector between two points.
963
964             Parameters:
965                 thePnt1 Start point for the vector.
966                 thePnt2 End point for the vector.
967
968             Returns:        
969                 New GEOM.GEOM_Object, containing the created vector.
970             """
971             # Example: see GEOM_TestAll.py
972             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
973             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
974             return anObj
975
976         ## Create a line, passing through the given point
977         #  and parrallel to the given direction
978         #  @param thePnt Point. The resulting line will pass through it.
979         #  @param theDir Direction. The resulting line will be parallel to it.
980         #  @return New GEOM.GEOM_Object, containing the created line.
981         #
982         #  @ref tui_creation_line "Example"
983         def MakeLine(self,thePnt, theDir):
984             """
985             Create a line, passing through the given point
986             and parrallel to the given direction
987
988             Parameters:
989                 thePnt Point. The resulting line will pass through it.
990                 theDir Direction. The resulting line will be parallel to it.
991
992             Returns:
993                 New GEOM.GEOM_Object, containing the created line.
994             """
995             # Example: see GEOM_TestAll.py
996             anObj = self.BasicOp.MakeLine(thePnt, theDir)
997             RaiseIfFailed("MakeLine", self.BasicOp)
998             return anObj
999
1000         ## Create a line, passing through the given points
1001         #  @param thePnt1 First of two points, defining the line.
1002         #  @param thePnt2 Second of two points, defining the line.
1003         #  @return New GEOM.GEOM_Object, containing the created line.
1004         #
1005         #  @ref tui_creation_line "Example"
1006         def MakeLineTwoPnt(self,thePnt1, thePnt2):
1007             """
1008             Create a line, passing through the given points
1009
1010             Parameters:
1011                 thePnt1 First of two points, defining the line.
1012                 thePnt2 Second of two points, defining the line.
1013
1014             Returns:
1015                 New GEOM.GEOM_Object, containing the created line.
1016             """
1017             # Example: see GEOM_TestAll.py
1018             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1019             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1020             return anObj
1021
1022         ## Create a line on two faces intersection.
1023         #  @param theFace1 First of two faces, defining the line.
1024         #  @param theFace2 Second of two faces, defining the line.
1025         #  @return New GEOM.GEOM_Object, containing the created line.
1026         #
1027         #  @ref swig_MakeLineTwoFaces "Example"
1028         def MakeLineTwoFaces(self, theFace1, theFace2):
1029             """
1030             Create a line on two faces intersection.
1031
1032             Parameters:
1033                 theFace1 First of two faces, defining the line.
1034                 theFace2 Second of two faces, defining the line.
1035
1036             Returns:
1037                 New GEOM.GEOM_Object, containing the created line.
1038             """
1039             # Example: see GEOM_TestAll.py
1040             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1041             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1042             return anObj
1043
1044         ## Create a plane, passing through the given point
1045         #  and normal to the given vector.
1046         #  @param thePnt Point, the plane has to pass through.
1047         #  @param theVec Vector, defining the plane normal direction.
1048         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1049         #  @return New GEOM.GEOM_Object, containing the created plane.
1050         #
1051         #  @ref tui_creation_plane "Example"
1052         def MakePlane(self,thePnt, theVec, theTrimSize):
1053             """
1054             Create a plane, passing through the given point
1055             and normal to the given vector.
1056
1057             Parameters:
1058                 thePnt Point, the plane has to pass through.
1059                 theVec Vector, defining the plane normal direction.
1060                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1061
1062             Returns:    
1063                 New GEOM.GEOM_Object, containing the created plane.
1064             """
1065             # Example: see GEOM_TestAll.py
1066             theTrimSize, Parameters = ParseParameters(theTrimSize);
1067             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1068             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1069             anObj.SetParameters(Parameters)
1070             return anObj
1071
1072         ## Create a plane, passing through the three given points
1073         #  @param thePnt1 First of three points, defining the plane.
1074         #  @param thePnt2 Second of three points, defining the plane.
1075         #  @param thePnt3 Fird of three points, defining the plane.
1076         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1077         #  @return New GEOM.GEOM_Object, containing the created plane.
1078         #
1079         #  @ref tui_creation_plane "Example"
1080         def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
1081             """
1082             Create a plane, passing through the three given points
1083
1084             Parameters:
1085                 thePnt1 First of three points, defining the plane.
1086                 thePnt2 Second of three points, defining the plane.
1087                 thePnt3 Fird of three points, defining the plane.
1088                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1089
1090             Returns:
1091                 New GEOM.GEOM_Object, containing the created plane.
1092             """
1093             # Example: see GEOM_TestAll.py
1094             theTrimSize, Parameters = ParseParameters(theTrimSize);
1095             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1096             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1097             anObj.SetParameters(Parameters)
1098             return anObj
1099
1100         ## Create a plane, similar to the existing one, but with another size of representing face.
1101         #  @param theFace Referenced plane or LCS(Marker).
1102         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1103         #  @return New GEOM.GEOM_Object, containing the created plane.
1104         #
1105         #  @ref tui_creation_plane "Example"
1106         def MakePlaneFace(self,theFace, theTrimSize):
1107             """
1108             Create a plane, similar to the existing one, but with another size of representing face.
1109
1110             Parameters:
1111                 theFace Referenced plane or LCS(Marker).
1112                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1113
1114             Returns:
1115                 New GEOM.GEOM_Object, containing the created plane.
1116             """
1117             # Example: see GEOM_TestAll.py
1118             theTrimSize, Parameters = ParseParameters(theTrimSize);
1119             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1120             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1121             anObj.SetParameters(Parameters)
1122             return anObj
1123
1124         ## Create a plane, passing through the 2 vectors
1125         #  with center in a start point of the first vector.
1126         #  @param theVec1 Vector, defining center point and plane direction.
1127         #  @param theVec2 Vector, defining the plane normal direction.
1128         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1129         #  @return New GEOM.GEOM_Object, containing the created plane.
1130         #
1131         #  @ref tui_creation_plane "Example"
1132         def MakePlane2Vec(self,theVec1, theVec2, theTrimSize):
1133             """
1134             Create a plane, passing through the 2 vectors
1135             with center in a start point of the first vector.
1136
1137             Parameters:
1138                 theVec1 Vector, defining center point and plane direction.
1139                 theVec2 Vector, defining the plane normal direction.
1140                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1141
1142             Returns: 
1143                 New GEOM.GEOM_Object, containing the created plane.
1144             """
1145             # Example: see GEOM_TestAll.py
1146             theTrimSize, Parameters = ParseParameters(theTrimSize);
1147             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1148             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1149             anObj.SetParameters(Parameters)
1150             return anObj
1151
1152         ## Create a plane, based on a Local coordinate system.
1153         #  @param theLCS  coordinate system, defining plane.
1154         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1155         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1156         #  @return New GEOM.GEOM_Object, containing the created plane.
1157         #
1158         #  @ref tui_creation_plane "Example"
1159         def MakePlaneLCS(self,theLCS, theTrimSize, theOrientation):
1160             """
1161             Create a plane, based on a Local coordinate system.
1162
1163            Parameters: 
1164                 theLCS  coordinate system, defining plane.
1165                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1166                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1167
1168             Returns: 
1169                 New GEOM.GEOM_Object, containing the created plane.
1170             """
1171             # Example: see GEOM_TestAll.py
1172             theTrimSize, Parameters = ParseParameters(theTrimSize);
1173             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1174             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1175             anObj.SetParameters(Parameters)
1176             return anObj
1177
1178         ## Create a local coordinate system.
1179         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1180         #  @param XDX,XDY,XDZ Three components of OX direction
1181         #  @param YDX,YDY,YDZ Three components of OY direction
1182         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1183         #
1184         #  @ref swig_MakeMarker "Example"
1185         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
1186             """
1187             Create a local coordinate system.
1188
1189             Parameters: 
1190                 OX,OY,OZ Three coordinates of coordinate system origin.
1191                 XDX,XDY,XDZ Three components of OX direction
1192                 YDX,YDY,YDZ Three components of OY direction
1193
1194             Returns: 
1195                 New GEOM.GEOM_Object, containing the created coordinate system.
1196             """
1197             # Example: see GEOM_TestAll.py
1198             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1199             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1200             RaiseIfFailed("MakeMarker", self.BasicOp)
1201             anObj.SetParameters(Parameters)
1202             return anObj
1203
1204         ## Create a local coordinate system from shape.
1205         #  @param theShape The initial shape to detect the coordinate system.
1206         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1207         #
1208         #  @ref tui_creation_lcs "Example"
1209         def MakeMarkerFromShape(self, theShape):
1210             """
1211             Create a local coordinate system from shape.
1212
1213             Parameters:
1214                 theShape The initial shape to detect the coordinate system.
1215                 
1216             Returns: 
1217                 New GEOM.GEOM_Object, containing the created coordinate system.
1218             """
1219             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1220             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1221             return anObj
1222
1223         ## Create a local coordinate system from point and two vectors.
1224         #  @param theOrigin Point of coordinate system origin.
1225         #  @param theXVec Vector of X direction
1226         #  @param theYVec Vector of Y direction
1227         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1228         #
1229         #  @ref tui_creation_lcs "Example"
1230         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec):
1231             """
1232             Create a local coordinate system from point and two vectors.
1233
1234             Parameters:
1235                 theOrigin Point of coordinate system origin.
1236                 theXVec Vector of X direction
1237                 theYVec Vector of Y direction
1238
1239             Returns: 
1240                 New GEOM.GEOM_Object, containing the created coordinate system.
1241
1242             """
1243             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1244             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1245             return anObj
1246
1247         # end of l3_basic_go
1248         ## @}
1249
1250         ## @addtogroup l4_curves
1251         ## @{
1252
1253         ##  Create an arc of circle, passing through three given points.
1254         #  @param thePnt1 Start point of the arc.
1255         #  @param thePnt2 Middle point of the arc.
1256         #  @param thePnt3 End point of the arc.
1257         #  @return New GEOM.GEOM_Object, containing the created arc.
1258         #
1259         #  @ref swig_MakeArc "Example"
1260         def MakeArc(self,thePnt1, thePnt2, thePnt3):
1261             """
1262             Create an arc of circle, passing through three given points.
1263
1264             Parameters:
1265                 thePnt1 Start point of the arc.
1266                 thePnt2 Middle point of the arc.
1267                 thePnt3 End point of the arc.
1268
1269             Returns: 
1270                 New GEOM.GEOM_Object, containing the created arc.
1271             """
1272             # Example: see GEOM_TestAll.py
1273             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1274             RaiseIfFailed("MakeArc", self.CurvesOp)
1275             return anObj
1276
1277         ##  Create an arc of circle from a center and 2 points.
1278         #  @param thePnt1 Center of the arc
1279         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1280         #  @param thePnt3 End point of the arc (Gives also a direction)
1281         #  @param theSense Orientation of the arc
1282         #  @return New GEOM.GEOM_Object, containing the created arc.
1283         #
1284         #  @ref swig_MakeArc "Example"
1285         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
1286             """
1287             Create an arc of circle from a center and 2 points.
1288
1289             Parameters:
1290                 thePnt1 Center of the arc
1291                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1292                 thePnt3 End point of the arc (Gives also a direction)
1293                 theSense Orientation of the arc
1294
1295             Returns:
1296                 New GEOM.GEOM_Object, containing the created arc.
1297             """
1298             # Example: see GEOM_TestAll.py
1299             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1300             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1301             return anObj
1302
1303         ##  Create an arc of ellipse, of center and two points.
1304         #  @param theCenter Center of the arc.
1305         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1306         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1307         #  @return New GEOM.GEOM_Object, containing the created arc.
1308         #
1309         #  @ref swig_MakeArc "Example"
1310         def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2):
1311             """
1312             Create an arc of ellipse, of center and two points.
1313
1314             Parameters:
1315                 theCenter Center of the arc.
1316                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1317                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1318
1319             Returns:
1320                 New GEOM.GEOM_Object, containing the created arc.
1321             """
1322             # Example: see GEOM_TestAll.py
1323             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1324             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1325             return anObj
1326
1327         ## Create a circle with given center, normal vector and radius.
1328         #  @param thePnt Circle center.
1329         #  @param theVec Vector, normal to the plane of the circle.
1330         #  @param theR Circle radius.
1331         #  @return New GEOM.GEOM_Object, containing the created circle.
1332         #
1333         #  @ref tui_creation_circle "Example"
1334         def MakeCircle(self, thePnt, theVec, theR):
1335             """
1336             Create a circle with given center, normal vector and radius.
1337
1338             Parameters:
1339                 thePnt Circle center.
1340                 theVec Vector, normal to the plane of the circle.
1341                 theR Circle radius.
1342
1343             Returns:
1344                 New GEOM.GEOM_Object, containing the created circle.
1345             """
1346             # Example: see GEOM_TestAll.py
1347             theR, Parameters = ParseParameters(theR)
1348             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1349             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1350             anObj.SetParameters(Parameters)
1351             return anObj
1352
1353         ## Create a circle with given radius.
1354         #  Center of the circle will be in the origin of global
1355         #  coordinate system and normal vector will be codirected with Z axis
1356         #  @param theR Circle radius.
1357         #  @return New GEOM.GEOM_Object, containing the created circle.
1358         def MakeCircleR(self, theR):
1359             """
1360             Create a circle with given radius.
1361             Center of the circle will be in the origin of global
1362             coordinate system and normal vector will be codirected with Z axis
1363
1364             Parameters:
1365                 theR Circle radius.
1366
1367             Returns:
1368                 New GEOM.GEOM_Object, containing the created circle.
1369             """
1370             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1371             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1372             return anObj
1373
1374         ## Create a circle, passing through three given points
1375         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1376         #  @return New GEOM.GEOM_Object, containing the created circle.
1377         #
1378         #  @ref tui_creation_circle "Example"
1379         def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3):
1380             """
1381             Create a circle, passing through three given points
1382
1383             Parameters:
1384                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1385
1386             Returns:
1387                 New GEOM.GEOM_Object, containing the created circle.
1388             """
1389             # Example: see GEOM_TestAll.py
1390             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1391             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1392             return anObj
1393
1394         ## Create a circle, with given point1 as center,
1395         #  passing through the point2 as radius and laying in the plane,
1396         #  defined by all three given points.
1397         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1398         #  @return New GEOM.GEOM_Object, containing the created circle.
1399         #
1400         #  @ref swig_MakeCircle "Example"
1401         def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
1402             """
1403             Create a circle, with given point1 as center,
1404             passing through the point2 as radius and laying in the plane,
1405             defined by all three given points.
1406
1407             Parameters:
1408                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1409
1410             Returns:
1411                 New GEOM.GEOM_Object, containing the created circle.
1412             """
1413             # Example: see GEOM_example6.py
1414             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
1415             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
1416             return anObj
1417
1418         ## Create an ellipse with given center, normal vector and radiuses.
1419         #  @param thePnt Ellipse center.
1420         #  @param theVec Vector, normal to the plane of the ellipse.
1421         #  @param theRMajor Major ellipse radius.
1422         #  @param theRMinor Minor ellipse radius.
1423         #  @param theVecMaj Vector, direction of the ellipse's main axis.
1424         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1425         #
1426         #  @ref tui_creation_ellipse "Example"
1427         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None):
1428             """
1429             Create an ellipse with given center, normal vector and radiuses.
1430
1431             Parameters:
1432                 thePnt Ellipse center.
1433                 theVec Vector, normal to the plane of the ellipse.
1434                 theRMajor Major ellipse radius.
1435                 theRMinor Minor ellipse radius.
1436                 theVecMaj Vector, direction of the ellipse's main axis.
1437
1438             Returns:    
1439                 New GEOM.GEOM_Object, containing the created ellipse.
1440             """
1441             # Example: see GEOM_TestAll.py
1442             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
1443             if theVecMaj is not None:
1444                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
1445             else:
1446                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
1447                 pass
1448             RaiseIfFailed("MakeEllipse", self.CurvesOp)
1449             anObj.SetParameters(Parameters)
1450             return anObj
1451
1452         ## Create an ellipse with given radiuses.
1453         #  Center of the ellipse will be in the origin of global
1454         #  coordinate system and normal vector will be codirected with Z axis
1455         #  @param theRMajor Major ellipse radius.
1456         #  @param theRMinor Minor ellipse radius.
1457         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1458         def MakeEllipseRR(self, theRMajor, theRMinor):
1459             """
1460             Create an ellipse with given radiuses.
1461             Center of the ellipse will be in the origin of global
1462             coordinate system and normal vector will be codirected with Z axis
1463
1464             Parameters:
1465                 theRMajor Major ellipse radius.
1466                 theRMinor Minor ellipse radius.
1467
1468             Returns:
1469                 New GEOM.GEOM_Object, containing the created ellipse.
1470             """
1471             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
1472             RaiseIfFailed("MakeEllipse", self.CurvesOp)
1473             return anObj
1474
1475         ## Create a polyline on the set of points.
1476         #  @param thePoints Sequence of points for the polyline.
1477         #  @param theIsClosed If True, build a closed wire.
1478         #  @return New GEOM.GEOM_Object, containing the created polyline.
1479         #
1480         #  @ref tui_creation_curve "Example"
1481         def MakePolyline(self, thePoints, theIsClosed=False):
1482             """
1483             Create a polyline on the set of points.
1484
1485             Parameters:
1486                 thePoints Sequence of points for the polyline.
1487                 theIsClosed If True, build a closed wire.
1488
1489             Returns:
1490                 New GEOM.GEOM_Object, containing the created polyline.
1491             """
1492             # Example: see GEOM_TestAll.py
1493             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
1494             RaiseIfFailed("MakePolyline", self.CurvesOp)
1495             return anObj
1496
1497         ## Create bezier curve on the set of points.
1498         #  @param thePoints Sequence of points for the bezier curve.
1499         #  @param theIsClosed If True, build a closed curve.
1500         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
1501         #
1502         #  @ref tui_creation_curve "Example"
1503         def MakeBezier(self, thePoints, theIsClosed=False):
1504             """
1505             Create bezier curve on the set of points.
1506
1507             Parameters:
1508                 thePoints Sequence of points for the bezier curve.
1509                 theIsClosed If True, build a closed curve.
1510
1511             Returns:
1512                 New GEOM.GEOM_Object, containing the created bezier curve.
1513             """
1514             # Example: see GEOM_TestAll.py
1515             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
1516             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
1517             return anObj
1518
1519         ## Create B-Spline curve on the set of points.
1520         #  @param thePoints Sequence of points for the B-Spline curve.
1521         #  @param theIsClosed If True, build a closed curve.
1522         #  @param theDoReordering If TRUE, the algo does not follow the order of
1523         #                         \a thePoints but searches for the closest vertex.
1524         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
1525         #
1526         #  @ref tui_creation_curve "Example"
1527         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False):
1528             """
1529             Create B-Spline curve on the set of points.
1530
1531             Parameters:
1532                 thePoints Sequence of points for the B-Spline curve.
1533                 theIsClosed If True, build a closed curve.
1534                 theDoReordering If True, the algo does not follow the order of
1535                                 thePoints but searches for the closest vertex.
1536
1537             Returns:                     
1538                 New GEOM.GEOM_Object, containing the created B-Spline curve.
1539             """
1540             # Example: see GEOM_TestAll.py
1541             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
1542             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
1543             return anObj
1544
1545
1546         ## Creates a curve using the parametric definition of the basic points.
1547         #  @param thexExpr parametric equation of the coordinates X.
1548         #  @param theyExpr parametric equation of the coordinates Y.
1549         #  @param thezExpr parametric equation of the coordinates Z.
1550         #  @param theParamMin the minimal value of the parameter.
1551         #  @param theParamMax the maximum value of the parameter.
1552         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
1553         #  @param theCurveType the type of the curve.
1554         #  @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.
1555         #  @return New GEOM.GEOM_Object, containing the created curve.
1556         #
1557         #  @ref tui_creation_curve "Example"
1558         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
1559                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False ):
1560             """
1561             Creates a curve using the parametric definition of the basic points.
1562
1563             Parameters:
1564                 thexExpr parametric equation of the coordinates X.
1565                 theyExpr parametric equation of the coordinates Y.
1566                 thezExpr parametric equation of the coordinates Z.
1567                 theParamMin the minimal value of the parameter.
1568                 theParamMax the maximum value of the parameter.
1569                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
1570                 theCurveType the type of the curve.
1571                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
1572                              method is used which can lead to a bug.
1573
1574             Returns:
1575                 New GEOM.GEOM_Object, containing the created curve.
1576             """
1577             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
1578             if theNewMethod:
1579               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
1580             else:
1581               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
1582             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
1583             anObj.SetParameters(Parameters)
1584             return anObj
1585             
1586
1587
1588         # end of l4_curves
1589         ## @}
1590
1591         ## @addtogroup l3_sketcher
1592         ## @{
1593
1594         ## Create a sketcher (wire or face), following the textual description,
1595         #  passed through <VAR>theCommand</VAR> argument. \n
1596         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
1597         #  Format of the description string have to be the following:
1598         #
1599         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1600         #
1601         #  Where:
1602         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
1603         #  - CMD is one of
1604         #     - "R angle" : Set the direction by angle
1605         #     - "D dx dy" : Set the direction by DX & DY
1606         #     .
1607         #       \n
1608         #     - "TT x y" : Create segment by point at X & Y
1609         #     - "T dx dy" : Create segment by point with DX & DY
1610         #     - "L length" : Create segment by direction & Length
1611         #     - "IX x" : Create segment by direction & Intersect. X
1612         #     - "IY y" : Create segment by direction & Intersect. Y
1613         #     .
1614         #       \n
1615         #     - "C radius length" : Create arc by direction, radius and length(in degree)
1616         #     - "AA x y": Create arc by point at X & Y
1617         #     - "A dx dy" : Create arc by point with DX & DY
1618         #     - "A dx dy" : Create arc by point with DX & DY
1619         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
1620         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
1621         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
1622         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
1623         #     .
1624         #       \n
1625         #     - "WW" : Close Wire (to finish)
1626         #     - "WF" : Close Wire and build face (to finish)
1627         #     .
1628         #        \n
1629         #  - Flag1 (= reverse) is 0 or 2 ...
1630         #     - if 0 the drawn arc is the one of lower angle (< Pi)
1631         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
1632         #     .
1633         #        \n
1634         #  - Flag2 (= control tolerance) is 0 or 1 ...
1635         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
1636         #     - if 1 the wire is built only if the end point is on the arc
1637         #       with a tolerance of 10^-7 on the distance else the creation fails
1638         #
1639         #  @param theCommand String, defining the sketcher in local
1640         #                    coordinates of the working plane.
1641         #  @param theWorkingPlane Nine double values, defining origin,
1642         #                         OZ and OX directions of the working plane.
1643         #  @return New GEOM.GEOM_Object, containing the created wire.
1644         #
1645         #  @ref tui_sketcher_page "Example"
1646         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]):
1647             """
1648             Create a sketcher (wire or face), following the textual description, passed
1649             through theCommand argument.
1650             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
1651             Format of the description string have to be the following:
1652                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1653             Where:
1654             - x1, y1 are coordinates of the first sketcher point (zero by default),
1655             - CMD is one of
1656                - "R angle" : Set the direction by angle
1657                - "D dx dy" : Set the direction by DX & DY
1658                
1659                - "TT x y" : Create segment by point at X & Y
1660                - "T dx dy" : Create segment by point with DX & DY
1661                - "L length" : Create segment by direction & Length
1662                - "IX x" : Create segment by direction & Intersect. X
1663                - "IY y" : Create segment by direction & Intersect. Y
1664
1665                - "C radius length" : Create arc by direction, radius and length(in degree)
1666                - "AA x y": Create arc by point at X & Y
1667                - "A dx dy" : Create arc by point with DX & DY
1668                - "A dx dy" : Create arc by point with DX & DY
1669                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
1670                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
1671                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
1672                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
1673
1674                - "WW" : Close Wire (to finish)
1675                - "WF" : Close Wire and build face (to finish)
1676             
1677             - Flag1 (= reverse) is 0 or 2 ...
1678                - if 0 the drawn arc is the one of lower angle (< Pi)
1679                - if 2 the drawn arc ius the one of greater angle (> Pi)
1680         
1681             - Flag2 (= control tolerance) is 0 or 1 ...
1682                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
1683                - if 1 the wire is built only if the end point is on the arc
1684                  with a tolerance of 10^-7 on the distance else the creation fails
1685
1686             Parameters:
1687                 theCommand String, defining the sketcher in local
1688                            coordinates of the working plane.
1689                 theWorkingPlane Nine double values, defining origin,
1690                                 OZ and OX directions of the working plane.
1691
1692             Returns:
1693                 New GEOM.GEOM_Object, containing the created wire.
1694             """
1695             # Example: see GEOM_TestAll.py
1696             theCommand,Parameters = ParseSketcherCommand(theCommand)
1697             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
1698             RaiseIfFailed("MakeSketcher", self.CurvesOp)
1699             anObj.SetParameters(Parameters)
1700             return anObj
1701
1702         ## Create a sketcher (wire or face), following the textual description,
1703         #  passed through <VAR>theCommand</VAR> argument. \n
1704         #  For format of the description string see MakeSketcher() method.\n
1705         #  @param theCommand String, defining the sketcher in local
1706         #                    coordinates of the working plane.
1707         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
1708         #  @return New GEOM.GEOM_Object, containing the created wire.
1709         #
1710         #  @ref tui_sketcher_page "Example"
1711         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane):
1712             """
1713             Create a sketcher (wire or face), following the textual description,
1714             passed through theCommand argument.
1715             For format of the description string see geompy.MakeSketcher() method.
1716
1717             Parameters:
1718                 theCommand String, defining the sketcher in local
1719                            coordinates of the working plane.
1720                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
1721
1722             Returns:
1723                 New GEOM.GEOM_Object, containing the created wire.
1724             """
1725             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
1726             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
1727             return anObj
1728
1729         ## Create a sketcher wire, following the numerical description,
1730         #  passed through <VAR>theCoordinates</VAR> argument. \n
1731         #  @param theCoordinates double values, defining points to create a wire,
1732         #                                                      passing from it.
1733         #  @return New GEOM.GEOM_Object, containing the created wire.
1734         #
1735         #  @ref tui_sketcher_page "Example"
1736         def Make3DSketcher(self, theCoordinates):
1737             """
1738             Create a sketcher wire, following the numerical description,
1739             passed through theCoordinates argument.
1740
1741             Parameters:
1742                 theCoordinates double values, defining points to create a wire,
1743                                passing from it.
1744
1745             Returns:
1746                 New GEOM_Object, containing the created wire.
1747             """
1748             theCoordinates,Parameters = ParseParameters(theCoordinates)
1749             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
1750             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
1751             anObj.SetParameters(Parameters)
1752             return anObj
1753
1754         # end of l3_sketcher
1755         ## @}
1756
1757         ## @addtogroup l3_3d_primitives
1758         ## @{
1759
1760         ## Create a box by coordinates of two opposite vertices.
1761         #
1762         #  @param x1,y1,z1 double values, defining first point it.
1763         #  @param x2,y2,z2 double values, defining first point it.
1764         #
1765         #  @return New GEOM.GEOM_Object, containing the created box.
1766         #  @ref tui_creation_box "Example"
1767         def MakeBox(self,x1,y1,z1,x2,y2,z2):
1768             """
1769             Create a box by coordinates of two opposite vertices.
1770             
1771             Parameters:
1772                 x1,y1,z1 double values, defining first point.
1773                 x2,y2,z2 double values, defining second point.
1774                 
1775             Returns:
1776                 New GEOM.GEOM_Object, containing the created box.
1777             """
1778             # Example: see GEOM_TestAll.py
1779             pnt1 = self.MakeVertex(x1,y1,z1)
1780             pnt2 = self.MakeVertex(x2,y2,z2)
1781             return self.MakeBoxTwoPnt(pnt1,pnt2)
1782
1783         ## Create a box with specified dimensions along the coordinate axes
1784         #  and with edges, parallel to the coordinate axes.
1785         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
1786         #  @param theDX Length of Box edges, parallel to OX axis.
1787         #  @param theDY Length of Box edges, parallel to OY axis.
1788         #  @param theDZ Length of Box edges, parallel to OZ axis.
1789         #  @return New GEOM.GEOM_Object, containing the created box.
1790         #
1791         #  @ref tui_creation_box "Example"
1792         def MakeBoxDXDYDZ(self,theDX, theDY, theDZ):
1793             """
1794             Create a box with specified dimensions along the coordinate axes
1795             and with edges, parallel to the coordinate axes.
1796             Center of the box will be at point (DX/2, DY/2, DZ/2).
1797
1798             Parameters:
1799                 theDX Length of Box edges, parallel to OX axis.
1800                 theDY Length of Box edges, parallel to OY axis.
1801                 theDZ Length of Box edges, parallel to OZ axis.
1802
1803             Returns:   
1804                 New GEOM.GEOM_Object, containing the created box.
1805             """
1806             # Example: see GEOM_TestAll.py
1807             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1808             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
1809             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
1810             anObj.SetParameters(Parameters)
1811             return anObj
1812
1813         ## Create a box with two specified opposite vertices,
1814         #  and with edges, parallel to the coordinate axes
1815         #  @param thePnt1 First of two opposite vertices.
1816         #  @param thePnt2 Second of two opposite vertices.
1817         #  @return New GEOM.GEOM_Object, containing the created box.
1818         #
1819         #  @ref tui_creation_box "Example"
1820         def MakeBoxTwoPnt(self,thePnt1, thePnt2):
1821             """
1822             Create a box with two specified opposite vertices,
1823             and with edges, parallel to the coordinate axes
1824
1825             Parameters:
1826                 thePnt1 First of two opposite vertices.
1827                 thePnt2 Second of two opposite vertices.
1828
1829             Returns:
1830                 New GEOM.GEOM_Object, containing the created box.
1831             """
1832             # Example: see GEOM_TestAll.py
1833             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
1834             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
1835             return anObj
1836
1837         ## Create a face with specified dimensions along OX-OY coordinate axes,
1838         #  with edges, parallel to this coordinate axes.
1839         #  @param theH height of Face.
1840         #  @param theW width of Face.
1841         #  @param theOrientation orientation belong axis OXY OYZ OZX
1842         #  @return New GEOM.GEOM_Object, containing the created face.
1843         #
1844         #  @ref tui_creation_face "Example"
1845         def MakeFaceHW(self,theH, theW, theOrientation):
1846             """
1847             Create a face with specified dimensions along OX-OY coordinate axes,
1848             with edges, parallel to this coordinate axes.
1849
1850             Parameters:
1851                 theH height of Face.
1852                 theW width of Face.
1853                 theOrientation orientation belong axis OXY OYZ OZX
1854
1855             Returns:
1856                 New GEOM.GEOM_Object, containing the created face.
1857             """
1858             # Example: see GEOM_TestAll.py
1859             theH,theW,Parameters = ParseParameters(theH, theW)
1860             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
1861             RaiseIfFailed("MakeFaceHW", self.PrimOp)
1862             anObj.SetParameters(Parameters)
1863             return anObj
1864
1865         ## Create a face from another plane and two sizes,
1866         #  vertical size and horisontal size.
1867         #  @param theObj   Normale vector to the creating face or
1868         #  the face object.
1869         #  @param theH     Height (vertical size).
1870         #  @param theW     Width (horisontal size).
1871         #  @return New GEOM.GEOM_Object, containing the created face.
1872         #
1873         #  @ref tui_creation_face "Example"
1874         def MakeFaceObjHW(self, theObj, theH, theW):
1875             """
1876             Create a face from another plane and two sizes,
1877             vertical size and horisontal size.
1878
1879             Parameters:
1880                 theObj   Normale vector to the creating face or
1881                          the face object.
1882                 theH     Height (vertical size).
1883                 theW     Width (horisontal size).
1884
1885             Returns:
1886                 New GEOM_Object, containing the created face.
1887             """
1888             # Example: see GEOM_TestAll.py
1889             theH,theW,Parameters = ParseParameters(theH, theW)
1890             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
1891             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
1892             anObj.SetParameters(Parameters)
1893             return anObj
1894
1895         ## Create a disk with given center, normal vector and radius.
1896         #  @param thePnt Disk center.
1897         #  @param theVec Vector, normal to the plane of the disk.
1898         #  @param theR Disk radius.
1899         #  @return New GEOM.GEOM_Object, containing the created disk.
1900         #
1901         #  @ref tui_creation_disk "Example"
1902         def MakeDiskPntVecR(self,thePnt, theVec, theR):
1903             """
1904             Create a disk with given center, normal vector and radius.
1905
1906             Parameters:
1907                 thePnt Disk center.
1908                 theVec Vector, normal to the plane of the disk.
1909                 theR Disk radius.
1910
1911             Returns:    
1912                 New GEOM.GEOM_Object, containing the created disk.
1913             """
1914             # Example: see GEOM_TestAll.py
1915             theR,Parameters = ParseParameters(theR)
1916             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
1917             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
1918             anObj.SetParameters(Parameters)
1919             return anObj
1920
1921         ## Create a disk, passing through three given points
1922         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
1923         #  @return New GEOM.GEOM_Object, containing the created disk.
1924         #
1925         #  @ref tui_creation_disk "Example"
1926         def MakeDiskThreePnt(self,thePnt1, thePnt2, thePnt3):
1927             """
1928             Create a disk, passing through three given points
1929
1930             Parameters:
1931                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
1932
1933             Returns:    
1934                 New GEOM.GEOM_Object, containing the created disk.
1935             """
1936             # Example: see GEOM_TestAll.py
1937             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
1938             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
1939             return anObj
1940
1941         ## Create a disk with specified dimensions along OX-OY coordinate axes.
1942         #  @param theR Radius of Face.
1943         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
1944         #  @return New GEOM.GEOM_Object, containing the created disk.
1945         #
1946         #  @ref tui_creation_face "Example"
1947         def MakeDiskR(self,theR, theOrientation):
1948             """
1949             Create a disk with specified dimensions along OX-OY coordinate axes.
1950
1951             Parameters:
1952                 theR Radius of Face.
1953                 theOrientation set the orientation belong axis OXY or OYZ or OZX
1954
1955             Returns: 
1956                 New GEOM.GEOM_Object, containing the created disk.
1957
1958             Example of usage:
1959                 Disk3 = geompy.MakeDiskR(100., 1)   #(1 Doubles, 1 Int)->GEOM_Object
1960             """
1961             # Example: see GEOM_TestAll.py
1962             theR,Parameters = ParseParameters(theR)
1963             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
1964             RaiseIfFailed("MakeDiskR", self.PrimOp)
1965             anObj.SetParameters(Parameters)
1966             return anObj
1967
1968         ## Create a cylinder with given base point, axis, radius and height.
1969         #  @param thePnt Central point of cylinder base.
1970         #  @param theAxis Cylinder axis.
1971         #  @param theR Cylinder radius.
1972         #  @param theH Cylinder height.
1973         #  @return New GEOM.GEOM_Object, containing the created cylinder.
1974         #
1975         #  @ref tui_creation_cylinder "Example"
1976         def MakeCylinder(self,thePnt, theAxis, theR, theH):
1977             """
1978             Create a cylinder with given base point, axis, radius and height.
1979
1980             Parameters:
1981                 thePnt Central point of cylinder base.
1982                 theAxis Cylinder axis.
1983                 theR Cylinder radius.
1984                 theH Cylinder height.
1985
1986             Returns: 
1987                 New GEOM.GEOM_Object, containing the created cylinder.
1988             """
1989             # Example: see GEOM_TestAll.py
1990             theR,theH,Parameters = ParseParameters(theR, theH)
1991             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
1992             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
1993             anObj.SetParameters(Parameters)
1994             return anObj
1995
1996         ## Create a cylinder with given radius and height at
1997         #  the origin of coordinate system. Axis of the cylinder
1998         #  will be collinear to the OZ axis of the coordinate system.
1999         #  @param theR Cylinder radius.
2000         #  @param theH Cylinder height.
2001         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2002         #
2003         #  @ref tui_creation_cylinder "Example"
2004         def MakeCylinderRH(self,theR, theH):
2005             """
2006             Create a cylinder with given radius and height at
2007             the origin of coordinate system. Axis of the cylinder
2008             will be collinear to the OZ axis of the coordinate system.
2009
2010             Parameters:
2011                 theR Cylinder radius.
2012                 theH Cylinder height.
2013
2014             Returns:    
2015                 New GEOM.GEOM_Object, containing the created cylinder.
2016             """
2017             # Example: see GEOM_TestAll.py
2018             theR,theH,Parameters = ParseParameters(theR, theH)
2019             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2020             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2021             anObj.SetParameters(Parameters)
2022             return anObj
2023
2024         ## Create a sphere with given center and radius.
2025         #  @param thePnt Sphere center.
2026         #  @param theR Sphere radius.
2027         #  @return New GEOM.GEOM_Object, containing the created sphere.
2028         #
2029         #  @ref tui_creation_sphere "Example"
2030         def MakeSpherePntR(self, thePnt, theR):
2031             """
2032             Create a sphere with given center and radius.
2033
2034             Parameters:
2035                 thePnt Sphere center.
2036                 theR Sphere radius.
2037
2038             Returns:    
2039                 New GEOM.GEOM_Object, containing the created sphere.            
2040             """
2041             # Example: see GEOM_TestAll.py
2042             theR,Parameters = ParseParameters(theR)
2043             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2044             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2045             anObj.SetParameters(Parameters)
2046             return anObj
2047
2048         ## Create a sphere with given center and radius.
2049         #  @param x,y,z Coordinates of sphere center.
2050         #  @param theR Sphere radius.
2051         #  @return New GEOM.GEOM_Object, containing the created sphere.
2052         #
2053         #  @ref tui_creation_sphere "Example"
2054         def MakeSphere(self, x, y, z, theR):
2055             """
2056             Create a sphere with given center and radius.
2057
2058             Parameters: 
2059                 x,y,z Coordinates of sphere center.
2060                 theR Sphere radius.
2061
2062             Returns:
2063                 New GEOM.GEOM_Object, containing the created sphere.
2064             """
2065             # Example: see GEOM_TestAll.py
2066             point = self.MakeVertex(x, y, z)
2067             anObj = self.MakeSpherePntR(point, theR)
2068             return anObj
2069
2070         ## Create a sphere with given radius at the origin of coordinate system.
2071         #  @param theR Sphere radius.
2072         #  @return New GEOM.GEOM_Object, containing the created sphere.
2073         #
2074         #  @ref tui_creation_sphere "Example"
2075         def MakeSphereR(self, theR):
2076             """
2077             Create a sphere with given radius at the origin of coordinate system.
2078
2079             Parameters: 
2080                 theR Sphere radius.
2081
2082             Returns:
2083                 New GEOM.GEOM_Object, containing the created sphere.            
2084             """
2085             # Example: see GEOM_TestAll.py
2086             theR,Parameters = ParseParameters(theR)
2087             anObj = self.PrimOp.MakeSphereR(theR)
2088             RaiseIfFailed("MakeSphereR", self.PrimOp)
2089             anObj.SetParameters(Parameters)
2090             return anObj
2091
2092         ## Create a cone with given base point, axis, height and radiuses.
2093         #  @param thePnt Central point of the first cone base.
2094         #  @param theAxis Cone axis.
2095         #  @param theR1 Radius of the first cone base.
2096         #  @param theR2 Radius of the second cone base.
2097         #    \note If both radiuses are non-zero, the cone will be truncated.
2098         #    \note If the radiuses are equal, a cylinder will be created instead.
2099         #  @param theH Cone height.
2100         #  @return New GEOM.GEOM_Object, containing the created cone.
2101         #
2102         #  @ref tui_creation_cone "Example"
2103         def MakeCone(self,thePnt, theAxis, theR1, theR2, theH):
2104             """
2105             Create a cone with given base point, axis, height and radiuses.
2106
2107             Parameters: 
2108                 thePnt Central point of the first cone base.
2109                 theAxis Cone axis.
2110                 theR1 Radius of the first cone base.
2111                 theR2 Radius of the second cone base.
2112                 theH Cone height.
2113
2114            Note:
2115                 If both radiuses are non-zero, the cone will be truncated.
2116                 If the radiuses are equal, a cylinder will be created instead.
2117
2118            Returns:
2119                 New GEOM.GEOM_Object, containing the created cone.
2120             """
2121             # Example: see GEOM_TestAll.py
2122             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2123             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2124             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2125             anObj.SetParameters(Parameters)
2126             return anObj
2127
2128         ## Create a cone with given height and radiuses at
2129         #  the origin of coordinate system. Axis of the cone will
2130         #  be collinear to the OZ axis of the coordinate system.
2131         #  @param theR1 Radius of the first cone base.
2132         #  @param theR2 Radius of the second cone base.
2133         #    \note If both radiuses are non-zero, the cone will be truncated.
2134         #    \note If the radiuses are equal, a cylinder will be created instead.
2135         #  @param theH Cone height.
2136         #  @return New GEOM.GEOM_Object, containing the created cone.
2137         #
2138         #  @ref tui_creation_cone "Example"
2139         def MakeConeR1R2H(self,theR1, theR2, theH):
2140             """
2141             Create a cone with given height and radiuses at
2142             the origin of coordinate system. Axis of the cone will
2143             be collinear to the OZ axis of the coordinate system.
2144
2145             Parameters: 
2146                 theR1 Radius of the first cone base.
2147                 theR2 Radius of the second cone base.
2148                 theH Cone height.
2149
2150             Note:
2151                 If both radiuses are non-zero, the cone will be truncated.
2152                 If the radiuses are equal, a cylinder will be created instead.
2153
2154            Returns:
2155                 New GEOM.GEOM_Object, containing the created cone.
2156             """
2157             # Example: see GEOM_TestAll.py
2158             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2159             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2160             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2161             anObj.SetParameters(Parameters)
2162             return anObj
2163
2164         ## Create a torus with given center, normal vector and radiuses.
2165         #  @param thePnt Torus central point.
2166         #  @param theVec Torus axis of symmetry.
2167         #  @param theRMajor Torus major radius.
2168         #  @param theRMinor Torus minor radius.
2169         #  @return New GEOM.GEOM_Object, containing the created torus.
2170         #
2171         #  @ref tui_creation_torus "Example"
2172         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor):
2173             """
2174             Create a torus with given center, normal vector and radiuses.
2175
2176             Parameters: 
2177                 thePnt Torus central point.
2178                 theVec Torus axis of symmetry.
2179                 theRMajor Torus major radius.
2180                 theRMinor Torus minor radius.
2181
2182            Returns:
2183                 New GEOM.GEOM_Object, containing the created torus.
2184             """
2185             # Example: see GEOM_TestAll.py
2186             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2187             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
2188             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
2189             anObj.SetParameters(Parameters)
2190             return anObj
2191
2192         ## Create a torus with given radiuses at the origin of coordinate system.
2193         #  @param theRMajor Torus major radius.
2194         #  @param theRMinor Torus minor radius.
2195         #  @return New GEOM.GEOM_Object, containing the created torus.
2196         #
2197         #  @ref tui_creation_torus "Example"
2198         def MakeTorusRR(self, theRMajor, theRMinor):
2199             """
2200            Create a torus with given radiuses at the origin of coordinate system.
2201
2202            Parameters: 
2203                 theRMajor Torus major radius.
2204                 theRMinor Torus minor radius.
2205
2206            Returns:
2207                 New GEOM.GEOM_Object, containing the created torus.            
2208             """
2209             # Example: see GEOM_TestAll.py
2210             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2211             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
2212             RaiseIfFailed("MakeTorusRR", self.PrimOp)
2213             anObj.SetParameters(Parameters)
2214             return anObj
2215
2216         # end of l3_3d_primitives
2217         ## @}
2218
2219         ## @addtogroup l3_complex
2220         ## @{
2221
2222         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
2223         #  @param theBase Base shape to be extruded.
2224         #  @param thePoint1 First end of extrusion vector.
2225         #  @param thePoint2 Second end of extrusion vector.
2226         #  @param theScaleFactor Use it to make prism with scaled second base.
2227         #                        Nagative value means not scaled second base.
2228         #  @return New GEOM.GEOM_Object, containing the created prism.
2229         #
2230         #  @ref tui_creation_prism "Example"
2231         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0):
2232             """
2233             Create a shape by extrusion of the base shape along a vector, defined by two points.
2234
2235             Parameters: 
2236                 theBase Base shape to be extruded.
2237                 thePoint1 First end of extrusion vector.
2238                 thePoint2 Second end of extrusion vector.
2239                 theScaleFactor Use it to make prism with scaled second base.
2240                                Nagative value means not scaled second base.
2241
2242             Returns:
2243                 New GEOM.GEOM_Object, containing the created prism.
2244             """
2245             # Example: see GEOM_TestAll.py
2246             anObj = None
2247             Parameters = ""
2248             if theScaleFactor > 0:
2249                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
2250                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
2251             else:
2252                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
2253             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
2254             anObj.SetParameters(Parameters)
2255             return anObj
2256
2257         ## Create a shape by extrusion of the base shape along a
2258         #  vector, defined by two points, in 2 Ways (forward/backward).
2259         #  @param theBase Base shape to be extruded.
2260         #  @param thePoint1 First end of extrusion vector.
2261         #  @param thePoint2 Second end of extrusion vector.
2262         #  @return New GEOM.GEOM_Object, containing the created prism.
2263         #
2264         #  @ref tui_creation_prism "Example"
2265         def MakePrism2Ways(self, theBase, thePoint1, thePoint2):
2266             """
2267             Create a shape by extrusion of the base shape along a
2268             vector, defined by two points, in 2 Ways (forward/backward).
2269
2270             Parameters: 
2271                 theBase Base shape to be extruded.
2272                 thePoint1 First end of extrusion vector.
2273                 thePoint2 Second end of extrusion vector.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created prism.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
2280             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
2281             return anObj
2282
2283         ## Create a shape by extrusion of the base shape along the vector,
2284         #  i.e. all the space, transfixed by the base shape during its translation
2285         #  along the vector on the given distance.
2286         #  @param theBase Base shape to be extruded.
2287         #  @param theVec Direction of extrusion.
2288         #  @param theH Prism dimension along theVec.
2289         #  @param theScaleFactor Use it to make prism with scaled second base.
2290         #                        Negative value means not scaled second base.
2291         #  @return New GEOM.GEOM_Object, containing the created prism.
2292         #
2293         #  @ref tui_creation_prism "Example"
2294         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0):
2295             """
2296             Create a shape by extrusion of the base shape along the vector,
2297             i.e. all the space, transfixed by the base shape during its translation
2298             along the vector on the given distance.
2299
2300             Parameters: 
2301                 theBase Base shape to be extruded.
2302                 theVec Direction of extrusion.
2303                 theH Prism dimension along theVec.
2304                 theScaleFactor Use it to make prism with scaled second base.
2305                                Negative value means not scaled second base.
2306
2307             Returns:
2308                 New GEOM.GEOM_Object, containing the created prism.
2309             """
2310             # Example: see GEOM_TestAll.py
2311             anObj = None
2312             Parameters = ""
2313             if theScaleFactor > 0:
2314                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
2315                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
2316             else:
2317                 theH,Parameters = ParseParameters(theH)
2318                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
2319             RaiseIfFailed("MakePrismVecH", self.PrimOp)
2320             anObj.SetParameters(Parameters)
2321             return anObj
2322
2323         ## Create a shape by extrusion of the base shape along the vector,
2324         #  i.e. all the space, transfixed by the base shape during its translation
2325         #  along the vector on the given distance in 2 Ways (forward/backward).
2326         #  @param theBase Base shape to be extruded.
2327         #  @param theVec Direction of extrusion.
2328         #  @param theH Prism dimension along theVec in forward direction.
2329         #  @return New GEOM.GEOM_Object, containing the created prism.
2330         #
2331         #  @ref tui_creation_prism "Example"
2332         def MakePrismVecH2Ways(self, theBase, theVec, theH):
2333             """
2334             Create a shape by extrusion of the base shape along the vector,
2335             i.e. all the space, transfixed by the base shape during its translation
2336             along the vector on the given distance in 2 Ways (forward/backward).
2337
2338             Parameters:
2339                 theBase Base shape to be extruded.
2340                 theVec Direction of extrusion.
2341                 theH Prism dimension along theVec in forward direction.
2342
2343             Returns:
2344                 New GEOM.GEOM_Object, containing the created prism.
2345             """
2346             # Example: see GEOM_TestAll.py
2347             theH,Parameters = ParseParameters(theH)
2348             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
2349             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
2350             anObj.SetParameters(Parameters)
2351             return anObj
2352
2353         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
2354         #  @param theBase Base shape to be extruded.
2355         #  @param theDX, theDY, theDZ Directions of extrusion.
2356         #  @param theScaleFactor Use it to make prism with scaled second base.
2357         #                        Nagative value means not scaled second base.
2358         #  @return New GEOM.GEOM_Object, containing the created prism.
2359         #
2360         #  @ref tui_creation_prism "Example"
2361         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0):
2362             """
2363             Create a shape by extrusion of the base shape along the dx, dy, dz direction
2364
2365             Parameters:
2366                 theBase Base shape to be extruded.
2367                 theDX, theDY, theDZ Directions of extrusion.
2368                 theScaleFactor Use it to make prism with scaled second base.
2369                                Nagative value means not scaled second base.
2370
2371             Returns: 
2372                 New GEOM.GEOM_Object, containing the created prism.
2373             """
2374             # Example: see GEOM_TestAll.py
2375             anObj = None
2376             Parameters = ""
2377             if theScaleFactor > 0:
2378                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
2379                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
2380             else:
2381                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2382                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
2383             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
2384             anObj.SetParameters(Parameters)
2385             return anObj
2386
2387         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
2388         #  i.e. all the space, transfixed by the base shape during its translation
2389         #  along the vector on the given distance in 2 Ways (forward/backward).
2390         #  @param theBase Base shape to be extruded.
2391         #  @param theDX, theDY, theDZ Directions of extrusion.
2392         #  @return New GEOM.GEOM_Object, containing the created prism.
2393         #
2394         #  @ref tui_creation_prism "Example"
2395         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ):
2396             """
2397             Create a shape by extrusion of the base shape along the dx, dy, dz direction
2398             i.e. all the space, transfixed by the base shape during its translation
2399             along the vector on the given distance in 2 Ways (forward/backward).
2400
2401             Parameters:
2402                 theBase Base shape to be extruded.
2403                 theDX, theDY, theDZ Directions of extrusion.
2404
2405             Returns:
2406                 New GEOM.GEOM_Object, containing the created prism.
2407             """
2408             # Example: see GEOM_TestAll.py
2409             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2410             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
2411             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
2412             anObj.SetParameters(Parameters)
2413             return anObj
2414
2415         ## Create a shape by revolution of the base shape around the axis
2416         #  on the given angle, i.e. all the space, transfixed by the base
2417         #  shape during its rotation around the axis on the given angle.
2418         #  @param theBase Base shape to be rotated.
2419         #  @param theAxis Rotation axis.
2420         #  @param theAngle Rotation angle in radians.
2421         #  @return New GEOM.GEOM_Object, containing the created revolution.
2422         #
2423         #  @ref tui_creation_revolution "Example"
2424         def MakeRevolution(self, theBase, theAxis, theAngle):
2425             """
2426             Create a shape by revolution of the base shape around the axis
2427             on the given angle, i.e. all the space, transfixed by the base
2428             shape during its rotation around the axis on the given angle.
2429
2430             Parameters:
2431                 theBase Base shape to be rotated.
2432                 theAxis Rotation axis.
2433                 theAngle Rotation angle in radians.
2434
2435             Returns: 
2436                 New GEOM.GEOM_Object, containing the created revolution.
2437             """
2438             # Example: see GEOM_TestAll.py
2439             theAngle,Parameters = ParseParameters(theAngle)
2440             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
2441             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
2442             anObj.SetParameters(Parameters)
2443             return anObj
2444
2445         ## Create a shape by revolution of the base shape around the axis
2446         #  on the given angle, i.e. all the space, transfixed by the base
2447         #  shape during its rotation around the axis on the given angle in
2448         #  both directions (forward/backward)
2449         #  @param theBase Base shape to be rotated.
2450         #  @param theAxis Rotation axis.
2451         #  @param theAngle Rotation angle in radians.
2452         #  @return New GEOM.GEOM_Object, containing the created revolution.
2453         #
2454         #  @ref tui_creation_revolution "Example"
2455         def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
2456             """
2457             Create a shape by revolution of the base shape around the axis
2458             on the given angle, i.e. all the space, transfixed by the base
2459             shape during its rotation around the axis on the given angle in
2460             both directions (forward/backward).
2461
2462             Parameters:
2463                 theBase Base shape to be rotated.
2464                 theAxis Rotation axis.
2465                 theAngle Rotation angle in radians.
2466
2467             Returns: 
2468                 New GEOM.GEOM_Object, containing the created revolution.
2469             """
2470             theAngle,Parameters = ParseParameters(theAngle)
2471             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
2472             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
2473             anObj.SetParameters(Parameters)
2474             return anObj
2475
2476         ## Create a filling from the given compound of contours.
2477         #  @param theShape the compound of contours
2478         #  @param theMinDeg a minimal degree of BSpline surface to create
2479         #  @param theMaxDeg a maximal degree of BSpline surface to create
2480         #  @param theTol2D a 2d tolerance to be reached
2481         #  @param theTol3D a 3d tolerance to be reached
2482         #  @param theNbIter a number of iteration of approximation algorithm
2483         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
2484         #  @param isApprox if True, BSpline curves are generated in the process
2485         #                  of surface construction. By default it is False, that means
2486         #                  the surface is created using Besier curves. The usage of
2487         #                  Approximation makes the algorithm work slower, but allows
2488         #                  building the surface for rather complex cases
2489         #  @return New GEOM.GEOM_Object, containing the created filling surface.
2490         #
2491         #  @ref tui_creation_filling "Example"
2492         def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D,
2493                         theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0):
2494             """
2495             Create a filling from the given compound of contours.
2496
2497             Parameters:
2498                 theShape the compound of contours
2499                 theMinDeg a minimal degree of BSpline surface to create
2500                 theMaxDeg a maximal degree of BSpline surface to create
2501                 theTol2D a 2d tolerance to be reached
2502                 theTol3D a 3d tolerance to be reached
2503                 theNbIter a number of iteration of approximation algorithm
2504                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
2505                 isApprox if True, BSpline curves are generated in the process
2506                          of surface construction. By default it is False, that means
2507                          the surface is created using Besier curves. The usage of
2508                          Approximation makes the algorithm work slower, but allows
2509                          building the surface for rather complex cases
2510
2511             Returns: 
2512                 New GEOM.GEOM_Object, containing the created filling surface.
2513
2514             Example of usage:
2515                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
2516             """
2517             # Example: see GEOM_TestAll.py
2518             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
2519             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
2520                                             theTol2D, theTol3D, theNbIter,
2521                                             theMethod, isApprox)
2522             RaiseIfFailed("MakeFilling", self.PrimOp)
2523             anObj.SetParameters(Parameters)
2524             return anObj
2525
2526         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2527         #  @param theSeqSections - set of specified sections.
2528         #  @param theModeSolid - mode defining building solid or shell
2529         #  @param thePreci - precision 3D used for smoothing
2530         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
2531         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
2532         #
2533         #  @ref swig_todo "Example"
2534         def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
2535             """
2536             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2537
2538             Parameters:
2539                 theSeqSections - set of specified sections.
2540                 theModeSolid - mode defining building solid or shell
2541                 thePreci - precision 3D used for smoothing
2542                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
2543
2544             Returns:
2545                 New GEOM.GEOM_Object, containing the created shell or solid.
2546             """
2547             # Example: see GEOM_TestAll.py
2548             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
2549             RaiseIfFailed("MakeThruSections", self.PrimOp)
2550             return anObj
2551
2552         ## Create a shape by extrusion of the base shape along
2553         #  the path shape. The path shape can be a wire or an edge.
2554         #  @param theBase Base shape to be extruded.
2555         #  @param thePath Path shape to extrude the base shape along it.
2556         #  @return New GEOM.GEOM_Object, containing the created pipe.
2557         #
2558         #  @ref tui_creation_pipe "Example"
2559         def MakePipe(self,theBase, thePath):
2560             """
2561             Create a shape by extrusion of the base shape along
2562             the path shape. The path shape can be a wire or an edge.
2563
2564             Parameters:
2565                 theBase Base shape to be extruded.
2566                 thePath Path shape to extrude the base shape along it.
2567
2568             Returns:
2569                 New GEOM.GEOM_Object, containing the created pipe.
2570             """
2571             # Example: see GEOM_TestAll.py
2572             anObj = self.PrimOp.MakePipe(theBase, thePath)
2573             RaiseIfFailed("MakePipe", self.PrimOp)
2574             return anObj
2575
2576         ## Create a shape by extrusion of the profile shape along
2577         #  the path shape. The path shape can be a wire or an edge.
2578         #  the several profiles can be specified in the several locations of path.
2579         #  @param theSeqBases - list of  Bases shape to be extruded.
2580         #  @param theLocations - list of locations on the path corresponding
2581         #                        specified list of the Bases shapes. Number of locations
2582         #                        should be equal to number of bases or list of locations can be empty.
2583         #  @param thePath - Path shape to extrude the base shape along it.
2584         #  @param theWithContact - the mode defining that the section is translated to be in
2585         #                          contact with the spine.
2586         #  @param theWithCorrection - defining that the section is rotated to be
2587         #                             orthogonal to the spine tangent in the correspondent point
2588         #  @return New GEOM.GEOM_Object, containing the created pipe.
2589         #
2590         #  @ref tui_creation_pipe_with_diff_sec "Example"
2591         def MakePipeWithDifferentSections(self, theSeqBases,
2592                                           theLocations, thePath,
2593                                           theWithContact, theWithCorrection):
2594             """
2595             Create a shape by extrusion of the profile shape along
2596             the path shape. The path shape can be a wire or an edge.
2597             the several profiles can be specified in the several locations of path.
2598
2599             Parameters:
2600                 theSeqBases - list of  Bases shape to be extruded.
2601                 theLocations - list of locations on the path corresponding
2602                                specified list of the Bases shapes. Number of locations
2603                                should be equal to number of bases or list of locations can be empty.
2604                 thePath - Path shape to extrude the base shape along it.
2605                 theWithContact - the mode defining that the section is translated to be in
2606                                  contact with the spine(0/1)
2607                 theWithCorrection - defining that the section is rotated to be
2608                                     orthogonal to the spine tangent in the correspondent point (0/1)
2609
2610             Returns:
2611                 New GEOM.GEOM_Object, containing the created pipe.
2612             """
2613             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
2614                                                               theLocations, thePath,
2615                                                               theWithContact, theWithCorrection)
2616             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
2617             return anObj
2618
2619         ## Create a shape by extrusion of the profile shape along
2620         #  the path shape. The path shape can be a wire or a edge.
2621         #  the several profiles can be specified in the several locations of path.
2622         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
2623         #                       shell or face. If number of faces in neighbour sections
2624         #                       aren't coincided result solid between such sections will
2625         #                       be created using external boundaries of this shells.
2626         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
2627         #                          This list is used for searching correspondences between
2628         #                          faces in the sections. Size of this list must be equal
2629         #                          to size of list of base shapes.
2630         #  @param theLocations - list of locations on the path corresponding
2631         #                        specified list of the Bases shapes. Number of locations
2632         #                        should be equal to number of bases. First and last
2633         #                        locations must be coincided with first and last vertexes
2634         #                        of path correspondingly.
2635         #  @param thePath - Path shape to extrude the base shape along it.
2636         #  @param theWithContact - the mode defining that the section is translated to be in
2637         #                          contact with the spine.
2638         #  @param theWithCorrection - defining that the section is rotated to be
2639         #                             orthogonal to the spine tangent in the correspondent point
2640         #  @return New GEOM.GEOM_Object, containing the created solids.
2641         #
2642         #  @ref tui_creation_pipe_with_shell_sec "Example"
2643         def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
2644                                       theLocations, thePath,
2645                                       theWithContact, theWithCorrection):
2646             """
2647             Create a shape by extrusion of the profile shape along
2648             the path shape. The path shape can be a wire or a edge.
2649             the several profiles can be specified in the several locations of path.
2650
2651             Parameters:
2652                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
2653                               shell or face. If number of faces in neighbour sections
2654                               aren't coincided result solid between such sections will
2655                               be created using external boundaries of this shells.
2656                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
2657                                  This list is used for searching correspondences between
2658                                  faces in the sections. Size of this list must be equal
2659                                  to size of list of base shapes.
2660                 theLocations - list of locations on the path corresponding
2661                                specified list of the Bases shapes. Number of locations
2662                                should be equal to number of bases. First and last
2663                                locations must be coincided with first and last vertexes
2664                                of path correspondingly.
2665                 thePath - Path shape to extrude the base shape along it.
2666                 theWithContact - the mode defining that the section is translated to be in
2667                                  contact with the spine (0/1)
2668                 theWithCorrection - defining that the section is rotated to be
2669                                     orthogonal to the spine tangent in the correspondent point (0/1)
2670
2671             Returns:                           
2672                 New GEOM.GEOM_Object, containing the created solids.
2673             """
2674             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
2675                                                           theLocations, thePath,
2676                                                           theWithContact, theWithCorrection)
2677             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2678             return anObj
2679
2680         ## Create a shape by extrusion of the profile shape along
2681         #  the path shape. This function is used only for debug pipe
2682         #  functionality - it is a version of function MakePipeWithShellSections()
2683         #  which give a possibility to recieve information about
2684         #  creating pipe between each pair of sections step by step.
2685         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
2686                                              theLocations, thePath,
2687                                              theWithContact, theWithCorrection):
2688             """
2689             Create a shape by extrusion of the profile shape along
2690             the path shape. This function is used only for debug pipe
2691             functionality - it is a version of previous function
2692             geompy.MakePipeWithShellSections() which give a possibility to
2693             recieve information about creating pipe between each pair of
2694             sections step by step.
2695             """
2696             res = []
2697             nbsect = len(theSeqBases)
2698             nbsubsect = len(theSeqSubBases)
2699             #print "nbsect = ",nbsect
2700             for i in range(1,nbsect):
2701                 #print "  i = ",i
2702                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
2703                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
2704                 tmpSeqSubBases = []
2705                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
2706                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
2707                                                               tmpLocations, thePath,
2708                                                               theWithContact, theWithCorrection)
2709                 if self.PrimOp.IsDone() == 0:
2710                     print "Problems with pipe creation between ",i," and ",i+1," sections"
2711                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2712                     break
2713                 else:
2714                     print "Pipe between ",i," and ",i+1," sections is OK"
2715                     res.append(anObj)
2716                     pass
2717                 pass
2718
2719             resc = self.MakeCompound(res)
2720             #resc = self.MakeSewing(res, 0.001)
2721             #print "resc: ",resc
2722             return resc
2723
2724         ## Create solids between given sections
2725         #  @param theSeqBases - list of sections (shell or face).
2726         #  @param theLocations - list of corresponding vertexes
2727         #  @return New GEOM.GEOM_Object, containing the created solids.
2728         #
2729         #  @ref tui_creation_pipe_without_path "Example"
2730         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
2731             """
2732             Create solids between given sections
2733
2734             Parameters:
2735                 theSeqBases - list of sections (shell or face).
2736                 theLocations - list of corresponding vertexes
2737
2738             Returns:
2739                 New GEOM.GEOM_Object, containing the created solids.
2740             """
2741             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
2742             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
2743             return anObj
2744
2745         ## Create a shape by extrusion of the base shape along
2746         #  the path shape with constant bi-normal direction along the given vector.
2747         #  The path shape can be a wire or an edge.
2748         #  @param theBase Base shape to be extruded.
2749         #  @param thePath Path shape to extrude the base shape along it.
2750         #  @param theVec Vector defines a constant binormal direction to keep the
2751         #                same angle beetween the direction and the sections
2752         #                along the sweep surface.
2753         #  @return New GEOM.GEOM_Object, containing the created pipe.
2754         #
2755         #  @ref tui_creation_pipe "Example"
2756         def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
2757             """
2758             Create a shape by extrusion of the base shape along
2759             the path shape with constant bi-normal direction along the given vector.
2760             The path shape can be a wire or an edge.
2761
2762             Parameters:
2763                 theBase Base shape to be extruded.
2764                 thePath Path shape to extrude the base shape along it.
2765                 theVec Vector defines a constant binormal direction to keep the
2766                        same angle beetween the direction and the sections
2767                        along the sweep surface.
2768
2769             Returns:              
2770                 New GEOM.GEOM_Object, containing the created pipe.
2771             """
2772             # Example: see GEOM_TestAll.py
2773             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
2774             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
2775             return anObj
2776
2777         # end of l3_complex
2778         ## @}
2779
2780         ## @addtogroup l3_advanced
2781         ## @{
2782
2783         ## Create a linear edge with specified ends.
2784         #  @param thePnt1 Point for the first end of edge.
2785         #  @param thePnt2 Point for the second end of edge.
2786         #  @return New GEOM.GEOM_Object, containing the created edge.
2787         #
2788         #  @ref tui_creation_edge "Example"
2789         def MakeEdge(self,thePnt1, thePnt2):
2790             """
2791             Create a linear edge with specified ends.
2792
2793             Parameters:
2794                 thePnt1 Point for the first end of edge.
2795                 thePnt2 Point for the second end of edge.
2796
2797             Returns:           
2798                 New GEOM.GEOM_Object, containing the created edge.
2799             """
2800             # Example: see GEOM_TestAll.py
2801             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
2802             RaiseIfFailed("MakeEdge", self.ShapesOp)
2803             return anObj
2804
2805         ## Create a new edge, corresponding to the given length on the given curve.
2806         #  @param theRefCurve The referenced curve (edge).
2807         #  @param theLength Length on the referenced curve. It can be negative.
2808         #  @param theStartPoint Any point can be selected for it, the new edge will begin
2809         #                       at the end of \a theRefCurve, close to the selected point.
2810         #                       If None, start from the first point of \a theRefCurve.
2811         #  @return New GEOM.GEOM_Object, containing the created edge.
2812         #
2813         #  @ref tui_creation_edge "Example"
2814         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
2815             """
2816             Create a new edge, corresponding to the given length on the given curve.
2817
2818             Parameters:
2819                 theRefCurve The referenced curve (edge).
2820                 theLength Length on the referenced curve. It can be negative.
2821                 theStartPoint Any point can be selected for it, the new edge will begin
2822                               at the end of theRefCurve, close to the selected point.
2823                               If None, start from the first point of theRefCurve.
2824
2825             Returns:              
2826                 New GEOM.GEOM_Object, containing the created edge.
2827             """
2828             # Example: see GEOM_TestAll.py
2829             theLength, Parameters = ParseParameters(theLength)
2830             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
2831             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
2832             anObj.SetParameters(Parameters)
2833             return anObj
2834
2835         ## Create an edge from specified wire.
2836         #  @param theWire source Wire
2837         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
2838         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
2839         #  @return New GEOM.GEOM_Object, containing the created edge.
2840         #
2841         #  @ref tui_creation_edge "Example"
2842         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
2843             """
2844             Create an edge from specified wire.
2845
2846             Parameters:
2847                 theWire source Wire
2848                 theLinearTolerance linear tolerance value (default = 1e-07)
2849                 theAngularTolerance angular tolerance value (default = 1e-12)
2850
2851             Returns:
2852                 New GEOM.GEOM_Object, containing the created edge.
2853             """
2854             # Example: see GEOM_TestAll.py
2855             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
2856             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
2857             return anObj
2858
2859         ## Create a wire from the set of edges and wires.
2860         #  @param theEdgesAndWires List of edges and/or wires.
2861         #  @param theTolerance Maximum distance between vertices, that will be merged.
2862         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
2863         #  @return New GEOM.GEOM_Object, containing the created wire.
2864         #
2865         #  @ref tui_creation_wire "Example"
2866         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
2867             """
2868             Create a wire from the set of edges and wires.
2869
2870             Parameters:
2871                 theEdgesAndWires List of edges and/or wires.
2872                 theTolerance Maximum distance between vertices, that will be merged.
2873                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
2874
2875             Returns:                    
2876                 New GEOM.GEOM_Object, containing the created wire.
2877             """
2878             # Example: see GEOM_TestAll.py
2879             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
2880             RaiseIfFailed("MakeWire", self.ShapesOp)
2881             return anObj
2882
2883         ## Create a face on the given wire.
2884         #  @param theWire closed Wire or Edge to build the face on.
2885         #  @param isPlanarWanted If TRUE, only planar face will be built.
2886         #                        If impossible, NULL object will be returned.
2887         #  @return New GEOM.GEOM_Object, containing the created face.
2888         #
2889         #  @ref tui_creation_face "Example"
2890         def MakeFace(self, theWire, isPlanarWanted):
2891             """
2892             Create a face on the given wire.
2893
2894             Parameters:
2895                 theWire closed Wire or Edge to build the face on.
2896                 isPlanarWanted If TRUE, only planar face will be built.
2897                                If impossible, NULL object will be returned.
2898
2899             Returns:
2900                 New GEOM.GEOM_Object, containing the created face.
2901             """
2902             # Example: see GEOM_TestAll.py
2903             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
2904             if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2905                 if os.getenv("GEOM_MAKEFACE_ALLOW_NONPLANAR") is not None:
2906                     print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2907                 else:
2908                     RaiseIfFailed("MakeFace", self.ShapesOp)
2909             else:
2910                 RaiseIfFailed("MakeFace", self.ShapesOp)
2911             return anObj
2912
2913         ## Create a face on the given wires set.
2914         #  @param theWires List of closed wires or edges to build the face on.
2915         #  @param isPlanarWanted If TRUE, only planar face will be built.
2916         #                        If impossible, NULL object will be returned.
2917         #  @return New GEOM.GEOM_Object, containing the created face.
2918         #
2919         #  @ref tui_creation_face "Example"
2920         def MakeFaceWires(self, theWires, isPlanarWanted):
2921             """
2922             Create a face on the given wires set.
2923
2924             Parameters:
2925                 theWires List of closed wires or edges to build the face on.
2926                 isPlanarWanted If TRUE, only planar face will be built.
2927                                If impossible, NULL object will be returned.
2928
2929             Returns: 
2930                 New GEOM.GEOM_Object, containing the created face.
2931             """
2932             # Example: see GEOM_TestAll.py
2933             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
2934             if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2935                 if os.getenv("GEOM_MAKEFACE_ALLOW_NONPLANAR") is not None:
2936                     print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2937                 else:
2938                     RaiseIfFailed("MakeFace", self.ShapesOp)
2939             else:
2940                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
2941             return anObj
2942
2943         ## See MakeFaceWires() method for details.
2944         #
2945         #  @ref tui_creation_face "Example 1"
2946         #  \n @ref swig_MakeFaces  "Example 2"
2947         def MakeFaces(self, theWires, isPlanarWanted):
2948             """
2949             See geompy.MakeFaceWires() method for details.
2950             """
2951             # Example: see GEOM_TestOthers.py
2952             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
2953             return anObj
2954
2955         ## Create a shell from the set of faces and shells.
2956         #  @param theFacesAndShells List of faces and/or shells.
2957         #  @return New GEOM.GEOM_Object, containing the created shell.
2958         #
2959         #  @ref tui_creation_shell "Example"
2960         def MakeShell(self,theFacesAndShells):
2961             """
2962             Create a shell from the set of faces and shells.
2963
2964             Parameters:
2965                 theFacesAndShells List of faces and/or shells.
2966
2967             Returns:
2968                 New GEOM.GEOM_Object, containing the created shell.
2969             """
2970             # Example: see GEOM_TestAll.py
2971             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
2972             RaiseIfFailed("MakeShell", self.ShapesOp)
2973             return anObj
2974
2975         ## Create a solid, bounded by the given shells.
2976         #  @param theShells Sequence of bounding shells.
2977         #  @return New GEOM.GEOM_Object, containing the created solid.
2978         #
2979         #  @ref tui_creation_solid "Example"
2980         def MakeSolid(self,theShells):
2981             """
2982             Create a solid, bounded by the given shells.
2983
2984             Parameters:
2985                 theShells Sequence of bounding shells.
2986
2987             Returns:
2988                 New GEOM.GEOM_Object, containing the created solid.
2989             """
2990             # Example: see GEOM_TestAll.py
2991             anObj = self.ShapesOp.MakeSolidShells(theShells)
2992             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
2993             return anObj
2994
2995         ## Create a compound of the given shapes.
2996         #  @param theShapes List of shapes to put in compound.
2997         #  @return New GEOM.GEOM_Object, containing the created compound.
2998         #
2999         #  @ref tui_creation_compound "Example"
3000         def MakeCompound(self,theShapes):
3001             """
3002             Create a compound of the given shapes.
3003
3004             Parameters:
3005                 theShapes List of shapes to put in compound.
3006
3007             Returns:
3008                 New GEOM.GEOM_Object, containing the created compound.
3009             """
3010             # Example: see GEOM_TestAll.py
3011             anObj = self.ShapesOp.MakeCompound(theShapes)
3012             RaiseIfFailed("MakeCompound", self.ShapesOp)
3013             return anObj
3014
3015         # end of l3_advanced
3016         ## @}
3017
3018         ## @addtogroup l2_measure
3019         ## @{
3020
3021         ## Gives quantity of faces in the given shape.
3022         #  @param theShape Shape to count faces of.
3023         #  @return Quantity of faces.
3024         #
3025         #  @ref swig_NumberOf "Example"
3026         def NumberOfFaces(self, theShape):
3027             """
3028             Gives quantity of faces in the given shape.
3029
3030             Parameters:
3031                 theShape Shape to count faces of.
3032
3033             Returns:    
3034                 Quantity of faces.
3035             """
3036             # Example: see GEOM_TestOthers.py
3037             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
3038             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
3039             return nb_faces
3040
3041         ## Gives quantity of edges in the given shape.
3042         #  @param theShape Shape to count edges of.
3043         #  @return Quantity of edges.
3044         #
3045         #  @ref swig_NumberOf "Example"
3046         def NumberOfEdges(self, theShape):
3047             """
3048             Gives quantity of edges in the given shape.
3049
3050             Parameters:
3051                 theShape Shape to count edges of.
3052
3053             Returns:    
3054                 Quantity of edges.
3055             """
3056             # Example: see GEOM_TestOthers.py
3057             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
3058             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
3059             return nb_edges
3060
3061         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
3062         #  @param theShape Shape to count sub-shapes of.
3063         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
3064         #  @return Quantity of sub-shapes of given type.
3065         #
3066         #  @ref swig_NumberOf "Example"
3067         def NumberOfSubShapes(self, theShape, theShapeType):
3068             """
3069             Gives quantity of sub-shapes of type theShapeType in the given shape.
3070
3071             Parameters:
3072                 theShape Shape to count sub-shapes of.
3073                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
3074
3075             Returns:
3076                 Quantity of sub-shapes of given type.
3077             """
3078             # Example: see GEOM_TestOthers.py
3079             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
3080             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
3081             return nb_ss
3082
3083         ## Gives quantity of solids in the given shape.
3084         #  @param theShape Shape to count solids in.
3085         #  @return Quantity of solids.
3086         #
3087         #  @ref swig_NumberOf "Example"
3088         def NumberOfSolids(self, theShape):
3089             """
3090             Gives quantity of solids in the given shape.
3091
3092             Parameters:
3093                 theShape Shape to count solids in.
3094
3095             Returns:
3096                 Quantity of solids.
3097             """
3098             # Example: see GEOM_TestOthers.py
3099             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
3100             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
3101             return nb_solids
3102
3103         # end of l2_measure
3104         ## @}
3105
3106         ## @addtogroup l3_healing
3107         ## @{
3108
3109         ## Reverses an orientation the given shape.
3110         #  @param theShape Shape to be reversed.
3111         #  @return The reversed copy of theShape.
3112         #
3113         #  @ref swig_ChangeOrientation "Example"
3114         def ChangeOrientation(self,theShape):
3115             """
3116             Reverses an orientation the given shape.
3117
3118             Parameters:
3119                 theShape Shape to be reversed.
3120
3121             Returns:   
3122                 The reversed copy of theShape.
3123             """
3124             # Example: see GEOM_TestAll.py
3125             anObj = self.ShapesOp.ChangeOrientation(theShape)
3126             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
3127             return anObj
3128
3129         ## See ChangeOrientation() method for details.
3130         #
3131         #  @ref swig_OrientationChange "Example"
3132         def OrientationChange(self,theShape):
3133             """
3134             See geompy.ChangeOrientation method for details.
3135             """
3136             # Example: see GEOM_TestOthers.py
3137             anObj = self.ChangeOrientation(theShape)
3138             return anObj
3139
3140         # end of l3_healing
3141         ## @}
3142
3143         ## @addtogroup l4_obtain
3144         ## @{
3145
3146         ## Retrieve all free faces from the given shape.
3147         #  Free face is a face, which is not shared between two shells of the shape.
3148         #  @param theShape Shape to find free faces in.
3149         #  @return List of IDs of all free faces, contained in theShape.
3150         #
3151         #  @ref tui_measurement_tools_page "Example"
3152         def GetFreeFacesIDs(self,theShape):
3153             """
3154             Retrieve all free faces from the given shape.
3155             Free face is a face, which is not shared between two shells of the shape.
3156
3157             Parameters:
3158                 theShape Shape to find free faces in.
3159
3160             Returns:
3161                 List of IDs of all free faces, contained in theShape.
3162             """
3163             # Example: see GEOM_TestOthers.py
3164             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
3165             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
3166             return anIDs
3167
3168         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3169         #  @param theShape1 Shape to find sub-shapes in.
3170         #  @param theShape2 Shape to find shared sub-shapes with.
3171         #  @param theShapeType Type of sub-shapes to be retrieved.
3172         #  @return List of sub-shapes of theShape1, shared with theShape2.
3173         #
3174         #  @ref swig_GetSharedShapes "Example"
3175         def GetSharedShapes(self,theShape1, theShape2, theShapeType):
3176             """
3177             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3178
3179             Parameters:
3180                 theShape1 Shape to find sub-shapes in.
3181                 theShape2 Shape to find shared sub-shapes with.
3182                 theShapeType Type of sub-shapes to be retrieved.
3183
3184             Returns:
3185                 List of sub-shapes of theShape1, shared with theShape2.
3186             """
3187             # Example: see GEOM_TestOthers.py
3188             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
3189             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
3190             return aList
3191
3192         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
3193         #  @param theShapes Shapes to find common sub-shapes of.
3194         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3195         #  @return List of objects, that are sub-shapes of all given shapes.
3196         #
3197         #  @ref swig_GetSharedShapes "Example"
3198         def GetSharedShapesMulti(self, theShapes, theShapeType):
3199             """
3200             Get all sub-shapes, shared by all shapes in the list theShapes.
3201
3202             Parameters:
3203                 theShapes Shapes to find common sub-shapes of.
3204                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3205
3206             Returns:    
3207                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
3208             """
3209             # Example: see GEOM_TestOthers.py
3210             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
3211             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
3212             return aList
3213
3214         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3215         #  situated relatively the specified plane by the certain way,
3216         #  defined through <VAR>theState</VAR> parameter.
3217         #  @param theShape Shape to find sub-shapes of.
3218         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3219         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3220         #                direction and location of the plane to find shapes on.
3221         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3222         #  @return List of all found sub-shapes.
3223         #
3224         #  @ref swig_GetShapesOnPlane "Example"
3225         def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
3226             """
3227             Find in theShape all sub-shapes of type theShapeType,
3228             situated relatively the specified plane by the certain way,
3229             defined through theState parameter.
3230
3231             Parameters:
3232                 theShape Shape to find sub-shapes of.
3233                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3234                 theAx1 Vector (or line, or linear edge), specifying normal
3235                        direction and location of the plane to find shapes on.
3236                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3237
3238             Returns:
3239                 List of all found sub-shapes.
3240             """
3241             # Example: see GEOM_TestOthers.py
3242             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
3243             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
3244             return aList
3245
3246         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3247         #  situated relatively the specified plane by the certain way,
3248         #  defined through <VAR>theState</VAR> parameter.
3249         #  @param theShape Shape to find sub-shapes of.
3250         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3251         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3252         #                direction and location of the plane to find shapes on.
3253         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3254         #  @return List of all found sub-shapes indices.
3255         #
3256         #  @ref swig_GetShapesOnPlaneIDs "Example"
3257         def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
3258             """
3259             Find in theShape all sub-shapes of type theShapeType,
3260             situated relatively the specified plane by the certain way,
3261             defined through theState parameter.
3262
3263             Parameters:
3264                 theShape Shape to find sub-shapes of.
3265                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3266                 theAx1 Vector (or line, or linear edge), specifying normal
3267                        direction and location of the plane to find shapes on.
3268                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3269
3270             Returns:
3271                 List of all found sub-shapes indices.
3272             """
3273             # Example: see GEOM_TestOthers.py
3274             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
3275             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
3276             return aList
3277
3278         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3279         #  situated relatively the specified plane by the certain way,
3280         #  defined through <VAR>theState</VAR> parameter.
3281         #  @param theShape Shape to find sub-shapes of.
3282         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3283         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3284         #                direction of the plane to find shapes on.
3285         #  @param thePnt Point specifying location of the plane to find shapes on.
3286         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3287         #  @return List of all found sub-shapes.
3288         #
3289         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
3290         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState):
3291             """
3292             Find in theShape all sub-shapes of type theShapeType,
3293             situated relatively the specified plane by the certain way,
3294             defined through theState parameter.
3295
3296             Parameters:
3297                 theShape Shape to find sub-shapes of.
3298                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3299                 theAx1 Vector (or line, or linear edge), specifying normal
3300                        direction and location of the plane to find shapes on.
3301                 thePnt Point specifying location of the plane to find shapes on.
3302                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3303
3304             Returns:
3305                 List of all found sub-shapes.
3306             """
3307             # Example: see GEOM_TestOthers.py
3308             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
3309                                                                theAx1, thePnt, theState)
3310             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
3311             return aList
3312
3313         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3314         #  situated relatively the specified plane by the certain way,
3315         #  defined through <VAR>theState</VAR> parameter.
3316         #  @param theShape Shape to find sub-shapes of.
3317         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3318         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3319         #                direction of the plane to find shapes on.
3320         #  @param thePnt Point specifying location of the plane to find shapes on.
3321         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3322         #  @return List of all found sub-shapes indices.
3323         #
3324         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
3325         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
3326             """
3327             Find in theShape all sub-shapes of type theShapeType,
3328             situated relatively the specified plane by the certain way,
3329             defined through theState parameter.
3330
3331             Parameters:
3332                 theShape Shape to find sub-shapes of.
3333                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3334                 theAx1 Vector (or line, or linear edge), specifying normal
3335                        direction and location of the plane to find shapes on.
3336                 thePnt Point specifying location of the plane to find shapes on.
3337                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3338
3339             Returns:
3340                 List of all found sub-shapes indices.
3341             """
3342             # Example: see GEOM_TestOthers.py
3343             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
3344                                                                   theAx1, thePnt, theState)
3345             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
3346             return aList
3347
3348         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3349         #  the specified cylinder by the certain way, defined through \a theState parameter.
3350         #  @param theShape Shape to find sub-shapes of.
3351         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3352         #  @param theAxis Vector (or line, or linear edge), specifying
3353         #                 axis of the cylinder to find shapes on.
3354         #  @param theRadius Radius of the cylinder to find shapes on.
3355         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3356         #  @return List of all found sub-shapes.
3357         #
3358         #  @ref swig_GetShapesOnCylinder "Example"
3359         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
3360             """
3361             Find in theShape all sub-shapes of type theShapeType, situated relatively
3362             the specified cylinder by the certain way, defined through theState parameter.
3363
3364             Parameters:
3365                 theShape Shape to find sub-shapes of.
3366                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3367                 theAxis Vector (or line, or linear edge), specifying
3368                         axis of the cylinder to find shapes on.
3369                 theRadius Radius of the cylinder to find shapes on.
3370                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3371
3372             Returns:
3373                 List of all found sub-shapes.
3374             """
3375             # Example: see GEOM_TestOthers.py
3376             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
3377             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
3378             return aList
3379
3380         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3381         #  the specified cylinder by the certain way, defined through \a theState parameter.
3382         #  @param theShape Shape to find sub-shapes of.
3383         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3384         #  @param theAxis Vector (or line, or linear edge), specifying
3385         #                 axis of the cylinder to find shapes on.
3386         #  @param theRadius Radius of the cylinder to find shapes on.
3387         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3388         #  @return List of all found sub-shapes indices.
3389         #
3390         #  @ref swig_GetShapesOnCylinderIDs "Example"
3391         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
3392             """
3393             Find in theShape all sub-shapes of type theShapeType, situated relatively
3394             the specified cylinder by the certain way, defined through theState parameter.
3395
3396             Parameters:
3397                 theShape Shape to find sub-shapes of.
3398                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3399                 theAxis Vector (or line, or linear edge), specifying
3400                         axis of the cylinder to find shapes on.
3401                 theRadius Radius of the cylinder to find shapes on.
3402                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3403
3404             Returns:
3405                 List of all found sub-shapes indices.
3406             """
3407             # Example: see GEOM_TestOthers.py
3408             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
3409             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
3410             return aList
3411
3412         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3413         #  the specified cylinder by the certain way, defined through \a theState parameter.
3414         #  @param theShape Shape to find sub-shapes of.
3415         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3416         #  @param theAxis Vector (or line, or linear edge), specifying
3417         #                 axis of the cylinder to find shapes on.
3418         #  @param thePnt Point specifying location of the bottom of the cylinder.
3419         #  @param theRadius Radius of the cylinder to find shapes on.
3420         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3421         #  @return List of all found sub-shapes.
3422         #
3423         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
3424         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3425             """
3426             Find in theShape all sub-shapes of type theShapeType, situated relatively
3427             the specified cylinder by the certain way, defined through theState parameter.
3428
3429             Parameters:
3430                 theShape Shape to find sub-shapes of.
3431                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3432                 theAxis Vector (or line, or linear edge), specifying
3433                         axis of the cylinder to find shapes on.
3434                 theRadius Radius of the cylinder to find shapes on.
3435                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3436
3437             Returns:
3438                 List of all found sub-shapes.
3439             """
3440             # Example: see GEOM_TestOthers.py
3441             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3442             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
3443             return aList
3444
3445         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3446         #  the specified cylinder by the certain way, defined through \a theState parameter.
3447         #  @param theShape Shape to find sub-shapes of.
3448         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3449         #  @param theAxis Vector (or line, or linear edge), specifying
3450         #                 axis of the cylinder to find shapes on.
3451         #  @param thePnt Point specifying location of the bottom of the cylinder.
3452         #  @param theRadius Radius of the cylinder to find shapes on.
3453         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3454         #  @return List of all found sub-shapes indices
3455         #
3456         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
3457         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3458             """
3459             Find in theShape all sub-shapes of type theShapeType, situated relatively
3460             the specified cylinder by the certain way, defined through theState parameter.
3461
3462             Parameters:
3463                 theShape Shape to find sub-shapes of.
3464                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3465                 theAxis Vector (or line, or linear edge), specifying
3466                         axis of the cylinder to find shapes on.
3467                 theRadius Radius of the cylinder to find shapes on.
3468                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3469
3470             Returns:
3471                 List of all found sub-shapes indices.            
3472             """
3473             # Example: see GEOM_TestOthers.py
3474             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3475             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
3476             return aList
3477
3478         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3479         #  the specified sphere by the certain way, defined through \a theState parameter.
3480         #  @param theShape Shape to find sub-shapes of.
3481         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3482         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3483         #  @param theRadius Radius of the sphere to find shapes on.
3484         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3485         #  @return List of all found sub-shapes.
3486         #
3487         #  @ref swig_GetShapesOnSphere "Example"
3488         def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
3489             """
3490             Find in theShape all sub-shapes of type theShapeType, situated relatively
3491             the specified sphere by the certain way, defined through theState parameter.
3492
3493             Parameters:
3494                 theShape Shape to find sub-shapes of.
3495                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3496                 theCenter Point, specifying center of the sphere to find shapes on.
3497                 theRadius Radius of the sphere to find shapes on.
3498                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3499
3500             Returns:
3501                 List of all found sub-shapes.
3502             """
3503             # Example: see GEOM_TestOthers.py
3504             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
3505             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
3506             return aList
3507
3508         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3509         #  the specified sphere by the certain way, defined through \a theState parameter.
3510         #  @param theShape Shape to find sub-shapes of.
3511         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3512         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3513         #  @param theRadius Radius of the sphere to find shapes on.
3514         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3515         #  @return List of all found sub-shapes indices.
3516         #
3517         #  @ref swig_GetShapesOnSphereIDs "Example"
3518         def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
3519             """
3520             Find in theShape all sub-shapes of type theShapeType, situated relatively
3521             the specified sphere by the certain way, defined through theState parameter.
3522
3523             Parameters:
3524                 theShape Shape to find sub-shapes of.
3525                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3526                 theCenter Point, specifying center of the sphere to find shapes on.
3527                 theRadius Radius of the sphere to find shapes on.
3528                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3529
3530             Returns:
3531                 List of all found sub-shapes indices.
3532             """
3533             # Example: see GEOM_TestOthers.py
3534             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
3535             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
3536             return aList
3537
3538         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3539         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3540         #  @param theShape Shape to find sub-shapes of.
3541         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3542         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3543         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3544         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3545         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3546         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3547         #  @return List of all found sub-shapes.
3548         #
3549         #  @ref swig_GetShapesOnQuadrangle "Example"
3550         def GetShapesOnQuadrangle(self, theShape, theShapeType,
3551                                   theTopLeftPoint, theTopRigthPoint,
3552                                   theBottomLeftPoint, theBottomRigthPoint, theState):
3553             """
3554             Find in theShape all sub-shapes of type theShapeType, situated relatively
3555             the specified quadrangle by the certain way, defined through theState parameter.
3556
3557             Parameters:
3558                 theShape Shape to find sub-shapes of.
3559                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3560                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3561                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3562                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3563                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3564                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3565
3566             Returns:
3567                 List of all found sub-shapes.
3568             """
3569             # Example: see GEOM_TestOthers.py
3570             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
3571                                                         theTopLeftPoint, theTopRigthPoint,
3572                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
3573             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
3574             return aList
3575
3576         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3577         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3578         #  @param theShape Shape to find sub-shapes of.
3579         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3580         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3581         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3582         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3583         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3584         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3585         #  @return List of all found sub-shapes indices.
3586         #
3587         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
3588         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
3589                                      theTopLeftPoint, theTopRigthPoint,
3590                                      theBottomLeftPoint, theBottomRigthPoint, theState):
3591             """
3592             Find in theShape all sub-shapes of type theShapeType, situated relatively
3593             the specified quadrangle by the certain way, defined through theState parameter.
3594
3595             Parameters:
3596                 theShape Shape to find sub-shapes of.
3597                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3598                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3599                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3600                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3601                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3602                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3603
3604             Returns:
3605                 List of all found sub-shapes indices.
3606             """
3607
3608             # Example: see GEOM_TestOthers.py
3609             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
3610                                                            theTopLeftPoint, theTopRigthPoint,
3611                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
3612             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
3613             return aList
3614
3615         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3616         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3617         #  @param theBox Shape for relative comparing.
3618         #  @param theShape Shape to find sub-shapes of.
3619         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3620         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3621         #  @return List of all found sub-shapes.
3622         #
3623         #  @ref swig_GetShapesOnBox "Example"
3624         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
3625             """
3626             Find in theShape all sub-shapes of type theShapeType, situated relatively
3627             the specified theBox by the certain way, defined through theState parameter.
3628
3629             Parameters:
3630                 theBox Shape for relative comparing.
3631                 theShape Shape to find sub-shapes of.
3632                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3633                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3634
3635             Returns:
3636                 List of all found sub-shapes.
3637             """
3638             # Example: see GEOM_TestOthers.py
3639             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
3640             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
3641             return aList
3642
3643         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3644         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3645         #  @param theBox Shape for relative comparing.
3646         #  @param theShape Shape to find sub-shapes of.
3647         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3648         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3649         #  @return List of all found sub-shapes indices.
3650         #
3651         #  @ref swig_GetShapesOnBoxIDs "Example"
3652         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
3653             """
3654             Find in theShape all sub-shapes of type theShapeType, situated relatively
3655             the specified theBox by the certain way, defined through theState parameter.
3656
3657             Parameters:
3658                 theBox Shape for relative comparing.
3659                 theShape Shape to find sub-shapes of.
3660                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3661                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3662
3663             Returns:
3664                 List of all found sub-shapes indices.
3665             """
3666             # Example: see GEOM_TestOthers.py
3667             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
3668             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
3669             return aList
3670
3671         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3672         #  situated relatively the specified \a theCheckShape by the
3673         #  certain way, defined through \a theState parameter.
3674         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3675         #  @param theShape Shape to find sub-shapes of.
3676         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
3677         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3678         #  @return List of all found sub-shapes.
3679         #
3680         #  @ref swig_GetShapesOnShape "Example"
3681         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
3682             """
3683             Find in theShape all sub-shapes of type theShapeType,
3684             situated relatively the specified theCheckShape by the
3685             certain way, defined through theState parameter.
3686
3687             Parameters:
3688                 theCheckShape Shape for relative comparing. It must be a solid.
3689                 theShape Shape to find sub-shapes of.
3690                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3691                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3692
3693             Returns:
3694                 List of all found sub-shapes.
3695             """
3696             # Example: see GEOM_TestOthers.py
3697             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
3698                                                    theShapeType, theState)
3699             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
3700             return aList
3701
3702         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3703         #  situated relatively the specified \a theCheckShape by the
3704         #  certain way, defined through \a theState parameter.
3705         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3706         #  @param theShape Shape to find sub-shapes of.
3707         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3708         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3709         #  @return All found sub-shapes as compound.
3710         #
3711         #  @ref swig_GetShapesOnShapeAsCompound "Example"
3712         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
3713             """
3714             Find in theShape all sub-shapes of type theShapeType,
3715             situated relatively the specified theCheckShape by the
3716             certain way, defined through theState parameter.
3717
3718             Parameters:
3719                 theCheckShape Shape for relative comparing. It must be a solid.
3720                 theShape Shape to find sub-shapes of.
3721                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3722                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3723
3724             Returns:
3725                 All found sub-shapes as compound.
3726             """
3727             # Example: see GEOM_TestOthers.py
3728             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
3729                                                              theShapeType, theState)
3730             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
3731             return anObj
3732
3733         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3734         #  situated relatively the specified \a theCheckShape by the
3735         #  certain way, defined through \a theState parameter.
3736         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3737         #  @param theShape Shape to find sub-shapes of.
3738         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3739         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3740         #  @return List of all found sub-shapes indices.
3741         #
3742         #  @ref swig_GetShapesOnShapeIDs "Example"
3743         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
3744             """
3745             Find in theShape all sub-shapes of type theShapeType,
3746             situated relatively the specified theCheckShape by the
3747             certain way, defined through theState parameter.
3748
3749             Parameters:
3750                 theCheckShape Shape for relative comparing. It must be a solid.
3751                 theShape Shape to find sub-shapes of.
3752                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3753                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3754
3755             Returns:
3756                 List of all found sub-shapes indices.
3757             """
3758             # Example: see GEOM_TestOthers.py
3759             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
3760                                                       theShapeType, theState)
3761             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
3762             return aList
3763
3764         ## Get sub-shape(s) of theShapeWhere, which are
3765         #  coincident with \a theShapeWhat or could be a part of it.
3766         #  @param theShapeWhere Shape to find sub-shapes of.
3767         #  @param theShapeWhat Shape, specifying what to find.
3768         #  @param isNewImplementation implementation of GetInPlace functionality
3769         #             (default = False, old alghorithm based on shape properties)
3770         #  @return Group of all found sub-shapes or a single found sub-shape.
3771         #
3772         #  @note This function has a restriction on argument shapes.
3773         #        If \a theShapeWhere has curved parts with significantly
3774         #        outstanding centres (i.e. the mass centre of a part is closer to
3775         #        \a theShapeWhat than to the part), such parts will not be found.
3776         #        @image html get_in_place_lost_part.png
3777         #
3778         #  @ref swig_GetInPlace "Example"
3779         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False):
3780             """
3781             Get sub-shape(s) of theShapeWhere, which are
3782             coincident with  theShapeWhat or could be a part of it.
3783
3784             Parameters:
3785                 theShapeWhere Shape to find sub-shapes of.
3786                 theShapeWhat Shape, specifying what to find.
3787                 isNewImplementation Implementation of GetInPlace functionality
3788                                     (default = False, old alghorithm based on shape properties)
3789
3790             Returns:
3791                 Group of all found sub-shapes or a single found sub-shape.
3792
3793                 
3794             Note:
3795                 This function has a restriction on argument shapes.
3796                 If theShapeWhere has curved parts with significantly
3797                 outstanding centres (i.e. the mass centre of a part is closer to
3798                 theShapeWhat than to the part), such parts will not be found.
3799             """
3800             # Example: see GEOM_TestOthers.py
3801             anObj = None
3802             if isNewImplementation:
3803                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
3804             else:
3805                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
3806                 pass
3807             RaiseIfFailed("GetInPlace", self.ShapesOp)
3808             return anObj
3809
3810         ## Get sub-shape(s) of \a theShapeWhere, which are
3811         #  coincident with \a theShapeWhat or could be a part of it.
3812         #
3813         #  Implementation of this method is based on a saved history of an operation,
3814         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
3815         #  arguments (an argument shape or a sub-shape of an argument shape).
3816         #  The operation could be the Partition or one of boolean operations,
3817         #  performed on simple shapes (not on compounds).
3818         #
3819         #  @param theShapeWhere Shape to find sub-shapes of.
3820         #  @param theShapeWhat Shape, specifying what to find (must be in the
3821         #                      building history of the ShapeWhere).
3822         #  @return Group of all found sub-shapes or a single found sub-shape.
3823         #
3824         #  @ref swig_GetInPlace "Example"
3825         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
3826             """
3827             Implementation of this method is based on a saved history of an operation,
3828             produced theShapeWhere. The theShapeWhat must be among this operation's
3829             arguments (an argument shape or a sub-shape of an argument shape).
3830             The operation could be the Partition or one of boolean operations,
3831             performed on simple shapes (not on compounds).
3832
3833             Parameters:
3834                 theShapeWhere Shape to find sub-shapes of.
3835                 theShapeWhat Shape, specifying what to find (must be in the
3836                                 building history of the ShapeWhere).
3837
3838             Returns:
3839                 Group of all found sub-shapes or a single found sub-shape.
3840             """
3841             # Example: see GEOM_TestOthers.py
3842             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
3843             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
3844             return anObj
3845
3846         ## Get sub-shape of theShapeWhere, which is
3847         #  equal to \a theShapeWhat.
3848         #  @param theShapeWhere Shape to find sub-shape of.
3849         #  @param theShapeWhat Shape, specifying what to find.
3850         #  @return New GEOM.GEOM_Object for found sub-shape.
3851         #
3852         #  @ref swig_GetSame "Example"
3853         def GetSame(self,theShapeWhere, theShapeWhat):
3854             """
3855             Get sub-shape of theShapeWhere, which is
3856             equal to theShapeWhat.
3857
3858             Parameters:
3859                 theShapeWhere Shape to find sub-shape of.
3860                 theShapeWhat Shape, specifying what to find.
3861
3862             Returns:
3863                 New GEOM.GEOM_Object for found sub-shape.
3864             """
3865             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
3866             RaiseIfFailed("GetSame", self.ShapesOp)
3867             return anObj
3868
3869         # end of l4_obtain
3870         ## @}
3871
3872         ## @addtogroup l4_access
3873         ## @{
3874
3875         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
3876         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3877         #  @param aShape Shape to get sub-shape of.
3878         #  @param ListOfID List of sub-shapes indices.
3879         #  @return Found sub-shape.
3880         #
3881         #  @ref swig_all_decompose "Example"
3882         def GetSubShape(self, aShape, ListOfID):
3883             """
3884             Obtain a composite sub-shape of aShape, composed from sub-shapes
3885             of aShape, selected by their unique IDs inside aShape
3886
3887             Parameters:
3888                aShape Shape to get sub-shape of.
3889                ListOfID List of sub-shapes indices.
3890
3891             Returns:
3892                 Found sub-shape.
3893             """
3894             # Example: see GEOM_TestAll.py
3895             anObj = self.AddSubShape(aShape,ListOfID)
3896             return anObj
3897
3898         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
3899         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3900         #  @param aShape Shape to get sub-shape of.
3901         #  @param aSubShape Sub-shapes of aShape.
3902         #  @return ID of found sub-shape.
3903         #
3904         #  @ref swig_all_decompose "Example"
3905         def GetSubShapeID(self, aShape, aSubShape):
3906             """
3907             Obtain unique ID of sub-shape aSubShape inside aShape
3908             of aShape, selected by their unique IDs inside aShape
3909
3910             Parameters:
3911                aShape Shape to get sub-shape of.
3912                aSubShape Sub-shapes of aShape.
3913
3914             Returns:
3915                ID of found sub-shape.
3916             """
3917             # Example: see GEOM_TestAll.py
3918             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
3919             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
3920             return anID
3921
3922         # end of l4_access
3923         ## @}
3924
3925         ## @addtogroup l4_decompose
3926         ## @{
3927
3928         ## Get all sub-shapes and groups of \a theShape,
3929         #  that were created already by any other methods.
3930         #  @param theShape Any shape.
3931         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
3932         #                       returned, else all found sub-shapes and groups.
3933         #  @return List of existing sub-objects of \a theShape.
3934         #
3935         #  @ref swig_all_decompose "Example"
3936         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
3937             """
3938             Get all sub-shapes and groups of theShape,
3939             that were created already by any other methods.
3940
3941             Parameters:
3942                 theShape Any shape.
3943                 theGroupsOnly If this parameter is TRUE, only groups will be
3944                                  returned, else all found sub-shapes and groups.
3945
3946             Returns:
3947                 List of existing sub-objects of theShape.
3948             """
3949             # Example: see GEOM_TestAll.py
3950             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
3951             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
3952             return ListObj
3953
3954         ## Get all groups of \a theShape,
3955         #  that were created already by any other methods.
3956         #  @param theShape Any shape.
3957         #  @return List of existing groups of \a theShape.
3958         #
3959         #  @ref swig_all_decompose "Example"
3960         def GetGroups(self, theShape):
3961             """
3962             Get all groups of theShape,
3963             that were created already by any other methods.
3964
3965             Parameters:
3966                 theShape Any shape.
3967
3968             Returns:
3969                 List of existing groups of theShape.
3970             """
3971             # Example: see GEOM_TestAll.py
3972             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
3973             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
3974             return ListObj
3975
3976         ## Explode a shape on sub-shapes of a given type.
3977         #  If the shape itself matches the type, it is also returned.
3978         #  @param aShape Shape to be exploded.
3979         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
3980         #  @return List of sub-shapes of type theShapeType, contained in theShape.
3981         #
3982         #  @ref swig_all_decompose "Example"
3983         def SubShapeAll(self, aShape, aType):
3984             """
3985             Explode a shape on sub-shapes of a given type.
3986             If the shape itself matches the type, it is also returned.
3987
3988             Parameters:
3989                 aShape Shape to be exploded.
3990                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
3991
3992             Returns:
3993                 List of sub-shapes of type theShapeType, contained in theShape.
3994             """
3995             # Example: see GEOM_TestAll.py
3996             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
3997             RaiseIfFailed("SubShapeAll", self.ShapesOp)
3998             return ListObj
3999
4000         ## Explode a shape on sub-shapes of a given type.
4001         #  @param aShape Shape to be exploded.
4002         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4003         #  @return List of IDs of sub-shapes.
4004         #
4005         #  @ref swig_all_decompose "Example"
4006         def SubShapeAllIDs(self, aShape, aType):
4007             """
4008             Explode a shape on sub-shapes of a given type.
4009
4010             Parameters:
4011                 aShape Shape to be exploded (see geompy.ShapeType) 
4012                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4013
4014             Returns:
4015                 List of IDs of sub-shapes.
4016             """
4017             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
4018             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4019             return ListObj
4020
4021         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4022         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
4023         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4024         #  @param aShape Shape to get sub-shape of.
4025         #  @param ListOfInd List of sub-shapes indices.
4026         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4027         #  @return A compound of sub-shapes of aShape.
4028         #
4029         #  @ref swig_all_decompose "Example"
4030         def SubShape(self, aShape, aType, ListOfInd):
4031             """
4032             Obtain a compound of sub-shapes of aShape,
4033             selected by they indices in list of all sub-shapes of type aType.
4034             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4035             
4036             Parameters:
4037                 aShape Shape to get sub-shape of.
4038                 ListOfID List of sub-shapes indices.
4039                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4040
4041             Returns:
4042                 A compound of sub-shapes of aShape.
4043             """
4044             # Example: see GEOM_TestAll.py
4045             ListOfIDs = []
4046             AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
4047             for ind in ListOfInd:
4048                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4049             anObj = self.GetSubShape(aShape, ListOfIDs)
4050             return anObj
4051
4052         ## Explode a shape on sub-shapes of a given type.
4053         #  Sub-shapes will be sorted by coordinates of their gravity centers.
4054         #  If the shape itself matches the type, it is also returned.
4055         #  @param aShape Shape to be exploded.
4056         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4057         #  @return List of sub-shapes of type theShapeType, contained in theShape.
4058         #
4059         #  @ref swig_SubShapeAllSorted "Example"
4060         def SubShapeAllSortedCentres(self, aShape, aType):
4061             """
4062             Explode a shape on sub-shapes of a given type.
4063             Sub-shapes will be sorted by coordinates of their gravity centers.
4064             If the shape itself matches the type, it is also returned.
4065
4066             Parameters: 
4067                 aShape Shape to be exploded.
4068                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4069
4070             Returns: 
4071                 List of sub-shapes of type theShapeType, contained in theShape.
4072             """
4073             # Example: see GEOM_TestAll.py
4074             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
4075             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
4076             return ListObj
4077
4078         ## Explode a shape on sub-shapes of a given type.
4079         #  Sub-shapes will be sorted by coordinates of their gravity centers.
4080         #  @param aShape Shape to be exploded.
4081         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4082         #  @return List of IDs of sub-shapes.
4083         #
4084         #  @ref swig_all_decompose "Example"
4085         def SubShapeAllSortedCentresIDs(self, aShape, aType):
4086             """
4087             Explode a shape on sub-shapes of a given type.
4088             Sub-shapes will be sorted by coordinates of their gravity centers.
4089
4090             Parameters: 
4091                 aShape Shape to be exploded.
4092                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4093
4094             Returns: 
4095                 List of IDs of sub-shapes.
4096             """
4097             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
4098             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4099             return ListIDs
4100
4101         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4102         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
4103         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4104         #  @param aShape Shape to get sub-shape of.
4105         #  @param ListOfInd List of sub-shapes indices.
4106         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4107         #  @return A compound of sub-shapes of aShape.
4108         #
4109         #  @ref swig_all_decompose "Example"
4110         def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
4111             """
4112             Obtain a compound of sub-shapes of aShape,
4113             selected by they indices in sorted list of all sub-shapes of type aType.
4114             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4115
4116             Parameters:
4117                 aShape Shape to get sub-shape of.
4118                 ListOfID List of sub-shapes indices.
4119                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4120
4121             Returns:
4122                 A compound of sub-shapes of aShape.
4123             """
4124             # Example: see GEOM_TestAll.py
4125             ListOfIDs = []
4126             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
4127             for ind in ListOfInd:
4128                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4129             anObj = self.GetSubShape(aShape, ListOfIDs)
4130             return anObj
4131
4132         ## Extract shapes (excluding the main shape) of given type.
4133         #  @param aShape The shape.
4134         #  @param aType  The shape type (see ShapeType())
4135         #  @param isSorted Boolean flag to switch sorting on/off.
4136         #  @return List of sub-shapes of type aType, contained in aShape.
4137         #
4138         #  @ref swig_FilletChamfer "Example"
4139         def ExtractShapes(self, aShape, aType, isSorted = False):
4140             """
4141             Extract shapes (excluding the main shape) of given type.
4142
4143             Parameters:
4144                 aShape The shape.
4145                 aType  The shape type (see geompy.ShapeType)
4146                 isSorted Boolean flag to switch sorting on/off.
4147
4148             Returns:     
4149                 List of sub-shapes of type aType, contained in aShape.
4150             """
4151             # Example: see GEOM_TestAll.py
4152             ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted)
4153             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
4154             return ListObj
4155
4156         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
4157         #  @param aShape Main shape.
4158         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
4159         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4160         #
4161         #  @ref swig_all_decompose "Example"
4162         def SubShapes(self, aShape, anIDs):
4163             """
4164             Get a set of sub-shapes defined by their unique IDs inside theMainShape
4165
4166             Parameters:
4167                 aShape Main shape.
4168                 anIDs List of unique IDs of sub-shapes inside theMainShape.
4169
4170             Returns:      
4171                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4172             """
4173             # Example: see GEOM_TestAll.py
4174             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
4175             RaiseIfFailed("SubShapes", self.ShapesOp)
4176             return ListObj
4177
4178         # end of l4_decompose
4179         ## @}
4180
4181         ## @addtogroup l4_decompose_d
4182         ## @{
4183
4184         ## Deprecated method
4185         #  It works like SubShapeAllSortedCentres(), but wrongly
4186         #  defines centres of faces, shells and solids.
4187         def SubShapeAllSorted(self, aShape, aType):
4188             """
4189             Deprecated method
4190             It works like geompy.SubShapeAllSortedCentres, but wrongly
4191             defines centres of faces, shells and solids.
4192             """
4193             ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
4194             RaiseIfFailed("MakeExplode", self.ShapesOp)
4195             return ListObj
4196
4197         ## Deprecated method
4198         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
4199         #  defines centres of faces, shells and solids.
4200         def SubShapeAllSortedIDs(self, aShape, aType):
4201             """
4202             Deprecated method
4203             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
4204             defines centres of faces, shells and solids.
4205             """
4206             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
4207             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4208             return ListIDs
4209
4210         ## Deprecated method
4211         #  It works like SubShapeSortedCentres(), but has a bug
4212         #  (wrongly defines centres of faces, shells and solids).
4213         def SubShapeSorted(self, aShape, aType, ListOfInd):
4214             """
4215             Deprecated method
4216             It works like geompy.SubShapeSortedCentres, but has a bug
4217             (wrongly defines centres of faces, shells and solids).
4218             """
4219             ListOfIDs = []
4220             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
4221             for ind in ListOfInd:
4222                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4223             anObj = self.GetSubShape(aShape, ListOfIDs)
4224             return anObj
4225
4226         # end of l4_decompose_d
4227         ## @}
4228
4229         ## @addtogroup l3_healing
4230         ## @{
4231
4232         ## Apply a sequence of Shape Healing operators to the given object.
4233         #  @param theShape Shape to be processed.
4234         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4235         #  @param theParameters List of names of parameters
4236         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4237         #  @param theValues List of values of parameters, in the same order
4238         #                    as parameters are listed in <VAR>theParameters</VAR> list.
4239         #
4240         #
4241         #  <b> Operators and Parameters: </b> \n
4242         #
4243         #  * \b FixShape - corrects invalid shapes. \n
4244         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
4245         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
4246         #
4247         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
4248         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
4249         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
4250         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
4251         #
4252         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
4253         #    surfaces in segments using a certain angle. \n
4254         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4255         #    if Angle=180, four if Angle=90, etc). \n
4256         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
4257         #
4258         #  * \b SplitClosedFaces - splits closed faces in segments.
4259         #    The number of segments depends on the number of splitting points.\n
4260         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
4261         #
4262         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
4263         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
4264         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
4265         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
4266         #   This and the previous parameters can take the following values:\n
4267         #   \b Parametric \b Continuity \n
4268         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
4269         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
4270         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
4271         #    ruling out sharp edges).\n
4272         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
4273         #       are of the same magnitude).\n
4274         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
4275         #    or surfaces (d/du C(u)) are the same at junction. \n
4276         #   \b Geometric \b Continuity \n
4277         #   \b G1: first derivatives are proportional at junction.\n
4278         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
4279         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
4280         #   \b G2: first and second derivatives are proportional at junction.
4281         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
4282         #    continuity requires that the underlying parameterization was continuous as well.
4283         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
4284         #
4285         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
4286         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
4287         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
4288         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
4289         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
4290         #       with the specified parameters.\n
4291         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
4292         #       with the specified parameters.\n
4293         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
4294         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
4295         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
4296         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
4297         #
4298         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
4299         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
4300         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
4301         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
4302         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
4303         #
4304         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
4305         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
4306         #
4307         #
4308         #  @return New GEOM.GEOM_Object, containing processed shape.
4309         #
4310         #  \n @ref tui_shape_processing "Example"
4311         def ProcessShape(self, theShape, theOperators, theParameters, theValues):
4312             """
4313             Apply a sequence of Shape Healing operators to the given object.
4314
4315             Parameters:
4316                 theShape Shape to be processed.
4317                 theValues List of values of parameters, in the same order
4318                           as parameters are listed in theParameters list.
4319                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4320                 theParameters List of names of parameters
4321                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4322                  Operators and Parameters:
4323
4324                  * FixShape - corrects invalid shapes.
4325                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
4326                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
4327                  * FixFaceSize - removes small faces, such as spots and strips.
4328                      * FixFaceSize.Tolerance - defines minimum possible face size.
4329                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
4330                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
4331                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
4332                                 in segments using a certain angle.
4333                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4334                                           if Angle=180, four if Angle=90, etc).
4335                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
4336                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
4337                                       splitting points.
4338                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
4339                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
4340                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
4341                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
4342                      * SplitContinuity.CurveContinuity - required continuity for curves.
4343                        This and the previous parameters can take the following values:
4344                        
4345                        Parametric Continuity:
4346                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
4347                                                    coincidental. The curves or surfaces may still meet at an angle,
4348                                                    giving rise to a sharp corner or edge).
4349                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
4350                                                    are parallel, ruling out sharp edges).
4351                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
4352                                                   or surfaces are of the same magnitude).
4353                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
4354                           curves or surfaces (d/du C(u)) are the same at junction.
4355                           
4356                        Geometric Continuity:
4357                        G1: first derivatives are proportional at junction.
4358                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
4359                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
4360                        G2: first and second derivatives are proportional at junction. As the names imply,
4361                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
4362                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
4363                            geometric continuity of order n, but not vice-versa.
4364                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
4365                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
4366                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
4367                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
4368                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
4369                                                         the specified parameters.
4370                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
4371                                                         the specified parameters.
4372                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
4373                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
4374                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
4375                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
4376                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
4377                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
4378                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
4379                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
4380                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
4381                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
4382                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
4383
4384             Returns:
4385                 New GEOM.GEOM_Object, containing processed shape.
4386
4387             Note: For more information look through SALOME Geometry User's Guide->
4388                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
4389             """
4390             # Example: see GEOM_TestHealing.py
4391             theValues,Parameters = ParseList(theValues)
4392             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
4393             # To avoid script failure in case of good argument shape
4394             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
4395                 return theShape
4396             RaiseIfFailed("ProcessShape", self.HealOp)
4397             for string in (theOperators + theParameters):
4398                 Parameters = ":" + Parameters
4399                 pass
4400             anObj.SetParameters(Parameters)
4401             return anObj
4402
4403         ## Remove faces from the given object (shape).
4404         #  @param theObject Shape to be processed.
4405         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
4406         #                  removes ALL faces of the given object.
4407         #  @return New GEOM.GEOM_Object, containing processed shape.
4408         #
4409         #  @ref tui_suppress_faces "Example"
4410         def SuppressFaces(self,theObject, theFaces):
4411             """
4412             Remove faces from the given object (shape).
4413
4414             Parameters:
4415                 theObject Shape to be processed.
4416                 theFaces Indices of faces to be removed, if EMPTY then the method
4417                          removes ALL faces of the given object.
4418
4419             Returns:
4420                 New GEOM.GEOM_Object, containing processed shape.
4421             """
4422             # Example: see GEOM_TestHealing.py
4423             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
4424             RaiseIfFailed("SuppressFaces", self.HealOp)
4425             return anObj
4426
4427         ## Sewing of some shapes into single shape.
4428         #  @param ListShape Shapes to be processed.
4429         #  @param theTolerance Required tolerance value.
4430         #  @return New GEOM.GEOM_Object, containing processed shape.
4431         #
4432         #  @ref tui_sewing "Example"
4433         def MakeSewing(self, ListShape, theTolerance):
4434             """
4435             Sewing of some shapes into single shape.
4436
4437             Parameters:
4438                 ListShape Shapes to be processed.
4439                 theTolerance Required tolerance value.
4440
4441             Returns:
4442                 New GEOM.GEOM_Object, containing processed shape.
4443             """
4444             # Example: see GEOM_TestHealing.py
4445             comp = self.MakeCompound(ListShape)
4446             anObj = self.Sew(comp, theTolerance)
4447             return anObj
4448
4449         ## Sewing of the given object.
4450         #  @param theObject Shape to be processed.
4451         #  @param theTolerance Required tolerance value.
4452         #  @return New GEOM.GEOM_Object, containing processed shape.
4453         def Sew(self, theObject, theTolerance):
4454             """
4455             Sewing of the given object.
4456
4457             Parameters:
4458                 theObject Shape to be processed.
4459                 theTolerance Required tolerance value.
4460
4461             Returns:
4462                 New GEOM.GEOM_Object, containing processed shape.
4463             """
4464             # Example: see MakeSewing() above
4465             theTolerance,Parameters = ParseParameters(theTolerance)
4466             anObj = self.HealOp.Sew(theObject, theTolerance)
4467             RaiseIfFailed("Sew", self.HealOp)
4468             anObj.SetParameters(Parameters)
4469             return anObj
4470
4471         ## Remove internal wires and edges from the given object (face).
4472         #  @param theObject Shape to be processed.
4473         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4474         #                  removes ALL internal wires of the given object.
4475         #  @return New GEOM.GEOM_Object, containing processed shape.
4476         #
4477         #  @ref tui_suppress_internal_wires "Example"
4478         def SuppressInternalWires(self,theObject, theWires):
4479             """
4480             Remove internal wires and edges from the given object (face).
4481
4482             Parameters:
4483                 theObject Shape to be processed.
4484                 theWires Indices of wires to be removed, if EMPTY then the method
4485                          removes ALL internal wires of the given object.
4486
4487             Returns:                
4488                 New GEOM.GEOM_Object, containing processed shape.
4489             """
4490             # Example: see GEOM_TestHealing.py
4491             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
4492             RaiseIfFailed("RemoveIntWires", self.HealOp)
4493             return anObj
4494
4495         ## Remove internal closed contours (holes) from the given object.
4496         #  @param theObject Shape to be processed.
4497         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4498         #                  removes ALL internal holes of the given object
4499         #  @return New GEOM.GEOM_Object, containing processed shape.
4500         #
4501         #  @ref tui_suppress_holes "Example"
4502         def SuppressHoles(self,theObject, theWires):
4503             """
4504             Remove internal closed contours (holes) from the given object.
4505
4506             Parameters:
4507                 theObject Shape to be processed.
4508                 theWires Indices of wires to be removed, if EMPTY then the method
4509                          removes ALL internal holes of the given object
4510
4511             Returns:    
4512                 New GEOM.GEOM_Object, containing processed shape.
4513             """
4514             # Example: see GEOM_TestHealing.py
4515             anObj = self.HealOp.FillHoles(theObject, theWires)
4516             RaiseIfFailed("FillHoles", self.HealOp)
4517             return anObj
4518
4519         ## Close an open wire.
4520         #  @param theObject Shape to be processed.
4521         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
4522         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
4523         #  @param isCommonVertex If True  : closure by creation of a common vertex,
4524         #                        If False : closure by creation of an edge between ends.
4525         #  @return New GEOM.GEOM_Object, containing processed shape.
4526         #
4527         #  @ref tui_close_contour "Example"
4528         def CloseContour(self,theObject, theWires, isCommonVertex):
4529             """
4530             Close an open wire.
4531
4532             Parameters: 
4533                 theObject Shape to be processed.
4534                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
4535                          if [ ], then theObject itself is a wire.
4536                 isCommonVertex If True  : closure by creation of a common vertex,
4537                                If False : closure by creation of an edge between ends.
4538
4539             Returns:                      
4540                 New GEOM.GEOM_Object, containing processed shape. 
4541             """
4542             # Example: see GEOM_TestHealing.py
4543             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
4544             RaiseIfFailed("CloseContour", self.HealOp)
4545             return anObj
4546
4547         ## Addition of a point to a given edge object.
4548         #  @param theObject Shape to be processed.
4549         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
4550         #                      if -1, then theObject itself is the edge.
4551         #  @param theValue Value of parameter on edge or length parameter,
4552         #                  depending on \a isByParameter.
4553         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
4554         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
4555         #  @return New GEOM.GEOM_Object, containing processed shape.
4556         #
4557         #  @ref tui_add_point_on_edge "Example"
4558         def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter):
4559             """
4560             Addition of a point to a given edge object.
4561
4562             Parameters: 
4563                 theObject Shape to be processed.
4564                 theEdgeIndex Index of edge to be divided within theObject's shape,
4565                              if -1, then theObject itself is the edge.
4566                 theValue Value of parameter on edge or length parameter,
4567                          depending on isByParameter.
4568                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
4569                               if FALSE : theValue is treated as a length parameter [0..1]
4570
4571             Returns:  
4572                 New GEOM.GEOM_Object, containing processed shape.
4573             """
4574             # Example: see GEOM_TestHealing.py
4575             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
4576             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
4577             RaiseIfFailed("DivideEdge", self.HealOp)
4578             anObj.SetParameters(Parameters)
4579             return anObj
4580
4581         ## Change orientation of the given object. Updates given shape.
4582         #  @param theObject Shape to be processed.
4583         #  @return Updated <var>theObject</var>
4584         #
4585         #  @ref swig_todo "Example"
4586         def ChangeOrientationShell(self,theObject):
4587             """
4588             Change orientation of the given object. Updates given shape.
4589
4590             Parameters: 
4591                 theObject Shape to be processed.
4592
4593             Returns:  
4594                 Updated theObject
4595             """
4596             theObject = self.HealOp.ChangeOrientation(theObject)
4597             RaiseIfFailed("ChangeOrientation", self.HealOp)
4598             pass
4599
4600         ## Change orientation of the given object.
4601         #  @param theObject Shape to be processed.
4602         #  @return New GEOM.GEOM_Object, containing processed shape.
4603         #
4604         #  @ref swig_todo "Example"
4605         def ChangeOrientationShellCopy(self, theObject):
4606             """
4607             Change orientation of the given object.
4608
4609             Parameters:
4610                 theObject Shape to be processed.
4611
4612             Returns:   
4613                 New GEOM.GEOM_Object, containing processed shape.
4614             """
4615             anObj = self.HealOp.ChangeOrientationCopy(theObject)
4616             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
4617             return anObj
4618
4619         ## Try to limit tolerance of the given object by value \a theTolerance.
4620         #  @param theObject Shape to be processed.
4621         #  @param theTolerance Required tolerance value.
4622         #  @return New GEOM.GEOM_Object, containing processed shape.
4623         #
4624         #  @ref tui_limit_tolerance "Example"
4625         def LimitTolerance(self, theObject, theTolerance = 1e-07):
4626             """
4627             Try to limit tolerance of the given object by value theTolerance.
4628
4629             Parameters:
4630                 theObject Shape to be processed.
4631                 theTolerance Required tolerance value.
4632
4633             Returns:   
4634                 New GEOM.GEOM_Object, containing processed shape.
4635             """
4636             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
4637             RaiseIfFailed("LimitTolerance", self.HealOp)
4638             return anObj
4639
4640         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4641         #  that constitute a free boundary of the given shape.
4642         #  @param theObject Shape to get free boundary of.
4643         #  @return [\a status, \a theClosedWires, \a theOpenWires]
4644         #  \n \a status: FALSE, if an error(s) occured during the method execution.
4645         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
4646         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
4647         #
4648         #  @ref tui_measurement_tools_page "Example"
4649         def GetFreeBoundary(self, theObject):
4650             """
4651             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4652             that constitute a free boundary of the given shape.
4653
4654             Parameters:
4655                 theObject Shape to get free boundary of.
4656
4657             Returns: 
4658                 [status, theClosedWires, theOpenWires]
4659                  status: FALSE, if an error(s) occured during the method execution.
4660                  theClosedWires: Closed wires on the free boundary of the given shape.
4661                  theOpenWires: Open wires on the free boundary of the given shape.
4662             """
4663             # Example: see GEOM_TestHealing.py
4664             anObj = self.HealOp.GetFreeBoundary(theObject)
4665             RaiseIfFailed("GetFreeBoundary", self.HealOp)
4666             return anObj
4667
4668         ## Replace coincident faces in theShape by one face.
4669         #  @param theShape Initial shape.
4670         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
4671         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4672         #                         otherwise all initial shapes.
4673         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4674         #
4675         #  @ref tui_glue_faces "Example"
4676         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True):
4677             """
4678             Replace coincident faces in theShape by one face.
4679
4680             Parameters:
4681                 theShape Initial shape.
4682                 theTolerance Maximum distance between faces, which can be considered as coincident.
4683                 doKeepNonSolids If FALSE, only solids will present in the result,
4684                                 otherwise all initial shapes.
4685
4686             Returns:
4687                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4688             """
4689             # Example: see GEOM_Spanner.py
4690             theTolerance,Parameters = ParseParameters(theTolerance)
4691             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
4692             if anObj is None:
4693                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
4694             anObj.SetParameters(Parameters)
4695             return anObj
4696
4697         ## Find coincident faces in theShape for possible gluing.
4698         #  @param theShape Initial shape.
4699         #  @param theTolerance Maximum distance between faces,
4700         #                      which can be considered as coincident.
4701         #  @return GEOM.ListOfGO
4702         #
4703         #  @ref tui_glue_faces "Example"
4704         def GetGlueFaces(self, theShape, theTolerance):
4705             """
4706             Find coincident faces in theShape for possible gluing.
4707
4708             Parameters:
4709                 theShape Initial shape.
4710                 theTolerance Maximum distance between faces,
4711                              which can be considered as coincident.
4712
4713             Returns:                    
4714                 GEOM.ListOfGO
4715             """
4716             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
4717             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
4718             return anObj
4719
4720         ## Replace coincident faces in theShape by one face
4721         #  in compliance with given list of faces
4722         #  @param theShape Initial shape.
4723         #  @param theTolerance Maximum distance between faces,
4724         #                      which can be considered as coincident.
4725         #  @param theFaces List of faces for gluing.
4726         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4727         #                         otherwise all initial shapes.
4728         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
4729         #                        will be glued, otherwise only the edges,
4730         #                        belonging to <VAR>theFaces</VAR>.
4731         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4732         #          without some faces.
4733         #
4734         #  @ref tui_glue_faces "Example"
4735         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
4736                                 doKeepNonSolids=True, doGlueAllEdges=True):
4737             """
4738             Replace coincident faces in theShape by one face
4739             in compliance with given list of faces
4740
4741             Parameters:
4742                 theShape Initial shape.
4743                 theTolerance Maximum distance between faces,
4744                              which can be considered as coincident.
4745                 theFaces List of faces for gluing.
4746                 doKeepNonSolids If FALSE, only solids will present in the result,
4747                                 otherwise all initial shapes.
4748                 doGlueAllEdges If TRUE, all coincident edges of theShape
4749                                will be glued, otherwise only the edges,
4750                                belonging to theFaces.
4751
4752             Returns:
4753                 New GEOM.GEOM_Object, containing a copy of theShape
4754                     without some faces.
4755             """
4756             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
4757                                                       doKeepNonSolids, doGlueAllEdges)
4758             if anObj is None:
4759                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
4760             return anObj
4761
4762         ## Replace coincident edges in theShape by one edge.
4763         #  @param theShape Initial shape.
4764         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
4765         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4766         #
4767         #  @ref tui_glue_edges "Example"
4768         def MakeGlueEdges(self, theShape, theTolerance):
4769             """
4770             Replace coincident edges in theShape by one edge.
4771
4772             Parameters:
4773                 theShape Initial shape.
4774                 theTolerance Maximum distance between edges, which can be considered as coincident.
4775
4776             Returns:    
4777                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4778             """
4779             theTolerance,Parameters = ParseParameters(theTolerance)
4780             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
4781             if anObj is None:
4782                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
4783             anObj.SetParameters(Parameters)
4784             return anObj
4785
4786         ## Find coincident edges in theShape for possible gluing.
4787         #  @param theShape Initial shape.
4788         #  @param theTolerance Maximum distance between edges,
4789         #                      which can be considered as coincident.
4790         #  @return GEOM.ListOfGO
4791         #
4792         #  @ref tui_glue_edges "Example"
4793         def GetGlueEdges(self, theShape, theTolerance):
4794             """
4795             Find coincident edges in theShape for possible gluing.
4796
4797             Parameters:
4798                 theShape Initial shape.
4799                 theTolerance Maximum distance between edges,
4800                              which can be considered as coincident.
4801
4802             Returns:                         
4803                 GEOM.ListOfGO
4804             """
4805             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
4806             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
4807             return anObj
4808
4809         ## Replace coincident edges in theShape by one edge
4810         #  in compliance with given list of edges.
4811         #  @param theShape Initial shape.
4812         #  @param theTolerance Maximum distance between edges,
4813         #                      which can be considered as coincident.
4814         #  @param theEdges List of edges for gluing.
4815         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4816         #          without some edges.
4817         #
4818         #  @ref tui_glue_edges "Example"
4819         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges):
4820             """
4821             Replace coincident edges in theShape by one edge
4822             in compliance with given list of edges.
4823
4824             Parameters:
4825                 theShape Initial shape.
4826                 theTolerance Maximum distance between edges,
4827                              which can be considered as coincident.
4828                 theEdges List of edges for gluing.
4829
4830             Returns:  
4831                 New GEOM.GEOM_Object, containing a copy of theShape
4832                 without some edges.
4833             """
4834             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
4835             if anObj is None:
4836                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
4837             return anObj
4838
4839         # end of l3_healing
4840         ## @}
4841
4842         ## @addtogroup l3_boolean Boolean Operations
4843         ## @{
4844
4845         # -----------------------------------------------------------------------------
4846         # Boolean (Common, Cut, Fuse, Section)
4847         # -----------------------------------------------------------------------------
4848
4849         ## Perform one of boolean operations on two given shapes.
4850         #  @param theShape1 First argument for boolean operation.
4851         #  @param theShape2 Second argument for boolean operation.
4852         #  @param theOperation Indicates the operation to be done:\n
4853         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4854         #  @return New GEOM.GEOM_Object, containing the result shape.
4855         #
4856         #  @ref tui_fuse "Example"
4857         def MakeBoolean(self,theShape1, theShape2, theOperation):
4858             """
4859             Perform one of boolean operations on two given shapes.
4860
4861             Parameters: 
4862                 theShape1 First argument for boolean operation.
4863                 theShape2 Second argument for boolean operation.
4864                 theOperation Indicates the operation to be done:
4865                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4866
4867             Returns:   
4868                 New GEOM.GEOM_Object, containing the result shape.
4869             """
4870             # Example: see GEOM_TestAll.py
4871             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
4872             RaiseIfFailed("MakeBoolean", self.BoolOp)
4873             return anObj
4874
4875         ## Perform Common boolean operation on two given shapes.
4876         #  @param theShape1 First argument for boolean operation.
4877         #  @param theShape2 Second argument for boolean operation.
4878         #  @return New GEOM.GEOM_Object, containing the result shape.
4879         #
4880         #  @ref tui_common "Example 1"
4881         #  \n @ref swig_MakeCommon "Example 2"
4882         def MakeCommon(self, theShape1, theShape2):
4883             """
4884             Perform Common boolean operation on two given shapes.
4885
4886             Parameters: 
4887                 theShape1 First argument for boolean operation.
4888                 theShape2 Second argument for boolean operation.
4889  
4890             Returns:   
4891                 New GEOM.GEOM_Object, containing the result shape.
4892             """
4893             # Example: see GEOM_TestOthers.py
4894             return self.MakeBoolean(theShape1, theShape2, 1)
4895
4896         ## Perform Cut boolean operation on two given shapes.
4897         #  @param theShape1 First argument for boolean operation.
4898         #  @param theShape2 Second argument for boolean operation.
4899         #  @return New GEOM.GEOM_Object, containing the result shape.
4900         #
4901         #  @ref tui_cut "Example 1"
4902         #  \n @ref swig_MakeCommon "Example 2"
4903         def MakeCut(self, theShape1, theShape2):
4904             """
4905             Perform Cut boolean operation on two given shapes.
4906
4907             Parameters: 
4908                 theShape1 First argument for boolean operation.
4909                 theShape2 Second argument for boolean operation.
4910  
4911             Returns:   
4912                 New GEOM.GEOM_Object, containing the result shape.
4913             
4914             """
4915             # Example: see GEOM_TestOthers.py
4916             return self.MakeBoolean(theShape1, theShape2, 2)
4917
4918         ## Perform Fuse boolean operation on two given shapes.
4919         #  @param theShape1 First argument for boolean operation.
4920         #  @param theShape2 Second argument for boolean operation.
4921         #  @return New GEOM.GEOM_Object, containing the result shape.
4922         #
4923         #  @ref tui_fuse "Example 1"
4924         #  \n @ref swig_MakeCommon "Example 2"
4925         def MakeFuse(self, theShape1, theShape2):
4926             """
4927             Perform Fuse boolean operation on two given shapes.
4928
4929             Parameters: 
4930                 theShape1 First argument for boolean operation.
4931                 theShape2 Second argument for boolean operation.
4932  
4933             Returns:   
4934                 New GEOM.GEOM_Object, containing the result shape.
4935             
4936             """
4937             # Example: see GEOM_TestOthers.py
4938             return self.MakeBoolean(theShape1, theShape2, 3)
4939
4940         ## Perform Section boolean operation on two given shapes.
4941         #  @param theShape1 First argument for boolean operation.
4942         #  @param theShape2 Second argument for boolean operation.
4943         #  @return New GEOM.GEOM_Object, containing the result shape.
4944         #
4945         #  @ref tui_section "Example 1"
4946         #  \n @ref swig_MakeCommon "Example 2"
4947         def MakeSection(self, theShape1, theShape2):
4948             """
4949             Perform Section boolean operation on two given shapes.
4950
4951             Parameters: 
4952                 theShape1 First argument for boolean operation.
4953                 theShape2 Second argument for boolean operation.
4954  
4955             Returns:   
4956                 New GEOM.GEOM_Object, containing the result shape.
4957             
4958             """
4959             # Example: see GEOM_TestOthers.py
4960             return self.MakeBoolean(theShape1, theShape2, 4)
4961
4962         # end of l3_boolean
4963         ## @}
4964
4965         ## @addtogroup l3_basic_op
4966         ## @{
4967
4968         ## Perform partition operation.
4969         #  @param ListShapes Shapes to be intersected.
4970         #  @param ListTools Shapes to intersect theShapes.
4971         #  @param Limit Type of resulting shapes (see ShapeType()).\n
4972         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
4973         #         type will be detected automatically.
4974         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
4975         #                             target type (equal to Limit) are kept in the result,
4976         #                             else standalone shapes of lower dimension
4977         #                             are kept also (if they exist).
4978         #  @note Each compound from ListShapes and ListTools will be exploded
4979         #        in order to avoid possible intersection between shapes from this compound.
4980         #
4981         #  After implementation new version of PartitionAlgo (October 2006)
4982         #  other parameters are ignored by current functionality. They are kept
4983         #  in this function only for support old versions.
4984         #      @param ListKeepInside Shapes, outside which the results will be deleted.
4985         #         Each shape from theKeepInside must belong to theShapes also.
4986         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
4987         #         Each shape from theRemoveInside must belong to theShapes also.
4988         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
4989         #      @param ListMaterials Material indices for each shape. Make sence,
4990         #         only if theRemoveWebs is TRUE.
4991         #
4992         #  @return New GEOM.GEOM_Object, containing the result shapes.
4993         #
4994         #  @ref tui_partition "Example"
4995         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
4996                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
4997                           KeepNonlimitShapes=0):
4998             """
4999             Perform partition operation.
5000
5001             Parameters: 
5002                 ListShapes Shapes to be intersected.
5003                 ListTools Shapes to intersect theShapes.
5004                 Limit Type of resulting shapes (see geompy.ShapeType)
5005                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
5006                       type will be detected automatically.
5007                 KeepNonlimitShapes if this parameter == 0, then only shapes of
5008                                     target type (equal to Limit) are kept in the result,
5009                                     else standalone shapes of lower dimension
5010                                     are kept also (if they exist).
5011             Note:
5012                     Each compound from ListShapes and ListTools will be exploded
5013                     in order to avoid possible intersection between shapes from
5014                     this compound.
5015                     
5016             After implementation new version of PartitionAlgo (October 2006) other
5017             parameters are ignored by current functionality. They are kept in this
5018             function only for support old versions.
5019             
5020             Ignored parameters:
5021                 ListKeepInside Shapes, outside which the results will be deleted.
5022                                Each shape from theKeepInside must belong to theShapes also.
5023                 ListRemoveInside Shapes, inside which the results will be deleted.
5024                                  Each shape from theRemoveInside must belong to theShapes also.
5025                 RemoveWebs If TRUE, perform Glue 3D algorithm.
5026                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
5027
5028             Returns:   
5029                 New GEOM.GEOM_Object, containing the result shapes.
5030             """
5031             # Example: see GEOM_TestAll.py
5032             if Limit == ShapeType["AUTO"]:
5033                 # automatic detection of the most appropriate shape limit type
5034                 lim = GEOM.SHAPE
5035                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5036                 Limit = EnumToLong(lim)
5037                 pass
5038             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
5039                                               ListKeepInside, ListRemoveInside,
5040                                               Limit, RemoveWebs, ListMaterials,
5041                                               KeepNonlimitShapes);
5042             RaiseIfFailed("MakePartition", self.BoolOp)
5043             return anObj
5044
5045         ## Perform partition operation.
5046         #  This method may be useful if it is needed to make a partition for
5047         #  compound contains nonintersected shapes. Performance will be better
5048         #  since intersection between shapes from compound is not performed.
5049         #
5050         #  Description of all parameters as in previous method MakePartition()
5051         #
5052         #  @note Passed compounds (via ListShapes or via ListTools)
5053         #           have to consist of nonintersecting shapes.
5054         #
5055         #  @return New GEOM.GEOM_Object, containing the result shapes.
5056         #
5057         #  @ref swig_todo "Example"
5058         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
5059                                                  ListKeepInside=[], ListRemoveInside=[],
5060                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
5061                                                  ListMaterials=[], KeepNonlimitShapes=0):
5062             """
5063             Perform partition operation.
5064             This method may be useful if it is needed to make a partition for
5065             compound contains nonintersected shapes. Performance will be better
5066             since intersection between shapes from compound is not performed.
5067
5068             Parameters: 
5069                 Description of all parameters as in method geompy.MakePartition
5070         
5071             NOTE:
5072                 Passed compounds (via ListShapes or via ListTools)
5073                 have to consist of nonintersecting shapes.
5074
5075             Returns:   
5076                 New GEOM.GEOM_Object, containing the result shapes.
5077             """
5078             if Limit == ShapeType["AUTO"]:
5079                 # automatic detection of the most appropriate shape limit type
5080                 lim = GEOM.SHAPE
5081                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5082                 Limit = EnumToLong(lim)
5083                 pass
5084             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
5085                                                                      ListKeepInside, ListRemoveInside,
5086                                                                      Limit, RemoveWebs, ListMaterials,
5087                                                                      KeepNonlimitShapes);
5088             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
5089             return anObj
5090
5091         ## See method MakePartition() for more information.
5092         #
5093         #  @ref tui_partition "Example 1"
5094         #  \n @ref swig_Partition "Example 2"
5095         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
5096                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
5097                       KeepNonlimitShapes=0):
5098             """
5099             See method geompy.MakePartition for more information.
5100             """
5101             # Example: see GEOM_TestOthers.py
5102             anObj = self.MakePartition(ListShapes, ListTools,
5103                                        ListKeepInside, ListRemoveInside,
5104                                        Limit, RemoveWebs, ListMaterials,
5105                                        KeepNonlimitShapes);
5106             return anObj
5107
5108         ## Perform partition of the Shape with the Plane
5109         #  @param theShape Shape to be intersected.
5110         #  @param thePlane Tool shape, to intersect theShape.
5111         #  @return New GEOM.GEOM_Object, containing the result shape.
5112         #
5113         #  @ref tui_partition "Example"
5114         def MakeHalfPartition(self,theShape, thePlane):
5115             """
5116             Perform partition of the Shape with the Plane
5117
5118             Parameters: 
5119                 theShape Shape to be intersected.
5120                 thePlane Tool shape, to intersect theShape.
5121
5122             Returns:  
5123                 New GEOM.GEOM_Object, containing the result shape.
5124             """
5125             # Example: see GEOM_TestAll.py
5126             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
5127             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
5128             return anObj
5129
5130         # end of l3_basic_op
5131         ## @}
5132
5133         ## @addtogroup l3_transform
5134         ## @{
5135
5136         ## Translate the given object along the vector, specified
5137         #  by its end points, creating its copy before the translation.
5138         #  @param theObject The object to be translated.
5139         #  @param thePoint1 Start point of translation vector.
5140         #  @param thePoint2 End point of translation vector.
5141         #  @return New GEOM.GEOM_Object, containing the translated object.
5142         #
5143         #  @ref tui_translation "Example 1"
5144         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
5145         def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
5146             """
5147             Translate the given object along the vector, specified
5148             by its end points, creating its copy before the translation.
5149
5150             Parameters: 
5151                 theObject The object to be translated.
5152                 thePoint1 Start point of translation vector.
5153                 thePoint2 End point of translation vector.
5154
5155             Returns:  
5156                 New GEOM.GEOM_Object, containing the translated object.
5157             """
5158             # Example: see GEOM_TestAll.py
5159             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
5160             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
5161             return anObj
5162
5163         ## Translate the given object along the vector, specified by its components.
5164         #  @param theObject The object to be translated.
5165         #  @param theDX,theDY,theDZ Components of translation vector.
5166         #  @return Translated GEOM.GEOM_Object.
5167         #
5168         #  @ref tui_translation "Example"
5169         def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ):
5170             """
5171             Translate the given object along the vector, specified by its components.
5172
5173             Parameters: 
5174                 theObject The object to be translated.
5175                 theDX,theDY,theDZ Components of translation vector.
5176
5177             Returns: 
5178                 Translated GEOM.GEOM_Object.
5179             """
5180             # Example: see GEOM_TestAll.py
5181             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5182             anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
5183             anObj.SetParameters(Parameters)
5184             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5185             return anObj
5186
5187         ## Translate the given object along the vector, specified
5188         #  by its components, creating its copy before the translation.
5189         #  @param theObject The object to be translated.
5190         #  @param theDX,theDY,theDZ Components of translation vector.
5191         #  @return New GEOM.GEOM_Object, containing the translated object.
5192         #
5193         #  @ref tui_translation "Example"
5194         def MakeTranslation(self,theObject, theDX, theDY, theDZ):
5195             """
5196             Translate the given object along the vector, specified
5197             by its components, creating its copy before the translation.
5198
5199             Parameters: 
5200                 theObject The object to be translated.
5201                 theDX,theDY,theDZ Components of translation vector.
5202
5203             Returns: 
5204                 New GEOM.GEOM_Object, containing the translated object.
5205             """
5206             # Example: see GEOM_TestAll.py
5207             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5208             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
5209             anObj.SetParameters(Parameters)
5210             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5211             return anObj
5212
5213         ## Translate the given object along the given vector,
5214         #  creating its copy before the translation.
5215         #  @param theObject The object to be translated.
5216         #  @param theVector The translation vector.
5217         #  @return New GEOM.GEOM_Object, containing the translated object.
5218         #
5219         #  @ref tui_translation "Example"
5220         def MakeTranslationVector(self,theObject, theVector):
5221             """
5222             Translate the given object along the given vector,
5223             creating its copy before the translation.
5224
5225             Parameters: 
5226                 theObject The object to be translated.
5227                 theVector The translation vector.
5228
5229             Returns: 
5230                 New GEOM.GEOM_Object, containing the translated object.
5231             """
5232             # Example: see GEOM_TestAll.py
5233             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
5234             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
5235             return anObj
5236
5237         ## Translate the given object along the given vector on given distance.
5238         #  @param theObject The object to be translated.
5239         #  @param theVector The translation vector.
5240         #  @param theDistance The translation distance.
5241         #  @param theCopy Flag used to translate object itself or create a copy.
5242         #  @return New GEOM.GEOM_Object, containing the translated object.
5243         #
5244         #  @ref tui_translation "Example"
5245         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy):
5246             """
5247             Translate the given object along the given vector on given distance.
5248
5249             Parameters: 
5250                 theObject The object to be translated.
5251                 theVector The translation vector.
5252                 theDistance The translation distance.
5253                 theCopy Flag used to translate object itself or create a copy.
5254
5255             Returns: 
5256                 New GEOM.GEOM_Object, containing the translated object.
5257             """
5258             # Example: see GEOM_TestAll.py
5259             theDistance,Parameters = ParseParameters(theDistance)
5260             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
5261             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5262             anObj.SetParameters(Parameters)
5263             return anObj
5264
5265         ## Translate the given object along the given vector on given distance,
5266         #  creating its copy before the translation.
5267         #  @param theObject The object to be translated.
5268         #  @param theVector The translation vector.
5269         #  @param theDistance The translation distance.
5270         #  @return New GEOM.GEOM_Object, containing the translated object.
5271         #
5272         #  @ref tui_translation "Example"
5273         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance):
5274             """
5275             Translate the given object along the given vector on given distance,
5276             creating its copy before the translation.
5277
5278             Parameters:
5279                 theObject The object to be translated.
5280                 theVector The translation vector.
5281                 theDistance The translation distance.
5282
5283             Returns: 
5284                 New GEOM.GEOM_Object, containing the translated object.
5285             """
5286             # Example: see GEOM_TestAll.py
5287             theDistance,Parameters = ParseParameters(theDistance)
5288             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
5289             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5290             anObj.SetParameters(Parameters)
5291             return anObj
5292
5293         ## Rotate the given object around the given axis on the given angle.
5294         #  @param theObject The object to be rotated.
5295         #  @param theAxis Rotation axis.
5296         #  @param theAngle Rotation angle in radians.
5297         #  @return New GEOM.GEOM_Object, containing the rotated object.
5298         #
5299         #  @ref tui_rotation "Example"
5300         def Rotate(self,theObject, theAxis, theAngle):
5301             """
5302             Rotate the given object around the given axis on the given angle.
5303
5304             Parameters:
5305                 theObject The object to be rotated.
5306                 theAxis Rotation axis.
5307                 theAngle Rotation angle in radians.
5308
5309             Returns: 
5310                 New GEOM.GEOM_Object, containing the rotated object.
5311             """
5312             # Example: see GEOM_TestAll.py
5313             flag = False
5314             if isinstance(theAngle,str):
5315                 flag = True
5316             theAngle, Parameters = ParseParameters(theAngle)
5317             if flag:
5318                 theAngle = theAngle*math.pi/180.0
5319             anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
5320             RaiseIfFailed("RotateCopy", self.TrsfOp)
5321             anObj.SetParameters(Parameters)
5322             return anObj
5323
5324         ## Rotate the given object around the given axis
5325         #  on the given angle, creating its copy before the rotatation.
5326         #  @param theObject The object to be rotated.
5327         #  @param theAxis Rotation axis.
5328         #  @param theAngle Rotation angle in radians.
5329         #  @return New GEOM.GEOM_Object, containing the rotated object.
5330         #
5331         #  @ref tui_rotation "Example"
5332         def MakeRotation(self,theObject, theAxis, theAngle):
5333             """
5334             Rotate the given object around the given axis
5335             on the given angle, creating its copy before the rotatation.
5336
5337             Parameters:
5338                 theObject The object to be rotated.
5339                 theAxis Rotation axis.
5340                 theAngle Rotation angle in radians.
5341
5342             Returns:
5343                 New GEOM.GEOM_Object, containing the rotated object.
5344             """
5345             # Example: see GEOM_TestAll.py
5346             flag = False
5347             if isinstance(theAngle,str):
5348                 flag = True
5349             theAngle, Parameters = ParseParameters(theAngle)
5350             if flag:
5351                 theAngle = theAngle*math.pi/180.0
5352             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
5353             RaiseIfFailed("RotateCopy", self.TrsfOp)
5354             anObj.SetParameters(Parameters)
5355             return anObj
5356
5357         ## Rotate given object around vector perpendicular to plane
5358         #  containing three points, creating its copy before the rotatation.
5359         #  @param theObject The object to be rotated.
5360         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
5361         #  containing the three points.
5362         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
5363         #  @return New GEOM.GEOM_Object, containing the rotated object.
5364         #
5365         #  @ref tui_rotation "Example"
5366         def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2):
5367             """
5368             Rotate given object around vector perpendicular to plane
5369             containing three points, creating its copy before the rotatation.
5370
5371             Parameters:
5372                 theObject The object to be rotated.
5373                 theCentPoint central point  the axis is the vector perpendicular to the plane
5374                              containing the three points.
5375                 thePoint1,thePoint2  in a perpendicular plane of the axis.
5376
5377             Returns:
5378                 New GEOM.GEOM_Object, containing the rotated object.
5379             """
5380             # Example: see GEOM_TestAll.py
5381             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
5382             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
5383             return anObj
5384
5385         ## Scale the given object by the factor, creating its copy before the scaling.
5386         #  @param theObject The object to be scaled.
5387         #  @param thePoint Center point for scaling.
5388         #                  Passing None for it means scaling relatively the origin of global CS.
5389         #  @param theFactor Scaling factor value.
5390         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5391         #
5392         #  @ref tui_scale "Example"
5393         def MakeScaleTransform(self, theObject, thePoint, theFactor):
5394             """
5395             Scale the given object by the factor, creating its copy before the scaling.
5396
5397             Parameters:
5398                 theObject The object to be scaled.
5399                 thePoint Center point for scaling.
5400                          Passing None for it means scaling relatively the origin of global CS.
5401                 theFactor Scaling factor value.
5402
5403             Returns:    
5404                 New GEOM.GEOM_Object, containing the scaled shape.
5405             """
5406             # Example: see GEOM_TestAll.py
5407             theFactor, Parameters = ParseParameters(theFactor)
5408             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
5409             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
5410             anObj.SetParameters(Parameters)
5411             return anObj
5412
5413         ## Scale the given object by different factors along coordinate axes,
5414         #  creating its copy before the scaling.
5415         #  @param theObject The object to be scaled.
5416         #  @param thePoint Center point for scaling.
5417         #                  Passing None for it means scaling relatively the origin of global CS.
5418         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5419         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5420         #
5421         #  @ref swig_scale "Example"
5422         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ):
5423             """
5424             Scale the given object by different factors along coordinate axes,
5425             creating its copy before the scaling.
5426
5427             Parameters:
5428                 theObject The object to be scaled.
5429                 thePoint Center point for scaling.
5430                             Passing None for it means scaling relatively the origin of global CS.
5431                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5432
5433             Returns:
5434                 New GEOM.GEOM_Object, containing the scaled shape.
5435             """
5436             # Example: see GEOM_TestAll.py
5437             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
5438             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
5439                                                         theFactorX, theFactorY, theFactorZ)
5440             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
5441             anObj.SetParameters(Parameters)
5442             return anObj
5443
5444         ## Create an object, symmetrical
5445         #  to the given one relatively the given plane.
5446         #  @param theObject The object to be mirrored.
5447         #  @param thePlane Plane of symmetry.
5448         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5449         #
5450         #  @ref tui_mirror "Example"
5451         def MakeMirrorByPlane(self,theObject, thePlane):
5452             """
5453             Create an object, symmetrical to the given one relatively the given plane.
5454
5455             Parameters:
5456                 theObject The object to be mirrored.
5457                 thePlane Plane of symmetry.
5458
5459             Returns:
5460                 New GEOM.GEOM_Object, containing the mirrored shape.
5461             """
5462             # Example: see GEOM_TestAll.py
5463             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
5464             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
5465             return anObj
5466
5467         ## Create an object, symmetrical
5468         #  to the given one relatively the given axis.
5469         #  @param theObject The object to be mirrored.
5470         #  @param theAxis Axis of symmetry.
5471         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5472         #
5473         #  @ref tui_mirror "Example"
5474         def MakeMirrorByAxis(self,theObject, theAxis):
5475             """
5476             Create an object, symmetrical to the given one relatively the given axis.
5477
5478             Parameters:
5479                 theObject The object to be mirrored.
5480                 theAxis Axis of symmetry.
5481
5482             Returns: 
5483                 New GEOM.GEOM_Object, containing the mirrored shape.
5484             """
5485             # Example: see GEOM_TestAll.py
5486             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
5487             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
5488             return anObj
5489
5490         ## Create an object, symmetrical
5491         #  to the given one relatively the given point.
5492         #  @param theObject The object to be mirrored.
5493         #  @param thePoint Point of symmetry.
5494         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5495         #
5496         #  @ref tui_mirror "Example"
5497         def MakeMirrorByPoint(self,theObject, thePoint):
5498             """
5499             Create an object, symmetrical
5500             to the given one relatively the given point.
5501
5502             Parameters:
5503                 theObject The object to be mirrored.
5504                 thePoint Point of symmetry.
5505
5506             Returns:  
5507                 New GEOM.GEOM_Object, containing the mirrored shape.
5508             """
5509             # Example: see GEOM_TestAll.py
5510             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
5511             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
5512             return anObj
5513
5514         ## Modify the Location of the given object by LCS,
5515         #  creating its copy before the setting.
5516         #  @param theObject The object to be displaced.
5517         #  @param theStartLCS Coordinate system to perform displacement from it.\n
5518         #                     If \a theStartLCS is NULL, displacement
5519         #                     will be performed from global CS.\n
5520         #                     If \a theObject itself is used as \a theStartLCS,
5521         #                     its location will be changed to \a theEndLCS.
5522         #  @param theEndLCS Coordinate system to perform displacement to it.
5523         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5524         #
5525         #  @ref tui_modify_location "Example"
5526         def MakePosition(self,theObject, theStartLCS, theEndLCS):
5527             """
5528             Modify the Location of the given object by LCS, creating its copy before the setting.
5529
5530             Parameters:
5531                 theObject The object to be displaced.
5532                 theStartLCS Coordinate system to perform displacement from it.
5533                             If theStartLCS is NULL, displacement
5534                             will be performed from global CS.
5535                             If theObject itself is used as theStartLCS,
5536                             its location will be changed to theEndLCS.
5537                 theEndLCS Coordinate system to perform displacement to it.
5538
5539             Returns:  
5540                 New GEOM.GEOM_Object, containing the displaced shape.
5541
5542             Example of usage:
5543                 # create local coordinate systems
5544                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
5545                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
5546                 # modify the location of the given object
5547                 position = geompy.MakePosition(cylinder, cs1, cs2)
5548             """
5549             # Example: see GEOM_TestAll.py
5550             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
5551             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
5552             return anObj
5553
5554         ## Modify the Location of the given object by Path,
5555         #  @param  theObject The object to be displaced.
5556         #  @param  thePath Wire or Edge along that the object will be translated.
5557         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
5558         #  @param  theCopy is to create a copy objects if true.
5559         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
5560         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5561         #
5562         #  @ref tui_modify_location "Example"
5563         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
5564             """
5565             Modify the Location of the given object by Path
5566
5567             Parameters:
5568                  theObject The object to be displaced.
5569                  thePath Wire or Edge along that the object will be translated.
5570                  theDistance progress of Path (0 = start location, 1 = end of path location).
5571                  theCopy is to create a copy objects if true.
5572                  theReverse  0 - for usual direction, 1 - to reverse path direction.
5573
5574             Returns:  
5575                 New GEOM.GEOM_Object, containing the displaced shape.
5576
5577             Example of usage:
5578                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
5579             """
5580             # Example: see GEOM_TestAll.py
5581             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
5582             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
5583             return anObj
5584
5585         ## Create new object as offset of the given one.
5586         #  @param theObject The base object for the offset.
5587         #  @param theOffset Offset value.
5588         #  @return New GEOM.GEOM_Object, containing the offset object.
5589         #
5590         #  @ref tui_offset "Example"
5591         def MakeOffset(self,theObject, theOffset):
5592             """
5593             Create new object as offset of the given one.
5594
5595             Parameters:
5596                 theObject The base object for the offset.
5597                 theOffset Offset value.
5598
5599             Returns:  
5600                 New GEOM.GEOM_Object, containing the offset object.
5601
5602             Example of usage:
5603                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
5604                  # create a new object as offset of the given object
5605                  offset = geompy.MakeOffset(box, 70.)
5606             """
5607             # Example: see GEOM_TestAll.py
5608             theOffset, Parameters = ParseParameters(theOffset)
5609             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
5610             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
5611             anObj.SetParameters(Parameters)
5612             return anObj
5613
5614         ## Create new object as projection of the given one on a 2D surface.
5615         #  @param theSource The source object for the projection. It can be a point, edge or wire.
5616         #  @param theTarget The target object. It can be planar or cylindrical face.
5617         #  @return New GEOM.GEOM_Object, containing the projection.
5618         #
5619         #  @ref tui_projection "Example"
5620         def MakeProjection(self, theSource, theTarget):
5621             """
5622             Create new object as projection of the given one on a 2D surface.
5623
5624             Parameters:
5625                 theSource The source object for the projection. It can be a point, edge or wire.
5626                 theTarget The target object. It can be planar or cylindrical face.
5627
5628             Returns:  
5629                 New GEOM.GEOM_Object, containing the projection.
5630             """
5631             # Example: see GEOM_TestAll.py
5632             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
5633             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
5634             return anObj
5635
5636         # -----------------------------------------------------------------------------
5637         # Patterns
5638         # -----------------------------------------------------------------------------
5639
5640         ## Translate the given object along the given vector a given number times
5641         #  @param theObject The object to be translated.
5642         #  @param theVector Direction of the translation.
5643         #  @param theStep Distance to translate on.
5644         #  @param theNbTimes Quantity of translations to be done.
5645         #  @return New GEOM.GEOM_Object, containing compound of all
5646         #          the shapes, obtained after each translation.
5647         #
5648         #  @ref tui_multi_translation "Example"
5649         def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes):
5650             """
5651             Translate the given object along the given vector a given number times
5652
5653             Parameters:
5654                 theObject The object to be translated.
5655                 theVector Direction of the translation.
5656                 theStep Distance to translate on.
5657                 theNbTimes Quantity of translations to be done.
5658
5659             Returns:     
5660                 New GEOM.GEOM_Object, containing compound of all
5661                 the shapes, obtained after each translation.
5662
5663             Example of usage:
5664                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
5665             """
5666             # Example: see GEOM_TestAll.py
5667             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
5668             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
5669             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
5670             anObj.SetParameters(Parameters)
5671             return anObj
5672
5673         ## Conseqently apply two specified translations to theObject specified number of times.
5674         #  @param theObject The object to be translated.
5675         #  @param theVector1 Direction of the first translation.
5676         #  @param theStep1 Step of the first translation.
5677         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
5678         #  @param theVector2 Direction of the second translation.
5679         #  @param theStep2 Step of the second translation.
5680         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
5681         #  @return New GEOM.GEOM_Object, containing compound of all
5682         #          the shapes, obtained after each translation.
5683         #
5684         #  @ref tui_multi_translation "Example"
5685         def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1,
5686                                    theVector2, theStep2, theNbTimes2):
5687             """
5688             Conseqently apply two specified translations to theObject specified number of times.
5689
5690             Parameters:
5691                 theObject The object to be translated.
5692                 theVector1 Direction of the first translation.
5693                 theStep1 Step of the first translation.
5694                 theNbTimes1 Quantity of translations to be done along theVector1.
5695                 theVector2 Direction of the second translation.
5696                 theStep2 Step of the second translation.
5697                 theNbTimes2 Quantity of translations to be done along theVector2.
5698
5699             Returns:
5700                 New GEOM.GEOM_Object, containing compound of all
5701                 the shapes, obtained after each translation.
5702
5703             Example of usage:
5704                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
5705             """
5706             # Example: see GEOM_TestAll.py
5707             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
5708             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
5709                                                  theVector2, theStep2, theNbTimes2)
5710             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
5711             anObj.SetParameters(Parameters)
5712             return anObj
5713
5714         ## Rotate the given object around the given axis a given number times.
5715         #  Rotation angle will be 2*PI/theNbTimes.
5716         #  @param theObject The object to be rotated.
5717         #  @param theAxis The rotation axis.
5718         #  @param theNbTimes Quantity of rotations to be done.
5719         #  @return New GEOM.GEOM_Object, containing compound of all the
5720         #          shapes, obtained after each rotation.
5721         #
5722         #  @ref tui_multi_rotation "Example"
5723         def MultiRotate1D(self,theObject, theAxis, theNbTimes):
5724             """
5725             Rotate the given object around the given axis a given number times.
5726             Rotation angle will be 2*PI/theNbTimes.
5727
5728             Parameters:
5729                 theObject The object to be rotated.
5730                 theAxis The rotation axis.
5731                 theNbTimes Quantity of rotations to be done.
5732
5733             Returns:     
5734                 New GEOM.GEOM_Object, containing compound of all the
5735                 shapes, obtained after each rotation.
5736
5737             Example of usage:
5738                 rot1d = geompy.MultiRotate1D(prism, vect, 4)
5739             """
5740             # Example: see GEOM_TestAll.py
5741             theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
5742             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
5743             RaiseIfFailed("MultiRotate1D", self.TrsfOp)
5744             anObj.SetParameters(Parameters)
5745             return anObj
5746
5747         ## Rotate the given object around the
5748         #  given axis on the given angle a given number
5749         #  times and multi-translate each rotation result.
5750         #  Translation direction passes through center of gravity
5751         #  of rotated shape and its projection on the rotation axis.
5752         #  @param theObject The object to be rotated.
5753         #  @param theAxis Rotation axis.
5754         #  @param theAngle Rotation angle in graduces.
5755         #  @param theNbTimes1 Quantity of rotations to be done.
5756         #  @param theStep Translation distance.
5757         #  @param theNbTimes2 Quantity of translations to be done.
5758         #  @return New GEOM.GEOM_Object, containing compound of all the
5759         #          shapes, obtained after each transformation.
5760         #
5761         #  @ref tui_multi_rotation "Example"
5762         def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2):
5763             """
5764             Rotate the given object around the
5765             given axis on the given angle a given number
5766             times and multi-translate each rotation result.
5767             Translation direction passes through center of gravity
5768             of rotated shape and its projection on the rotation axis.
5769
5770             Parameters:
5771                 theObject The object to be rotated.
5772                 theAxis Rotation axis.
5773                 theAngle Rotation angle in graduces.
5774                 theNbTimes1 Quantity of rotations to be done.
5775                 theStep Translation distance.
5776                 theNbTimes2 Quantity of translations to be done.
5777
5778             Returns:    
5779                 New GEOM.GEOM_Object, containing compound of all the
5780                 shapes, obtained after each transformation.
5781
5782             Example of usage:
5783                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
5784             """
5785             # Example: see GEOM_TestAll.py
5786             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
5787             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
5788             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
5789             anObj.SetParameters(Parameters)
5790             return anObj
5791
5792         ## The same, as MultiRotate1D(), but axis is given by direction and point
5793         #
5794         #  @ref swig_MakeMultiRotation "Example"
5795         def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
5796             """
5797             The same, as geompy.MultiRotate1D, but axis is given by direction and point
5798
5799             Example of usage:
5800                 pz = geompy.MakeVertex(0, 0, 100)
5801                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5802                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
5803             """
5804             # Example: see GEOM_TestOthers.py
5805             aVec = self.MakeLine(aPoint,aDir)
5806             anObj = self.MultiRotate1D(aShape,aVec,aNbTimes)
5807             return anObj
5808
5809         ## The same, as MultiRotate2D(), but axis is given by direction and point
5810         #
5811         #  @ref swig_MakeMultiRotation "Example"
5812         def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
5813             """
5814             The same, as MultiRotate2D(), but axis is given by direction and point
5815             
5816             Example of usage:
5817                 pz = geompy.MakeVertex(0, 0, 100)
5818                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5819                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
5820             """
5821             # Example: see GEOM_TestOthers.py
5822             aVec = self.MakeLine(aPoint,aDir)
5823             anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2)
5824             return anObj
5825
5826         # end of l3_transform
5827         ## @}
5828
5829         ## @addtogroup l3_local
5830         ## @{
5831
5832         ## Perform a fillet on all edges of the given shape.
5833         #  @param theShape Shape, to perform fillet on.
5834         #  @param theR Fillet radius.
5835         #  @return New GEOM.GEOM_Object, containing the result shape.
5836         #
5837         #  @ref tui_fillet "Example 1"
5838         #  \n @ref swig_MakeFilletAll "Example 2"
5839         def MakeFilletAll(self,theShape, theR):
5840             """
5841             Perform a fillet on all edges of the given shape.
5842
5843             Parameters:
5844                 theShape Shape, to perform fillet on.
5845                 theR Fillet radius.
5846
5847             Returns: 
5848                 New GEOM.GEOM_Object, containing the result shape.
5849
5850             Example of usage: 
5851                filletall = geompy.MakeFilletAll(prism, 10.) 
5852             """
5853             # Example: see GEOM_TestOthers.py
5854             theR,Parameters = ParseParameters(theR)
5855             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
5856             RaiseIfFailed("MakeFilletAll", self.LocalOp)
5857             anObj.SetParameters(Parameters)
5858             return anObj
5859
5860         ## Perform a fillet on the specified edges/faces of the given shape
5861         #  @param theShape Shape, to perform fillet on.
5862         #  @param theR Fillet radius.
5863         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
5864         #  @param theListShapes Global indices of edges/faces to perform fillet on.
5865         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
5866         #  @return New GEOM.GEOM_Object, containing the result shape.
5867         #
5868         #  @ref tui_fillet "Example"
5869         def MakeFillet(self,theShape, theR, theShapeType, theListShapes):
5870             """
5871             Perform a fillet on the specified edges/faces of the given shape
5872
5873             Parameters:
5874                 theShape Shape, to perform fillet on.
5875                 theR Fillet radius.
5876                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
5877                 theListShapes Global indices of edges/faces to perform fillet on.
5878
5879             Note:
5880                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5881
5882             Returns: 
5883                 New GEOM.GEOM_Object, containing the result shape.
5884
5885             Example of usage:
5886                 # get the list of IDs (IDList) for the fillet
5887                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5888                 IDlist_e = []
5889                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5890                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5891                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5892                 # make a fillet on the specified edges of the given shape
5893                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
5894             """
5895             # Example: see GEOM_TestAll.py
5896             theR,Parameters = ParseParameters(theR)
5897             anObj = None
5898             if theShapeType == ShapeType["EDGE"]:
5899                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
5900                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
5901             else:
5902                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
5903                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
5904             anObj.SetParameters(Parameters)
5905             return anObj
5906
5907         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
5908         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
5909             """
5910             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
5911
5912             Example of usage:
5913                 # get the list of IDs (IDList) for the fillet
5914                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5915                 IDlist_e = []
5916                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5917                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5918                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5919                 # make a fillet on the specified edges of the given shape
5920                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
5921             """
5922             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
5923             anObj = None
5924             if theShapeType == ShapeType["EDGE"]:
5925                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
5926                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
5927             else:
5928                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
5929                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
5930             anObj.SetParameters(Parameters)
5931             return anObj
5932
5933         ## Perform a fillet on the specified edges of the given shape
5934         #  @param theShape  Wire Shape to perform fillet on.
5935         #  @param theR  Fillet radius.
5936         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
5937         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
5938         #    \note The list of vertices could be empty,
5939         #          in this case fillet will done done at all vertices in wire
5940         #  @return New GEOM.GEOM_Object, containing the result shape.
5941         #
5942         #  @ref tui_fillet2d "Example"
5943         def MakeFillet1D(self,theShape, theR, theListOfVertexes):
5944             """
5945             Perform a fillet on the specified edges of the given shape
5946
5947             Parameters:
5948                 theShape  Wire Shape to perform fillet on.
5949                 theR  Fillet radius.
5950                 theListOfVertexes Global indices of vertexes to perform fillet on.
5951             Note:
5952                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5953
5954                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
5955
5956             Returns: 
5957                 New GEOM.GEOM_Object, containing the result shape.
5958
5959             Example of usage:  
5960                 # create wire
5961                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
5962                 # make fillet at given wire vertices with giver radius
5963                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
5964             """
5965             # Example: see GEOM_TestAll.py
5966             theR,Parameters = ParseParameters(theR)
5967             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes)
5968             RaiseIfFailed("MakeFillet1D", self.LocalOp)
5969             anObj.SetParameters(Parameters)
5970             return anObj
5971
5972         ## Perform a fillet at the specified vertices of the given face/shell.
5973         #  @param theShape Face or Shell shape to perform fillet on.
5974         #  @param theR Fillet radius.
5975         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
5976         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
5977         #  @return New GEOM.GEOM_Object, containing the result shape.
5978         #
5979         #  @ref tui_fillet2d "Example"
5980         def MakeFillet2D(self, theShape, theR, theListOfVertexes):
5981             """
5982             Perform a fillet at the specified vertices of the given face/shell.
5983
5984             Parameters:
5985                 theShape  Face or Shell shape to perform fillet on.
5986                 theR  Fillet radius.
5987                 theListOfVertexes Global indices of vertexes to perform fillet on.
5988             Note:
5989                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5990
5991             Returns: 
5992                 New GEOM.GEOM_Object, containing the result shape.
5993
5994             Example of usage:
5995                 face = geompy.MakeFaceHW(100, 100, 1)
5996                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
5997             """
5998             # Example: see GEOM_TestAll.py
5999             theR,Parameters = ParseParameters(theR)
6000             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
6001             RaiseIfFailed("MakeFillet2D", self.LocalOp)
6002             anObj.SetParameters(Parameters)
6003             return anObj
6004
6005         ## Perform a symmetric chamfer on all edges of the given shape.
6006         #  @param theShape Shape, to perform chamfer on.
6007         #  @param theD Chamfer size along each face.
6008         #  @return New GEOM.GEOM_Object, containing the result shape.
6009         #
6010         #  @ref tui_chamfer "Example 1"
6011         #  \n @ref swig_MakeChamferAll "Example 2"
6012         def MakeChamferAll(self,theShape, theD):
6013             """
6014             Perform a symmetric chamfer on all edges of the given shape.
6015
6016             Parameters:
6017                 theShape Shape, to perform chamfer on.
6018                 theD Chamfer size along each face.
6019
6020             Returns:     
6021                 New GEOM.GEOM_Object, containing the result shape.
6022
6023             Example of usage:
6024                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
6025             """
6026             # Example: see GEOM_TestOthers.py
6027             theD,Parameters = ParseParameters(theD)
6028             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
6029             RaiseIfFailed("MakeChamferAll", self.LocalOp)
6030             anObj.SetParameters(Parameters)
6031             return anObj
6032
6033         ## Perform a chamfer on edges, common to the specified faces,
6034         #  with distance D1 on the Face1
6035         #  @param theShape Shape, to perform chamfer on.
6036         #  @param theD1 Chamfer size along \a theFace1.
6037         #  @param theD2 Chamfer size along \a theFace2.
6038         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6039         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6040         #  @return New GEOM.GEOM_Object, containing the result shape.
6041         #
6042         #  @ref tui_chamfer "Example"
6043         def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2):
6044             """
6045             Perform a chamfer on edges, common to the specified faces,
6046             with distance D1 on the Face1
6047
6048             Parameters:
6049                 theShape Shape, to perform chamfer on.
6050                 theD1 Chamfer size along theFace1.
6051                 theD2 Chamfer size along theFace2.
6052                 theFace1,theFace2 Global indices of two faces of theShape.
6053
6054             Note:
6055                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6056
6057             Returns:      
6058                 New GEOM.GEOM_Object, containing the result shape.
6059
6060             Example of usage:
6061                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6062                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6063                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6064                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
6065             """
6066             # Example: see GEOM_TestAll.py
6067             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6068             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
6069             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
6070             anObj.SetParameters(Parameters)
6071             return anObj
6072
6073         ## Perform a chamfer on edges
6074         #  @param theShape Shape, to perform chamfer on.
6075         #  @param theD Chamfer length
6076         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6077         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6078         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6079         #  @return New GEOM.GEOM_Object, containing the result shape.
6080         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
6081             """
6082             Perform a chamfer on edges
6083
6084             Parameters:
6085                 theShape Shape, to perform chamfer on.
6086                 theD1 Chamfer size along theFace1.
6087                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
6088                 theFace1,theFace2 Global indices of two faces of theShape.
6089
6090             Note:
6091                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6092
6093             Returns:      
6094                 New GEOM.GEOM_Object, containing the result shape.
6095
6096             Example of usage:
6097                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6098                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6099                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6100                 ang = 30
6101                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
6102             """
6103             flag = False
6104             if isinstance(theAngle,str):
6105                 flag = True
6106             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6107             if flag:
6108                 theAngle = theAngle*math.pi/180.0
6109             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
6110             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
6111             anObj.SetParameters(Parameters)
6112             return anObj
6113
6114         ## Perform a chamfer on all edges of the specified faces,
6115         #  with distance D1 on the first specified face (if several for one edge)
6116         #  @param theShape Shape, to perform chamfer on.
6117         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
6118         #               connected to the edge, are in \a theFaces, \a theD1
6119         #               will be get along face, which is nearer to \a theFaces beginning.
6120         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
6121         #  @param theFaces Sequence of global indices of faces of \a theShape.
6122         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6123         #  @return New GEOM.GEOM_Object, containing the result shape.
6124         #
6125         #  @ref tui_chamfer "Example"
6126         def MakeChamferFaces(self,theShape, theD1, theD2, theFaces):
6127             """
6128             Perform a chamfer on all edges of the specified faces,
6129             with distance D1 on the first specified face (if several for one edge)
6130
6131             Parameters:
6132                 theShape Shape, to perform chamfer on.
6133                 theD1 Chamfer size along face from  theFaces. If both faces,
6134                       connected to the edge, are in theFaces, theD1
6135                       will be get along face, which is nearer to theFaces beginning.
6136                 theD2 Chamfer size along another of two faces, connected to the edge.
6137                 theFaces Sequence of global indices of faces of theShape.
6138
6139                 
6140             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
6141
6142             Returns:  
6143                 New GEOM.GEOM_Object, containing the result shape.
6144             """
6145             # Example: see GEOM_TestAll.py
6146             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6147             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
6148             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
6149             anObj.SetParameters(Parameters)
6150             return anObj
6151
6152         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
6153         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6154         #
6155         #  @ref swig_FilletChamfer "Example"
6156         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
6157             """
6158             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
6159             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6160             """
6161             flag = False
6162             if isinstance(theAngle,str):
6163                 flag = True
6164             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6165             if flag:
6166                 theAngle = theAngle*math.pi/180.0
6167             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
6168             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
6169             anObj.SetParameters(Parameters)
6170             return anObj
6171
6172         ## Perform a chamfer on edges,
6173         #  with distance D1 on the first specified face (if several for one edge)
6174         #  @param theShape Shape, to perform chamfer on.
6175         #  @param theD1,theD2 Chamfer size
6176         #  @param theEdges Sequence of edges of \a theShape.
6177         #  @return New GEOM.GEOM_Object, containing the result shape.
6178         #
6179         #  @ref swig_FilletChamfer "Example"
6180         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
6181             """
6182             Perform a chamfer on edges,
6183             with distance D1 on the first specified face (if several for one edge)
6184             
6185             Parameters:
6186                 theShape Shape, to perform chamfer on.
6187                 theD1,theD2 Chamfer size
6188                 theEdges Sequence of edges of theShape.
6189
6190             Returns:
6191                 New GEOM.GEOM_Object, containing the result shape.
6192             """
6193             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6194             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
6195             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
6196             anObj.SetParameters(Parameters)
6197             return anObj
6198
6199         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
6200         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6201         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
6202             """
6203             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
6204             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6205             """
6206             flag = False
6207             if isinstance(theAngle,str):
6208                 flag = True
6209             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6210             if flag:
6211                 theAngle = theAngle*math.pi/180.0
6212             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
6213             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
6214             anObj.SetParameters(Parameters)
6215             return anObj
6216
6217         ## /sa MakeChamferEdge() and MakeChamferFaces()
6218         #
6219         #  @ref swig_MakeChamfer "Example"
6220         def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
6221             """
6222             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
6223             """
6224             # Example: see GEOM_TestOthers.py
6225             anObj = None
6226             if aShapeType == ShapeType["EDGE"]:
6227                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1])
6228             else:
6229                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
6230             return anObj
6231             
6232         ## Remove material from a solid by extrusion of the base shape on the given distance.
6233         #  @param theInit Shape to remove material from. It must be a solid or 
6234         #  a compound made of a single solid.
6235         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6236         #  @param theH Prism dimension along the normal to theBase
6237         #  @param theAngle Draft angle in degrees.
6238         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
6239         #
6240         #  @ref tui_creation_prism "Example"
6241         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle):
6242             """
6243             Add material to a solid by extrusion of the base shape on the given distance.
6244
6245             Parameters:
6246                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
6247                 theBase Closed edge or wire defining the base shape to be extruded.
6248                 theH Prism dimension along the normal  to theBase
6249                 theAngle Draft angle in degrees.
6250
6251             Returns:
6252                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
6253             """
6254             # Example: see GEOM_TestAll.py
6255             #theH,Parameters = ParseParameters(theH)
6256             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
6257             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6258             #anObj.SetParameters(Parameters)
6259             return anObj   
6260             
6261         ## Add material to a solid by extrusion of the base shape on the given distance.
6262         #  @param theInit Shape to add material to. It must be a solid or 
6263         #  a compound made of a single solid.
6264         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6265         #  @param theH Prism dimension along the normal to theBase
6266         #  @param theAngle Draft angle in degrees.
6267         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
6268         #
6269         #  @ref tui_creation_prism "Example"
6270         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle):
6271             """
6272             Add material to a solid by extrusion of the base shape on the given distance.
6273
6274             Parameters:
6275                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
6276                 theBase Closed edge or wire defining the base shape to be extruded.
6277                 theH Prism dimension along the normal  to theBase
6278                 theAngle Draft angle in degrees.
6279
6280             Returns:
6281                 New GEOM.GEOM_Object,  containing the initial shape with added material.
6282             """
6283             # Example: see GEOM_TestAll.py
6284             #theH,Parameters = ParseParameters(theH)
6285             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
6286             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6287             #anObj.SetParameters(Parameters)
6288             return anObj   
6289
6290         # end of l3_local
6291         ## @}
6292
6293         ## @addtogroup l3_basic_op
6294         ## @{
6295
6296         ## Perform an Archimde operation on the given shape with given parameters.
6297         #  The object presenting the resulting face is returned.
6298         #  @param theShape Shape to be put in water.
6299         #  @param theWeight Weight og the shape.
6300         #  @param theWaterDensity Density of the water.
6301         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
6302         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
6303         #          by a plane, corresponding to water level.
6304         #
6305         #  @ref tui_archimede "Example"
6306         def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection):
6307             """
6308             Perform an Archimde operation on the given shape with given parameters.
6309             The object presenting the resulting face is returned.
6310
6311             Parameters: 
6312                 theShape Shape to be put in water.
6313                 theWeight Weight og the shape.
6314                 theWaterDensity Density of the water.
6315                 theMeshDeflection Deflection of the mesh, using to compute the section.
6316
6317             Returns: 
6318                 New GEOM.GEOM_Object, containing a section of theShape
6319                 by a plane, corresponding to water level.
6320             """
6321             # Example: see GEOM_TestAll.py
6322             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
6323               theWeight,theWaterDensity,theMeshDeflection)
6324             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
6325             RaiseIfFailed("MakeArchimede", self.LocalOp)
6326             anObj.SetParameters(Parameters)
6327             return anObj
6328
6329         # end of l3_basic_op
6330         ## @}
6331
6332         ## @addtogroup l2_measure
6333         ## @{
6334
6335         ## Get point coordinates
6336         #  @return [x, y, z]
6337         #
6338         #  @ref tui_measurement_tools_page "Example"
6339         def PointCoordinates(self,Point):
6340             """
6341             Get point coordinates
6342
6343             Returns:
6344                 [x, y, z]
6345             """
6346             # Example: see GEOM_TestMeasures.py
6347             aTuple = self.MeasuOp.PointCoordinates(Point)
6348             RaiseIfFailed("PointCoordinates", self.MeasuOp)
6349             return aTuple
6350
6351         ## Get summarized length of all wires,
6352         #  area of surface and volume of the given shape.
6353         #  @param theShape Shape to define properties of.
6354         #  @return [theLength, theSurfArea, theVolume]\n
6355         #  theLength:   Summarized length of all wires of the given shape.\n
6356         #  theSurfArea: Area of surface of the given shape.\n
6357         #  theVolume:   Volume of the given shape.
6358         #
6359         #  @ref tui_measurement_tools_page "Example"
6360         def BasicProperties(self,theShape):
6361             """
6362             Get summarized length of all wires,
6363             area of surface and volume of the given shape.
6364
6365             Parameters: 
6366                 theShape Shape to define properties of.
6367
6368             Returns:
6369                 [theLength, theSurfArea, theVolume]
6370                  theLength:   Summarized length of all wires of the given shape.
6371                  theSurfArea: Area of surface of the given shape.
6372                  theVolume:   Volume of the given shape.
6373             """
6374             # Example: see GEOM_TestMeasures.py
6375             aTuple = self.MeasuOp.GetBasicProperties(theShape)
6376             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
6377             return aTuple
6378
6379         ## Get parameters of bounding box of the given shape
6380         #  @param theShape Shape to obtain bounding box of.
6381         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6382         #  Xmin,Xmax: Limits of shape along OX axis.
6383         #  Ymin,Ymax: Limits of shape along OY axis.
6384         #  Zmin,Zmax: Limits of shape along OZ axis.
6385         #
6386         #  @ref tui_measurement_tools_page "Example"
6387         def BoundingBox(self,theShape):
6388             """
6389             Get parameters of bounding box of the given shape
6390
6391             Parameters: 
6392                 theShape Shape to obtain bounding box of.
6393
6394             Returns:
6395                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6396                  Xmin,Xmax: Limits of shape along OX axis.
6397                  Ymin,Ymax: Limits of shape along OY axis.
6398                  Zmin,Zmax: Limits of shape along OZ axis.
6399             """
6400             # Example: see GEOM_TestMeasures.py
6401             aTuple = self.MeasuOp.GetBoundingBox(theShape)
6402             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
6403             return aTuple
6404
6405         ## Get inertia matrix and moments of inertia of theShape.
6406         #  @param theShape Shape to calculate inertia of.
6407         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6408         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6409         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
6410         #
6411         #  @ref tui_measurement_tools_page "Example"
6412         def Inertia(self,theShape):
6413             """
6414             Get inertia matrix and moments of inertia of theShape.
6415
6416             Parameters: 
6417                 theShape Shape to calculate inertia of.
6418
6419             Returns:
6420                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6421                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6422                  Ix,Iy,Iz:    Moments of inertia of the given shape.
6423             """
6424             # Example: see GEOM_TestMeasures.py
6425             aTuple = self.MeasuOp.GetInertia(theShape)
6426             RaiseIfFailed("GetInertia", self.MeasuOp)
6427             return aTuple
6428
6429         ## Get if coords are included in the shape (ST_IN or ST_ON)
6430         #  @param theShape Shape
6431         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6432         #  @param tolerance to be used (default is 1.0e-7)
6433         #  @return list_of_boolean = [res1, res2, ...]
6434         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
6435             """
6436             Get if coords are included in the shape (ST_IN or ST_ON)
6437             
6438             Parameters: 
6439                 theShape Shape
6440                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6441                 tolerance to be used (default is 1.0e-7)
6442
6443             Returns:
6444                 list_of_boolean = [res1, res2, ...]
6445             """
6446             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
6447
6448         ## Get minimal distance between the given shapes.
6449         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6450         #  @return Value of the minimal distance between the given shapes.
6451         #
6452         #  @ref tui_measurement_tools_page "Example"
6453         def MinDistance(self, theShape1, theShape2):
6454             """
6455             Get minimal distance between the given shapes.
6456             
6457             Parameters: 
6458                 theShape1,theShape2 Shapes to find minimal distance between.
6459
6460             Returns:    
6461                 Value of the minimal distance between the given shapes.
6462             """
6463             # Example: see GEOM_TestMeasures.py
6464             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6465             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6466             return aTuple[0]
6467
6468         ## Get minimal distance between the given shapes.
6469         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6470         #  @return Value of the minimal distance between the given shapes.
6471         #
6472         #  @ref swig_all_measure "Example"
6473         def MinDistanceComponents(self, theShape1, theShape2):
6474             """
6475             Get minimal distance between the given shapes.
6476
6477             Parameters: 
6478                 theShape1,theShape2 Shapes to find minimal distance between.
6479
6480             Returns:  
6481                 Value of the minimal distance between the given shapes.
6482             """
6483             # Example: see GEOM_TestMeasures.py
6484             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6485             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6486             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
6487             return aRes
6488
6489         ## Get angle between the given shapes in degrees.
6490         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6491         #  @note If both arguments are vectors, the angle is computed in accordance
6492         #        with their orientations, otherwise the minimum angle is computed.
6493         #  @return Value of the angle between the given shapes in degrees.
6494         #
6495         #  @ref tui_measurement_tools_page "Example"
6496         def GetAngle(self, theShape1, theShape2):
6497             """
6498             Get angle between the given shapes in degrees.
6499
6500             Parameters: 
6501                 theShape1,theShape2 Lines or linear edges to find angle between.
6502
6503             Note:
6504                 If both arguments are vectors, the angle is computed in accordance
6505                 with their orientations, otherwise the minimum angle is computed.
6506
6507             Returns:  
6508                 Value of the angle between the given shapes in degrees.
6509             """
6510             # Example: see GEOM_TestMeasures.py
6511             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
6512             RaiseIfFailed("GetAngle", self.MeasuOp)
6513             return anAngle
6514
6515         ## Get angle between the given shapes in radians.
6516         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6517         #  @note If both arguments are vectors, the angle is computed in accordance
6518         #        with their orientations, otherwise the minimum angle is computed.
6519         #  @return Value of the angle between the given shapes in radians.
6520         #
6521         #  @ref tui_measurement_tools_page "Example"
6522         def GetAngleRadians(self, theShape1, theShape2):
6523             """
6524             Get angle between the given shapes in radians.
6525
6526             Parameters: 
6527                 theShape1,theShape2 Lines or linear edges to find angle between.
6528
6529                 
6530             Note:
6531                 If both arguments are vectors, the angle is computed in accordance
6532                 with their orientations, otherwise the minimum angle is computed.
6533
6534             Returns:  
6535                 Value of the angle between the given shapes in radians.
6536             """
6537             # Example: see GEOM_TestMeasures.py
6538             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
6539             RaiseIfFailed("GetAngle", self.MeasuOp)
6540             return anAngle
6541
6542         ## @name Curve Curvature Measurement
6543         #  Methods for receiving radius of curvature of curves
6544         #  in the given point
6545         ## @{
6546
6547         ## Measure curvature of a curve at a point, set by parameter.
6548         #  @param theCurve a curve.
6549         #  @param theParam parameter.
6550         #  @return radius of curvature of \a theCurve.
6551         #
6552         #  @ref swig_todo "Example"
6553         def CurveCurvatureByParam(self, theCurve, theParam):
6554             """
6555             Measure curvature of a curve at a point, set by parameter.
6556
6557             Parameters: 
6558                 theCurve a curve.
6559                 theParam parameter.
6560
6561             Returns: 
6562                 radius of curvature of theCurve.
6563             """
6564             # Example: see GEOM_TestMeasures.py
6565             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
6566             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
6567             return aCurv
6568
6569         ## Measure curvature of a curve at a point.
6570         #  @param theCurve a curve.
6571         #  @param thePoint given point.
6572         #  @return radius of curvature of \a theCurve.
6573         #
6574         #  @ref swig_todo "Example"
6575         def CurveCurvatureByPoint(self, theCurve, thePoint):
6576             """
6577             Measure curvature of a curve at a point.
6578
6579             Parameters: 
6580                 theCurve a curve.
6581                 thePoint given point.
6582
6583             Returns: 
6584                 radius of curvature of theCurve.           
6585             """
6586             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
6587             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
6588             return aCurv
6589         ## @}
6590
6591         ## @name Surface Curvature Measurement
6592         #  Methods for receiving max and min radius of curvature of surfaces
6593         #  in the given point
6594         ## @{
6595
6596         ## Measure max radius of curvature of surface.
6597         #  @param theSurf the given surface.
6598         #  @param theUParam Value of U-parameter on the referenced surface.
6599         #  @param theVParam Value of V-parameter on the referenced surface.
6600         #  @return max radius of curvature of theSurf.
6601         #
6602         ## @ref swig_todo "Example"
6603         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6604             """
6605             Measure max radius of curvature of surface.
6606
6607             Parameters: 
6608                 theSurf the given surface.
6609                 theUParam Value of U-parameter on the referenced surface.
6610                 theVParam Value of V-parameter on the referenced surface.
6611                 
6612             Returns:     
6613                 max radius of curvature of theSurf.
6614             """
6615             # Example: see GEOM_TestMeasures.py
6616             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6617             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
6618             return aSurf
6619
6620         ## Measure max radius of curvature of surface in the given point
6621         #  @param theSurf the given surface.
6622         #  @param thePoint given point.
6623         #  @return max radius of curvature of theSurf.
6624         #
6625         ## @ref swig_todo "Example"
6626         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
6627             """
6628             Measure max radius of curvature of surface in the given point.
6629
6630             Parameters: 
6631                 theSurf the given surface.
6632                 thePoint given point.
6633                 
6634             Returns:     
6635                 max radius of curvature of theSurf.          
6636             """
6637             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
6638             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
6639             return aSurf
6640
6641         ## Measure min radius of curvature of surface.
6642         #  @param theSurf the given surface.
6643         #  @param theUParam Value of U-parameter on the referenced surface.
6644         #  @param theVParam Value of V-parameter on the referenced surface.
6645         #  @return min radius of curvature of theSurf.
6646         #   
6647         ## @ref swig_todo "Example"
6648         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6649             """
6650             Measure min radius of curvature of surface.
6651
6652             Parameters: 
6653                 theSurf the given surface.
6654                 theUParam Value of U-parameter on the referenced surface.
6655                 theVParam Value of V-parameter on the referenced surface.
6656                 
6657             Returns:     
6658                 Min radius of curvature of theSurf.
6659             """
6660             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6661             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
6662             return aSurf
6663
6664         ## Measure min radius of curvature of surface in the given point
6665         #  @param theSurf the given surface.
6666         #  @param thePoint given point.
6667         #  @return min radius of curvature of theSurf.
6668         #
6669         ## @ref swig_todo "Example"
6670         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
6671             """
6672             Measure min radius of curvature of surface in the given point.
6673
6674             Parameters: 
6675                 theSurf the given surface.
6676                 thePoint given point.
6677                 
6678             Returns:     
6679                 Min radius of curvature of theSurf.          
6680             """
6681             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
6682             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
6683             return aSurf
6684         ## @}
6685
6686         ## Get min and max tolerances of sub-shapes of theShape
6687         #  @param theShape Shape, to get tolerances of.
6688         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
6689         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
6690         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
6691         #  VertMin,VertMax: Min and max tolerances of the vertices.
6692         #
6693         #  @ref tui_measurement_tools_page "Example"
6694         def Tolerance(self,theShape):
6695             """
6696             Get min and max tolerances of sub-shapes of theShape
6697
6698             Parameters: 
6699                 theShape Shape, to get tolerances of.
6700
6701             Returns:    
6702                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
6703                  FaceMin,FaceMax: Min and max tolerances of the faces.
6704                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
6705                  VertMin,VertMax: Min and max tolerances of the vertices.
6706             """
6707             # Example: see GEOM_TestMeasures.py
6708             aTuple = self.MeasuOp.GetTolerance(theShape)
6709             RaiseIfFailed("GetTolerance", self.MeasuOp)
6710             return aTuple
6711
6712         ## Obtain description of the given shape (number of sub-shapes of each type)
6713         #  @param theShape Shape to be described.
6714         #  @return Description of the given shape.
6715         #
6716         #  @ref tui_measurement_tools_page "Example"
6717         def WhatIs(self,theShape):
6718             """
6719             Obtain description of the given shape (number of sub-shapes of each type)
6720
6721             Parameters:
6722                 theShape Shape to be described.
6723
6724             Returns:
6725                 Description of the given shape.
6726             """
6727             # Example: see GEOM_TestMeasures.py
6728             aDescr = self.MeasuOp.WhatIs(theShape)
6729             RaiseIfFailed("WhatIs", self.MeasuOp)
6730             return aDescr
6731
6732         ## Obtain quantity of shapes of the given type in \a theShape.
6733         #  If \a theShape is of type \a theType, it is also counted.
6734         #  @param theShape Shape to be described.
6735         #  @param theType the given ShapeType().
6736         #  @return Quantity of shapes of type \a theType in \a theShape.
6737         #
6738         #  @ref tui_measurement_tools_page "Example"
6739         def NbShapes (self, theShape, theType):
6740             """
6741             Obtain quantity of shapes of the given type in theShape.
6742             If theShape is of type theType, it is also counted.
6743
6744             Parameters:
6745                 theShape Shape to be described.
6746                 theType the given geompy.ShapeType
6747
6748             Returns:
6749                 Quantity of shapes of type theType in theShape.
6750             """
6751             # Example: see GEOM_TestMeasures.py
6752             listSh = self.SubShapeAllIDs(theShape, theType)
6753             Nb = len(listSh)
6754             t       = EnumToLong(theShape.GetShapeType())
6755             theType = EnumToLong(theType)
6756             if t == theType:
6757                 Nb = Nb + 1
6758                 pass
6759             return Nb
6760
6761         ## Obtain quantity of shapes of each type in \a theShape.
6762         #  The \a theShape is also counted.
6763         #  @param theShape Shape to be described.
6764         #  @return Dictionary of ShapeType() with bound quantities of shapes.
6765         #
6766         #  @ref tui_measurement_tools_page "Example"
6767         def ShapeInfo (self, theShape):
6768             """
6769             Obtain quantity of shapes of each type in theShape.
6770             The theShape is also counted.
6771
6772             Parameters:
6773                 theShape Shape to be described.
6774
6775             Returns:
6776                 Dictionary of geompy.ShapeType with bound quantities of shapes.
6777             """
6778             # Example: see GEOM_TestMeasures.py
6779             aDict = {}
6780             for typeSh in ShapeType:
6781                 if typeSh in ( "AUTO", "SHAPE" ): continue
6782                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
6783                 Nb = len(listSh)
6784                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
6785                     Nb = Nb + 1
6786                     pass
6787                 aDict[typeSh] = Nb
6788                 pass
6789             return aDict
6790
6791         ## Get a point, situated at the centre of mass of theShape.
6792         #  @param theShape Shape to define centre of mass of.
6793         #  @return New GEOM.GEOM_Object, containing the created point.
6794         #
6795         #  @ref tui_measurement_tools_page "Example"
6796         def MakeCDG(self,theShape):
6797             """
6798             Get a point, situated at the centre of mass of theShape.
6799
6800             Parameters:
6801                 theShape Shape to define centre of mass of.
6802
6803             Returns:
6804                 New GEOM.GEOM_Object, containing the created point.
6805             """
6806             # Example: see GEOM_TestMeasures.py
6807             anObj = self.MeasuOp.GetCentreOfMass(theShape)
6808             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
6809             return anObj
6810
6811         ## Get a vertex sub-shape by index depended with orientation.
6812         #  @param theShape Shape to find sub-shape.
6813         #  @param theIndex Index to find vertex by this index (starting from zero)
6814         #  @return New GEOM.GEOM_Object, containing the created vertex.
6815         #
6816         #  @ref tui_measurement_tools_page "Example"
6817         def GetVertexByIndex(self,theShape, theIndex):
6818             """
6819             Get a vertex sub-shape by index depended with orientation.
6820
6821             Parameters:
6822                 theShape Shape to find sub-shape.
6823                 theIndex Index to find vertex by this index (starting from zero)
6824
6825             Returns:
6826                 New GEOM.GEOM_Object, containing the created vertex.
6827             """
6828             # Example: see GEOM_TestMeasures.py
6829             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
6830             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
6831             return anObj
6832
6833         ## Get the first vertex of wire/edge depended orientation.
6834         #  @param theShape Shape to find first vertex.
6835         #  @return New GEOM.GEOM_Object, containing the created vertex.
6836         #
6837         #  @ref tui_measurement_tools_page "Example"
6838         def GetFirstVertex(self,theShape):
6839             """
6840             Get the first vertex of wire/edge depended orientation.
6841
6842             Parameters:
6843                 theShape Shape to find first vertex.
6844
6845             Returns:    
6846                 New GEOM.GEOM_Object, containing the created vertex.
6847             """
6848             # Example: see GEOM_TestMeasures.py
6849             anObj = self.GetVertexByIndex(theShape, 0)
6850             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
6851             return anObj
6852
6853         ## Get the last vertex of wire/edge depended orientation.
6854         #  @param theShape Shape to find last vertex.
6855         #  @return New GEOM.GEOM_Object, containing the created vertex.
6856         #
6857         #  @ref tui_measurement_tools_page "Example"
6858         def GetLastVertex(self,theShape):
6859             """
6860             Get the last vertex of wire/edge depended orientation.
6861
6862             Parameters: 
6863                 theShape Shape to find last vertex.
6864
6865             Returns:   
6866                 New GEOM.GEOM_Object, containing the created vertex.
6867             """
6868             # Example: see GEOM_TestMeasures.py
6869             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
6870             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
6871             RaiseIfFailed("GetLastVertex", self.MeasuOp)
6872             return anObj
6873
6874         ## Get a normale to the given face. If the point is not given,
6875         #  the normale is calculated at the center of mass.
6876         #  @param theFace Face to define normale of.
6877         #  @param theOptionalPoint Point to compute the normale at.
6878         #  @return New GEOM.GEOM_Object, containing the created vector.
6879         #
6880         #  @ref swig_todo "Example"
6881         def GetNormal(self, theFace, theOptionalPoint = None):
6882             """
6883             Get a normale to the given face. If the point is not given,
6884             the normale is calculated at the center of mass.
6885             
6886             Parameters: 
6887                 theFace Face to define normale of.
6888                 theOptionalPoint Point to compute the normale at.
6889
6890             Returns:   
6891                 New GEOM.GEOM_Object, containing the created vector.
6892             """
6893             # Example: see GEOM_TestMeasures.py
6894             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
6895             RaiseIfFailed("GetNormal", self.MeasuOp)
6896             return anObj
6897
6898         ## Check a topology of the given shape.
6899         #  @param theShape Shape to check validity of.
6900         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
6901         #                        if TRUE, the shape's geometry will be checked also.
6902         #  @return TRUE, if the shape "seems to be valid".
6903         #  If theShape is invalid, prints a description of problem.
6904         #
6905         #  @ref tui_measurement_tools_page "Example"
6906         def CheckShape(self,theShape, theIsCheckGeom = 0):
6907             """
6908             Check a topology of the given shape.
6909
6910             Parameters: 
6911                 theShape Shape to check validity of.
6912                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
6913                                if TRUE, the shape's geometry will be checked also.
6914
6915             Returns:   
6916                 TRUE, if the shape "seems to be valid".
6917                 If theShape is invalid, prints a description of problem.
6918             """
6919             # Example: see GEOM_TestMeasures.py
6920             if theIsCheckGeom:
6921                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
6922                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
6923             else:
6924                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
6925                 RaiseIfFailed("CheckShape", self.MeasuOp)
6926             if IsValid == 0:
6927                 print Status
6928             return IsValid
6929
6930         ## Detect self-intersections in the given shape.
6931         #  @param theShape Shape to check.
6932         #  @return TRUE, if the shape contains no self-intersections.
6933         #
6934         #  @ref tui_measurement_tools_page "Example"
6935         def CheckSelfIntersections (self, theShape):
6936             """
6937             Detect self-intersections in the given shape.
6938
6939             Parameters: 
6940                 theShape Shape to check.
6941
6942             Returns:   
6943                 TRUE, if the shape contains no self-intersections.
6944             """
6945             # Example: see GEOM_TestMeasures.py
6946             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
6947             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
6948             return IsValid
6949
6950         ## Get position (LCS) of theShape.
6951         #
6952         #  Origin of the LCS is situated at the shape's center of mass.
6953         #  Axes of the LCS are obtained from shape's location or,
6954         #  if the shape is a planar face, from position of its plane.
6955         #
6956         #  @param theShape Shape to calculate position of.
6957         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
6958         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
6959         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
6960         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
6961         #
6962         #  @ref swig_todo "Example"
6963         def GetPosition(self,theShape):
6964             """
6965             Get position (LCS) of theShape.
6966             Origin of the LCS is situated at the shape's center of mass.
6967             Axes of the LCS are obtained from shape's location or,
6968             if the shape is a planar face, from position of its plane.
6969
6970             Parameters: 
6971                 theShape Shape to calculate position of.
6972
6973             Returns:  
6974                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
6975                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
6976                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
6977                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
6978             """
6979             # Example: see GEOM_TestMeasures.py
6980             aTuple = self.MeasuOp.GetPosition(theShape)
6981             RaiseIfFailed("GetPosition", self.MeasuOp)
6982             return aTuple
6983
6984         ## Get kind of theShape.
6985         #
6986         #  @param theShape Shape to get a kind of.
6987         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
6988         #          and a list of parameters, describing the shape.
6989         #  @note  Concrete meaning of each value, returned via \a theIntegers
6990         #         or \a theDoubles list depends on the kind() of the shape.
6991         #
6992         #  @ref swig_todo "Example"
6993         def KindOfShape(self,theShape):
6994             """
6995             Get kind of theShape.
6996          
6997             Parameters: 
6998                 theShape Shape to get a kind of.
6999
7000             Returns:
7001                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
7002                     and a list of parameters, describing the shape.
7003             Note:
7004                 Concrete meaning of each value, returned via theIntegers
7005                 or theDoubles list depends on the geompy.kind of the shape
7006             """
7007             # Example: see GEOM_TestMeasures.py
7008             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
7009             RaiseIfFailed("KindOfShape", self.MeasuOp)
7010
7011             aKind  = aRoughTuple[0]
7012             anInts = aRoughTuple[1]
7013             aDbls  = aRoughTuple[2]
7014
7015             # Now there is no exception from this rule:
7016             aKindTuple = [aKind] + aDbls + anInts
7017
7018             # If they are we will regroup parameters for such kind of shape.
7019             # For example:
7020             #if aKind == kind.SOME_KIND:
7021             #    #  SOME_KIND     int int double int double double
7022             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
7023
7024             return aKindTuple
7025
7026         # end of l2_measure
7027         ## @}
7028
7029         ## @addtogroup l2_import_export
7030         ## @{
7031
7032         ## Import a shape from the BREP or IGES or STEP file
7033         #  (depends on given format) with given name.
7034         #  @param theFileName The file, containing the shape.
7035         #  @param theFormatName Specify format for the file reading.
7036         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7037         #         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7038         #         set to 'meter' and result model will be scaled.
7039         #  @return New GEOM.GEOM_Object, containing the imported shape.
7040         #
7041         #  @ref swig_Import_Export "Example"
7042         def ImportFile(self,theFileName, theFormatName):
7043             """
7044             Import a shape from the BREP or IGES or STEP file
7045             (depends on given format) with given name.
7046
7047             Parameters: 
7048                 theFileName The file, containing the shape.
7049                 theFormatName Specify format for the file reading.
7050                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7051                               If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7052                               set to 'meter' and result model will be scaled.
7053
7054             Returns:
7055                 New GEOM.GEOM_Object, containing the imported shape.
7056             """
7057             # Example: see GEOM_TestOthers.py
7058             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7059             RaiseIfFailed("Import", self.InsertOp)
7060             return anObj
7061
7062         ## Deprecated analog of ImportFile()
7063         def Import(self,theFileName, theFormatName):
7064             """
7065             Deprecated analog of geompy.ImportFile
7066             """
7067             print "WARNING: Function Import is deprecated, use ImportFile instead"
7068             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7069             RaiseIfFailed("Import", self.InsertOp)
7070             return anObj
7071
7072         ## Shortcut to ImportFile() for BREP format
7073         #
7074         #  @ref swig_Import_Export "Example"
7075         def ImportBREP(self,theFileName):
7076             """
7077             geompy.ImportFile(...) function for BREP format
7078             """
7079             # Example: see GEOM_TestOthers.py
7080             return self.ImportFile(theFileName, "BREP")
7081
7082         ## Shortcut to ImportFile() for IGES format
7083         #
7084         #  @ref swig_Import_Export "Example"
7085         def ImportIGES(self,theFileName):
7086             """
7087             geompy.ImportFile(...) function for IGES format
7088             """
7089             # Example: see GEOM_TestOthers.py
7090             return self.ImportFile(theFileName, "IGES")
7091
7092         ## Return length unit from given IGES file
7093         #
7094         #  @ref swig_Import_Export "Example"
7095         def GetIGESUnit(self,theFileName):
7096             """
7097             Return length unit from given IGES file
7098             """
7099             # Example: see GEOM_TestOthers.py
7100             anObj = self.InsertOp.ImportFile(theFileName, "IGES_UNIT")
7101             #RaiseIfFailed("Import", self.InsertOp)
7102             # recieve name using returned vertex
7103             UnitName = "M"
7104             if anObj.GetShapeType() == GEOM.VERTEX:
7105                 vertices = [anObj]
7106             else:
7107                 vertices = self.SubShapeAll(anObj,ShapeType["VERTEX"])
7108             if len(vertices)>0:
7109                 p = self.PointCoordinates(vertices[0])
7110                 if abs(p[0]-0.01) < 1.e-6:
7111                     UnitName = "CM"
7112                 elif abs(p[0]-0.001) < 1.e-6:
7113                     UnitName = "MM"
7114             return UnitName
7115
7116         ## Shortcut to ImportFile() for STEP format
7117         #
7118         #  @ref swig_Import_Export "Example"
7119         def ImportSTEP(self,theFileName):
7120             """
7121             geompy.ImportFile(...) function for STEP format
7122             """
7123             # Example: see GEOM_TestOthers.py
7124             return self.ImportFile(theFileName, "STEP")
7125
7126         ## Export the given shape into a file with given name.
7127         #  @param theObject Shape to be stored in the file.
7128         #  @param theFileName Name of the file to store the given shape in.
7129         #  @param theFormatName Specify format for the shape storage.
7130         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7131         #
7132         #  @ref swig_Import_Export "Example"
7133         def Export(self,theObject, theFileName, theFormatName):
7134             """
7135             Export the given shape into a file with given name.
7136
7137             Parameters: 
7138                 theObject Shape to be stored in the file.
7139                 theFileName Name of the file to store the given shape in.
7140                 theFormatName Specify format for the shape storage.
7141                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7142             """
7143             # Example: see GEOM_TestOthers.py
7144             self.InsertOp.Export(theObject, theFileName, theFormatName)
7145             if self.InsertOp.IsDone() == 0:
7146                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
7147                 pass
7148             pass
7149
7150         ## Shortcut to Export() for BREP format
7151         #
7152         #  @ref swig_Import_Export "Example"
7153         def ExportBREP(self,theObject, theFileName):
7154             """
7155             geompy.Export(...) function for BREP format
7156             """
7157             # Example: see GEOM_TestOthers.py
7158             return self.Export(theObject, theFileName, "BREP")
7159
7160         ## Shortcut to Export() for IGES format
7161         #
7162         #  @ref swig_Import_Export "Example"
7163         def ExportIGES(self,theObject, theFileName):
7164             """
7165             geompy.Export(...) function for IGES format
7166             """
7167             # Example: see GEOM_TestOthers.py
7168             return self.Export(theObject, theFileName, "IGES")
7169
7170         ## Shortcut to Export() for STEP format
7171         #
7172         #  @ref swig_Import_Export "Example"
7173         def ExportSTEP(self,theObject, theFileName):
7174             """
7175             geompy.Export(...) function for STEP format
7176             """
7177             # Example: see GEOM_TestOthers.py
7178             return self.Export(theObject, theFileName, "STEP")
7179
7180         # end of l2_import_export
7181         ## @}
7182
7183         ## @addtogroup l3_blocks
7184         ## @{
7185
7186         ## Create a quadrangle face from four edges. Order of Edges is not
7187         #  important. It is  not necessary that edges share the same vertex.
7188         #  @param E1,E2,E3,E4 Edges for the face bound.
7189         #  @return New GEOM.GEOM_Object, containing the created face.
7190         #
7191         #  @ref tui_building_by_blocks_page "Example"
7192         def MakeQuad(self,E1, E2, E3, E4):
7193             """
7194             Create a quadrangle face from four edges. Order of Edges is not
7195             important. It is  not necessary that edges share the same vertex.
7196
7197             Parameters: 
7198                 E1,E2,E3,E4 Edges for the face bound.
7199
7200             Returns: 
7201                 New GEOM.GEOM_Object, containing the created face.
7202
7203             Example of usage:               
7204                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
7205             """
7206             # Example: see GEOM_Spanner.py
7207             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
7208             RaiseIfFailed("MakeQuad", self.BlocksOp)
7209             return anObj
7210
7211         ## Create a quadrangle face on two edges.
7212         #  The missing edges will be built by creating the shortest ones.
7213         #  @param E1,E2 Two opposite edges for the face.
7214         #  @return New GEOM.GEOM_Object, containing the created face.
7215         #
7216         #  @ref tui_building_by_blocks_page "Example"
7217         def MakeQuad2Edges(self,E1, E2):
7218             """
7219             Create a quadrangle face on two edges.
7220             The missing edges will be built by creating the shortest ones.
7221
7222             Parameters: 
7223                 E1,E2 Two opposite edges for the face.
7224
7225             Returns: 
7226                 New GEOM.GEOM_Object, containing the created face.
7227             
7228             Example of usage:
7229                 # create vertices
7230                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
7231                 p2 = geompy.MakeVertex(150.,  30.,   0.)
7232                 p3 = geompy.MakeVertex(  0., 120.,  50.)
7233                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
7234                 # create edges
7235                 edge1 = geompy.MakeEdge(p1, p2)
7236                 edge2 = geompy.MakeEdge(p3, p4)
7237                 # create a quadrangle face from two edges
7238                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
7239             """
7240             # Example: see GEOM_Spanner.py
7241             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
7242             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
7243             return anObj
7244
7245         ## Create a quadrangle face with specified corners.
7246         #  The missing edges will be built by creating the shortest ones.
7247         #  @param V1,V2,V3,V4 Corner vertices for the face.
7248         #  @return New GEOM.GEOM_Object, containing the created face.
7249         #
7250         #  @ref tui_building_by_blocks_page "Example 1"
7251         #  \n @ref swig_MakeQuad4Vertices "Example 2"
7252         def MakeQuad4Vertices(self,V1, V2, V3, V4):
7253             """
7254             Create a quadrangle face with specified corners.
7255             The missing edges will be built by creating the shortest ones.
7256
7257             Parameters: 
7258                 V1,V2,V3,V4 Corner vertices for the face.
7259
7260             Returns: 
7261                 New GEOM.GEOM_Object, containing the created face.
7262
7263             Example of usage:
7264                 # create vertices
7265                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
7266                 p2 = geompy.MakeVertex(150.,  30.,   0.)
7267                 p3 = geompy.MakeVertex(  0., 120.,  50.)
7268                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
7269                 # create a quadrangle from four points in its corners
7270                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
7271             """
7272             # Example: see GEOM_Spanner.py
7273             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
7274             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
7275             return anObj
7276
7277         ## Create a hexahedral solid, bounded by the six given faces. Order of
7278         #  faces is not important. It is  not necessary that Faces share the same edge.
7279         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7280         #  @return New GEOM.GEOM_Object, containing the created solid.
7281         #
7282         #  @ref tui_building_by_blocks_page "Example 1"
7283         #  \n @ref swig_MakeHexa "Example 2"
7284         def MakeHexa(self,F1, F2, F3, F4, F5, F6):
7285             """
7286             Create a hexahedral solid, bounded by the six given faces. Order of
7287             faces is not important. It is  not necessary that Faces share the same edge.
7288
7289             Parameters: 
7290                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7291
7292             Returns:    
7293                 New GEOM.GEOM_Object, containing the created solid.
7294
7295             Example of usage:
7296                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
7297             """
7298             # Example: see GEOM_Spanner.py
7299             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
7300             RaiseIfFailed("MakeHexa", self.BlocksOp)
7301             return anObj
7302
7303         ## Create a hexahedral solid between two given faces.
7304         #  The missing faces will be built by creating the smallest ones.
7305         #  @param F1,F2 Two opposite faces for the hexahedral solid.
7306         #  @return New GEOM.GEOM_Object, containing the created solid.
7307         #
7308         #  @ref tui_building_by_blocks_page "Example 1"
7309         #  \n @ref swig_MakeHexa2Faces "Example 2"
7310         def MakeHexa2Faces(self,F1, F2):
7311             """
7312             Create a hexahedral solid between two given faces.
7313             The missing faces will be built by creating the smallest ones.
7314
7315             Parameters: 
7316                 F1,F2 Two opposite faces for the hexahedral solid.
7317
7318             Returns:
7319                 New GEOM.GEOM_Object, containing the created solid.
7320
7321             Example of usage:
7322                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
7323             """
7324             # Example: see GEOM_Spanner.py
7325             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
7326             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
7327             return anObj
7328
7329         # end of l3_blocks
7330         ## @}
7331
7332         ## @addtogroup l3_blocks_op
7333         ## @{
7334
7335         ## Get a vertex, found in the given shape by its coordinates.
7336         #  @param theShape Block or a compound of blocks.
7337         #  @param theX,theY,theZ Coordinates of the sought vertex.
7338         #  @param theEpsilon Maximum allowed distance between the resulting
7339         #                    vertex and point with the given coordinates.
7340         #  @return New GEOM.GEOM_Object, containing the found vertex.
7341         #
7342         #  @ref swig_GetPoint "Example"
7343         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon):
7344             """
7345             Get a vertex, found in the given shape by its coordinates.
7346
7347             Parameters: 
7348                 theShape Block or a compound of blocks.
7349                 theX,theY,theZ Coordinates of the sought vertex.
7350                 theEpsilon Maximum allowed distance between the resulting
7351                            vertex and point with the given coordinates.
7352
7353             Returns:                  
7354                 New GEOM.GEOM_Object, containing the found vertex.
7355
7356             Example of usage:
7357                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
7358             """
7359             # Example: see GEOM_TestOthers.py
7360             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
7361             RaiseIfFailed("GetPoint", self.BlocksOp)
7362             return anObj
7363
7364         ## Find a vertex of the given shape, which has minimal distance to the given point.
7365         #  @param theShape Any shape.
7366         #  @param thePoint Point, close to the desired vertex.
7367         #  @return New GEOM.GEOM_Object, containing the found vertex.
7368         #
7369         #  @ref swig_GetVertexNearPoint "Example"
7370         def GetVertexNearPoint(self, theShape, thePoint):
7371             """
7372             Find a vertex of the given shape, which has minimal distance to the given point.
7373
7374             Parameters: 
7375                 theShape Any shape.
7376                 thePoint Point, close to the desired vertex.
7377
7378             Returns:
7379                 New GEOM.GEOM_Object, containing the found vertex.
7380
7381             Example of usage:
7382                 pmidle = geompy.MakeVertex(50, 0, 50)
7383                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
7384             """
7385             # Example: see GEOM_TestOthers.py
7386             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
7387             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
7388             return anObj
7389
7390         ## Get an edge, found in the given shape by two given vertices.
7391         #  @param theShape Block or a compound of blocks.
7392         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
7393         #  @return New GEOM.GEOM_Object, containing the found edge.
7394         #
7395         #  @ref swig_GetEdge "Example"
7396         def GetEdge(self, theShape, thePoint1, thePoint2):
7397             """
7398             Get an edge, found in the given shape by two given vertices.
7399
7400             Parameters: 
7401                 theShape Block or a compound of blocks.
7402                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
7403
7404             Returns:
7405                 New GEOM.GEOM_Object, containing the found edge.
7406             """
7407             # Example: see GEOM_Spanner.py
7408             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
7409             RaiseIfFailed("GetEdge", self.BlocksOp)
7410             return anObj
7411
7412         ## Find an edge of the given shape, which has minimal distance to the given point.
7413         #  @param theShape Block or a compound of blocks.
7414         #  @param thePoint Point, close to the desired edge.
7415         #  @return New GEOM.GEOM_Object, containing the found edge.
7416         #
7417         #  @ref swig_GetEdgeNearPoint "Example"
7418         def GetEdgeNearPoint(self, theShape, thePoint):
7419             """
7420             Find an edge of the given shape, which has minimal distance to the given point.
7421
7422             Parameters: 
7423                 theShape Block or a compound of blocks.
7424                 thePoint Point, close to the desired edge.
7425
7426             Returns:
7427                 New GEOM.GEOM_Object, containing the found edge.
7428             """
7429             # Example: see GEOM_TestOthers.py
7430             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
7431             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
7432             return anObj
7433
7434         ## Returns a face, found in the given shape by four given corner vertices.
7435         #  @param theShape Block or a compound of blocks.
7436         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7437         #  @return New GEOM.GEOM_Object, containing the found face.
7438         #
7439         #  @ref swig_todo "Example"
7440         def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
7441             """
7442             Returns a face, found in the given shape by four given corner vertices.
7443
7444             Parameters:
7445                 theShape Block or a compound of blocks.
7446                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7447
7448             Returns:
7449                 New GEOM.GEOM_Object, containing the found face.
7450             """
7451             # Example: see GEOM_Spanner.py
7452             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
7453             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
7454             return anObj
7455
7456         ## Get a face of block, found in the given shape by two given edges.
7457         #  @param theShape Block or a compound of blocks.
7458         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
7459         #  @return New GEOM.GEOM_Object, containing the found face.
7460         #
7461         #  @ref swig_todo "Example"
7462         def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
7463             """
7464             Get a face of block, found in the given shape by two given edges.
7465
7466             Parameters:
7467                 theShape Block or a compound of blocks.
7468                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
7469
7470             Returns:
7471                 New GEOM.GEOM_Object, containing the found face.
7472             """
7473             # Example: see GEOM_Spanner.py
7474             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
7475             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
7476             return anObj
7477
7478         ## Find a face, opposite to the given one in the given block.
7479         #  @param theBlock Must be a hexahedral solid.
7480         #  @param theFace Face of \a theBlock, opposite to the desired face.
7481         #  @return New GEOM.GEOM_Object, containing the found face.
7482         #
7483         #  @ref swig_GetOppositeFace "Example"
7484         def GetOppositeFace(self,theBlock, theFace):
7485             """
7486             Find a face, opposite to the given one in the given block.
7487
7488             Parameters:
7489                 theBlock Must be a hexahedral solid.
7490                 theFace Face of theBlock, opposite to the desired face.
7491
7492             Returns: 
7493                 New GEOM.GEOM_Object, containing the found face.
7494             """
7495             # Example: see GEOM_Spanner.py
7496             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
7497             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
7498             return anObj
7499
7500         ## Find a face of the given shape, which has minimal distance to the given point.
7501         #  @param theShape Block or a compound of blocks.
7502         #  @param thePoint Point, close to the desired face.
7503         #  @return New GEOM.GEOM_Object, containing the found face.
7504         #
7505         #  @ref swig_GetFaceNearPoint "Example"
7506         def GetFaceNearPoint(self, theShape, thePoint):
7507             """
7508             Find a face of the given shape, which has minimal distance to the given point.
7509
7510             Parameters:
7511                 theShape Block or a compound of blocks.
7512                 thePoint Point, close to the desired face.
7513
7514             Returns:
7515                 New GEOM.GEOM_Object, containing the found face.
7516             """
7517             # Example: see GEOM_Spanner.py
7518             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
7519             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
7520             return anObj
7521
7522         ## Find a face of block, whose outside normale has minimal angle with the given vector.
7523         #  @param theBlock Block or a compound of blocks.
7524         #  @param theVector Vector, close to the normale of the desired face.
7525         #  @return New GEOM.GEOM_Object, containing the found face.
7526         #
7527         #  @ref swig_todo "Example"
7528         def GetFaceByNormale(self, theBlock, theVector):
7529             """
7530             Find a face of block, whose outside normale has minimal angle with the given vector.
7531
7532             Parameters:
7533                 theBlock Block or a compound of blocks.
7534                 theVector Vector, close to the normale of the desired face.
7535
7536             Returns:
7537                 New GEOM.GEOM_Object, containing the found face.
7538             """
7539             # Example: see GEOM_Spanner.py
7540             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
7541             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
7542             return anObj
7543
7544         ## Find all sub-shapes of type \a theShapeType of the given shape,
7545         #  which have minimal distance to the given point.
7546         #  @param theShape Any shape.
7547         #  @param thePoint Point, close to the desired shape.
7548         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
7549         #  @param theTolerance The tolerance for distances comparison. All shapes
7550         #                      with distances to the given point in interval
7551         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
7552         #  @return New GEOM_Object, containing a group of all found shapes.
7553         #
7554         #  @ref swig_GetShapesNearPoint "Example"
7555         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07):
7556             """
7557             Find all sub-shapes of type theShapeType of the given shape,
7558             which have minimal distance to the given point.
7559
7560             Parameters:
7561                 theShape Any shape.
7562                 thePoint Point, close to the desired shape.
7563                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
7564                 theTolerance The tolerance for distances comparison. All shapes
7565                                 with distances to the given point in interval
7566                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
7567
7568             Returns:
7569                 New GEOM_Object, containing a group of all found shapes.
7570             """
7571             # Example: see GEOM_TestOthers.py
7572             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
7573             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
7574             return anObj
7575
7576         # end of l3_blocks_op
7577         ## @}
7578
7579         ## @addtogroup l4_blocks_measure
7580         ## @{
7581
7582         ## Check, if the compound of blocks is given.
7583         #  To be considered as a compound of blocks, the
7584         #  given shape must satisfy the following conditions:
7585         #  - Each element of the compound should be a Block (6 faces and 12 edges).
7586         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7587         #  - The compound should be connexe.
7588         #  - The glue between two quadrangle faces should be applied.
7589         #  @param theCompound The compound to check.
7590         #  @return TRUE, if the given shape is a compound of blocks.
7591         #  If theCompound is not valid, prints all discovered errors.
7592         #
7593         #  @ref tui_measurement_tools_page "Example 1"
7594         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
7595         def CheckCompoundOfBlocks(self,theCompound):
7596             """
7597             Check, if the compound of blocks is given.
7598             To be considered as a compound of blocks, the
7599             given shape must satisfy the following conditions:
7600             - Each element of the compound should be a Block (6 faces and 12 edges).
7601             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7602             - The compound should be connexe.
7603             - The glue between two quadrangle faces should be applied.
7604
7605             Parameters:
7606                 theCompound The compound to check.
7607
7608             Returns:
7609                 TRUE, if the given shape is a compound of blocks.
7610                 If theCompound is not valid, prints all discovered errors.            
7611             """
7612             # Example: see GEOM_Spanner.py
7613             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
7614             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
7615             if IsValid == 0:
7616                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
7617                 print Descr
7618             return IsValid
7619
7620         ## Remove all seam and degenerated edges from \a theShape.
7621         #  Unite faces and edges, sharing one surface. It means that
7622         #  this faces must have references to one C++ surface object (handle).
7623         #  @param theShape The compound or single solid to remove irregular edges from.
7624         #  @param doUnionFaces If True, then unite faces. If False (the default value),
7625         #         do not unite faces.
7626         #  @return Improved shape.
7627         #
7628         #  @ref swig_RemoveExtraEdges "Example"
7629         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
7630             """
7631             Remove all seam and degenerated edges from theShape.
7632             Unite faces and edges, sharing one surface. It means that
7633             this faces must have references to one C++ surface object (handle).
7634
7635             Parameters:
7636                 theShape The compound or single solid to remove irregular edges from.
7637                 doUnionFaces If True, then unite faces. If False (the default value),
7638                              do not unite faces.
7639
7640             Returns: 
7641                 Improved shape.
7642             """
7643             # Example: see GEOM_TestOthers.py
7644             nbFacesOptimum = -1 # -1 means do not unite faces
7645             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
7646             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
7647             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
7648             return anObj
7649
7650         ## Check, if the given shape is a blocks compound.
7651         #  Fix all detected errors.
7652         #    \note Single block can be also fixed by this method.
7653         #  @param theShape The compound to check and improve.
7654         #  @return Improved compound.
7655         #
7656         #  @ref swig_CheckAndImprove "Example"
7657         def CheckAndImprove(self,theShape):
7658             """
7659             Check, if the given shape is a blocks compound.
7660             Fix all detected errors.
7661
7662             Note:
7663                 Single block can be also fixed by this method.
7664
7665             Parameters:
7666                 theShape The compound to check and improve.
7667
7668             Returns: 
7669                 Improved compound.
7670             """
7671             # Example: see GEOM_TestOthers.py
7672             anObj = self.BlocksOp.CheckAndImprove(theShape)
7673             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
7674             return anObj
7675
7676         # end of l4_blocks_measure
7677         ## @}
7678
7679         ## @addtogroup l3_blocks_op
7680         ## @{
7681
7682         ## Get all the blocks, contained in the given compound.
7683         #  @param theCompound The compound to explode.
7684         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
7685         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
7686         #    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7687         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
7688         #
7689         #  @ref tui_explode_on_blocks "Example 1"
7690         #  \n @ref swig_MakeBlockExplode "Example 2"
7691         def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
7692             """
7693             Get all the blocks, contained in the given compound.
7694
7695             Parameters:
7696                 theCompound The compound to explode.
7697                 theMinNbFaces If solid has lower number of faces, it is not a block.
7698                 theMaxNbFaces If solid has higher number of faces, it is not a block.
7699
7700             Note:
7701                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7702
7703             Returns:  
7704                 List of GEOM.GEOM_Object, containing the retrieved blocks.
7705             """
7706             # Example: see GEOM_TestOthers.py
7707             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
7708             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
7709             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
7710             for anObj in aList:
7711                 anObj.SetParameters(Parameters)
7712                 pass
7713             return aList
7714
7715         ## Find block, containing the given point inside its volume or on boundary.
7716         #  @param theCompound Compound, to find block in.
7717         #  @param thePoint Point, close to the desired block. If the point lays on
7718         #         boundary between some blocks, we return block with nearest center.
7719         #  @return New GEOM.GEOM_Object, containing the found block.
7720         #
7721         #  @ref swig_todo "Example"
7722         def GetBlockNearPoint(self,theCompound, thePoint):
7723             """
7724             Find block, containing the given point inside its volume or on boundary.
7725
7726             Parameters:
7727                 theCompound Compound, to find block in.
7728                 thePoint Point, close to the desired block. If the point lays on
7729                          boundary between some blocks, we return block with nearest center.
7730
7731             Returns:
7732                 New GEOM.GEOM_Object, containing the found block.
7733             """
7734             # Example: see GEOM_Spanner.py
7735             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
7736             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
7737             return anObj
7738
7739         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7740         #  @param theCompound Compound, to find block in.
7741         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
7742         #  @return New GEOM.GEOM_Object, containing the found block.
7743         #
7744         #  @ref swig_GetBlockByParts "Example"
7745         def GetBlockByParts(self,theCompound, theParts):
7746             """
7747              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7748
7749              Parameters:
7750                 theCompound Compound, to find block in.
7751                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
7752
7753             Returns: 
7754                 New GEOM_Object, containing the found block.
7755             """
7756             # Example: see GEOM_TestOthers.py
7757             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
7758             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
7759             return anObj
7760
7761         ## Return all blocks, containing all the elements, passed as the parts.
7762         #  @param theCompound Compound, to find blocks in.
7763         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7764         #  @return List of GEOM.GEOM_Object, containing the found blocks.
7765         #
7766         #  @ref swig_todo "Example"
7767         def GetBlocksByParts(self,theCompound, theParts):
7768             """
7769             Return all blocks, containing all the elements, passed as the parts.
7770
7771             Parameters:
7772                 theCompound Compound, to find blocks in.
7773                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7774
7775             Returns:
7776                 List of GEOM.GEOM_Object, containing the found blocks.
7777             """
7778             # Example: see GEOM_Spanner.py
7779             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
7780             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
7781             return aList
7782
7783         ## Multi-transformate block and glue the result.
7784         #  Transformation is defined so, as to superpose direction faces.
7785         #  @param Block Hexahedral solid to be multi-transformed.
7786         #  @param DirFace1 ID of First direction face.
7787         #  @param DirFace2 ID of Second direction face.
7788         #  @param NbTimes Quantity of transformations to be done.
7789         #    \note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7790         #  @return New GEOM.GEOM_Object, containing the result shape.
7791         #
7792         #  @ref tui_multi_transformation "Example"
7793         def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes):
7794             """
7795             Multi-transformate block and glue the result.
7796             Transformation is defined so, as to superpose direction faces.
7797
7798             Parameters:
7799                 Block Hexahedral solid to be multi-transformed.
7800                 DirFace1 ID of First direction face.
7801                 DirFace2 ID of Second direction face.
7802                 NbTimes Quantity of transformations to be done.
7803
7804             Note:
7805                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7806
7807             Returns:
7808                 New GEOM.GEOM_Object, containing the result shape.
7809             """
7810             # Example: see GEOM_Spanner.py
7811             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
7812             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
7813             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
7814             anObj.SetParameters(Parameters)
7815             return anObj
7816
7817         ## Multi-transformate block and glue the result.
7818         #  @param Block Hexahedral solid to be multi-transformed.
7819         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7820         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7821         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
7822         #  @return New GEOM.GEOM_Object, containing the result shape.
7823         #
7824         #  @ref tui_multi_transformation "Example"
7825         def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU,
7826                                       DirFace1V, DirFace2V, NbTimesV):
7827             """
7828             Multi-transformate block and glue the result.
7829
7830             Parameters:
7831                 Block Hexahedral solid to be multi-transformed.
7832                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7833                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7834                 NbTimesU,NbTimesV Quantity of transformations to be done.
7835
7836             Returns:
7837                 New GEOM.GEOM_Object, containing the result shape.
7838             """
7839             # Example: see GEOM_Spanner.py
7840             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
7841               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
7842             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
7843                                                             DirFace1V, DirFace2V, NbTimesV)
7844             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
7845             anObj.SetParameters(Parameters)
7846             return anObj
7847
7848         ## Build all possible propagation groups.
7849         #  Propagation group is a set of all edges, opposite to one (main)
7850         #  edge of this group directly or through other opposite edges.
7851         #  Notion of Opposite Edge make sence only on quadrangle face.
7852         #  @param theShape Shape to build propagation groups on.
7853         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
7854         #
7855         #  @ref swig_Propagate "Example"
7856         def Propagate(self,theShape):
7857             """
7858             Build all possible propagation groups.
7859             Propagation group is a set of all edges, opposite to one (main)
7860             edge of this group directly or through other opposite edges.
7861             Notion of Opposite Edge make sence only on quadrangle face.
7862
7863             Parameters:
7864                 theShape Shape to build propagation groups on.
7865
7866             Returns:
7867                 List of GEOM.GEOM_Object, each of them is a propagation group.
7868             """
7869             # Example: see GEOM_TestOthers.py
7870             listChains = self.BlocksOp.Propagate(theShape)
7871             RaiseIfFailed("Propagate", self.BlocksOp)
7872             return listChains
7873
7874         # end of l3_blocks_op
7875         ## @}
7876
7877         ## @addtogroup l3_groups
7878         ## @{
7879
7880         ## Creates a new group which will store sub-shapes of theMainShape
7881         #  @param theMainShape is a GEOM object on which the group is selected
7882         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
7883         #  @return a newly created GEOM group
7884         #
7885         #  @ref tui_working_with_groups_page "Example 1"
7886         #  \n @ref swig_CreateGroup "Example 2"
7887         def CreateGroup(self,theMainShape, theShapeType):
7888             """
7889             Creates a new group which will store sub-shapes of theMainShape
7890
7891             Parameters:
7892                theMainShape is a GEOM object on which the group is selected
7893                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
7894                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
7895
7896             Returns:
7897                a newly created GEOM group
7898
7899             Example of usage:
7900                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
7901                 
7902             """
7903             # Example: see GEOM_TestOthers.py
7904             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
7905             RaiseIfFailed("CreateGroup", self.GroupOp)
7906             return anObj
7907
7908         ## Adds a sub-object with ID theSubShapeId to the group
7909         #  @param theGroup is a GEOM group to which the new sub-shape is added
7910         #  @param theSubShapeID is a sub-shape ID in the main object.
7911         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
7912         #
7913         #  @ref tui_working_with_groups_page "Example"
7914         def AddObject(self,theGroup, theSubShapeID):
7915             """
7916             Adds a sub-object with ID theSubShapeId to the group
7917
7918             Parameters:
7919                 theGroup       is a GEOM group to which the new sub-shape is added
7920                 theSubShapeID  is a sub-shape ID in the main object.
7921
7922             Note:
7923                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
7924             """
7925             # Example: see GEOM_TestOthers.py
7926             self.GroupOp.AddObject(theGroup, theSubShapeID)
7927             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
7928                 RaiseIfFailed("AddObject", self.GroupOp)
7929                 pass
7930             pass
7931
7932         ## Removes a sub-object with ID \a theSubShapeId from the group
7933         #  @param theGroup is a GEOM group from which the new sub-shape is removed
7934         #  @param theSubShapeID is a sub-shape ID in the main object.
7935         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
7936         #
7937         #  @ref tui_working_with_groups_page "Example"
7938         def RemoveObject(self,theGroup, theSubShapeID):
7939             """
7940             Removes a sub-object with ID theSubShapeId from the group
7941
7942             Parameters:
7943                 theGroup is a GEOM group from which the new sub-shape is removed
7944                 theSubShapeID is a sub-shape ID in the main object.
7945
7946             Note:
7947                 Use method GetSubShapeID() to get an unique ID of the sub-shape
7948             """
7949             # Example: see GEOM_TestOthers.py
7950             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
7951             RaiseIfFailed("RemoveObject", self.GroupOp)
7952             pass
7953
7954         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
7955         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
7956         #  @param theSubShapes is a list of sub-shapes to be added.
7957         #
7958         #  @ref tui_working_with_groups_page "Example"
7959         def UnionList (self,theGroup, theSubShapes):
7960             """
7961             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
7962
7963             Parameters:
7964                 theGroup is a GEOM group to which the new sub-shapes are added.
7965                 theSubShapes is a list of sub-shapes to be added.
7966             """
7967             # Example: see GEOM_TestOthers.py
7968             self.GroupOp.UnionList(theGroup, theSubShapes)
7969             RaiseIfFailed("UnionList", self.GroupOp)
7970             pass
7971
7972         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
7973         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
7974         #  @param theSubShapes is a list of indices of sub-shapes to be added.
7975         #
7976         #  @ref swig_UnionIDs "Example"
7977         def UnionIDs(self,theGroup, theSubShapes):
7978             """
7979             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
7980
7981             Parameters:
7982                 theGroup is a GEOM group to which the new sub-shapes are added.
7983                 theSubShapes is a list of indices of sub-shapes to be added.
7984             """
7985             # Example: see GEOM_TestOthers.py
7986             self.GroupOp.UnionIDs(theGroup, theSubShapes)
7987             RaiseIfFailed("UnionIDs", self.GroupOp)
7988             pass
7989
7990         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
7991         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
7992         #  @param theSubShapes is a list of sub-shapes to be removed.
7993         #
7994         #  @ref tui_working_with_groups_page "Example"
7995         def DifferenceList (self,theGroup, theSubShapes):
7996             """
7997             Removes from the group all the given shapes. No errors, if some shapes are not included.
7998
7999             Parameters:
8000                 theGroup is a GEOM group from which the sub-shapes are removed.
8001                 theSubShapes is a list of sub-shapes to be removed.
8002             """
8003             # Example: see GEOM_TestOthers.py
8004             self.GroupOp.DifferenceList(theGroup, theSubShapes)
8005             RaiseIfFailed("DifferenceList", self.GroupOp)
8006             pass
8007
8008         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
8009         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
8010         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
8011         #
8012         #  @ref swig_DifferenceIDs "Example"
8013         def DifferenceIDs(self,theGroup, theSubShapes):
8014             """
8015             Removes from the group all the given shapes. No errors, if some shapes are not included.
8016
8017             Parameters:
8018                 theGroup is a GEOM group from which the sub-shapes are removed.
8019                 theSubShapes is a list of indices of sub-shapes to be removed.
8020             """            
8021             # Example: see GEOM_TestOthers.py
8022             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
8023             RaiseIfFailed("DifferenceIDs", self.GroupOp)
8024             pass
8025
8026         ## Returns a list of sub-objects ID stored in the group
8027         #  @param theGroup is a GEOM group for which a list of IDs is requested
8028         #
8029         #  @ref swig_GetObjectIDs "Example"
8030         def GetObjectIDs(self,theGroup):
8031             """
8032             Returns a list of sub-objects ID stored in the group
8033
8034             Parameters:
8035                 theGroup is a GEOM group for which a list of IDs is requested
8036             """
8037             # Example: see GEOM_TestOthers.py
8038             ListIDs = self.GroupOp.GetObjects(theGroup)
8039             RaiseIfFailed("GetObjects", self.GroupOp)
8040             return ListIDs
8041
8042         ## Returns a type of sub-objects stored in the group
8043         #  @param theGroup is a GEOM group which type is returned.
8044         #
8045         #  @ref swig_GetType "Example"
8046         def GetType(self,theGroup):
8047             """
8048             Returns a type of sub-objects stored in the group
8049
8050             Parameters:
8051                 theGroup is a GEOM group which type is returned.
8052             """
8053             # Example: see GEOM_TestOthers.py
8054             aType = self.GroupOp.GetType(theGroup)
8055             RaiseIfFailed("GetType", self.GroupOp)
8056             return aType
8057
8058         ## Convert a type of geom object from id to string value
8059         #  @param theId is a GEOM obect type id.
8060         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8061         #  @ref swig_GetType "Example"
8062         def ShapeIdToType(self, theId):
8063             """
8064             Convert a type of geom object from id to string value
8065
8066             Parameters:
8067                 theId is a GEOM obect type id.
8068                 
8069             Returns:
8070                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8071             """
8072             if theId == 0:
8073                 return "COPY"
8074             if theId == 1:
8075                 return "IMPORT"
8076             if theId == 2:
8077                 return "POINT"
8078             if theId == 3:
8079                 return "VECTOR"
8080             if theId == 4:
8081                 return "PLANE"
8082             if theId == 5:
8083                 return "LINE"
8084             if theId == 6:
8085                 return "TORUS"
8086             if theId == 7:
8087                 return "BOX"
8088             if theId == 8:
8089                 return "CYLINDER"
8090             if theId == 9:
8091                 return "CONE"
8092             if theId == 10:
8093                 return "SPHERE"
8094             if theId == 11:
8095                 return "PRISM"
8096             if theId == 12:
8097                 return "REVOLUTION"
8098             if theId == 13:
8099                 return "BOOLEAN"
8100             if theId == 14:
8101                 return "PARTITION"
8102             if theId == 15:
8103                 return "POLYLINE"
8104             if theId == 16:
8105                 return "CIRCLE"
8106             if theId == 17:
8107                 return "SPLINE"
8108             if theId == 18:
8109                 return "ELLIPSE"
8110             if theId == 19:
8111                 return "CIRC_ARC"
8112             if theId == 20:
8113                 return "FILLET"
8114             if theId == 21:
8115                 return "CHAMFER"
8116             if theId == 22:
8117                 return "EDGE"
8118             if theId == 23:
8119                 return "WIRE"
8120             if theId == 24:
8121                 return "FACE"
8122             if theId == 25:
8123                 return "SHELL"
8124             if theId == 26:
8125                 return "SOLID"
8126             if theId == 27:
8127                 return "COMPOUND"
8128             if theId == 28:
8129                 return "SUBSHAPE"
8130             if theId == 29:
8131                 return "PIPE"
8132             if theId == 30:
8133                 return "ARCHIMEDE"
8134             if theId == 31:
8135                 return "FILLING"
8136             if theId == 32:
8137                 return "EXPLODE"
8138             if theId == 33:
8139                 return "GLUED"
8140             if theId == 34:
8141                 return "SKETCHER"
8142             if theId == 35:
8143                 return "CDG"
8144             if theId == 36:
8145                 return "FREE_BOUNDS"
8146             if theId == 37:
8147                 return "GROUP"
8148             if theId == 38:
8149                 return "BLOCK"
8150             if theId == 39:
8151                 return "MARKER"
8152             if theId == 40:
8153                 return "THRUSECTIONS"
8154             if theId == 41:
8155                 return "COMPOUNDFILTER"
8156             if theId == 42:
8157                 return "SHAPES_ON_SHAPE"
8158             if theId == 43:
8159                 return "ELLIPSE_ARC"
8160             if theId == 44:
8161                 return "3DSKETCHER"
8162             if theId == 45:
8163                 return "FILLET_2D"
8164             if theId == 46:
8165                 return "FILLET_1D"
8166             return "Shape Id not exist."
8167
8168         ## Returns a main shape associated with the group
8169         #  @param theGroup is a GEOM group for which a main shape object is requested
8170         #  @return a GEOM object which is a main shape for theGroup
8171         #
8172         #  @ref swig_GetMainShape "Example"
8173         def GetMainShape(self,theGroup):
8174             """
8175             Returns a main shape associated with the group
8176
8177             Parameters:
8178                 theGroup is a GEOM group for which a main shape object is requested
8179
8180             Returns:
8181                 a GEOM object which is a main shape for theGroup
8182
8183             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
8184             """
8185             # Example: see GEOM_TestOthers.py
8186             anObj = self.GroupOp.GetMainShape(theGroup)
8187             RaiseIfFailed("GetMainShape", self.GroupOp)
8188             return anObj
8189
8190         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
8191         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8192         #  @param theShape given shape (see GEOM.GEOM_Object)
8193         #  @param min_length minimum length of edges of theShape
8194         #  @param max_length maximum length of edges of theShape
8195         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8196         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8197         #  @return a newly created GEOM group of edges
8198         #  @@ref swig_todo "Example"
8199         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
8200             """
8201             Create group of edges of theShape, whose length is in range [min_length, max_length].
8202             If include_min/max == 0, edges with length == min/max_length will not be included in result.
8203
8204             Parameters:
8205                 theShape given shape
8206                 min_length minimum length of edges of theShape
8207                 max_length maximum length of edges of theShape
8208                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8209                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8210
8211              Returns:
8212                 a newly created GEOM group of edges.
8213             """
8214             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
8215             edges_in_range = []
8216             for edge in edges:
8217                 Props = self.BasicProperties(edge)
8218                 if min_length <= Props[0] and Props[0] <= max_length:
8219                     if (not include_min) and (min_length == Props[0]):
8220                         skip = 1
8221                     else:
8222                         if (not include_max) and (Props[0] == max_length):
8223                             skip = 1
8224                         else:
8225                             edges_in_range.append(edge)
8226
8227             if len(edges_in_range) <= 0:
8228                 print "No edges found by given criteria"
8229                 return 0
8230
8231             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"])
8232             self.UnionList(group_edges, edges_in_range)
8233
8234             return group_edges
8235
8236         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
8237         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8238         #  @param min_length minimum length of edges of selected shape
8239         #  @param max_length maximum length of edges of selected shape
8240         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8241         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8242         #  @return a newly created GEOM group of edges
8243         #  @ref swig_todo "Example"
8244         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
8245             """
8246             Create group of edges of selected shape, whose length is in range [min_length, max_length].
8247             If include_min/max == 0, edges with length == min/max_length will not be included in result.
8248
8249             Parameters:
8250                 min_length minimum length of edges of selected shape
8251                 max_length maximum length of edges of selected shape
8252                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8253                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8254
8255              Returns:
8256                 a newly created GEOM group of edges.
8257             """
8258             nb_selected = sg.SelectedCount()
8259             if nb_selected < 1:
8260                 print "Select a shape before calling this function, please."
8261                 return 0
8262             if nb_selected > 1:
8263                 print "Only one shape must be selected"
8264                 return 0
8265
8266             id_shape = sg.getSelected(0)
8267             shape = IDToObject( id_shape )
8268
8269             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
8270
8271             left_str  = " < "
8272             right_str = " < "
8273             if include_min: left_str  = " <= "
8274             if include_max: right_str  = " <= "
8275
8276             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
8277                                     + left_str + "length" + right_str + `max_length`)
8278
8279             sg.updateObjBrowser(1)
8280
8281             return group_edges
8282
8283         # end of l3_groups
8284         ## @}
8285
8286         ## @addtogroup l4_advanced
8287         ## @{
8288
8289         ## Create a T-shape object with specified caracteristics for the main
8290         #  and the incident pipes (radius, width, half-length).
8291         #  The extremities of the main pipe are located on junctions points P1 and P2.
8292         #  The extremity of the incident pipe is located on junction point P3.
8293         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8294         #  the main plane of the T-shape is XOY.
8295         #  @param theR1 Internal radius of main pipe
8296         #  @param theW1 Width of main pipe
8297         #  @param theL1 Half-length of main pipe
8298         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8299         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8300         #  @param theL2 Half-length of incident pipe
8301         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8302         #  @param theP1 1st junction point of main pipe
8303         #  @param theP2 2nd junction point of main pipe
8304         #  @param theP3 Junction point of incident pipe
8305         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8306         #
8307         #  @ref tui_creation_pipetshape "Example"
8308         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8309             """
8310             Create a T-shape object with specified caracteristics for the main
8311             and the incident pipes (radius, width, half-length).
8312             The extremities of the main pipe are located on junctions points P1 and P2.
8313             The extremity of the incident pipe is located on junction point P3.
8314             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8315             the main plane of the T-shape is XOY.
8316
8317             Paremeters:
8318                 theR1 Internal radius of main pipe
8319                 theW1 Width of main pipe
8320                 theL1 Half-length of main pipe
8321                 theR2 Internal radius of incident pipe (R2 < R1)
8322                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8323                 theL2 Half-length of incident pipe
8324                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8325                 theP1 1st junction point of main pipe
8326                 theP2 2nd junction point of main pipe
8327                 theP3 Junction point of incident pipe
8328
8329             Returns:
8330                 List of GEOM_Object, containing the created shape and propagation groups.
8331
8332             Example of usage:
8333                 # create PipeTShape object
8334                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
8335                 # create PipeTShape object with position
8336                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
8337             """
8338             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)        
8339             if (theP1 and theP2 and theP3):
8340                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
8341             else:
8342                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
8343             RaiseIfFailed("MakePipeTShape", self.AdvOp)
8344             if Parameters: anObj[0].SetParameters(Parameters)
8345             return anObj
8346
8347         ## Create a T-shape object with chamfer and with specified caracteristics for the main
8348         #  and the incident pipes (radius, width, half-length). The chamfer is
8349         #  created on the junction of the pipes.
8350         #  The extremities of the main pipe are located on junctions points P1 and P2.
8351         #  The extremity of the incident pipe is located on junction point P3.
8352         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8353         #  the main plane of the T-shape is XOY.
8354         #  @param theR1 Internal radius of main pipe
8355         #  @param theW1 Width of main pipe
8356         #  @param theL1 Half-length of main pipe
8357         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8358         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8359         #  @param theL2 Half-length of incident pipe
8360         #  @param theH Height of the chamfer.
8361         #  @param theW Width of the chamfer.
8362         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8363         #  @param theP1 1st junction point of main pipe
8364         #  @param theP2 2nd junction point of main pipe
8365         #  @param theP3 Junction point of incident pipe
8366         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8367         #
8368         #  @ref tui_creation_pipetshape "Example"
8369         def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8370             """
8371             Create a T-shape object with chamfer and with specified caracteristics for the main
8372             and the incident pipes (radius, width, half-length). The chamfer is
8373             created on the junction of the pipes.
8374             The extremities of the main pipe are located on junctions points P1 and P2.
8375             The extremity of the incident pipe is located on junction point P3.
8376             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8377             the main plane of the T-shape is XOY.
8378
8379             Paremeters:
8380                 theR1 Internal radius of main pipe
8381                 theW1 Width of main pipe
8382                 theL1 Half-length of main pipe
8383                 theR2 Internal radius of incident pipe (R2 < R1)
8384                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8385                 theL2 Half-length of incident pipe
8386                 theH Height of the chamfer.
8387                 theW Width of the chamfer.
8388                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8389                 theP1 1st junction point of main pipe
8390                 theP2 2nd junction point of main pipe
8391                 theP3 Junction point of incident pipe
8392
8393             Returns:
8394                 List of GEOM_Object, containing the created shape and propagation groups.
8395
8396             Example of usage:
8397                 # create PipeTShape with chamfer object
8398                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
8399                 # create PipeTShape with chamfer object with position
8400                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
8401             """
8402             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
8403             if (theP1 and theP2 and theP3):
8404               anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
8405             else:
8406               anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
8407             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
8408             if Parameters: anObj[0].SetParameters(Parameters)
8409             return anObj
8410
8411         ## Create a T-shape object with fillet and with specified caracteristics for the main
8412         #  and the incident pipes (radius, width, half-length). The fillet is
8413         #  created on the junction of the pipes.
8414         #  The extremities of the main pipe are located on junctions points P1 and P2.
8415         #  The extremity of the incident pipe is located on junction point P3.
8416         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8417         #  the main plane of the T-shape is XOY.
8418         #  @param theR1 Internal radius of main pipe
8419         #  @param theW1 Width of main pipe
8420         #  @param theL1 Half-length of main pipe
8421         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8422         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8423         #  @param theL2 Half-length of incident pipe
8424         #  @param theRF Radius of curvature of fillet.
8425         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8426         #  @param theP1 1st junction point of main pipe
8427         #  @param theP2 2nd junction point of main pipe
8428         #  @param theP3 Junction point of incident pipe
8429         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8430         #
8431         #  @ref tui_creation_pipetshape "Example"
8432         def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8433             """
8434             Create a T-shape object with fillet and with specified caracteristics for the main
8435             and the incident pipes (radius, width, half-length). The fillet is
8436             created on the junction of the pipes.
8437             The extremities of the main pipe are located on junctions points P1 and P2.
8438             The extremity of the incident pipe is located on junction point P3.
8439
8440             Paremeters:
8441                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8442                 the main plane of the T-shape is XOY.
8443                 theR1 Internal radius of main pipe
8444                 theW1 Width of main pipe
8445                 heL1 Half-length of main pipe
8446                 theR2 Internal radius of incident pipe (R2 < R1)
8447                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8448                 theL2 Half-length of incident pipe
8449                 theRF Radius of curvature of fillet.
8450                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8451                 theP1 1st junction point of main pipe
8452                 theP2 2nd junction point of main pipe
8453                 theP3 Junction point of incident pipe
8454                 
8455             Returns:
8456                 List of GEOM_Object, containing the created shape and propagation groups.
8457                 
8458             Example of usage:
8459                 # create PipeTShape with fillet object
8460                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
8461                 # create PipeTShape with fillet object with position
8462                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
8463         
8464             """
8465             theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
8466             if (theP1 and theP2 and theP3):
8467               anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
8468             else:
8469               anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
8470             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
8471             if Parameters: anObj[0].SetParameters(Parameters)
8472             return anObj
8473
8474         #@@ insert new functions before this line @@ do not remove this line @@#
8475
8476         # end of l4_advanced
8477         ## @}
8478
8479         ## Create a copy of the given object
8480         #
8481         #  @param theOriginal geometry object for copy
8482         #  @return unique object identifier
8483         #  @ingroup l1_geompy_auxiliary
8484         #  @ref swig_MakeCopy "Example"
8485         def MakeCopy(self,theOriginal):
8486             """
8487             Create a copy of the given object
8488
8489             Paremeters:
8490                 theOriginal geometry object for copy
8491
8492             Returns:
8493                 unique object identifier
8494
8495             Example of usage: Copy = geompy.MakeCopy(Box)
8496             """
8497             # Example: see GEOM_TestAll.py
8498             anObj = self.InsertOp.MakeCopy(theOriginal)
8499             RaiseIfFailed("MakeCopy", self.InsertOp)
8500             return anObj
8501
8502         ## Add Path to load python scripts from
8503         #  @param Path a path to load python scripts from
8504         #  @ingroup l1_geompy_auxiliary
8505         def addPath(self,Path):
8506             """
8507             Add Path to load python scripts from
8508
8509             Parameters:
8510                 Path a path to load python scripts from
8511             """
8512             if (sys.path.count(Path) < 1):
8513                 sys.path.append(Path)
8514                 pass
8515             pass
8516
8517         ## Load marker texture from the file
8518         #  @param Path a path to the texture file
8519         #  @return unique texture identifier
8520         #  @ingroup l1_geompy_auxiliary
8521         def LoadTexture(self, Path):
8522             """
8523             Load marker texture from the file
8524             
8525             Parameters:
8526                 Path a path to the texture file
8527                 
8528             Returns:
8529                 unique texture identifier
8530             """
8531             # Example: see GEOM_TestAll.py
8532             ID = self.InsertOp.LoadTexture(Path)
8533             RaiseIfFailed("LoadTexture", self.InsertOp)
8534             return ID
8535
8536         ## Get entry of the object
8537         #  @param obj geometry object
8538         #  @return unique object identifier
8539         #  @ingroup l1_geompy_auxiliary
8540         def getObjectID(self, obj):
8541             """
8542             Get entry of the object
8543
8544             Parameters:
8545                 obj geometry object
8546
8547             Returns:
8548                 unique object identifier
8549             """
8550             ID = ""
8551             entry = salome.ObjectToID(obj)
8552             if entry is not None:
8553                 lst = entry.split(":")
8554                 if len(lst) > 0:
8555                     ID = lst[-1] # -1 means last item in the list            
8556                     return "GEOM_" + ID
8557             return ID
8558                 
8559             
8560
8561         ## Add marker texture. @a Width and @a Height parameters
8562         #  specify width and height of the texture in pixels.
8563         #  If @a RowData is @c True, @a Texture parameter should represent texture data
8564         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
8565         #  parameter should be unpacked string, in which '1' symbols represent opaque
8566         #  pixels and '0' represent transparent pixels of the texture bitmap.
8567         #
8568         #  @param Width texture width in pixels
8569         #  @param Height texture height in pixels
8570         #  @param Texture texture data
8571         #  @param RowData if @c True, @a Texture data are packed in the byte stream
8572         #  @return unique texture identifier
8573         #  @ingroup l1_geompy_auxiliary
8574         def AddTexture(self, Width, Height, Texture, RowData=False):
8575             """
8576             Add marker texture. Width and Height parameters
8577             specify width and height of the texture in pixels.
8578             If RowData is True, Texture parameter should represent texture data
8579             packed into the byte array. If RowData is False (default), Texture
8580             parameter should be unpacked string, in which '1' symbols represent opaque
8581             pixels and '0' represent transparent pixels of the texture bitmap.
8582
8583             Parameters:
8584                 Width texture width in pixels
8585                 Height texture height in pixels
8586                 Texture texture data
8587                 RowData if True, Texture data are packed in the byte stream
8588
8589             Returns:
8590                 return unique texture identifier
8591             """
8592             if not RowData: Texture = PackData(Texture)
8593             ID = self.InsertOp.AddTexture(Width, Height, Texture)
8594             RaiseIfFailed("AddTexture", self.InsertOp)
8595             return ID
8596
8597 import omniORB
8598 #Register the new proxy for GEOM_Gen
8599 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)