]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
013c70a6af3c5b8998fda05a6f418eebfb2174e5
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  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
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 # Warning: geom is a singleton
463 geom = None
464 engine = None
465 doLcc = False
466 created = False
467
468 class geomBuilder(object, GEOM._objref_GEOM_Gen):
469
470         ## Enumeration ShapeType as a dictionary. \n
471         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
472         #  @ingroup l1_geomBuilder_auxiliary
473         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
474
475         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
476         #  and a list of parameters, describing the shape.
477         #  List of parameters, describing the shape:
478         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
479         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
480         #
481         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
482         #
483         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
484         #
485         #  - SPHERE:       [xc yc zc            R]
486         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
487         #  - BOX:          [xc yc zc                      ax ay az]
488         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
489         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
490         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
491         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
492         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
493         #
494         #  - SPHERE2D:     [xc yc zc            R]
495         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
496         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
497         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
498         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
499         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
500         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
501         #  - PLANE:        [xo yo zo  dx dy dz]
502         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
503         #  - FACE:                                       [nb_edges  nb_vertices]
504         #
505         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
506         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
507         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
508         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
509         #  - LINE:         [xo yo zo  dx dy dz]
510         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
511         #  - EDGE:                                                 [nb_vertices]
512         #
513         #  - VERTEX:       [x  y  z]
514         #  @ingroup l1_geomBuilder_auxiliary
515         kind = GEOM.GEOM_IKindOfShape
516
517         def __new__(cls):
518             global engine
519             global geom
520             global doLcc
521             global created
522             #print "==== __new__ ", engine, geom, doLcc, created
523             if geom is None:
524                 # geom engine is either retrieved from engine, or created
525                 geom = engine
526                 # Following test avoids a recursive loop
527                 if doLcc:
528                     if geom is not None:
529                         # geom engine not created: existing engine found
530                         doLcc = False
531                     if doLcc and not created:
532                         doLcc = False
533                         # FindOrLoadComponent called:
534                         # 1. CORBA resolution of server
535                         # 2. the __new__ method is called again
536                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
537                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
538                         #print "====1 ",geom
539                 else:
540                     # FindOrLoadComponent not called
541                     if geom is None:
542                         # geomBuilder instance is created from lcc.FindOrLoadComponent
543                         #print "==== super ", engine, geom, doLcc, created
544                         geom = super(geomBuilder,cls).__new__(cls)
545                         #print "====2 ",geom
546                     else:
547                         # geom engine not created: existing engine found
548                         #print "==== existing ", engine, geom, doLcc, created
549                         pass
550                 #print "return geom 1 ", geom
551                 return geom
552
553             #print "return geom 2 ", geom
554             return geom
555
556         def __init__(self):
557             global created
558             #print "-------- geomBuilder __init__ --- ", created, self
559             if not created:
560               created = True
561               GEOM._objref_GEOM_Gen.__init__(self)
562               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
563               self.myBuilder = None
564               self.myStudyId = 0
565               self.father    = None
566
567               self.BasicOp  = None
568               self.CurvesOp = None
569               self.PrimOp   = None
570               self.ShapesOp = None
571               self.HealOp   = None
572               self.InsertOp = None
573               self.BoolOp   = None
574               self.TrsfOp   = None
575               self.LocalOp  = None
576               self.MeasuOp  = None
577               self.BlocksOp = None
578               self.GroupOp  = None
579               self.AdvOp    = None
580             pass
581
582         ## Process object publication in the study, as follows:
583         #  - if @a theName is specified (not None), the object is published in the study
584         #    with this name, not taking into account "auto-publishing" option;
585         #  - if @a theName is NOT specified, the object is published in the study
586         #    (using default name, which can be customized using @a theDefaultName parameter)
587         #    only if auto-publishing is switched on.
588         #
589         #  @param theObj  object, a subject for publishing
590         #  @param theName object name for study
591         #  @param theDefaultName default name for the auto-publishing
592         #
593         #  @sa addToStudyAuto()
594         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
595             # ---
596             def _item_name(_names, _defname, _idx=-1):
597                 if not _names: _names = _defname
598                 if type(_names) in [types.ListType, types.TupleType]:
599                     if _idx >= 0:
600                         if _idx >= len(_names) or not _names[_idx]:
601                             if type(_defname) not in [types.ListType, types.TupleType]:
602                                 _name = "%s_%d"%(_defname, _idx+1)
603                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
604                                 _name = _defname[_idx]
605                             else:
606                                 _name = "%noname_%d"%(dn, _idx+1)
607                             pass
608                         else:
609                             _name = _names[_idx]
610                         pass
611                     else:
612                         # must be wrong  usage
613                         _name = _names[0]
614                     pass
615                 else:
616                     if _idx >= 0:
617                         _name = "%s_%d"%(_names, _idx+1)
618                     else:
619                         _name = _names
620                     pass
621                 return _name
622             # ---
623             if not theObj:
624                 return # null object
625             if not theName and not self.myMaxNbSubShapesAllowed:
626                 return # nothing to do: auto-publishing is disabled
627             if not theName and not theDefaultName:
628                 return # neither theName nor theDefaultName is given
629             import types
630             if type(theObj) in [types.ListType, types.TupleType]:
631                 # list of objects is being published
632                 idx = 0
633                 for obj in theObj:
634                     if not obj: continue # bad object
635                     ###if obj.GetStudyEntry(): continue # already published
636                     name = _item_name(theName, theDefaultName, idx)
637                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
638                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
639                     else:
640                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
641                         pass
642                     idx = idx+1
643                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
644                     pass
645                 pass
646             else:
647                 # single object is published
648                 ###if theObj.GetStudyEntry(): return # already published
649                 name = _item_name(theName, theDefaultName)
650                 if theObj.IsMainShape():
651                     self.addToStudy(theObj, name)
652                 else:
653                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
654                     pass
655                 pass
656             pass
657
658         ## @addtogroup l1_geomBuilder_auxiliary
659         ## @{
660         def init_geom(self,theStudy):
661             self.myStudy = theStudy
662             self.myStudyId = self.myStudy._get_StudyId()
663             self.myBuilder = self.myStudy.NewBuilder()
664             self.father = self.myStudy.FindComponent("GEOM")
665             if self.father is None:
666                 self.father = self.myBuilder.NewComponent("GEOM")
667                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
668                 FName = A1._narrow(SALOMEDS.AttributeName)
669                 FName.SetValue("Geometry")
670                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
671                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
672                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
673                 self.myBuilder.DefineComponentInstance(self.father,self)
674                 pass
675             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
676             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
677             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
678             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
679             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
680             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
681             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
682             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
683             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
684             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
685             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
686             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
687             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
688             pass
689
690         ## Enable / disable results auto-publishing
691         # 
692         #  The automatic publishing is managed in the following way:
693         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
694         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
695         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
696         #  value passed as parameter has the same effect.
697         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
698         #  maximum number of sub-shapes allowed for publishing is set to specified value.
699         #
700         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
701         #  @ingroup l1_publish_data
702         def addToStudyAuto(self, maxNbSubShapes=-1):
703             """
704             Enable / disable results auto-publishing
705
706             The automatic publishing is managed in the following way:
707             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
708             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
709             maximum number of sub-shapes allowed for publishing is unlimited; any negative
710             value passed as parameter has the same effect.
711             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
712             maximum number of sub-shapes allowed for publishing is set to this value.
713
714             Parameters:
715                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
716
717             Example of usage:
718                 geompy.addToStudyAuto()   # enable auto-publishing
719                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
720                 geompy.addToStudyAuto(0)  # disable auto-publishing
721             """
722             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
723             pass
724
725         ## Dump component to the Python script
726         #  This method overrides IDL function to allow default values for the parameters.
727         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
728             """
729             Dump component to the Python script
730             This method overrides IDL function to allow default values for the parameters.
731             """
732             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
733
734         ## Get name for sub-shape aSubObj of shape aMainObj
735         #
736         # @ref swig_SubShapeName "Example"
737         def SubShapeName(self,aSubObj, aMainObj):
738             """
739             Get name for sub-shape aSubObj of shape aMainObj
740             """
741             # Example: see GEOM_TestAll.py
742
743             #aSubId  = orb.object_to_string(aSubObj)
744             #aMainId = orb.object_to_string(aMainObj)
745             #index = gg.getIndexTopology(aSubId, aMainId)
746             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
747             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
748             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
749             return name
750
751         ## Publish in study aShape with name aName
752         #
753         #  \param aShape the shape to be published
754         #  \param aName  the name for the shape
755         #  \param doRestoreSubShapes if True, finds and publishes also
756         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
757         #         and published sub-shapes of arguments
758         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
759         #                                                  these arguments description
760         #  \return study entry of the published shape in form of string
761         #
762         #  @ingroup l1_publish_data
763         #  @ref swig_all_addtostudy "Example"
764         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
765                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
766             """
767             Publish in study aShape with name aName
768
769             Parameters:
770                 aShape the shape to be published
771                 aName  the name for the shape
772                 doRestoreSubShapes if True, finds and publishes also
773                                    sub-shapes of aShape, corresponding to its arguments
774                                    and published sub-shapes of arguments
775                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
776                                                          these arguments description
777
778             Returns:
779                 study entry of the published shape in form of string
780
781             Example of usage:
782                 id_block1 = geompy.addToStudy(Block1, "Block 1")
783             """
784             # Example: see GEOM_TestAll.py
785             try:
786                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
787                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
788                 if doRestoreSubShapes:
789                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
790                                             theFindMethod, theInheritFirstArg, True )
791             except:
792                 print "addToStudy() failed"
793                 return ""
794             return aShape.GetStudyEntry()
795
796         ## Publish in study aShape with name aName as sub-object of previously published aFather
797         #  \param aFather previously published object
798         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
799         #  \param aName  the name for the shape
800         #
801         #  \return study entry of the published shape in form of string
802         #
803         #  @ingroup l1_publish_data
804         #  @ref swig_all_addtostudyInFather "Example"
805         def addToStudyInFather(self, aFather, aShape, aName):
806             """
807             Publish in study aShape with name aName as sub-object of previously published aFather
808
809             Parameters:
810                 aFather previously published object
811                 aShape the shape to be published as sub-object of aFather
812                 aName  the name for the shape
813
814             Returns:
815                 study entry of the published shape in form of string
816             """
817             # Example: see GEOM_TestAll.py
818             try:
819                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
820                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
821             except:
822                 print "addToStudyInFather() failed"
823                 return ""
824             return aShape.GetStudyEntry()
825
826         ## Unpublish object in study
827         #
828         #  \param obj the object to be unpublished
829         def hideInStudy(self, obj):
830             """
831             Unpublish object in study
832
833             Parameters:
834                 obj the object to be unpublished
835             """
836             ior = salome.orb.object_to_string(obj)
837             aSObject = self.myStudy.FindObjectIOR(ior)
838             if aSObject is not None:
839                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
840                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
841                 drwAttribute.SetDrawable(False)
842                 pass
843
844         # end of l1_geomBuilder_auxiliary
845         ## @}
846
847         ## @addtogroup l3_restore_ss
848         ## @{
849
850         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
851         #  To be used from python scripts out of addToStudy() (non-default usage)
852         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
853         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
854         #                   If this list is empty, all operation arguments will be published
855         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
856         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
857         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
858         #                            Do not publish sub-shapes in place of arguments, but only
859         #                            in place of sub-shapes of the first argument,
860         #                            because the whole shape corresponds to the first argument.
861         #                            Mainly to be used after transformations, but it also can be
862         #                            usefull after partition with one object shape, and some other
863         #                            operations, where only the first argument has to be considered.
864         #                            If theObject has only one argument shape, this flag is automatically
865         #                            considered as True, not regarding really passed value.
866         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
867         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
868         #  \return list of published sub-shapes
869         #
870         #  @ref tui_restore_prs_params "Example"
871         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
872                               theInheritFirstArg=False, theAddPrefix=True):
873             """
874             Publish sub-shapes, standing for arguments and sub-shapes of arguments
875             To be used from python scripts out of geompy.addToStudy (non-default usage)
876
877             Parameters:
878                 theObject published GEOM.GEOM_Object, arguments of which will be published
879                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
880                           If this list is empty, all operation arguments will be published
881                 theFindMethod method to search sub-shapes, corresponding to arguments and
882                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
883                 theInheritFirstArg set properties of the first argument for theObject.
884                                    Do not publish sub-shapes in place of arguments, but only
885                                    in place of sub-shapes of the first argument,
886                                    because the whole shape corresponds to the first argument.
887                                    Mainly to be used after transformations, but it also can be
888                                    usefull after partition with one object shape, and some other
889                                    operations, where only the first argument has to be considered.
890                                    If theObject has only one argument shape, this flag is automatically
891                                    considered as True, not regarding really passed value.
892                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
893                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
894             Returns:
895                 list of published sub-shapes
896             """
897             # Example: see GEOM_TestAll.py
898             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
899                                           theFindMethod, theInheritFirstArg, theAddPrefix)
900
901         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
902         #  To be used from python scripts out of addToStudy() (non-default usage)
903         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
904         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
905         #                   If this list is empty, all operation arguments will be published
906         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
907         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
908         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
909         #                            Do not publish sub-shapes in place of arguments, but only
910         #                            in place of sub-shapes of the first argument,
911         #                            because the whole shape corresponds to the first argument.
912         #                            Mainly to be used after transformations, but it also can be
913         #                            usefull after partition with one object shape, and some other
914         #                            operations, where only the first argument has to be considered.
915         #                            If theObject has only one argument shape, this flag is automatically
916         #                            considered as True, not regarding really passed value.
917         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
918         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
919         #  \return list of published sub-shapes
920         #
921         #  @ref tui_restore_prs_params "Example"
922         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
923                                    theInheritFirstArg=False, theAddPrefix=True):
924             """
925             Publish sub-shapes, standing for arguments and sub-shapes of arguments
926             To be used from python scripts out of geompy.addToStudy() (non-default usage)
927
928             Parameters:
929                 theObject published GEOM.GEOM_Object, arguments of which will be published
930                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
931                           If this list is empty, all operation arguments will be published
932                 theFindMethod method to search sub-shapes, corresponding to arguments and
933                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
934                 theInheritFirstArg set properties of the first argument for theObject.
935                                    Do not publish sub-shapes in place of arguments, but only
936                                    in place of sub-shapes of the first argument,
937                                    because the whole shape corresponds to the first argument.
938                                    Mainly to be used after transformations, but it also can be
939                                    usefull after partition with one object shape, and some other
940                                    operations, where only the first argument has to be considered.
941                                    If theObject has only one argument shape, this flag is automatically
942                                    considered as True, not regarding really passed value.
943                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
944                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
945
946             Returns: 
947                 list of published sub-shapes
948             """
949             # Example: see GEOM_TestAll.py
950             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
951                                                theFindMethod, theInheritFirstArg, theAddPrefix)
952
953         # end of l3_restore_ss
954         ## @}
955
956         ## @addtogroup l3_basic_go
957         ## @{
958
959         ## Create point by three coordinates.
960         #  @param theX The X coordinate of the point.
961         #  @param theY The Y coordinate of the point.
962         #  @param theZ The Z coordinate of the point.
963         #  @param theName Object name; when specified, this parameter is used
964         #         for result publication in the study. Otherwise, if automatic
965         #         publication is switched on, default value is used for result name.
966         #
967         #  @return New GEOM.GEOM_Object, containing the created point.
968         #
969         #  @ref tui_creation_point "Example"
970         def MakeVertex(self, theX, theY, theZ, theName=None):
971             """
972             Create point by three coordinates.
973
974             Parameters:
975                 theX The X coordinate of the point.
976                 theY The Y coordinate of the point.
977                 theZ The Z coordinate of the point.
978                 theName Object name; when specified, this parameter is used
979                         for result publication in the study. Otherwise, if automatic
980                         publication is switched on, default value is used for result name.
981                 
982             Returns: 
983                 New GEOM.GEOM_Object, containing the created point.
984             """
985             # Example: see GEOM_TestAll.py
986             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
987             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
988             RaiseIfFailed("MakePointXYZ", self.BasicOp)
989             anObj.SetParameters(Parameters)
990             self._autoPublish(anObj, theName, "vertex")
991             return anObj
992
993         ## Create a point, distant from the referenced point
994         #  on the given distances along the coordinate axes.
995         #  @param theReference The referenced point.
996         #  @param theX Displacement from the referenced point along OX axis.
997         #  @param theY Displacement from the referenced point along OY axis.
998         #  @param theZ Displacement from the referenced point along OZ axis.
999         #  @param theName Object name; when specified, this parameter is used
1000         #         for result publication in the study. Otherwise, if automatic
1001         #         publication is switched on, default value is used for result name.
1002         #
1003         #  @return New GEOM.GEOM_Object, containing the created point.
1004         #
1005         #  @ref tui_creation_point "Example"
1006         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1007             """
1008             Create a point, distant from the referenced point
1009             on the given distances along the coordinate axes.
1010
1011             Parameters:
1012                 theReference The referenced point.
1013                 theX Displacement from the referenced point along OX axis.
1014                 theY Displacement from the referenced point along OY axis.
1015                 theZ Displacement from the referenced point along OZ axis.
1016                 theName Object name; when specified, this parameter is used
1017                         for result publication in the study. Otherwise, if automatic
1018                         publication is switched on, default value is used for result name.
1019
1020             Returns:
1021                 New GEOM.GEOM_Object, containing the created point.
1022             """
1023             # Example: see GEOM_TestAll.py
1024             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1025             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1026             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1027             anObj.SetParameters(Parameters)
1028             self._autoPublish(anObj, theName, "vertex")
1029             return anObj
1030
1031         ## Create a point, corresponding to the given parameter on the given curve.
1032         #  @param theRefCurve The referenced curve.
1033         #  @param theParameter Value of parameter on the referenced curve.
1034         #  @param theName Object name; when specified, this parameter is used
1035         #         for result publication in the study. Otherwise, if automatic
1036         #         publication is switched on, default value is used for result name.
1037         #
1038         #  @return New GEOM.GEOM_Object, containing the created point.
1039         #
1040         #  @ref tui_creation_point "Example"
1041         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1042             """
1043             Create a point, corresponding to the given parameter on the given curve.
1044
1045             Parameters:
1046                 theRefCurve The referenced curve.
1047                 theParameter Value of parameter on the referenced curve.
1048                 theName Object name; when specified, this parameter is used
1049                         for result publication in the study. Otherwise, if automatic
1050                         publication is switched on, default value is used for result name.
1051
1052             Returns:
1053                 New GEOM.GEOM_Object, containing the created point.
1054
1055             Example of usage:
1056                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1057             """
1058             # Example: see GEOM_TestAll.py
1059             theParameter, Parameters = ParseParameters(theParameter)
1060             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1061             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1062             anObj.SetParameters(Parameters)
1063             self._autoPublish(anObj, theName, "vertex")
1064             return anObj
1065
1066         ## Create a point by projection give coordinates on the given curve
1067         #  @param theRefCurve The referenced curve.
1068         #  @param theX X-coordinate in 3D space
1069         #  @param theY Y-coordinate in 3D space
1070         #  @param theZ Z-coordinate in 3D space
1071         #  @param theName Object name; when specified, this parameter is used
1072         #         for result publication in the study. Otherwise, if automatic
1073         #         publication is switched on, default value is used for result name.
1074         #
1075         #  @return New GEOM.GEOM_Object, containing the created point.
1076         #
1077         #  @ref tui_creation_point "Example"
1078         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1079             """
1080             Create a point by projection give coordinates on the given curve
1081             
1082             Parameters:
1083                 theRefCurve The referenced curve.
1084                 theX X-coordinate in 3D space
1085                 theY Y-coordinate in 3D space
1086                 theZ Z-coordinate in 3D space
1087                 theName Object name; when specified, this parameter is used
1088                         for result publication in the study. Otherwise, if automatic
1089                         publication is switched on, default value is used for result name.
1090
1091             Returns:
1092                 New GEOM.GEOM_Object, containing the created point.
1093
1094             Example of usage:
1095                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1096             """
1097             # Example: see GEOM_TestAll.py
1098             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1099             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1100             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1101             anObj.SetParameters(Parameters)
1102             self._autoPublish(anObj, theName, "vertex")
1103             return anObj
1104
1105         ## Create a point, corresponding to the given length on the given curve.
1106         #  @param theRefCurve The referenced curve.
1107         #  @param theLength Length on the referenced curve. It can be negative.
1108         #  @param theStartPoint Point allowing to choose the direction for the calculation
1109         #                       of the length. If None, start from the first point of theRefCurve.
1110         #  @param theName Object name; when specified, this parameter is used
1111         #         for result publication in the study. Otherwise, if automatic
1112         #         publication is switched on, default value is used for result name.
1113         #
1114         #  @return New GEOM.GEOM_Object, containing the created point.
1115         #
1116         #  @ref tui_creation_point "Example"
1117         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1118             """
1119             Create a point, corresponding to the given length on the given curve.
1120
1121             Parameters:
1122                 theRefCurve The referenced curve.
1123                 theLength Length on the referenced curve. It can be negative.
1124                 theStartPoint Point allowing to choose the direction for the calculation
1125                               of the length. If None, start from the first point of theRefCurve.
1126                 theName Object name; when specified, this parameter is used
1127                         for result publication in the study. Otherwise, if automatic
1128                         publication is switched on, default value is used for result name.
1129
1130             Returns:
1131                 New GEOM.GEOM_Object, containing the created point.
1132             """
1133             # Example: see GEOM_TestAll.py
1134             theLength, Parameters = ParseParameters(theLength)
1135             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1136             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1137             anObj.SetParameters(Parameters)
1138             self._autoPublish(anObj, theName, "vertex")
1139             return anObj
1140
1141         ## Create a point, corresponding to the given parameters on the
1142         #    given surface.
1143         #  @param theRefSurf The referenced surface.
1144         #  @param theUParameter Value of U-parameter on the referenced surface.
1145         #  @param theVParameter Value of V-parameter on the referenced surface.
1146         #  @param theName Object name; when specified, this parameter is used
1147         #         for result publication in the study. Otherwise, if automatic
1148         #         publication is switched on, default value is used for result name.
1149         #
1150         #  @return New GEOM.GEOM_Object, containing the created point.
1151         #
1152         #  @ref swig_MakeVertexOnSurface "Example"
1153         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1154             """
1155             Create a point, corresponding to the given parameters on the
1156             given surface.
1157
1158             Parameters:
1159                 theRefSurf The referenced surface.
1160                 theUParameter Value of U-parameter on the referenced surface.
1161                 theVParameter Value of V-parameter on the referenced surface.
1162                 theName Object name; when specified, this parameter is used
1163                         for result publication in the study. Otherwise, if automatic
1164                         publication is switched on, default value is used for result name.
1165
1166             Returns:
1167                 New GEOM.GEOM_Object, containing the created point.
1168
1169             Example of usage:
1170                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1171             """
1172             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1173             # Example: see GEOM_TestAll.py
1174             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1175             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1176             anObj.SetParameters(Parameters);
1177             self._autoPublish(anObj, theName, "vertex")
1178             return anObj
1179
1180         ## Create a point by projection give coordinates on the given surface
1181         #  @param theRefSurf The referenced surface.
1182         #  @param theX X-coordinate in 3D space
1183         #  @param theY Y-coordinate in 3D space
1184         #  @param theZ Z-coordinate in 3D space
1185         #  @param theName Object name; when specified, this parameter is used
1186         #         for result publication in the study. Otherwise, if automatic
1187         #         publication is switched on, default value is used for result name.
1188         #
1189         #  @return New GEOM.GEOM_Object, containing the created point.
1190         #
1191         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1192         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1193             """
1194             Create a point by projection give coordinates on the given surface
1195
1196             Parameters:
1197                 theRefSurf The referenced surface.
1198                 theX X-coordinate in 3D space
1199                 theY Y-coordinate in 3D space
1200                 theZ Z-coordinate in 3D space
1201                 theName Object name; when specified, this parameter is used
1202                         for result publication in the study. Otherwise, if automatic
1203                         publication is switched on, default value is used for result name.
1204
1205             Returns:
1206                 New GEOM.GEOM_Object, containing the created point.
1207
1208             Example of usage:
1209                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1210             """
1211             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1212             # Example: see GEOM_TestAll.py
1213             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1214             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1215             anObj.SetParameters(Parameters);
1216             self._autoPublish(anObj, theName, "vertex")
1217             return anObj
1218
1219         ## Create a point, which lays on the given face.
1220         #  The point will lay in arbitrary place of the face.
1221         #  The only condition on it is a non-zero distance to the face boundary.
1222         #  Such point can be used to uniquely identify the face inside any
1223         #  shape in case, when the shape does not contain overlapped faces.
1224         #  @param theFace The referenced face.
1225         #  @param theName Object name; when specified, this parameter is used
1226         #         for result publication in the study. Otherwise, if automatic
1227         #         publication is switched on, default value is used for result name.
1228         #
1229         #  @return New GEOM.GEOM_Object, containing the created point.
1230         #
1231         #  @ref swig_MakeVertexInsideFace "Example"
1232         def MakeVertexInsideFace (self, theFace, theName=None):
1233             """
1234             Create a point, which lays on the given face.
1235             The point will lay in arbitrary place of the face.
1236             The only condition on it is a non-zero distance to the face boundary.
1237             Such point can be used to uniquely identify the face inside any
1238             shape in case, when the shape does not contain overlapped faces.
1239
1240             Parameters:
1241                 theFace The referenced face.
1242                 theName Object name; when specified, this parameter is used
1243                         for result publication in the study. Otherwise, if automatic
1244                         publication is switched on, default value is used for result name.
1245
1246             Returns:
1247                 New GEOM.GEOM_Object, containing the created point.
1248
1249             Example of usage:
1250                 p_on_face = geompy.MakeVertexInsideFace(Face)
1251             """
1252             # Example: see GEOM_TestAll.py
1253             anObj = self.BasicOp.MakePointOnFace(theFace)
1254             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point on intersection of two lines.
1259         #  @param theRefLine1, theRefLine2 The referenced lines.
1260         #  @param theName Object name; when specified, this parameter is used
1261         #         for result publication in the study. Otherwise, if automatic
1262         #         publication is switched on, default value is used for result name.
1263         #
1264         #  @return New GEOM.GEOM_Object, containing the created point.
1265         #
1266         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1267         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1268             """
1269             Create a point on intersection of two lines.
1270
1271             Parameters:
1272                 theRefLine1, theRefLine2 The referenced lines.
1273                 theName Object name; when specified, this parameter is used
1274                         for result publication in the study. Otherwise, if automatic
1275                         publication is switched on, default value is used for result name.
1276
1277             Returns:
1278                 New GEOM.GEOM_Object, containing the created point.
1279             """
1280             # Example: see GEOM_TestAll.py
1281             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1282             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1283             self._autoPublish(anObj, theName, "vertex")
1284             return anObj
1285
1286         ## Create a tangent, corresponding to the given parameter on the given curve.
1287         #  @param theRefCurve The referenced curve.
1288         #  @param theParameter Value of parameter on the referenced curve.
1289         #  @param theName Object name; when specified, this parameter is used
1290         #         for result publication in the study. Otherwise, if automatic
1291         #         publication is switched on, default value is used for result name.
1292         #
1293         #  @return New GEOM.GEOM_Object, containing the created tangent.
1294         #
1295         #  @ref swig_MakeTangentOnCurve "Example"
1296         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1297             """
1298             Create a tangent, corresponding to the given parameter on the given curve.
1299
1300             Parameters:
1301                 theRefCurve The referenced curve.
1302                 theParameter Value of parameter on the referenced curve.
1303                 theName Object name; when specified, this parameter is used
1304                         for result publication in the study. Otherwise, if automatic
1305                         publication is switched on, default value is used for result name.
1306
1307             Returns:
1308                 New GEOM.GEOM_Object, containing the created tangent.
1309
1310             Example of usage:
1311                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1312             """
1313             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1314             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1315             self._autoPublish(anObj, theName, "tangent")
1316             return anObj
1317
1318         ## Create a tangent plane, corresponding to the given parameter on the given face.
1319         #  @param theFace The face for which tangent plane should be built.
1320         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1321         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1322         #  @param theTrimSize the size of plane.
1323         #  @param theName Object name; when specified, this parameter is used
1324         #         for result publication in the study. Otherwise, if automatic
1325         #         publication is switched on, default value is used for result name.
1326         #
1327         #  @return New GEOM.GEOM_Object, containing the created tangent.
1328         #
1329         #  @ref swig_MakeTangentPlaneOnFace "Example"
1330         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1331             """
1332             Create a tangent plane, corresponding to the given parameter on the given face.
1333
1334             Parameters:
1335                 theFace The face for which tangent plane should be built.
1336                 theParameterV vertical value of the center point (0.0 - 1.0).
1337                 theParameterU horisontal value of the center point (0.0 - 1.0).
1338                 theTrimSize the size of plane.
1339                 theName Object name; when specified, this parameter is used
1340                         for result publication in the study. Otherwise, if automatic
1341                         publication is switched on, default value is used for result name.
1342
1343            Returns: 
1344                 New GEOM.GEOM_Object, containing the created tangent.
1345
1346            Example of usage:
1347                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1348             """
1349             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1350             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1351             self._autoPublish(anObj, theName, "tangent")
1352             return anObj
1353
1354         ## Create a vector with the given components.
1355         #  @param theDX X component of the vector.
1356         #  @param theDY Y component of the vector.
1357         #  @param theDZ Z component of the vector.
1358         #  @param theName Object name; when specified, this parameter is used
1359         #         for result publication in the study. Otherwise, if automatic
1360         #         publication is switched on, default value is used for result name.
1361         #
1362         #  @return New GEOM.GEOM_Object, containing the created vector.
1363         #
1364         #  @ref tui_creation_vector "Example"
1365         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1366             """
1367             Create a vector with the given components.
1368
1369             Parameters:
1370                 theDX X component of the vector.
1371                 theDY Y component of the vector.
1372                 theDZ Z component of the vector.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:     
1378                 New GEOM.GEOM_Object, containing the created vector.
1379             """
1380             # Example: see GEOM_TestAll.py
1381             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1382             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1383             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1384             anObj.SetParameters(Parameters)
1385             self._autoPublish(anObj, theName, "vector")
1386             return anObj
1387
1388         ## Create a vector between two points.
1389         #  @param thePnt1 Start point for the vector.
1390         #  @param thePnt2 End point for the vector.
1391         #  @param theName Object name; when specified, this parameter is used
1392         #         for result publication in the study. Otherwise, if automatic
1393         #         publication is switched on, default value is used for result name.
1394         #
1395         #  @return New GEOM.GEOM_Object, containing the created vector.
1396         #
1397         #  @ref tui_creation_vector "Example"
1398         def MakeVector(self, thePnt1, thePnt2, theName=None):
1399             """
1400             Create a vector between two points.
1401
1402             Parameters:
1403                 thePnt1 Start point for the vector.
1404                 thePnt2 End point for the vector.
1405                 theName Object name; when specified, this parameter is used
1406                         for result publication in the study. Otherwise, if automatic
1407                         publication is switched on, default value is used for result name.
1408
1409             Returns:        
1410                 New GEOM.GEOM_Object, containing the created vector.
1411             """
1412             # Example: see GEOM_TestAll.py
1413             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1414             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1415             self._autoPublish(anObj, theName, "vector")
1416             return anObj
1417
1418         ## Create a line, passing through the given point
1419         #  and parrallel to the given direction
1420         #  @param thePnt Point. The resulting line will pass through it.
1421         #  @param theDir Direction. The resulting line will be parallel to it.
1422         #  @param theName Object name; when specified, this parameter is used
1423         #         for result publication in the study. Otherwise, if automatic
1424         #         publication is switched on, default value is used for result name.
1425         #
1426         #  @return New GEOM.GEOM_Object, containing the created line.
1427         #
1428         #  @ref tui_creation_line "Example"
1429         def MakeLine(self, thePnt, theDir, theName=None):
1430             """
1431             Create a line, passing through the given point
1432             and parrallel to the given direction
1433
1434             Parameters:
1435                 thePnt Point. The resulting line will pass through it.
1436                 theDir Direction. The resulting line will be parallel to it.
1437                 theName Object name; when specified, this parameter is used
1438                         for result publication in the study. Otherwise, if automatic
1439                         publication is switched on, default value is used for result name.
1440
1441             Returns:
1442                 New GEOM.GEOM_Object, containing the created line.
1443             """
1444             # Example: see GEOM_TestAll.py
1445             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1446             RaiseIfFailed("MakeLine", self.BasicOp)
1447             self._autoPublish(anObj, theName, "line")
1448             return anObj
1449
1450         ## Create a line, passing through the given points
1451         #  @param thePnt1 First of two points, defining the line.
1452         #  @param thePnt2 Second of two points, defining the line.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created line.
1458         #
1459         #  @ref tui_creation_line "Example"
1460         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1461             """
1462             Create a line, passing through the given points
1463
1464             Parameters:
1465                 thePnt1 First of two points, defining the line.
1466                 thePnt2 Second of two points, defining the line.
1467                 theName Object name; when specified, this parameter is used
1468                         for result publication in the study. Otherwise, if automatic
1469                         publication is switched on, default value is used for result name.
1470
1471             Returns:
1472                 New GEOM.GEOM_Object, containing the created line.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1476             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1477             self._autoPublish(anObj, theName, "line")
1478             return anObj
1479
1480         ## Create a line on two faces intersection.
1481         #  @param theFace1 First of two faces, defining the line.
1482         #  @param theFace2 Second of two faces, defining the line.
1483         #  @param theName Object name; when specified, this parameter is used
1484         #         for result publication in the study. Otherwise, if automatic
1485         #         publication is switched on, default value is used for result name.
1486         #
1487         #  @return New GEOM.GEOM_Object, containing the created line.
1488         #
1489         #  @ref swig_MakeLineTwoFaces "Example"
1490         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1491             """
1492             Create a line on two faces intersection.
1493
1494             Parameters:
1495                 theFace1 First of two faces, defining the line.
1496                 theFace2 Second of two faces, defining the line.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created line.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1506             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1507             self._autoPublish(anObj, theName, "line")
1508             return anObj
1509
1510         ## Create a plane, passing through the given point
1511         #  and normal to the given vector.
1512         #  @param thePnt Point, the plane has to pass through.
1513         #  @param theVec Vector, defining the plane normal direction.
1514         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created plane.
1520         #
1521         #  @ref tui_creation_plane "Example"
1522         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1523             """
1524             Create a plane, passing through the given point
1525             and normal to the given vector.
1526
1527             Parameters:
1528                 thePnt Point, the plane has to pass through.
1529                 theVec Vector, defining the plane normal direction.
1530                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1531                 theName Object name; when specified, this parameter is used
1532                         for result publication in the study. Otherwise, if automatic
1533                         publication is switched on, default value is used for result name.
1534
1535             Returns:    
1536                 New GEOM.GEOM_Object, containing the created plane.
1537             """
1538             # Example: see GEOM_TestAll.py
1539             theTrimSize, Parameters = ParseParameters(theTrimSize);
1540             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1541             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1542             anObj.SetParameters(Parameters)
1543             self._autoPublish(anObj, theName, "plane")
1544             return anObj
1545
1546         ## Create a plane, passing through the three given points
1547         #  @param thePnt1 First of three points, defining the plane.
1548         #  @param thePnt2 Second of three points, defining the plane.
1549         #  @param thePnt3 Fird of three points, defining the plane.
1550         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1551         #  @param theName Object name; when specified, this parameter is used
1552         #         for result publication in the study. Otherwise, if automatic
1553         #         publication is switched on, default value is used for result name.
1554         #
1555         #  @return New GEOM.GEOM_Object, containing the created plane.
1556         #
1557         #  @ref tui_creation_plane "Example"
1558         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1559             """
1560             Create a plane, passing through the three given points
1561
1562             Parameters:
1563                 thePnt1 First of three points, defining the plane.
1564                 thePnt2 Second of three points, defining the plane.
1565                 thePnt3 Fird of three points, defining the plane.
1566                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1567                 theName Object name; when specified, this parameter is used
1568                         for result publication in the study. Otherwise, if automatic
1569                         publication is switched on, default value is used for result name.
1570
1571             Returns:
1572                 New GEOM.GEOM_Object, containing the created plane.
1573             """
1574             # Example: see GEOM_TestAll.py
1575             theTrimSize, Parameters = ParseParameters(theTrimSize);
1576             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1577             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1578             anObj.SetParameters(Parameters)
1579             self._autoPublish(anObj, theName, "plane")
1580             return anObj
1581
1582         ## Create a plane, similar to the existing one, but with another size of representing face.
1583         #  @param theFace Referenced plane or LCS(Marker).
1584         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1585         #  @param theName Object name; when specified, this parameter is used
1586         #         for result publication in the study. Otherwise, if automatic
1587         #         publication is switched on, default value is used for result name.
1588         #
1589         #  @return New GEOM.GEOM_Object, containing the created plane.
1590         #
1591         #  @ref tui_creation_plane "Example"
1592         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1593             """
1594             Create a plane, similar to the existing one, but with another size of representing face.
1595
1596             Parameters:
1597                 theFace Referenced plane or LCS(Marker).
1598                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1599                 theName Object name; when specified, this parameter is used
1600                         for result publication in the study. Otherwise, if automatic
1601                         publication is switched on, default value is used for result name.
1602
1603             Returns:
1604                 New GEOM.GEOM_Object, containing the created plane.
1605             """
1606             # Example: see GEOM_TestAll.py
1607             theTrimSize, Parameters = ParseParameters(theTrimSize);
1608             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1609             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1610             anObj.SetParameters(Parameters)
1611             self._autoPublish(anObj, theName, "plane")
1612             return anObj
1613
1614         ## Create a plane, passing through the 2 vectors
1615         #  with center in a start point of the first vector.
1616         #  @param theVec1 Vector, defining center point and plane direction.
1617         #  @param theVec2 Vector, defining the plane normal direction.
1618         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1619         #  @param theName Object name; when specified, this parameter is used
1620         #         for result publication in the study. Otherwise, if automatic
1621         #         publication is switched on, default value is used for result name.
1622         #
1623         #  @return New GEOM.GEOM_Object, containing the created plane.
1624         #
1625         #  @ref tui_creation_plane "Example"
1626         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1627             """
1628             Create a plane, passing through the 2 vectors
1629             with center in a start point of the first vector.
1630
1631             Parameters:
1632                 theVec1 Vector, defining center point and plane direction.
1633                 theVec2 Vector, defining the plane normal direction.
1634                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1635                 theName Object name; when specified, this parameter is used
1636                         for result publication in the study. Otherwise, if automatic
1637                         publication is switched on, default value is used for result name.
1638
1639             Returns: 
1640                 New GEOM.GEOM_Object, containing the created plane.
1641             """
1642             # Example: see GEOM_TestAll.py
1643             theTrimSize, Parameters = ParseParameters(theTrimSize);
1644             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1645             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1646             anObj.SetParameters(Parameters)
1647             self._autoPublish(anObj, theName, "plane")
1648             return anObj
1649
1650         ## Create a plane, based on a Local coordinate system.
1651         #  @param theLCS  coordinate system, defining plane.
1652         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1653         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1654         #  @param theName Object name; when specified, this parameter is used
1655         #         for result publication in the study. Otherwise, if automatic
1656         #         publication is switched on, default value is used for result name.
1657         #
1658         #  @return New GEOM.GEOM_Object, containing the created plane.
1659         #
1660         #  @ref tui_creation_plane "Example"
1661         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1662             """
1663             Create a plane, based on a Local coordinate system.
1664
1665            Parameters: 
1666                 theLCS  coordinate system, defining plane.
1667                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1668                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1669                 theName Object name; when specified, this parameter is used
1670                         for result publication in the study. Otherwise, if automatic
1671                         publication is switched on, default value is used for result name.
1672
1673             Returns: 
1674                 New GEOM.GEOM_Object, containing the created plane.
1675             """
1676             # Example: see GEOM_TestAll.py
1677             theTrimSize, Parameters = ParseParameters(theTrimSize);
1678             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1679             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1680             anObj.SetParameters(Parameters)
1681             self._autoPublish(anObj, theName, "plane")
1682             return anObj
1683
1684         ## Create a local coordinate system.
1685         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1686         #  @param XDX,XDY,XDZ Three components of OX direction
1687         #  @param YDX,YDY,YDZ Three components of OY direction
1688         #  @param theName Object name; when specified, this parameter is used
1689         #         for result publication in the study. Otherwise, if automatic
1690         #         publication is switched on, default value is used for result name.
1691         #
1692         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1693         #
1694         #  @ref swig_MakeMarker "Example"
1695         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1696             """
1697             Create a local coordinate system.
1698
1699             Parameters: 
1700                 OX,OY,OZ Three coordinates of coordinate system origin.
1701                 XDX,XDY,XDZ Three components of OX direction
1702                 YDX,YDY,YDZ Three components of OY direction
1703                 theName Object name; when specified, this parameter is used
1704                         for result publication in the study. Otherwise, if automatic
1705                         publication is switched on, default value is used for result name.
1706
1707             Returns: 
1708                 New GEOM.GEOM_Object, containing the created coordinate system.
1709             """
1710             # Example: see GEOM_TestAll.py
1711             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1712             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1713             RaiseIfFailed("MakeMarker", self.BasicOp)
1714             anObj.SetParameters(Parameters)
1715             self._autoPublish(anObj, theName, "lcs")
1716             return anObj
1717
1718         ## Create a local coordinate system from shape.
1719         #  @param theShape The initial shape to detect the coordinate system.
1720         #  @param theName Object name; when specified, this parameter is used
1721         #         for result publication in the study. Otherwise, if automatic
1722         #         publication is switched on, default value is used for result name.
1723         #
1724         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1725         #
1726         #  @ref tui_creation_lcs "Example"
1727         def MakeMarkerFromShape(self, theShape, theName=None):
1728             """
1729             Create a local coordinate system from shape.
1730
1731             Parameters:
1732                 theShape The initial shape to detect the coordinate system.
1733                 theName Object name; when specified, this parameter is used
1734                         for result publication in the study. Otherwise, if automatic
1735                         publication is switched on, default value is used for result name.
1736                 
1737             Returns: 
1738                 New GEOM.GEOM_Object, containing the created coordinate system.
1739             """
1740             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1741             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1742             self._autoPublish(anObj, theName, "lcs")
1743             return anObj
1744
1745         ## Create a local coordinate system from point and two vectors.
1746         #  @param theOrigin Point of coordinate system origin.
1747         #  @param theXVec Vector of X direction
1748         #  @param theYVec Vector of Y direction
1749         #  @param theName Object name; when specified, this parameter is used
1750         #         for result publication in the study. Otherwise, if automatic
1751         #         publication is switched on, default value is used for result name.
1752         #
1753         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1754         #
1755         #  @ref tui_creation_lcs "Example"
1756         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1757             """
1758             Create a local coordinate system from point and two vectors.
1759
1760             Parameters:
1761                 theOrigin Point of coordinate system origin.
1762                 theXVec Vector of X direction
1763                 theYVec Vector of Y direction
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created coordinate system.
1770
1771             """
1772             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1773             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1774             self._autoPublish(anObj, theName, "lcs")
1775             return anObj
1776
1777         # end of l3_basic_go
1778         ## @}
1779
1780         ## @addtogroup l4_curves
1781         ## @{
1782
1783         ##  Create an arc of circle, passing through three given points.
1784         #  @param thePnt1 Start point of the arc.
1785         #  @param thePnt2 Middle point of the arc.
1786         #  @param thePnt3 End point of the arc.
1787         #  @param theName Object name; when specified, this parameter is used
1788         #         for result publication in the study. Otherwise, if automatic
1789         #         publication is switched on, default value is used for result name.
1790         #
1791         #  @return New GEOM.GEOM_Object, containing the created arc.
1792         #
1793         #  @ref swig_MakeArc "Example"
1794         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1795             """
1796             Create an arc of circle, passing through three given points.
1797
1798             Parameters:
1799                 thePnt1 Start point of the arc.
1800                 thePnt2 Middle point of the arc.
1801                 thePnt3 End point of the arc.
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns: 
1807                 New GEOM.GEOM_Object, containing the created arc.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1811             RaiseIfFailed("MakeArc", self.CurvesOp)
1812             self._autoPublish(anObj, theName, "arc")
1813             return anObj
1814
1815         ##  Create an arc of circle from a center and 2 points.
1816         #  @param thePnt1 Center of the arc
1817         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1818         #  @param thePnt3 End point of the arc (Gives also a direction)
1819         #  @param theSense Orientation of the arc
1820         #  @param theName Object name; when specified, this parameter is used
1821         #         for result publication in the study. Otherwise, if automatic
1822         #         publication is switched on, default value is used for result name.
1823         #
1824         #  @return New GEOM.GEOM_Object, containing the created arc.
1825         #
1826         #  @ref swig_MakeArc "Example"
1827         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1828             """
1829             Create an arc of circle from a center and 2 points.
1830
1831             Parameters:
1832                 thePnt1 Center of the arc
1833                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1834                 thePnt3 End point of the arc (Gives also a direction)
1835                 theSense Orientation of the arc
1836                 theName Object name; when specified, this parameter is used
1837                         for result publication in the study. Otherwise, if automatic
1838                         publication is switched on, default value is used for result name.
1839
1840             Returns:
1841                 New GEOM.GEOM_Object, containing the created arc.
1842             """
1843             # Example: see GEOM_TestAll.py
1844             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1845             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1846             self._autoPublish(anObj, theName, "arc")
1847             return anObj
1848
1849         ##  Create an arc of ellipse, of center and two points.
1850         #  @param theCenter Center of the arc.
1851         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1852         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1853         #  @param theName Object name; when specified, this parameter is used
1854         #         for result publication in the study. Otherwise, if automatic
1855         #         publication is switched on, default value is used for result name.
1856         #
1857         #  @return New GEOM.GEOM_Object, containing the created arc.
1858         #
1859         #  @ref swig_MakeArc "Example"
1860         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1861             """
1862             Create an arc of ellipse, of center and two points.
1863
1864             Parameters:
1865                 theCenter Center of the arc.
1866                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1867                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created arc.
1874             """
1875             # Example: see GEOM_TestAll.py
1876             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1877             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1878             self._autoPublish(anObj, theName, "arc")
1879             return anObj
1880
1881         ## Create a circle with given center, normal vector and radius.
1882         #  @param thePnt Circle center.
1883         #  @param theVec Vector, normal to the plane of the circle.
1884         #  @param theR Circle radius.
1885         #  @param theName Object name; when specified, this parameter is used
1886         #         for result publication in the study. Otherwise, if automatic
1887         #         publication is switched on, default value is used for result name.
1888         #
1889         #  @return New GEOM.GEOM_Object, containing the created circle.
1890         #
1891         #  @ref tui_creation_circle "Example"
1892         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1893             """
1894             Create a circle with given center, normal vector and radius.
1895
1896             Parameters:
1897                 thePnt Circle center.
1898                 theVec Vector, normal to the plane of the circle.
1899                 theR Circle radius.
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created circle.
1906             """
1907             # Example: see GEOM_TestAll.py
1908             theR, Parameters = ParseParameters(theR)
1909             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1910             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1911             anObj.SetParameters(Parameters)
1912             self._autoPublish(anObj, theName, "circle")
1913             return anObj
1914
1915         ## Create a circle with given radius.
1916         #  Center of the circle will be in the origin of global
1917         #  coordinate system and normal vector will be codirected with Z axis
1918         #  @param theR Circle radius.
1919         #  @param theName Object name; when specified, this parameter is used
1920         #         for result publication in the study. Otherwise, if automatic
1921         #         publication is switched on, default value is used for result name.
1922         #
1923         #  @return New GEOM.GEOM_Object, containing the created circle.
1924         def MakeCircleR(self, theR, theName=None):
1925             """
1926             Create a circle with given radius.
1927             Center of the circle will be in the origin of global
1928             coordinate system and normal vector will be codirected with Z axis
1929
1930             Parameters:
1931                 theR Circle radius.
1932                 theName Object name; when specified, this parameter is used
1933                         for result publication in the study. Otherwise, if automatic
1934                         publication is switched on, default value is used for result name.
1935
1936             Returns:
1937                 New GEOM.GEOM_Object, containing the created circle.
1938             """
1939             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1940             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1941             self._autoPublish(anObj, theName, "circle")
1942             return anObj
1943
1944         ## Create a circle, passing through three given points
1945         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1946         #  @param theName Object name; when specified, this parameter is used
1947         #         for result publication in the study. Otherwise, if automatic
1948         #         publication is switched on, default value is used for result name.
1949         #
1950         #  @return New GEOM.GEOM_Object, containing the created circle.
1951         #
1952         #  @ref tui_creation_circle "Example"
1953         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1954             """
1955             Create a circle, passing through three given points
1956
1957             Parameters:
1958                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1959                 theName Object name; when specified, this parameter is used
1960                         for result publication in the study. Otherwise, if automatic
1961                         publication is switched on, default value is used for result name.
1962
1963             Returns:
1964                 New GEOM.GEOM_Object, containing the created circle.
1965             """
1966             # Example: see GEOM_TestAll.py
1967             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1968             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1969             self._autoPublish(anObj, theName, "circle")
1970             return anObj
1971
1972         ## Create a circle, with given point1 as center,
1973         #  passing through the point2 as radius and laying in the plane,
1974         #  defined by all three given points.
1975         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1976         #  @param theName Object name; when specified, this parameter is used
1977         #         for result publication in the study. Otherwise, if automatic
1978         #         publication is switched on, default value is used for result name.
1979         #
1980         #  @return New GEOM.GEOM_Object, containing the created circle.
1981         #
1982         #  @ref swig_MakeCircle "Example"
1983         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1984             """
1985             Create a circle, with given point1 as center,
1986             passing through the point2 as radius and laying in the plane,
1987             defined by all three given points.
1988
1989             Parameters:
1990                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1991                 theName Object name; when specified, this parameter is used
1992                         for result publication in the study. Otherwise, if automatic
1993                         publication is switched on, default value is used for result name.
1994
1995             Returns:
1996                 New GEOM.GEOM_Object, containing the created circle.
1997             """
1998             # Example: see GEOM_example6.py
1999             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2000             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2001             self._autoPublish(anObj, theName, "circle")
2002             return anObj
2003
2004         ## Create an ellipse with given center, normal vector and radiuses.
2005         #  @param thePnt Ellipse center.
2006         #  @param theVec Vector, normal to the plane of the ellipse.
2007         #  @param theRMajor Major ellipse radius.
2008         #  @param theRMinor Minor ellipse radius.
2009         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2010         #  @param theName Object name; when specified, this parameter is used
2011         #         for result publication in the study. Otherwise, if automatic
2012         #         publication is switched on, default value is used for result name.
2013         #
2014         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2015         #
2016         #  @ref tui_creation_ellipse "Example"
2017         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2018             """
2019             Create an ellipse with given center, normal vector and radiuses.
2020
2021             Parameters:
2022                 thePnt Ellipse center.
2023                 theVec Vector, normal to the plane of the ellipse.
2024                 theRMajor Major ellipse radius.
2025                 theRMinor Minor ellipse radius.
2026                 theVecMaj Vector, direction of the ellipse's main axis.
2027                 theName Object name; when specified, this parameter is used
2028                         for result publication in the study. Otherwise, if automatic
2029                         publication is switched on, default value is used for result name.
2030
2031             Returns:    
2032                 New GEOM.GEOM_Object, containing the created ellipse.
2033             """
2034             # Example: see GEOM_TestAll.py
2035             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2036             if theVecMaj is not None:
2037                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2038             else:
2039                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2040                 pass
2041             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2042             anObj.SetParameters(Parameters)
2043             self._autoPublish(anObj, theName, "ellipse")
2044             return anObj
2045
2046         ## Create an ellipse with given radiuses.
2047         #  Center of the ellipse will be in the origin of global
2048         #  coordinate system and normal vector will be codirected with Z axis
2049         #  @param theRMajor Major ellipse radius.
2050         #  @param theRMinor Minor ellipse radius.
2051         #  @param theName Object name; when specified, this parameter is used
2052         #         for result publication in the study. Otherwise, if automatic
2053         #         publication is switched on, default value is used for result name.
2054         #
2055         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2056         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2057             """
2058             Create an ellipse with given radiuses.
2059             Center of the ellipse will be in the origin of global
2060             coordinate system and normal vector will be codirected with Z axis
2061
2062             Parameters:
2063                 theRMajor Major ellipse radius.
2064                 theRMinor Minor ellipse radius.
2065                 theName Object name; when specified, this parameter is used
2066                         for result publication in the study. Otherwise, if automatic
2067                         publication is switched on, default value is used for result name.
2068
2069             Returns:
2070             New GEOM.GEOM_Object, containing the created ellipse.
2071             """
2072             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2073             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2074             self._autoPublish(anObj, theName, "ellipse")
2075             return anObj
2076
2077         ## Create a polyline on the set of points.
2078         #  @param thePoints Sequence of points for the polyline.
2079         #  @param theIsClosed If True, build a closed wire.
2080         #  @param theName Object name; when specified, this parameter is used
2081         #         for result publication in the study. Otherwise, if automatic
2082         #         publication is switched on, default value is used for result name.
2083         #
2084         #  @return New GEOM.GEOM_Object, containing the created polyline.
2085         #
2086         #  @ref tui_creation_curve "Example"
2087         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2088             """
2089             Create a polyline on the set of points.
2090
2091             Parameters:
2092                 thePoints Sequence of points for the polyline.
2093                 theIsClosed If True, build a closed wire.
2094                 theName Object name; when specified, this parameter is used
2095                         for result publication in the study. Otherwise, if automatic
2096                         publication is switched on, default value is used for result name.
2097
2098             Returns:
2099                 New GEOM.GEOM_Object, containing the created polyline.
2100             """
2101             # Example: see GEOM_TestAll.py
2102             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2103             RaiseIfFailed("MakePolyline", self.CurvesOp)
2104             self._autoPublish(anObj, theName, "polyline")
2105             return anObj
2106
2107         ## Create bezier curve on the set of points.
2108         #  @param thePoints Sequence of points for the bezier curve.
2109         #  @param theIsClosed If True, build a closed curve.
2110         #  @param theName Object name; when specified, this parameter is used
2111         #         for result publication in the study. Otherwise, if automatic
2112         #         publication is switched on, default value is used for result name.
2113         #
2114         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2115         #
2116         #  @ref tui_creation_curve "Example"
2117         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2118             """
2119             Create bezier curve on the set of points.
2120
2121             Parameters:
2122                 thePoints Sequence of points for the bezier curve.
2123                 theIsClosed If True, build a closed curve.
2124                 theName Object name; when specified, this parameter is used
2125                         for result publication in the study. Otherwise, if automatic
2126                         publication is switched on, default value is used for result name.
2127
2128             Returns:
2129                 New GEOM.GEOM_Object, containing the created bezier curve.
2130             """
2131             # Example: see GEOM_TestAll.py
2132             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2133             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2134             self._autoPublish(anObj, theName, "bezier")
2135             return anObj
2136
2137         ## Create B-Spline curve on the set of points.
2138         #  @param thePoints Sequence of points for the B-Spline curve.
2139         #  @param theIsClosed If True, build a closed curve.
2140         #  @param theDoReordering If TRUE, the algo does not follow the order of
2141         #                         \a thePoints but searches for the closest vertex.
2142         #  @param theName Object name; when specified, this parameter is used
2143         #         for result publication in the study. Otherwise, if automatic
2144         #         publication is switched on, default value is used for result name.
2145         #
2146         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2147         #
2148         #  @ref tui_creation_curve "Example"
2149         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2150             """
2151             Create B-Spline curve on the set of points.
2152
2153             Parameters:
2154                 thePoints Sequence of points for the B-Spline curve.
2155                 theIsClosed If True, build a closed curve.
2156                 theDoReordering If True, the algo does not follow the order of
2157                                 thePoints but searches for the closest vertex.
2158                 theName Object name; when specified, this parameter is used
2159                         for result publication in the study. Otherwise, if automatic
2160                         publication is switched on, default value is used for result name.
2161
2162             Returns:                     
2163                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2164             """
2165             # Example: see GEOM_TestAll.py
2166             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2167             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "bspline")
2169             return anObj
2170
2171         ## Create B-Spline curve on the set of points.
2172         #  @param thePoints Sequence of points for the B-Spline curve.
2173         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2174         #  @param theLastVec Vector object, defining the curve direction at its last point.
2175         #  @param theName Object name; when specified, this parameter is used
2176         #         for result publication in the study. Otherwise, if automatic
2177         #         publication is switched on, default value is used for result name.
2178         #
2179         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2180         #
2181         #  @ref tui_creation_curve "Example"
2182         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2183             """
2184             Create B-Spline curve on the set of points.
2185
2186             Parameters:
2187                 thePoints Sequence of points for the B-Spline curve.
2188                 theFirstVec Vector object, defining the curve direction at its first point.
2189                 theLastVec Vector object, defining the curve direction at its last point.
2190                 theName Object name; when specified, this parameter is used
2191                         for result publication in the study. Otherwise, if automatic
2192                         publication is switched on, default value is used for result name.
2193
2194             Returns:                     
2195                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2196             """
2197             # Example: see GEOM_TestAll.py
2198             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2199             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2200             self._autoPublish(anObj, theName, "bspline")
2201             return anObj
2202
2203         ## Creates a curve using the parametric definition of the basic points.
2204         #  @param thexExpr parametric equation of the coordinates X.
2205         #  @param theyExpr parametric equation of the coordinates Y.
2206         #  @param thezExpr parametric equation of the coordinates Z.
2207         #  @param theParamMin the minimal value of the parameter.
2208         #  @param theParamMax the maximum value of the parameter.
2209         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2210         #  @param theCurveType the type of the curve.
2211         #  @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.
2212         #  @param theName Object name; when specified, this parameter is used
2213         #         for result publication in the study. Otherwise, if automatic
2214         #         publication is switched on, default value is used for result name.
2215         #
2216         #  @return New GEOM.GEOM_Object, containing the created curve.
2217         #
2218         #  @ref tui_creation_curve "Example"
2219         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2220                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2221             """
2222             Creates a curve using the parametric definition of the basic points.
2223
2224             Parameters:
2225                 thexExpr parametric equation of the coordinates X.
2226                 theyExpr parametric equation of the coordinates Y.
2227                 thezExpr parametric equation of the coordinates Z.
2228                 theParamMin the minimal value of the parameter.
2229                 theParamMax the maximum value of the parameter.
2230                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2231                 theCurveType the type of the curve.
2232                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2233                              method is used which can lead to a bug.
2234                 theName Object name; when specified, this parameter is used
2235                         for result publication in the study. Otherwise, if automatic
2236                         publication is switched on, default value is used for result name.
2237
2238             Returns:
2239                 New GEOM.GEOM_Object, containing the created curve.
2240             """
2241             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2242             if theNewMethod:
2243               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2244             else:
2245               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2246             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2247             anObj.SetParameters(Parameters)
2248             self._autoPublish(anObj, theName, "curve")
2249             return anObj
2250
2251         # end of l4_curves
2252         ## @}
2253
2254         ## @addtogroup l3_sketcher
2255         ## @{
2256
2257         ## Create a sketcher (wire or face), following the textual description,
2258         #  passed through <VAR>theCommand</VAR> argument. \n
2259         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2260         #  Format of the description string have to be the following:
2261         #
2262         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2263         #
2264         #  Where:
2265         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2266         #  - CMD is one of
2267         #     - "R angle" : Set the direction by angle
2268         #     - "D dx dy" : Set the direction by DX & DY
2269         #     .
2270         #       \n
2271         #     - "TT x y" : Create segment by point at X & Y
2272         #     - "T dx dy" : Create segment by point with DX & DY
2273         #     - "L length" : Create segment by direction & Length
2274         #     - "IX x" : Create segment by direction & Intersect. X
2275         #     - "IY y" : Create segment by direction & Intersect. Y
2276         #     .
2277         #       \n
2278         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2279         #     - "AA x y": Create arc by point at X & Y
2280         #     - "A dx dy" : Create arc by point with DX & DY
2281         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2282         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2283         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2284         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2285         #     .
2286         #       \n
2287         #     - "WW" : Close Wire (to finish)
2288         #     - "WF" : Close Wire and build face (to finish)
2289         #     .
2290         #        \n
2291         #  - Flag1 (= reverse) is 0 or 2 ...
2292         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2293         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2294         #     .
2295         #        \n
2296         #  - Flag2 (= control tolerance) is 0 or 1 ...
2297         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2298         #     - if 1 the wire is built only if the end point is on the arc
2299         #       with a tolerance of 10^-7 on the distance else the creation fails
2300         #
2301         #  @param theCommand String, defining the sketcher in local
2302         #                    coordinates of the working plane.
2303         #  @param theWorkingPlane Nine double values, defining origin,
2304         #                         OZ and OX directions of the working plane.
2305         #  @param theName Object name; when specified, this parameter is used
2306         #         for result publication in the study. Otherwise, if automatic
2307         #         publication is switched on, default value is used for result name.
2308         #
2309         #  @return New GEOM.GEOM_Object, containing the created wire.
2310         #
2311         #  @ref tui_sketcher_page "Example"
2312         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2313             """
2314             Create a sketcher (wire or face), following the textual description, passed
2315             through theCommand argument.
2316             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2317             Format of the description string have to be the following:
2318                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2319             Where:
2320             - x1, y1 are coordinates of the first sketcher point (zero by default),
2321             - CMD is one of
2322                - "R angle" : Set the direction by angle
2323                - "D dx dy" : Set the direction by DX & DY
2324                
2325                - "TT x y" : Create segment by point at X & Y
2326                - "T dx dy" : Create segment by point with DX & DY
2327                - "L length" : Create segment by direction & Length
2328                - "IX x" : Create segment by direction & Intersect. X
2329                - "IY y" : Create segment by direction & Intersect. Y
2330
2331                - "C radius length" : Create arc by direction, radius and length(in degree)
2332                - "AA x y": Create arc by point at X & Y
2333                - "A dx dy" : Create arc by point with DX & DY
2334                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2335                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2336                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2337                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2338
2339                - "WW" : Close Wire (to finish)
2340                - "WF" : Close Wire and build face (to finish)
2341             
2342             - Flag1 (= reverse) is 0 or 2 ...
2343                - if 0 the drawn arc is the one of lower angle (< Pi)
2344                - if 2 the drawn arc ius the one of greater angle (> Pi)
2345         
2346             - Flag2 (= control tolerance) is 0 or 1 ...
2347                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2348                - if 1 the wire is built only if the end point is on the arc
2349                  with a tolerance of 10^-7 on the distance else the creation fails
2350
2351             Parameters:
2352                 theCommand String, defining the sketcher in local
2353                            coordinates of the working plane.
2354                 theWorkingPlane Nine double values, defining origin,
2355                                 OZ and OX directions of the working plane.
2356                 theName Object name; when specified, this parameter is used
2357                         for result publication in the study. Otherwise, if automatic
2358                         publication is switched on, default value is used for result name.
2359
2360             Returns:
2361                 New GEOM.GEOM_Object, containing the created wire.
2362             """
2363             # Example: see GEOM_TestAll.py
2364             theCommand,Parameters = ParseSketcherCommand(theCommand)
2365             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2366             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2367             anObj.SetParameters(Parameters)
2368             self._autoPublish(anObj, theName, "wire")
2369             return anObj
2370
2371         ## Create a sketcher (wire or face), following the textual description,
2372         #  passed through <VAR>theCommand</VAR> argument. \n
2373         #  For format of the description string see MakeSketcher() method.\n
2374         #  @param theCommand String, defining the sketcher in local
2375         #                    coordinates of the working plane.
2376         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2377         #  @param theName Object name; when specified, this parameter is used
2378         #         for result publication in the study. Otherwise, if automatic
2379         #         publication is switched on, default value is used for result name.
2380         #
2381         #  @return New GEOM.GEOM_Object, containing the created wire.
2382         #
2383         #  @ref tui_sketcher_page "Example"
2384         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2385             """
2386             Create a sketcher (wire or face), following the textual description,
2387             passed through theCommand argument.
2388             For format of the description string see geompy.MakeSketcher() method.
2389
2390             Parameters:
2391                 theCommand String, defining the sketcher in local
2392                            coordinates of the working plane.
2393                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2394                 theName Object name; when specified, this parameter is used
2395                         for result publication in the study. Otherwise, if automatic
2396                         publication is switched on, default value is used for result name.
2397
2398             Returns:
2399                 New GEOM.GEOM_Object, containing the created wire.
2400             """
2401             theCommand,Parameters = ParseSketcherCommand(theCommand)
2402             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2403             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2404             anObj.SetParameters(Parameters)
2405             self._autoPublish(anObj, theName, "wire")
2406             return anObj
2407
2408         ## Obtain a 2D sketcher interface
2409         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2410         def Sketcher2D (self):
2411             """
2412             Obtain a 2D sketcher interface.
2413
2414             Example of usage:
2415                sk = geompy.Sketcher2D()
2416                sk.addPoint(20, 20)
2417                sk.addSegmentRelative(15, 70)
2418                sk.addSegmentPerpY(50)
2419                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2420                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2421                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2422                sk.close()
2423                Sketch_1 = sk.wire(geomObj_1)
2424             """
2425             sk = Sketcher2D (self)
2426             return sk
2427         
2428         ## Create a sketcher wire, following the numerical description,
2429         #  passed through <VAR>theCoordinates</VAR> argument. \n
2430         #  @param theCoordinates double values, defining points to create a wire,
2431         #                                                      passing from it.
2432         #  @param theName Object name; when specified, this parameter is used
2433         #         for result publication in the study. Otherwise, if automatic
2434         #         publication is switched on, default value is used for result name.
2435         #
2436         #  @return New GEOM.GEOM_Object, containing the created wire.
2437         #
2438         #  @ref tui_3dsketcher_page "Example"
2439         def Make3DSketcher(self, theCoordinates, theName=None):
2440             """
2441             Create a sketcher wire, following the numerical description,
2442             passed through theCoordinates argument.
2443
2444             Parameters:
2445                 theCoordinates double values, defining points to create a wire,
2446                                passing from it.
2447                 theName Object name; when specified, this parameter is used
2448                         for result publication in the study. Otherwise, if automatic
2449                         publication is switched on, default value is used for result name.
2450
2451             Returns:
2452                 New GEOM_Object, containing the created wire.
2453             """
2454             theCoordinates,Parameters = ParseParameters(theCoordinates)
2455             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2456             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2457             anObj.SetParameters(Parameters)
2458             self._autoPublish(anObj, theName, "wire")
2459             return anObj
2460
2461         ## Obtain a 3D sketcher interface
2462         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2463         #
2464         #  @ref tui_3dsketcher_page "Example"
2465         def Sketcher3D (self):
2466             """
2467             Obtain a 3D sketcher interface.
2468
2469             Example of usage:
2470                 sk = geompy.Sketcher3D()
2471                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2472                 sk.addPointsRelative(0, 0, 130)
2473                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2474                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2475                 sk.close()
2476                 a3D_Sketcher_1 = sk.wire()
2477             """
2478             sk = Sketcher3D (self)
2479             return sk
2480
2481         # end of l3_sketcher
2482         ## @}
2483
2484         ## @addtogroup l3_3d_primitives
2485         ## @{
2486
2487         ## Create a box by coordinates of two opposite vertices.
2488         #
2489         #  @param x1,y1,z1 double values, defining first point it.
2490         #  @param x2,y2,z2 double values, defining first point it.
2491         #  @param theName Object name; when specified, this parameter is used
2492         #         for result publication in the study. Otherwise, if automatic
2493         #         publication is switched on, default value is used for result name.
2494         #
2495         #  @return New GEOM.GEOM_Object, containing the created box.
2496         #
2497         #  @ref tui_creation_box "Example"
2498         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2499             """
2500             Create a box by coordinates of two opposite vertices.
2501             
2502             Parameters:
2503                 x1,y1,z1 double values, defining first point.
2504                 x2,y2,z2 double values, defining second point.
2505                 theName Object name; when specified, this parameter is used
2506                         for result publication in the study. Otherwise, if automatic
2507                         publication is switched on, default value is used for result name.
2508                 
2509             Returns:
2510                 New GEOM.GEOM_Object, containing the created box.
2511             """
2512             # Example: see GEOM_TestAll.py
2513             pnt1 = self.MakeVertex(x1,y1,z1)
2514             pnt2 = self.MakeVertex(x2,y2,z2)
2515             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2516             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2517
2518         ## Create a box with specified dimensions along the coordinate axes
2519         #  and with edges, parallel to the coordinate axes.
2520         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2521         #  @param theDX Length of Box edges, parallel to OX axis.
2522         #  @param theDY Length of Box edges, parallel to OY axis.
2523         #  @param theDZ Length of Box edges, parallel to OZ axis.
2524         #  @param theName Object name; when specified, this parameter is used
2525         #         for result publication in the study. Otherwise, if automatic
2526         #         publication is switched on, default value is used for result name.
2527         #
2528         #  @return New GEOM.GEOM_Object, containing the created box.
2529         #
2530         #  @ref tui_creation_box "Example"
2531         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2532             """
2533             Create a box with specified dimensions along the coordinate axes
2534             and with edges, parallel to the coordinate axes.
2535             Center of the box will be at point (DX/2, DY/2, DZ/2).
2536
2537             Parameters:
2538                 theDX Length of Box edges, parallel to OX axis.
2539                 theDY Length of Box edges, parallel to OY axis.
2540                 theDZ Length of Box edges, parallel to OZ axis.
2541                 theName Object name; when specified, this parameter is used
2542                         for result publication in the study. Otherwise, if automatic
2543                         publication is switched on, default value is used for result name.
2544
2545             Returns:   
2546                 New GEOM.GEOM_Object, containing the created box.
2547             """
2548             # Example: see GEOM_TestAll.py
2549             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2550             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2551             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2552             anObj.SetParameters(Parameters)
2553             self._autoPublish(anObj, theName, "box")
2554             return anObj
2555
2556         ## Create a box with two specified opposite vertices,
2557         #  and with edges, parallel to the coordinate axes
2558         #  @param thePnt1 First of two opposite vertices.
2559         #  @param thePnt2 Second of two opposite vertices.
2560         #  @param theName Object name; when specified, this parameter is used
2561         #         for result publication in the study. Otherwise, if automatic
2562         #         publication is switched on, default value is used for result name.
2563         #
2564         #  @return New GEOM.GEOM_Object, containing the created box.
2565         #
2566         #  @ref tui_creation_box "Example"
2567         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2568             """
2569             Create a box with two specified opposite vertices,
2570             and with edges, parallel to the coordinate axes
2571
2572             Parameters:
2573                 thePnt1 First of two opposite vertices.
2574                 thePnt2 Second of two opposite vertices.
2575                 theName Object name; when specified, this parameter is used
2576                         for result publication in the study. Otherwise, if automatic
2577                         publication is switched on, default value is used for result name.
2578
2579             Returns:
2580                 New GEOM.GEOM_Object, containing the created box.
2581             """
2582             # Example: see GEOM_TestAll.py
2583             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2584             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2585             self._autoPublish(anObj, theName, "box")
2586             return anObj
2587
2588         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2589         #  @param theH height of Face.
2590         #  @param theW width of Face.
2591         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2592         #  @param theName Object name; when specified, this parameter is used
2593         #         for result publication in the study. Otherwise, if automatic
2594         #         publication is switched on, default value is used for result name.
2595         #
2596         #  @return New GEOM.GEOM_Object, containing the created face.
2597         #
2598         #  @ref tui_creation_face "Example"
2599         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2600             """
2601             Create a face with specified dimensions with edges parallel to coordinate axes.
2602
2603             Parameters:
2604                 theH height of Face.
2605                 theW width of Face.
2606                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2607                 theName Object name; when specified, this parameter is used
2608                         for result publication in the study. Otherwise, if automatic
2609                         publication is switched on, default value is used for result name.
2610
2611             Returns:
2612                 New GEOM.GEOM_Object, containing the created face.
2613             """
2614             # Example: see GEOM_TestAll.py
2615             theH,theW,Parameters = ParseParameters(theH, theW)
2616             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2617             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2618             anObj.SetParameters(Parameters)
2619             self._autoPublish(anObj, theName, "rectangle")
2620             return anObj
2621
2622         ## Create a face from another plane and two sizes,
2623         #  vertical size and horisontal size.
2624         #  @param theObj   Normale vector to the creating face or
2625         #  the face object.
2626         #  @param theH     Height (vertical size).
2627         #  @param theW     Width (horisontal size).
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created face.
2633         #
2634         #  @ref tui_creation_face "Example"
2635         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2636             """
2637             Create a face from another plane and two sizes,
2638             vertical size and horisontal size.
2639
2640             Parameters:
2641                 theObj   Normale vector to the creating face or
2642                          the face object.
2643                 theH     Height (vertical size).
2644                 theW     Width (horisontal size).
2645                 theName Object name; when specified, this parameter is used
2646                         for result publication in the study. Otherwise, if automatic
2647                         publication is switched on, default value is used for result name.
2648
2649             Returns:
2650                 New GEOM_Object, containing the created face.
2651             """
2652             # Example: see GEOM_TestAll.py
2653             theH,theW,Parameters = ParseParameters(theH, theW)
2654             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2655             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2656             anObj.SetParameters(Parameters)
2657             self._autoPublish(anObj, theName, "rectangle")
2658             return anObj
2659
2660         ## Create a disk with given center, normal vector and radius.
2661         #  @param thePnt Disk center.
2662         #  @param theVec Vector, normal to the plane of the disk.
2663         #  @param theR Disk radius.
2664         #  @param theName Object name; when specified, this parameter is used
2665         #         for result publication in the study. Otherwise, if automatic
2666         #         publication is switched on, default value is used for result name.
2667         #
2668         #  @return New GEOM.GEOM_Object, containing the created disk.
2669         #
2670         #  @ref tui_creation_disk "Example"
2671         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2672             """
2673             Create a disk with given center, normal vector and radius.
2674
2675             Parameters:
2676                 thePnt Disk center.
2677                 theVec Vector, normal to the plane of the disk.
2678                 theR Disk radius.
2679                 theName Object name; when specified, this parameter is used
2680                         for result publication in the study. Otherwise, if automatic
2681                         publication is switched on, default value is used for result name.
2682
2683             Returns:    
2684                 New GEOM.GEOM_Object, containing the created disk.
2685             """
2686             # Example: see GEOM_TestAll.py
2687             theR,Parameters = ParseParameters(theR)
2688             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2689             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2690             anObj.SetParameters(Parameters)
2691             self._autoPublish(anObj, theName, "disk")
2692             return anObj
2693
2694         ## Create a disk, passing through three given points
2695         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2696         #  @param theName Object name; when specified, this parameter is used
2697         #         for result publication in the study. Otherwise, if automatic
2698         #         publication is switched on, default value is used for result name.
2699         #
2700         #  @return New GEOM.GEOM_Object, containing the created disk.
2701         #
2702         #  @ref tui_creation_disk "Example"
2703         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2704             """
2705             Create a disk, passing through three given points
2706
2707             Parameters:
2708                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2709                 theName Object name; when specified, this parameter is used
2710                         for result publication in the study. Otherwise, if automatic
2711                         publication is switched on, default value is used for result name.
2712
2713             Returns:    
2714                 New GEOM.GEOM_Object, containing the created disk.
2715             """
2716             # Example: see GEOM_TestAll.py
2717             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2718             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2719             self._autoPublish(anObj, theName, "disk")
2720             return anObj
2721
2722         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2723         #  @param theR Radius of Face.
2724         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2725         #  @param theName Object name; when specified, this parameter is used
2726         #         for result publication in the study. Otherwise, if automatic
2727         #         publication is switched on, default value is used for result name.
2728         #
2729         #  @return New GEOM.GEOM_Object, containing the created disk.
2730         #
2731         #  @ref tui_creation_face "Example"
2732         def MakeDiskR(self, theR, theOrientation, theName=None):
2733             """
2734             Create a disk with specified dimensions along OX-OY coordinate axes.
2735
2736             Parameters:
2737                 theR Radius of Face.
2738                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2739                 theName Object name; when specified, this parameter is used
2740                         for result publication in the study. Otherwise, if automatic
2741                         publication is switched on, default value is used for result name.
2742
2743             Returns: 
2744                 New GEOM.GEOM_Object, containing the created disk.
2745
2746             Example of usage:
2747                 Disk3 = geompy.MakeDiskR(100., 1)
2748             """
2749             # Example: see GEOM_TestAll.py
2750             theR,Parameters = ParseParameters(theR)
2751             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2752             RaiseIfFailed("MakeDiskR", self.PrimOp)
2753             anObj.SetParameters(Parameters)
2754             self._autoPublish(anObj, theName, "disk")
2755             return anObj
2756
2757         ## Create a cylinder with given base point, axis, radius and height.
2758         #  @param thePnt Central point of cylinder base.
2759         #  @param theAxis Cylinder axis.
2760         #  @param theR Cylinder radius.
2761         #  @param theH Cylinder height.
2762         #  @param theName Object name; when specified, this parameter is used
2763         #         for result publication in the study. Otherwise, if automatic
2764         #         publication is switched on, default value is used for result name.
2765         #
2766         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2767         #
2768         #  @ref tui_creation_cylinder "Example"
2769         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2770             """
2771             Create a cylinder with given base point, axis, radius and height.
2772
2773             Parameters:
2774                 thePnt Central point of cylinder base.
2775                 theAxis Cylinder axis.
2776                 theR Cylinder radius.
2777                 theH Cylinder height.
2778                 theName Object name; when specified, this parameter is used
2779                         for result publication in the study. Otherwise, if automatic
2780                         publication is switched on, default value is used for result name.
2781
2782             Returns: 
2783                 New GEOM.GEOM_Object, containing the created cylinder.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             theR,theH,Parameters = ParseParameters(theR, theH)
2787             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2788             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2789             anObj.SetParameters(Parameters)
2790             self._autoPublish(anObj, theName, "cylinder")
2791             return anObj
2792
2793         ## Create a cylinder with given radius and height at
2794         #  the origin of coordinate system. Axis of the cylinder
2795         #  will be collinear to the OZ axis of the coordinate system.
2796         #  @param theR Cylinder radius.
2797         #  @param theH Cylinder height.
2798         #  @param theName Object name; when specified, this parameter is used
2799         #         for result publication in the study. Otherwise, if automatic
2800         #         publication is switched on, default value is used for result name.
2801         #
2802         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2803         #
2804         #  @ref tui_creation_cylinder "Example"
2805         def MakeCylinderRH(self, theR, theH, theName=None):
2806             """
2807             Create a cylinder with given radius and height at
2808             the origin of coordinate system. Axis of the cylinder
2809             will be collinear to the OZ axis of the coordinate system.
2810
2811             Parameters:
2812                 theR Cylinder radius.
2813                 theH Cylinder height.
2814                 theName Object name; when specified, this parameter is used
2815                         for result publication in the study. Otherwise, if automatic
2816                         publication is switched on, default value is used for result name.
2817
2818             Returns:    
2819                 New GEOM.GEOM_Object, containing the created cylinder.
2820             """
2821             # Example: see GEOM_TestAll.py
2822             theR,theH,Parameters = ParseParameters(theR, theH)
2823             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2824             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2825             anObj.SetParameters(Parameters)
2826             self._autoPublish(anObj, theName, "cylinder")
2827             return anObj
2828
2829         ## Create a sphere with given center and radius.
2830         #  @param thePnt Sphere center.
2831         #  @param theR Sphere radius.
2832         #  @param theName Object name; when specified, this parameter is used
2833         #         for result publication in the study. Otherwise, if automatic
2834         #         publication is switched on, default value is used for result name.
2835         #
2836         #  @return New GEOM.GEOM_Object, containing the created sphere.
2837         #
2838         #  @ref tui_creation_sphere "Example"
2839         def MakeSpherePntR(self, thePnt, theR, theName=None):
2840             """
2841             Create a sphere with given center and radius.
2842
2843             Parameters:
2844                 thePnt Sphere center.
2845                 theR Sphere radius.
2846                 theName Object name; when specified, this parameter is used
2847                         for result publication in the study. Otherwise, if automatic
2848                         publication is switched on, default value is used for result name.
2849
2850             Returns:    
2851                 New GEOM.GEOM_Object, containing the created sphere.            
2852             """
2853             # Example: see GEOM_TestAll.py
2854             theR,Parameters = ParseParameters(theR)
2855             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2856             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2857             anObj.SetParameters(Parameters)
2858             self._autoPublish(anObj, theName, "sphere")
2859             return anObj
2860
2861         ## Create a sphere with given center and radius.
2862         #  @param x,y,z Coordinates of sphere center.
2863         #  @param theR Sphere radius.
2864         #  @param theName Object name; when specified, this parameter is used
2865         #         for result publication in the study. Otherwise, if automatic
2866         #         publication is switched on, default value is used for result name.
2867         #
2868         #  @return New GEOM.GEOM_Object, containing the created sphere.
2869         #
2870         #  @ref tui_creation_sphere "Example"
2871         def MakeSphere(self, x, y, z, theR, theName=None):
2872             """
2873             Create a sphere with given center and radius.
2874
2875             Parameters: 
2876                 x,y,z Coordinates of sphere center.
2877                 theR Sphere radius.
2878                 theName Object name; when specified, this parameter is used
2879                         for result publication in the study. Otherwise, if automatic
2880                         publication is switched on, default value is used for result name.
2881
2882             Returns:
2883                 New GEOM.GEOM_Object, containing the created sphere.
2884             """
2885             # Example: see GEOM_TestAll.py
2886             point = self.MakeVertex(x, y, z)
2887             # note: auto-publishing is done in self.MakeSpherePntR()
2888             anObj = self.MakeSpherePntR(point, theR, theName)
2889             return anObj
2890
2891         ## Create a sphere with given radius at the origin of coordinate system.
2892         #  @param theR Sphere radius.
2893         #  @param theName Object name; when specified, this parameter is used
2894         #         for result publication in the study. Otherwise, if automatic
2895         #         publication is switched on, default value is used for result name.
2896         #
2897         #  @return New GEOM.GEOM_Object, containing the created sphere.
2898         #
2899         #  @ref tui_creation_sphere "Example"
2900         def MakeSphereR(self, theR, theName=None):
2901             """
2902             Create a sphere with given radius at the origin of coordinate system.
2903
2904             Parameters: 
2905                 theR Sphere radius.
2906                 theName Object name; when specified, this parameter is used
2907                         for result publication in the study. Otherwise, if automatic
2908                         publication is switched on, default value is used for result name.
2909
2910             Returns:
2911                 New GEOM.GEOM_Object, containing the created sphere.            
2912             """
2913             # Example: see GEOM_TestAll.py
2914             theR,Parameters = ParseParameters(theR)
2915             anObj = self.PrimOp.MakeSphereR(theR)
2916             RaiseIfFailed("MakeSphereR", self.PrimOp)
2917             anObj.SetParameters(Parameters)
2918             self._autoPublish(anObj, theName, "sphere")
2919             return anObj
2920
2921         ## Create a cone with given base point, axis, height and radiuses.
2922         #  @param thePnt Central point of the first cone base.
2923         #  @param theAxis Cone axis.
2924         #  @param theR1 Radius of the first cone base.
2925         #  @param theR2 Radius of the second cone base.
2926         #    \note If both radiuses are non-zero, the cone will be truncated.
2927         #    \note If the radiuses are equal, a cylinder will be created instead.
2928         #  @param theH Cone height.
2929         #  @param theName Object name; when specified, this parameter is used
2930         #         for result publication in the study. Otherwise, if automatic
2931         #         publication is switched on, default value is used for result name.
2932         #
2933         #  @return New GEOM.GEOM_Object, containing the created cone.
2934         #
2935         #  @ref tui_creation_cone "Example"
2936         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2937             """
2938             Create a cone with given base point, axis, height and radiuses.
2939
2940             Parameters: 
2941                 thePnt Central point of the first cone base.
2942                 theAxis Cone axis.
2943                 theR1 Radius of the first cone base.
2944                 theR2 Radius of the second cone base.
2945                 theH Cone height.
2946                 theName Object name; when specified, this parameter is used
2947                         for result publication in the study. Otherwise, if automatic
2948                         publication is switched on, default value is used for result name.
2949
2950             Note:
2951                 If both radiuses are non-zero, the cone will be truncated.
2952                 If the radiuses are equal, a cylinder will be created instead.
2953
2954             Returns:
2955                 New GEOM.GEOM_Object, containing the created cone.
2956             """
2957             # Example: see GEOM_TestAll.py
2958             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2959             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2960             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2961             anObj.SetParameters(Parameters)
2962             self._autoPublish(anObj, theName, "cone")
2963             return anObj
2964
2965         ## Create a cone with given height and radiuses at
2966         #  the origin of coordinate system. Axis of the cone will
2967         #  be collinear to the OZ axis of the coordinate system.
2968         #  @param theR1 Radius of the first cone base.
2969         #  @param theR2 Radius of the second cone base.
2970         #    \note If both radiuses are non-zero, the cone will be truncated.
2971         #    \note If the radiuses are equal, a cylinder will be created instead.
2972         #  @param theH Cone height.
2973         #  @param theName Object name; when specified, this parameter is used
2974         #         for result publication in the study. Otherwise, if automatic
2975         #         publication is switched on, default value is used for result name.
2976         #
2977         #  @return New GEOM.GEOM_Object, containing the created cone.
2978         #
2979         #  @ref tui_creation_cone "Example"
2980         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2981             """
2982             Create a cone with given height and radiuses at
2983             the origin of coordinate system. Axis of the cone will
2984             be collinear to the OZ axis of the coordinate system.
2985
2986             Parameters: 
2987                 theR1 Radius of the first cone base.
2988                 theR2 Radius of the second cone base.
2989                 theH Cone height.
2990                 theName Object name; when specified, this parameter is used
2991                         for result publication in the study. Otherwise, if automatic
2992                         publication is switched on, default value is used for result name.
2993
2994             Note:
2995                 If both radiuses are non-zero, the cone will be truncated.
2996                 If the radiuses are equal, a cylinder will be created instead.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cone.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3003             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3004             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cone")
3007             return anObj
3008
3009         ## Create a torus with given center, normal vector and radiuses.
3010         #  @param thePnt Torus central point.
3011         #  @param theVec Torus axis of symmetry.
3012         #  @param theRMajor Torus major radius.
3013         #  @param theRMinor Torus minor radius.
3014         #  @param theName Object name; when specified, this parameter is used
3015         #         for result publication in the study. Otherwise, if automatic
3016         #         publication is switched on, default value is used for result name.
3017         #
3018         #  @return New GEOM.GEOM_Object, containing the created torus.
3019         #
3020         #  @ref tui_creation_torus "Example"
3021         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3022             """
3023             Create a torus with given center, normal vector and radiuses.
3024
3025             Parameters: 
3026                 thePnt Torus central point.
3027                 theVec Torus axis of symmetry.
3028                 theRMajor Torus major radius.
3029                 theRMinor Torus minor radius.
3030                 theName Object name; when specified, this parameter is used
3031                         for result publication in the study. Otherwise, if automatic
3032                         publication is switched on, default value is used for result name.
3033
3034            Returns:
3035                 New GEOM.GEOM_Object, containing the created torus.
3036             """
3037             # Example: see GEOM_TestAll.py
3038             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3039             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3040             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3041             anObj.SetParameters(Parameters)
3042             self._autoPublish(anObj, theName, "torus")
3043             return anObj
3044
3045         ## Create a torus with given radiuses at the origin of coordinate system.
3046         #  @param theRMajor Torus major radius.
3047         #  @param theRMinor Torus minor radius.
3048         #  @param theName Object name; when specified, this parameter is used
3049         #         for result publication in the study. Otherwise, if automatic
3050         #         publication is switched on, default value is used for result name.
3051         #
3052         #  @return New GEOM.GEOM_Object, containing the created torus.
3053         #
3054         #  @ref tui_creation_torus "Example"
3055         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3056             """
3057            Create a torus with given radiuses at the origin of coordinate system.
3058
3059            Parameters: 
3060                 theRMajor Torus major radius.
3061                 theRMinor Torus minor radius.
3062                 theName Object name; when specified, this parameter is used
3063                         for result publication in the study. Otherwise, if automatic
3064                         publication is switched on, default value is used for result name.
3065
3066            Returns:
3067                 New GEOM.GEOM_Object, containing the created torus.            
3068             """
3069             # Example: see GEOM_TestAll.py
3070             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3071             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3072             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3073             anObj.SetParameters(Parameters)
3074             self._autoPublish(anObj, theName, "torus")
3075             return anObj
3076
3077         # end of l3_3d_primitives
3078         ## @}
3079
3080         ## @addtogroup l3_complex
3081         ## @{
3082
3083         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3084         #  @param theBase Base shape to be extruded.
3085         #  @param thePoint1 First end of extrusion vector.
3086         #  @param thePoint2 Second end of extrusion vector.
3087         #  @param theScaleFactor Use it to make prism with scaled second base.
3088         #                        Nagative value means not scaled second base.
3089         #  @param theName Object name; when specified, this parameter is used
3090         #         for result publication in the study. Otherwise, if automatic
3091         #         publication is switched on, default value is used for result name.
3092         #
3093         #  @return New GEOM.GEOM_Object, containing the created prism.
3094         #
3095         #  @ref tui_creation_prism "Example"
3096         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3097             """
3098             Create a shape by extrusion of the base shape along a vector, defined by two points.
3099
3100             Parameters: 
3101                 theBase Base shape to be extruded.
3102                 thePoint1 First end of extrusion vector.
3103                 thePoint2 Second end of extrusion vector.
3104                 theScaleFactor Use it to make prism with scaled second base.
3105                                Nagative value means not scaled second base.
3106                 theName Object name; when specified, this parameter is used
3107                         for result publication in the study. Otherwise, if automatic
3108                         publication is switched on, default value is used for result name.
3109
3110             Returns:
3111                 New GEOM.GEOM_Object, containing the created prism.
3112             """
3113             # Example: see GEOM_TestAll.py
3114             anObj = None
3115             Parameters = ""
3116             if theScaleFactor > 0:
3117                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3118                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3119             else:
3120                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3121             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3122             anObj.SetParameters(Parameters)
3123             self._autoPublish(anObj, theName, "prism")
3124             return anObj
3125
3126         ## Create a shape by extrusion of the base shape along a
3127         #  vector, defined by two points, in 2 Ways (forward/backward).
3128         #  @param theBase Base shape to be extruded.
3129         #  @param thePoint1 First end of extrusion vector.
3130         #  @param thePoint2 Second end of extrusion vector.
3131         #  @param theName Object name; when specified, this parameter is used
3132         #         for result publication in the study. Otherwise, if automatic
3133         #         publication is switched on, default value is used for result name.
3134         #
3135         #  @return New GEOM.GEOM_Object, containing the created prism.
3136         #
3137         #  @ref tui_creation_prism "Example"
3138         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3139             """
3140             Create a shape by extrusion of the base shape along a
3141             vector, defined by two points, in 2 Ways (forward/backward).
3142
3143             Parameters: 
3144                 theBase Base shape to be extruded.
3145                 thePoint1 First end of extrusion vector.
3146                 thePoint2 Second end of extrusion vector.
3147                 theName Object name; when specified, this parameter is used
3148                         for result publication in the study. Otherwise, if automatic
3149                         publication is switched on, default value is used for result name.
3150
3151             Returns:
3152                 New GEOM.GEOM_Object, containing the created prism.
3153             """
3154             # Example: see GEOM_TestAll.py
3155             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3156             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3157             self._autoPublish(anObj, theName, "prism")
3158             return anObj
3159
3160         ## Create a shape by extrusion of the base shape along the vector,
3161         #  i.e. all the space, transfixed by the base shape during its translation
3162         #  along the vector on the given distance.
3163         #  @param theBase Base shape to be extruded.
3164         #  @param theVec Direction of extrusion.
3165         #  @param theH Prism dimension along theVec.
3166         #  @param theScaleFactor Use it to make prism with scaled second base.
3167         #                        Negative value means not scaled second base.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created prism.
3173         #
3174         #  @ref tui_creation_prism "Example"
3175         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3176             """
3177             Create a shape by extrusion of the base shape along the vector,
3178             i.e. all the space, transfixed by the base shape during its translation
3179             along the vector on the given distance.
3180
3181             Parameters: 
3182                 theBase Base shape to be extruded.
3183                 theVec Direction of extrusion.
3184                 theH Prism dimension along theVec.
3185                 theScaleFactor Use it to make prism with scaled second base.
3186                                Negative value means not scaled second base.
3187                 theName Object name; when specified, this parameter is used
3188                         for result publication in the study. Otherwise, if automatic
3189                         publication is switched on, default value is used for result name.
3190
3191             Returns:
3192                 New GEOM.GEOM_Object, containing the created prism.
3193             """
3194             # Example: see GEOM_TestAll.py
3195             anObj = None
3196             Parameters = ""
3197             if theScaleFactor > 0:
3198                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3199                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3200             else:
3201                 theH,Parameters = ParseParameters(theH)
3202                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3203             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3204             anObj.SetParameters(Parameters)
3205             self._autoPublish(anObj, theName, "prism")
3206             return anObj
3207
3208         ## Create a shape by extrusion of the base shape along the vector,
3209         #  i.e. all the space, transfixed by the base shape during its translation
3210         #  along the vector on the given distance in 2 Ways (forward/backward).
3211         #  @param theBase Base shape to be extruded.
3212         #  @param theVec Direction of extrusion.
3213         #  @param theH Prism dimension along theVec in forward direction.
3214         #  @param theName Object name; when specified, this parameter is used
3215         #         for result publication in the study. Otherwise, if automatic
3216         #         publication is switched on, default value is used for result name.
3217         #
3218         #  @return New GEOM.GEOM_Object, containing the created prism.
3219         #
3220         #  @ref tui_creation_prism "Example"
3221         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3222             """
3223             Create a shape by extrusion of the base shape along the vector,
3224             i.e. all the space, transfixed by the base shape during its translation
3225             along the vector on the given distance in 2 Ways (forward/backward).
3226
3227             Parameters:
3228                 theBase Base shape to be extruded.
3229                 theVec Direction of extrusion.
3230                 theH Prism dimension along theVec in forward direction.
3231                 theName Object name; when specified, this parameter is used
3232                         for result publication in the study. Otherwise, if automatic
3233                         publication is switched on, default value is used for result name.
3234
3235             Returns:
3236                 New GEOM.GEOM_Object, containing the created prism.
3237             """
3238             # Example: see GEOM_TestAll.py
3239             theH,Parameters = ParseParameters(theH)
3240             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3241             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "prism")
3244             return anObj
3245
3246         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3247         #  @param theBase Base shape to be extruded.
3248         #  @param theDX, theDY, theDZ Directions of extrusion.
3249         #  @param theScaleFactor Use it to make prism with scaled second base.
3250         #                        Nagative value means not scaled second base.
3251         #  @param theName Object name; when specified, this parameter is used
3252         #         for result publication in the study. Otherwise, if automatic
3253         #         publication is switched on, default value is used for result name.
3254         #
3255         #  @return New GEOM.GEOM_Object, containing the created prism.
3256         #
3257         #  @ref tui_creation_prism "Example"
3258         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3259             """
3260             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3261
3262             Parameters:
3263                 theBase Base shape to be extruded.
3264                 theDX, theDY, theDZ Directions of extrusion.
3265                 theScaleFactor Use it to make prism with scaled second base.
3266                                Nagative value means not scaled second base.
3267                 theName Object name; when specified, this parameter is used
3268                         for result publication in the study. Otherwise, if automatic
3269                         publication is switched on, default value is used for result name.
3270
3271             Returns: 
3272                 New GEOM.GEOM_Object, containing the created prism.
3273             """
3274             # Example: see GEOM_TestAll.py
3275             anObj = None
3276             Parameters = ""
3277             if theScaleFactor > 0:
3278                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3279                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3280             else:
3281                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3282                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3283             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3284             anObj.SetParameters(Parameters)
3285             self._autoPublish(anObj, theName, "prism")
3286             return anObj
3287
3288         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3289         #  i.e. all the space, transfixed by the base shape during its translation
3290         #  along the vector on the given distance in 2 Ways (forward/backward).
3291         #  @param theBase Base shape to be extruded.
3292         #  @param theDX, theDY, theDZ Directions of extrusion.
3293         #  @param theName Object name; when specified, this parameter is used
3294         #         for result publication in the study. Otherwise, if automatic
3295         #         publication is switched on, default value is used for result name.
3296         #
3297         #  @return New GEOM.GEOM_Object, containing the created prism.
3298         #
3299         #  @ref tui_creation_prism "Example"
3300         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3301             """
3302             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3303             i.e. all the space, transfixed by the base shape during its translation
3304             along the vector on the given distance in 2 Ways (forward/backward).
3305
3306             Parameters:
3307                 theBase Base shape to be extruded.
3308                 theDX, theDY, theDZ Directions of extrusion.
3309                 theName Object name; when specified, this parameter is used
3310                         for result publication in the study. Otherwise, if automatic
3311                         publication is switched on, default value is used for result name.
3312
3313             Returns:
3314                 New GEOM.GEOM_Object, containing the created prism.
3315             """
3316             # Example: see GEOM_TestAll.py
3317             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3318             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3319             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3320             anObj.SetParameters(Parameters)
3321             self._autoPublish(anObj, theName, "prism")
3322             return anObj
3323
3324         ## Create a shape by revolution of the base shape around the axis
3325         #  on the given angle, i.e. all the space, transfixed by the base
3326         #  shape during its rotation around the axis on the given angle.
3327         #  @param theBase Base shape to be rotated.
3328         #  @param theAxis Rotation axis.
3329         #  @param theAngle Rotation angle in radians.
3330         #  @param theName Object name; when specified, this parameter is used
3331         #         for result publication in the study. Otherwise, if automatic
3332         #         publication is switched on, default value is used for result name.
3333         #
3334         #  @return New GEOM.GEOM_Object, containing the created revolution.
3335         #
3336         #  @ref tui_creation_revolution "Example"
3337         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3338             """
3339             Create a shape by revolution of the base shape around the axis
3340             on the given angle, i.e. all the space, transfixed by the base
3341             shape during its rotation around the axis on the given angle.
3342
3343             Parameters:
3344                 theBase Base shape to be rotated.
3345                 theAxis Rotation axis.
3346                 theAngle Rotation angle in radians.
3347                 theName Object name; when specified, this parameter is used
3348                         for result publication in the study. Otherwise, if automatic
3349                         publication is switched on, default value is used for result name.
3350
3351             Returns: 
3352                 New GEOM.GEOM_Object, containing the created revolution.
3353             """
3354             # Example: see GEOM_TestAll.py
3355             theAngle,Parameters = ParseParameters(theAngle)
3356             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3357             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3358             anObj.SetParameters(Parameters)
3359             self._autoPublish(anObj, theName, "revolution")
3360             return anObj
3361
3362         ## Create a shape by revolution of the base shape around the axis
3363         #  on the given angle, i.e. all the space, transfixed by the base
3364         #  shape during its rotation around the axis on the given angle in
3365         #  both directions (forward/backward)
3366         #  @param theBase Base shape to be rotated.
3367         #  @param theAxis Rotation axis.
3368         #  @param theAngle Rotation angle in radians.
3369         #  @param theName Object name; when specified, this parameter is used
3370         #         for result publication in the study. Otherwise, if automatic
3371         #         publication is switched on, default value is used for result name.
3372         #
3373         #  @return New GEOM.GEOM_Object, containing the created revolution.
3374         #
3375         #  @ref tui_creation_revolution "Example"
3376         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3377             """
3378             Create a shape by revolution of the base shape around the axis
3379             on the given angle, i.e. all the space, transfixed by the base
3380             shape during its rotation around the axis on the given angle in
3381             both directions (forward/backward).
3382
3383             Parameters:
3384                 theBase Base shape to be rotated.
3385                 theAxis Rotation axis.
3386                 theAngle Rotation angle in radians.
3387                 theName Object name; when specified, this parameter is used
3388                         for result publication in the study. Otherwise, if automatic
3389                         publication is switched on, default value is used for result name.
3390
3391             Returns: 
3392                 New GEOM.GEOM_Object, containing the created revolution.
3393             """
3394             theAngle,Parameters = ParseParameters(theAngle)
3395             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3396             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3397             anObj.SetParameters(Parameters)
3398             self._autoPublish(anObj, theName, "revolution")
3399             return anObj
3400
3401         ## Create a filling from the given compound of contours.
3402         #  @param theShape the compound of contours
3403         #  @param theMinDeg a minimal degree of BSpline surface to create
3404         #  @param theMaxDeg a maximal degree of BSpline surface to create
3405         #  @param theTol2D a 2d tolerance to be reached
3406         #  @param theTol3D a 3d tolerance to be reached
3407         #  @param theNbIter a number of iteration of approximation algorithm
3408         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3409         #  @param isApprox if True, BSpline curves are generated in the process
3410         #                  of surface construction. By default it is False, that means
3411         #                  the surface is created using given curves. The usage of
3412         #                  Approximation makes the algorithm work slower, but allows
3413         #                  building the surface for rather complex cases.
3414         #  @param theName Object name; when specified, this parameter is used
3415         #         for result publication in the study. Otherwise, if automatic
3416         #         publication is switched on, default value is used for result name.
3417         #
3418         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3419         #
3420         #  @ref tui_creation_filling "Example"
3421         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3422                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3423             """
3424             Create a filling from the given compound of contours.
3425
3426             Parameters:
3427                 theShape the compound of contours
3428                 theMinDeg a minimal degree of BSpline surface to create
3429                 theMaxDeg a maximal degree of BSpline surface to create
3430                 theTol2D a 2d tolerance to be reached
3431                 theTol3D a 3d tolerance to be reached
3432                 theNbIter a number of iteration of approximation algorithm
3433                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3434                 isApprox if True, BSpline curves are generated in the process
3435                          of surface construction. By default it is False, that means
3436                          the surface is created using given curves. The usage of
3437                          Approximation makes the algorithm work slower, but allows
3438                          building the surface for rather complex cases
3439                 theName Object name; when specified, this parameter is used
3440                         for result publication in the study. Otherwise, if automatic
3441                         publication is switched on, default value is used for result name.
3442
3443             Returns: 
3444                 New GEOM.GEOM_Object, containing the created filling surface.
3445
3446             Example of usage:
3447                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3448             """
3449             # Example: see GEOM_TestAll.py
3450             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3451             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3452                                             theTol2D, theTol3D, theNbIter,
3453                                             theMethod, isApprox)
3454             RaiseIfFailed("MakeFilling", self.PrimOp)
3455             anObj.SetParameters(Parameters)
3456             self._autoPublish(anObj, theName, "filling")
3457             return anObj
3458
3459
3460         ## Create a filling from the given compound of contours.
3461         #  This method corresponds to MakeFilling with isApprox=True
3462         #  @param theShape the compound of contours
3463         #  @param theMinDeg a minimal degree of BSpline surface to create
3464         #  @param theMaxDeg a maximal degree of BSpline surface to create
3465         #  @param theTol3D a 3d tolerance to be reached
3466         #  @param theName Object name; when specified, this parameter is used
3467         #         for result publication in the study. Otherwise, if automatic
3468         #         publication is switched on, default value is used for result name.
3469         #
3470         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3471         #
3472         #  @ref tui_creation_filling "Example"
3473         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3474             """
3475             Create a filling from the given compound of contours.
3476             This method corresponds to MakeFilling with isApprox=True
3477
3478             Parameters:
3479                 theShape the compound of contours
3480                 theMinDeg a minimal degree of BSpline surface to create
3481                 theMaxDeg a maximal degree of BSpline surface to create
3482                 theTol3D a 3d tolerance to be reached
3483                 theName Object name; when specified, this parameter is used
3484                         for result publication in the study. Otherwise, if automatic
3485                         publication is switched on, default value is used for result name.
3486
3487             Returns: 
3488                 New GEOM.GEOM_Object, containing the created filling surface.
3489
3490             Example of usage:
3491                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3492             """
3493             # Example: see GEOM_TestAll.py
3494             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3495             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3496                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3497             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3498             anObj.SetParameters(Parameters)
3499             self._autoPublish(anObj, theName, "filling")
3500             return anObj
3501
3502         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3503         #  @param theSeqSections - set of specified sections.
3504         #  @param theModeSolid - mode defining building solid or shell
3505         #  @param thePreci - precision 3D used for smoothing
3506         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3512         #
3513         #  @ref swig_todo "Example"
3514         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3515             """
3516             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3517
3518             Parameters:
3519                 theSeqSections - set of specified sections.
3520                 theModeSolid - mode defining building solid or shell
3521                 thePreci - precision 3D used for smoothing
3522                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3523                 theName Object name; when specified, this parameter is used
3524                         for result publication in the study. Otherwise, if automatic
3525                         publication is switched on, default value is used for result name.
3526
3527             Returns:
3528                 New GEOM.GEOM_Object, containing the created shell or solid.
3529             """
3530             # Example: see GEOM_TestAll.py
3531             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3532             RaiseIfFailed("MakeThruSections", self.PrimOp)
3533             self._autoPublish(anObj, theName, "filling")
3534             return anObj
3535
3536         ## Create a shape by extrusion of the base shape along
3537         #  the path shape. The path shape can be a wire or an edge.
3538         #  @param theBase Base shape to be extruded.
3539         #  @param thePath Path shape to extrude the base shape along it.
3540         #  @param theName Object name; when specified, this parameter is used
3541         #         for result publication in the study. Otherwise, if automatic
3542         #         publication is switched on, default value is used for result name.
3543         #
3544         #  @return New GEOM.GEOM_Object, containing the created pipe.
3545         #
3546         #  @ref tui_creation_pipe "Example"
3547         def MakePipe(self, theBase, thePath, theName=None):
3548             """
3549             Create a shape by extrusion of the base shape along
3550             the path shape. The path shape can be a wire or an edge.
3551
3552             Parameters:
3553                 theBase Base shape to be extruded.
3554                 thePath Path shape to extrude the base shape along it.
3555                 theName Object name; when specified, this parameter is used
3556                         for result publication in the study. Otherwise, if automatic
3557                         publication is switched on, default value is used for result name.
3558
3559             Returns:
3560                 New GEOM.GEOM_Object, containing the created pipe.
3561             """
3562             # Example: see GEOM_TestAll.py
3563             anObj = self.PrimOp.MakePipe(theBase, thePath)
3564             RaiseIfFailed("MakePipe", self.PrimOp)
3565             self._autoPublish(anObj, theName, "pipe")
3566             return anObj
3567
3568         ## Create a shape by extrusion of the profile shape along
3569         #  the path shape. The path shape can be a wire or an edge.
3570         #  the several profiles can be specified in the several locations of path.
3571         #  @param theSeqBases - list of  Bases shape to be extruded.
3572         #  @param theLocations - list of locations on the path corresponding
3573         #                        specified list of the Bases shapes. Number of locations
3574         #                        should be equal to number of bases or list of locations can be empty.
3575         #  @param thePath - Path shape to extrude the base shape along it.
3576         #  @param theWithContact - the mode defining that the section is translated to be in
3577         #                          contact with the spine.
3578         #  @param theWithCorrection - defining that the section is rotated to be
3579         #                             orthogonal to the spine tangent in the correspondent point
3580         #  @param theName Object name; when specified, this parameter is used
3581         #         for result publication in the study. Otherwise, if automatic
3582         #         publication is switched on, default value is used for result name.
3583         #
3584         #  @return New GEOM.GEOM_Object, containing the created pipe.
3585         #
3586         #  @ref tui_creation_pipe_with_diff_sec "Example"
3587         def MakePipeWithDifferentSections(self, theSeqBases,
3588                                           theLocations, thePath,
3589                                           theWithContact, theWithCorrection, theName=None):
3590             """
3591             Create a shape by extrusion of the profile shape along
3592             the path shape. The path shape can be a wire or an edge.
3593             the several profiles can be specified in the several locations of path.
3594
3595             Parameters:
3596                 theSeqBases - list of  Bases shape to be extruded.
3597                 theLocations - list of locations on the path corresponding
3598                                specified list of the Bases shapes. Number of locations
3599                                should be equal to number of bases or list of locations can be empty.
3600                 thePath - Path shape to extrude the base shape along it.
3601                 theWithContact - the mode defining that the section is translated to be in
3602                                  contact with the spine(0/1)
3603                 theWithCorrection - defining that the section is rotated to be
3604                                     orthogonal to the spine tangent in the correspondent point (0/1)
3605                 theName Object name; when specified, this parameter is used
3606                         for result publication in the study. Otherwise, if automatic
3607                         publication is switched on, default value is used for result name.
3608
3609             Returns:
3610                 New GEOM.GEOM_Object, containing the created pipe.
3611             """
3612             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3613                                                               theLocations, thePath,
3614                                                               theWithContact, theWithCorrection)
3615             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3616             self._autoPublish(anObj, theName, "pipe")
3617             return anObj
3618
3619         ## Create a shape by extrusion of the profile shape along
3620         #  the path shape. The path shape can be a wire or a edge.
3621         #  the several profiles can be specified in the several locations of path.
3622         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3623         #                       shell or face. If number of faces in neighbour sections
3624         #                       aren't coincided result solid between such sections will
3625         #                       be created using external boundaries of this shells.
3626         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3627         #                          This list is used for searching correspondences between
3628         #                          faces in the sections. Size of this list must be equal
3629         #                          to size of list of base shapes.
3630         #  @param theLocations - list of locations on the path corresponding
3631         #                        specified list of the Bases shapes. Number of locations
3632         #                        should be equal to number of bases. First and last
3633         #                        locations must be coincided with first and last vertexes
3634         #                        of path correspondingly.
3635         #  @param thePath - Path shape to extrude the base shape along it.
3636         #  @param theWithContact - the mode defining that the section is translated to be in
3637         #                          contact with the spine.
3638         #  @param theWithCorrection - defining that the section is rotated to be
3639         #                             orthogonal to the spine tangent in the correspondent point
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created solids.
3645         #
3646         #  @ref tui_creation_pipe_with_shell_sec "Example"
3647         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3648                                       theLocations, thePath,
3649                                       theWithContact, theWithCorrection, theName=None):
3650             """
3651             Create a shape by extrusion of the profile shape along
3652             the path shape. The path shape can be a wire or a edge.
3653             the several profiles can be specified in the several locations of path.
3654
3655             Parameters:
3656                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3657                               shell or face. If number of faces in neighbour sections
3658                               aren't coincided result solid between such sections will
3659                               be created using external boundaries of this shells.
3660                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3661                                  This list is used for searching correspondences between
3662                                  faces in the sections. Size of this list must be equal
3663                                  to size of list of base shapes.
3664                 theLocations - list of locations on the path corresponding
3665                                specified list of the Bases shapes. Number of locations
3666                                should be equal to number of bases. First and last
3667                                locations must be coincided with first and last vertexes
3668                                of path correspondingly.
3669                 thePath - Path shape to extrude the base shape along it.
3670                 theWithContact - the mode defining that the section is translated to be in
3671                                  contact with the spine (0/1)
3672                 theWithCorrection - defining that the section is rotated to be
3673                                     orthogonal to the spine tangent in the correspondent point (0/1)
3674                 theName Object name; when specified, this parameter is used
3675                         for result publication in the study. Otherwise, if automatic
3676                         publication is switched on, default value is used for result name.
3677
3678             Returns:                           
3679                 New GEOM.GEOM_Object, containing the created solids.
3680             """
3681             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3682                                                           theLocations, thePath,
3683                                                           theWithContact, theWithCorrection)
3684             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3685             self._autoPublish(anObj, theName, "pipe")
3686             return anObj
3687
3688         ## Create a shape by extrusion of the profile shape along
3689         #  the path shape. This function is used only for debug pipe
3690         #  functionality - it is a version of function MakePipeWithShellSections()
3691         #  which give a possibility to recieve information about
3692         #  creating pipe between each pair of sections step by step.
3693         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3694                                              theLocations, thePath,
3695                                              theWithContact, theWithCorrection, theName=None):
3696             """
3697             Create a shape by extrusion of the profile shape along
3698             the path shape. This function is used only for debug pipe
3699             functionality - it is a version of previous function
3700             geompy.MakePipeWithShellSections() which give a possibility to
3701             recieve information about creating pipe between each pair of
3702             sections step by step.
3703             """
3704             res = []
3705             nbsect = len(theSeqBases)
3706             nbsubsect = len(theSeqSubBases)
3707             #print "nbsect = ",nbsect
3708             for i in range(1,nbsect):
3709                 #print "  i = ",i
3710                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3711                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3712                 tmpSeqSubBases = []
3713                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3714                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3715                                                               tmpLocations, thePath,
3716                                                               theWithContact, theWithCorrection)
3717                 if self.PrimOp.IsDone() == 0:
3718                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3719                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3720                     break
3721                 else:
3722                     print "Pipe between ",i," and ",i+1," sections is OK"
3723                     res.append(anObj)
3724                     pass
3725                 pass
3726
3727             resc = self.MakeCompound(res)
3728             #resc = self.MakeSewing(res, 0.001)
3729             #print "resc: ",resc
3730             self._autoPublish(resc, theName, "pipe")
3731             return resc
3732
3733         ## Create solids between given sections
3734         #  @param theSeqBases - list of sections (shell or face).
3735         #  @param theLocations - list of corresponding vertexes
3736         #  @param theName Object name; when specified, this parameter is used
3737         #         for result publication in the study. Otherwise, if automatic
3738         #         publication is switched on, default value is used for result name.
3739         #
3740         #  @return New GEOM.GEOM_Object, containing the created solids.
3741         #
3742         #  @ref tui_creation_pipe_without_path "Example"
3743         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3744             """
3745             Create solids between given sections
3746
3747             Parameters:
3748                 theSeqBases - list of sections (shell or face).
3749                 theLocations - list of corresponding vertexes
3750                 theName Object name; when specified, this parameter is used
3751                         for result publication in the study. Otherwise, if automatic
3752                         publication is switched on, default value is used for result name.
3753
3754             Returns:
3755                 New GEOM.GEOM_Object, containing the created solids.
3756             """
3757             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3758             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3759             self._autoPublish(anObj, theName, "pipe")
3760             return anObj
3761
3762         ## Create a shape by extrusion of the base shape along
3763         #  the path shape with constant bi-normal direction along the given vector.
3764         #  The path shape can be a wire or an edge.
3765         #  @param theBase Base shape to be extruded.
3766         #  @param thePath Path shape to extrude the base shape along it.
3767         #  @param theVec Vector defines a constant binormal direction to keep the
3768         #                same angle beetween the direction and the sections
3769         #                along the sweep surface.
3770         #  @param theName Object name; when specified, this parameter is used
3771         #         for result publication in the study. Otherwise, if automatic
3772         #         publication is switched on, default value is used for result name.
3773         #
3774         #  @return New GEOM.GEOM_Object, containing the created pipe.
3775         #
3776         #  @ref tui_creation_pipe "Example"
3777         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3778             """
3779             Create a shape by extrusion of the base shape along
3780             the path shape with constant bi-normal direction along the given vector.
3781             The path shape can be a wire or an edge.
3782
3783             Parameters:
3784                 theBase Base shape to be extruded.
3785                 thePath Path shape to extrude the base shape along it.
3786                 theVec Vector defines a constant binormal direction to keep the
3787                        same angle beetween the direction and the sections
3788                        along the sweep surface.
3789                 theName Object name; when specified, this parameter is used
3790                         for result publication in the study. Otherwise, if automatic
3791                         publication is switched on, default value is used for result name.
3792
3793             Returns:              
3794                 New GEOM.GEOM_Object, containing the created pipe.
3795             """
3796             # Example: see GEOM_TestAll.py
3797             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3798             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3799             self._autoPublish(anObj, theName, "pipe")
3800             return anObj
3801               
3802         ## Makes a thick solid from a face or a shell
3803         #  @param theShape Face or Shell to be thicken
3804         #  @param theThickness Thickness of the resulting solid
3805         #  @param theName Object name; when specified, this parameter is used
3806         #         for result publication in the study. Otherwise, if automatic
3807         #         publication is switched on, default value is used for result name.
3808         #
3809         #  @return New GEOM.GEOM_Object, containing the created solid
3810         #
3811         def MakeThickSolid(self, theShape, theThickness, theName=None):
3812             """
3813             Make a thick solid from a face or a shell
3814
3815             Parameters:
3816                  theShape Face or Shell to be thicken
3817                  theThickness Thickness of the resulting solid
3818                  theName Object name; when specified, this parameter is used
3819                  for result publication in the study. Otherwise, if automatic
3820                  publication is switched on, default value is used for result name.
3821                  
3822             Returns:
3823                 New GEOM.GEOM_Object, containing the created solid
3824             """
3825             # Example: see GEOM_TestAll.py
3826             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3827             RaiseIfFailed("MakeThickening", self.PrimOp)
3828             self._autoPublish(anObj, theName, "pipe")
3829             return anObj
3830             
3831
3832         ## Modifies a face or a shell to make it a thick solid
3833         #  @param theShape Face or Shell to be thicken
3834         #  @param theThickness Thickness of the resulting solid
3835         #
3836         #  @return The modified shape
3837         #
3838         def Thicken(self, theShape, theThickness):
3839             """
3840             Modifies a face or a shell to make it a thick solid
3841
3842             Parameters:
3843                 theBase Base shape to be extruded.
3844                 thePath Path shape to extrude the base shape along it.
3845                 theName Object name; when specified, this parameter is used
3846                         for result publication in the study. Otherwise, if automatic
3847                         publication is switched on, default value is used for result name.
3848
3849             Returns:
3850                 The modified shape
3851             """
3852             # Example: see GEOM_TestAll.py
3853             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3854             RaiseIfFailed("MakeThickening", self.PrimOp)
3855             return anObj
3856
3857         ## Build a middle path of a pipe-like shape.
3858         #  The path shape can be a wire or an edge.
3859         #  @param theShape It can be closed or unclosed pipe-like shell
3860         #                  or a pipe-like solid.
3861         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3862         #                            should be wires or faces of theShape.
3863         #  @param theName Object name; when specified, this parameter is used
3864         #         for result publication in the study. Otherwise, if automatic
3865         #         publication is switched on, default value is used for result name.
3866         #
3867         #  @note It is not assumed that exact or approximate copy of theShape
3868         #        can be obtained by applying existing Pipe operation on the
3869         #        resulting "Path" wire taking theBase1 as the base - it is not
3870         #        always possible; though in some particular cases it might work
3871         #        it is not guaranteed. Thus, RestorePath function should not be
3872         #        considered as an exact reverse operation of the Pipe.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3875         #                                source pipe's "path".
3876         #
3877         #  @ref tui_creation_pipe_path "Example"
3878         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3879             """
3880             Build a middle path of a pipe-like shape.
3881             The path shape can be a wire or an edge.
3882
3883             Parameters:
3884                 theShape It can be closed or unclosed pipe-like shell
3885                          or a pipe-like solid.
3886                 theBase1, theBase2 Two bases of the supposed pipe. This
3887                                    should be wires or faces of theShape.
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM_Object, containing an edge or wire that represent
3894                                  source pipe's path.
3895             """
3896             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3897             RaiseIfFailed("RestorePath", self.PrimOp)
3898             self._autoPublish(anObj, theName, "path")
3899             return anObj
3900
3901         ## Build a middle path of a pipe-like shape.
3902         #  The path shape can be a wire or an edge.
3903         #  @param theShape It can be closed or unclosed pipe-like shell
3904         #                  or a pipe-like solid.
3905         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3906         #                                should be lists of edges of theShape.
3907         #  @param theName Object name; when specified, this parameter is used
3908         #         for result publication in the study. Otherwise, if automatic
3909         #         publication is switched on, default value is used for result name.
3910         #
3911         #  @note It is not assumed that exact or approximate copy of theShape
3912         #        can be obtained by applying existing Pipe operation on the
3913         #        resulting "Path" wire taking theBase1 as the base - it is not
3914         #        always possible; though in some particular cases it might work
3915         #        it is not guaranteed. Thus, RestorePath function should not be
3916         #        considered as an exact reverse operation of the Pipe.
3917         #
3918         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3919         #                                source pipe's "path".
3920         #
3921         #  @ref tui_creation_pipe_path "Example"
3922         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3923             """
3924             Build a middle path of a pipe-like shape.
3925             The path shape can be a wire or an edge.
3926
3927             Parameters:
3928                 theShape It can be closed or unclosed pipe-like shell
3929                          or a pipe-like solid.
3930                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3931                                        should be lists of edges of theShape.
3932                 theName Object name; when specified, this parameter is used
3933                         for result publication in the study. Otherwise, if automatic
3934                         publication is switched on, default value is used for result name.
3935
3936             Returns:
3937                 New GEOM_Object, containing an edge or wire that represent
3938                                  source pipe's path.
3939             """
3940             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3941             RaiseIfFailed("RestorePath", self.PrimOp)
3942             self._autoPublish(anObj, theName, "path")
3943             return anObj
3944
3945         # end of l3_complex
3946         ## @}
3947
3948         ## @addtogroup l3_advanced
3949         ## @{
3950
3951         ## Create a linear edge with specified ends.
3952         #  @param thePnt1 Point for the first end of edge.
3953         #  @param thePnt2 Point for the second end of edge.
3954         #  @param theName Object name; when specified, this parameter is used
3955         #         for result publication in the study. Otherwise, if automatic
3956         #         publication is switched on, default value is used for result name.
3957         #
3958         #  @return New GEOM.GEOM_Object, containing the created edge.
3959         #
3960         #  @ref tui_creation_edge "Example"
3961         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3962             """
3963             Create a linear edge with specified ends.
3964
3965             Parameters:
3966                 thePnt1 Point for the first end of edge.
3967                 thePnt2 Point for the second end of edge.
3968                 theName Object name; when specified, this parameter is used
3969                         for result publication in the study. Otherwise, if automatic
3970                         publication is switched on, default value is used for result name.
3971
3972             Returns:           
3973                 New GEOM.GEOM_Object, containing the created edge.
3974             """
3975             # Example: see GEOM_TestAll.py
3976             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3977             RaiseIfFailed("MakeEdge", self.ShapesOp)
3978             self._autoPublish(anObj, theName, "edge")
3979             return anObj
3980
3981         ## Create a new edge, corresponding to the given length on the given curve.
3982         #  @param theRefCurve The referenced curve (edge).
3983         #  @param theLength Length on the referenced curve. It can be negative.
3984         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3985         #                       at the end of \a theRefCurve, close to the selected point.
3986         #                       If None, start from the first point of \a theRefCurve.
3987         #  @param theName Object name; when specified, this parameter is used
3988         #         for result publication in the study. Otherwise, if automatic
3989         #         publication is switched on, default value is used for result name.
3990         #
3991         #  @return New GEOM.GEOM_Object, containing the created edge.
3992         #
3993         #  @ref tui_creation_edge "Example"
3994         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3995             """
3996             Create a new edge, corresponding to the given length on the given curve.
3997
3998             Parameters:
3999                 theRefCurve The referenced curve (edge).
4000                 theLength Length on the referenced curve. It can be negative.
4001                 theStartPoint Any point can be selected for it, the new edge will begin
4002                               at the end of theRefCurve, close to the selected point.
4003                               If None, start from the first point of theRefCurve.
4004                 theName Object name; when specified, this parameter is used
4005                         for result publication in the study. Otherwise, if automatic
4006                         publication is switched on, default value is used for result name.
4007
4008             Returns:              
4009                 New GEOM.GEOM_Object, containing the created edge.
4010             """
4011             # Example: see GEOM_TestAll.py
4012             theLength, Parameters = ParseParameters(theLength)
4013             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4014             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4015             anObj.SetParameters(Parameters)
4016             self._autoPublish(anObj, theName, "edge")
4017             return anObj
4018
4019         ## Create an edge from specified wire.
4020         #  @param theWire source Wire
4021         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4022         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4023         #  @param theName Object name; when specified, this parameter is used
4024         #         for result publication in the study. Otherwise, if automatic
4025         #         publication is switched on, default value is used for result name.
4026         #
4027         #  @return New GEOM.GEOM_Object, containing the created edge.
4028         #
4029         #  @ref tui_creation_edge "Example"
4030         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4031             """
4032             Create an edge from specified wire.
4033
4034             Parameters:
4035                 theWire source Wire
4036                 theLinearTolerance linear tolerance value (default = 1e-07)
4037                 theAngularTolerance angular tolerance value (default = 1e-12)
4038                 theName Object name; when specified, this parameter is used
4039                         for result publication in the study. Otherwise, if automatic
4040                         publication is switched on, default value is used for result name.
4041
4042             Returns:
4043                 New GEOM.GEOM_Object, containing the created edge.
4044             """
4045             # Example: see GEOM_TestAll.py
4046             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4047             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4048             self._autoPublish(anObj, theName, "edge")
4049             return anObj
4050
4051         ## Create a wire from the set of edges and wires.
4052         #  @param theEdgesAndWires List of edges and/or wires.
4053         #  @param theTolerance Maximum distance between vertices, that will be merged.
4054         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4055         #  @param theName Object name; when specified, this parameter is used
4056         #         for result publication in the study. Otherwise, if automatic
4057         #         publication is switched on, default value is used for result name.
4058         #
4059         #  @return New GEOM.GEOM_Object, containing the created wire.
4060         #
4061         #  @ref tui_creation_wire "Example"
4062         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4063             """
4064             Create a wire from the set of edges and wires.
4065
4066             Parameters:
4067                 theEdgesAndWires List of edges and/or wires.
4068                 theTolerance Maximum distance between vertices, that will be merged.
4069                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4070                 theName Object name; when specified, this parameter is used
4071                         for result publication in the study. Otherwise, if automatic
4072                         publication is switched on, default value is used for result name.
4073
4074             Returns:                    
4075                 New GEOM.GEOM_Object, containing the created wire.
4076             """
4077             # Example: see GEOM_TestAll.py
4078             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4079             RaiseIfFailed("MakeWire", self.ShapesOp)
4080             self._autoPublish(anObj, theName, "wire")
4081             return anObj
4082
4083         ## Create a face on the given wire.
4084         #  @param theWire closed Wire or Edge to build the face on.
4085         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4086         #                        If the tolerance of the obtained planar face is less
4087         #                        than 1e-06, this face will be returned, otherwise the
4088         #                        algorithm tries to build any suitable face on the given
4089         #                        wire and prints a warning message.
4090         #  @param theName Object name; when specified, this parameter is used
4091         #         for result publication in the study. Otherwise, if automatic
4092         #         publication is switched on, default value is used for result name.
4093         #
4094         #  @return New GEOM.GEOM_Object, containing the created face.
4095         #
4096         #  @ref tui_creation_face "Example"
4097         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4098             """
4099             Create a face on the given wire.
4100
4101             Parameters:
4102                 theWire closed Wire or Edge to build the face on.
4103                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4104                                If the tolerance of the obtained planar face is less
4105                                than 1e-06, this face will be returned, otherwise the
4106                                algorithm tries to build any suitable face on the given
4107                                wire and prints a warning message.
4108                 theName Object name; when specified, this parameter is used
4109                         for result publication in the study. Otherwise, if automatic
4110                         publication is switched on, default value is used for result name.
4111
4112             Returns:
4113                 New GEOM.GEOM_Object, containing the created face.
4114             """
4115             # Example: see GEOM_TestAll.py
4116             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4117             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4118                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4119             else:
4120                 RaiseIfFailed("MakeFace", self.ShapesOp)
4121             self._autoPublish(anObj, theName, "face")
4122             return anObj
4123
4124         ## Create a face on the given wires set.
4125         #  @param theWires List of closed wires or edges to build the face on.
4126         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4127         #                        If the tolerance of the obtained planar face is less
4128         #                        than 1e-06, this face will be returned, otherwise the
4129         #                        algorithm tries to build any suitable face on the given
4130         #                        wire and prints a warning message.
4131         #  @param theName Object name; when specified, this parameter is used
4132         #         for result publication in the study. Otherwise, if automatic
4133         #         publication is switched on, default value is used for result name.
4134         #
4135         #  @return New GEOM.GEOM_Object, containing the created face.
4136         #
4137         #  @ref tui_creation_face "Example"
4138         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4139             """
4140             Create a face on the given wires set.
4141
4142             Parameters:
4143                 theWires List of closed wires or edges to build the face on.
4144                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4145                                If the tolerance of the obtained planar face is less
4146                                than 1e-06, this face will be returned, otherwise the
4147                                algorithm tries to build any suitable face on the given
4148                                wire and prints a warning message.
4149                 theName Object name; when specified, this parameter is used
4150                         for result publication in the study. Otherwise, if automatic
4151                         publication is switched on, default value is used for result name.
4152
4153             Returns: 
4154                 New GEOM.GEOM_Object, containing the created face.
4155             """
4156             # Example: see GEOM_TestAll.py
4157             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4158             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4159                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4160             else:
4161                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4162             self._autoPublish(anObj, theName, "face")
4163             return anObj
4164
4165         ## See MakeFaceWires() method for details.
4166         #
4167         #  @ref tui_creation_face "Example 1"
4168         #  \n @ref swig_MakeFaces  "Example 2"
4169         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4170             """
4171             See geompy.MakeFaceWires() method for details.
4172             """
4173             # Example: see GEOM_TestOthers.py
4174             # note: auto-publishing is done in self.MakeFaceWires()
4175             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4176             return anObj
4177
4178         ## Create a shell from the set of faces and shells.
4179         #  @param theFacesAndShells List of faces and/or shells.
4180         #  @param theName Object name; when specified, this parameter is used
4181         #         for result publication in the study. Otherwise, if automatic
4182         #         publication is switched on, default value is used for result name.
4183         #
4184         #  @return New GEOM.GEOM_Object, containing the created shell.
4185         #
4186         #  @ref tui_creation_shell "Example"
4187         def MakeShell(self, theFacesAndShells, theName=None):
4188             """
4189             Create a shell from the set of faces and shells.
4190
4191             Parameters:
4192                 theFacesAndShells List of faces and/or shells.
4193                 theName Object name; when specified, this parameter is used
4194                         for result publication in the study. Otherwise, if automatic
4195                         publication is switched on, default value is used for result name.
4196
4197             Returns:
4198                 New GEOM.GEOM_Object, containing the created shell.
4199             """
4200             # Example: see GEOM_TestAll.py
4201             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4202             RaiseIfFailed("MakeShell", self.ShapesOp)
4203             self._autoPublish(anObj, theName, "shell")
4204             return anObj
4205
4206         ## Create a solid, bounded by the given shells.
4207         #  @param theShells Sequence of bounding shells.
4208         #  @param theName Object name; when specified, this parameter is used
4209         #         for result publication in the study. Otherwise, if automatic
4210         #         publication is switched on, default value is used for result name.
4211         #
4212         #  @return New GEOM.GEOM_Object, containing the created solid.
4213         #
4214         #  @ref tui_creation_solid "Example"
4215         def MakeSolid(self, theShells, theName=None):
4216             """
4217             Create a solid, bounded by the given shells.
4218
4219             Parameters:
4220                 theShells Sequence of bounding shells.
4221                 theName Object name; when specified, this parameter is used
4222                         for result publication in the study. Otherwise, if automatic
4223                         publication is switched on, default value is used for result name.
4224
4225             Returns:
4226                 New GEOM.GEOM_Object, containing the created solid.
4227             """
4228             # Example: see GEOM_TestAll.py
4229             if len(theShells) == 1:
4230                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4231                 #if len(descr) > 0:
4232                 #    raise RuntimeError, "MakeSolidShells : " + descr
4233                 if descr == "WRN_SHAPE_UNCLOSED":
4234                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4235             anObj = self.ShapesOp.MakeSolidShells(theShells)
4236             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4237             self._autoPublish(anObj, theName, "solid")
4238             return anObj
4239
4240         ## Create a compound of the given shapes.
4241         #  @param theShapes List of shapes to put in compound.
4242         #  @param theName Object name; when specified, this parameter is used
4243         #         for result publication in the study. Otherwise, if automatic
4244         #         publication is switched on, default value is used for result name.
4245         #
4246         #  @return New GEOM.GEOM_Object, containing the created compound.
4247         #
4248         #  @ref tui_creation_compound "Example"
4249         def MakeCompound(self, theShapes, theName=None):
4250             """
4251             Create a compound of the given shapes.
4252
4253             Parameters:
4254                 theShapes List of shapes to put in compound.
4255                 theName Object name; when specified, this parameter is used
4256                         for result publication in the study. Otherwise, if automatic
4257                         publication is switched on, default value is used for result name.
4258
4259             Returns:
4260                 New GEOM.GEOM_Object, containing the created compound.
4261             """
4262             # Example: see GEOM_TestAll.py
4263             anObj = self.ShapesOp.MakeCompound(theShapes)
4264             RaiseIfFailed("MakeCompound", self.ShapesOp)
4265             self._autoPublish(anObj, theName, "compound")
4266             return anObj
4267
4268         # end of l3_advanced
4269         ## @}
4270
4271         ## @addtogroup l2_measure
4272         ## @{
4273
4274         ## Gives quantity of faces in the given shape.
4275         #  @param theShape Shape to count faces of.
4276         #  @return Quantity of faces.
4277         #
4278         #  @ref swig_NumberOf "Example"
4279         def NumberOfFaces(self, theShape):
4280             """
4281             Gives quantity of faces in the given shape.
4282
4283             Parameters:
4284                 theShape Shape to count faces of.
4285
4286             Returns:    
4287                 Quantity of faces.
4288             """
4289             # Example: see GEOM_TestOthers.py
4290             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4291             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4292             return nb_faces
4293
4294         ## Gives quantity of edges in the given shape.
4295         #  @param theShape Shape to count edges of.
4296         #  @return Quantity of edges.
4297         #
4298         #  @ref swig_NumberOf "Example"
4299         def NumberOfEdges(self, theShape):
4300             """
4301             Gives quantity of edges in the given shape.
4302
4303             Parameters:
4304                 theShape Shape to count edges of.
4305
4306             Returns:    
4307                 Quantity of edges.
4308             """
4309             # Example: see GEOM_TestOthers.py
4310             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4311             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4312             return nb_edges
4313
4314         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4315         #  @param theShape Shape to count sub-shapes of.
4316         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4317         #  @return Quantity of sub-shapes of given type.
4318         #
4319         #  @ref swig_NumberOf "Example"
4320         def NumberOfSubShapes(self, theShape, theShapeType):
4321             """
4322             Gives quantity of sub-shapes of type theShapeType in the given shape.
4323
4324             Parameters:
4325                 theShape Shape to count sub-shapes of.
4326                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4327
4328             Returns:
4329                 Quantity of sub-shapes of given type.
4330             """
4331             # Example: see GEOM_TestOthers.py
4332             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4333             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4334             return nb_ss
4335
4336         ## Gives quantity of solids in the given shape.
4337         #  @param theShape Shape to count solids in.
4338         #  @return Quantity of solids.
4339         #
4340         #  @ref swig_NumberOf "Example"
4341         def NumberOfSolids(self, theShape):
4342             """
4343             Gives quantity of solids in the given shape.
4344
4345             Parameters:
4346                 theShape Shape to count solids in.
4347
4348             Returns:
4349                 Quantity of solids.
4350             """
4351             # Example: see GEOM_TestOthers.py
4352             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4353             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4354             return nb_solids
4355
4356         # end of l2_measure
4357         ## @}
4358
4359         ## @addtogroup l3_healing
4360         ## @{
4361
4362         ## Reverses an orientation the given shape.
4363         #  @param theShape Shape to be reversed.
4364         #  @param theName Object name; when specified, this parameter is used
4365         #         for result publication in the study. Otherwise, if automatic
4366         #         publication is switched on, default value is used for result name.
4367         #
4368         #  @return The reversed copy of theShape.
4369         #
4370         #  @ref swig_ChangeOrientation "Example"
4371         def ChangeOrientation(self, theShape, theName=None):
4372             """
4373             Reverses an orientation the given shape.
4374
4375             Parameters:
4376                 theShape Shape to be reversed.
4377                 theName Object name; when specified, this parameter is used
4378                         for result publication in the study. Otherwise, if automatic
4379                         publication is switched on, default value is used for result name.
4380
4381             Returns:   
4382                 The reversed copy of theShape.
4383             """
4384             # Example: see GEOM_TestAll.py
4385             anObj = self.ShapesOp.ChangeOrientation(theShape)
4386             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4387             self._autoPublish(anObj, theName, "reversed")
4388             return anObj
4389
4390         ## See ChangeOrientation() method for details.
4391         #
4392         #  @ref swig_OrientationChange "Example"
4393         def OrientationChange(self, theShape, theName=None):
4394             """
4395             See geompy.ChangeOrientation method for details.
4396             """
4397             # Example: see GEOM_TestOthers.py
4398             # note: auto-publishing is done in self.ChangeOrientation()
4399             anObj = self.ChangeOrientation(theShape, theName)
4400             return anObj
4401
4402         # end of l3_healing
4403         ## @}
4404
4405         ## @addtogroup l4_obtain
4406         ## @{
4407
4408         ## Retrieve all free faces from the given shape.
4409         #  Free face is a face, which is not shared between two shells of the shape.
4410         #  @param theShape Shape to find free faces in.
4411         #  @return List of IDs of all free faces, contained in theShape.
4412         #
4413         #  @ref tui_measurement_tools_page "Example"
4414         def GetFreeFacesIDs(self,theShape):
4415             """
4416             Retrieve all free faces from the given shape.
4417             Free face is a face, which is not shared between two shells of the shape.
4418
4419             Parameters:
4420                 theShape Shape to find free faces in.
4421
4422             Returns:
4423                 List of IDs of all free faces, contained in theShape.
4424             """
4425             # Example: see GEOM_TestOthers.py
4426             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4427             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4428             return anIDs
4429
4430         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4431         #  @param theShape1 Shape to find sub-shapes in.
4432         #  @param theShape2 Shape to find shared sub-shapes with.
4433         #  @param theShapeType Type of sub-shapes to be retrieved.
4434         #  @param theName Object name; when specified, this parameter is used
4435         #         for result publication in the study. Otherwise, if automatic
4436         #         publication is switched on, default value is used for result name.
4437         #
4438         #  @return List of sub-shapes of theShape1, shared with theShape2.
4439         #
4440         #  @ref swig_GetSharedShapes "Example"
4441         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4442             """
4443             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4444
4445             Parameters:
4446                 theShape1 Shape to find sub-shapes in.
4447                 theShape2 Shape to find shared sub-shapes with.
4448                 theShapeType Type of sub-shapes to be retrieved.
4449                 theName Object name; when specified, this parameter is used
4450                         for result publication in the study. Otherwise, if automatic
4451                         publication is switched on, default value is used for result name.
4452
4453             Returns:
4454                 List of sub-shapes of theShape1, shared with theShape2.
4455             """
4456             # Example: see GEOM_TestOthers.py
4457             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4458             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4459             self._autoPublish(aList, theName, "shared")
4460             return aList
4461
4462         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4463         #  @param theShapes Shapes to find common sub-shapes of.
4464         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4465         #  @param theName Object name; when specified, this parameter is used
4466         #         for result publication in the study. Otherwise, if automatic
4467         #         publication is switched on, default value is used for result name.
4468         #
4469         #  @return List of objects, that are sub-shapes of all given shapes.
4470         #
4471         #  @ref swig_GetSharedShapes "Example"
4472         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4473             """
4474             Get all sub-shapes, shared by all shapes in the list theShapes.
4475
4476             Parameters:
4477                 theShapes Shapes to find common sub-shapes of.
4478                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4479                 theName Object name; when specified, this parameter is used
4480                         for result publication in the study. Otherwise, if automatic
4481                         publication is switched on, default value is used for result name.
4482
4483             Returns:    
4484                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4485             """
4486             # Example: see GEOM_TestOthers.py
4487             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4488             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4489             self._autoPublish(aList, theName, "shared")
4490             return aList
4491
4492         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4493         #  situated relatively the specified plane by the certain way,
4494         #  defined through <VAR>theState</VAR> parameter.
4495         #  @param theShape Shape to find sub-shapes of.
4496         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4497         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4498         #                direction and location of the plane to find shapes on.
4499         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4500         #  @param theName Object name; when specified, this parameter is used
4501         #         for result publication in the study. Otherwise, if automatic
4502         #         publication is switched on, default value is used for result name.
4503         #
4504         #  @return List of all found sub-shapes.
4505         #
4506         #  @ref swig_GetShapesOnPlane "Example"
4507         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4508             """
4509             Find in theShape all sub-shapes of type theShapeType,
4510             situated relatively the specified plane by the certain way,
4511             defined through theState parameter.
4512
4513             Parameters:
4514                 theShape Shape to find sub-shapes of.
4515                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4516                 theAx1 Vector (or line, or linear edge), specifying normal
4517                        direction and location of the plane to find shapes on.
4518                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4519                 theName Object name; when specified, this parameter is used
4520                         for result publication in the study. Otherwise, if automatic
4521                         publication is switched on, default value is used for result name.
4522
4523             Returns:
4524                 List of all found sub-shapes.
4525             """
4526             # Example: see GEOM_TestOthers.py
4527             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4528             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4529             self._autoPublish(aList, theName, "shapeOnPlane")
4530             return aList
4531
4532         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4533         #  situated relatively the specified plane by the certain way,
4534         #  defined through <VAR>theState</VAR> parameter.
4535         #  @param theShape Shape to find sub-shapes of.
4536         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4537         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4538         #                direction and location of the plane to find shapes on.
4539         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4540         #
4541         #  @return List of all found sub-shapes indices.
4542         #
4543         #  @ref swig_GetShapesOnPlaneIDs "Example"
4544         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4545             """
4546             Find in theShape all sub-shapes of type theShapeType,
4547             situated relatively the specified plane by the certain way,
4548             defined through theState parameter.
4549
4550             Parameters:
4551                 theShape Shape to find sub-shapes of.
4552                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4553                 theAx1 Vector (or line, or linear edge), specifying normal
4554                        direction and location of the plane to find shapes on.
4555                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4556
4557             Returns:
4558                 List of all found sub-shapes indices.
4559             """
4560             # Example: see GEOM_TestOthers.py
4561             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4562             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4563             return aList
4564
4565         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4566         #  situated relatively the specified plane by the certain way,
4567         #  defined through <VAR>theState</VAR> parameter.
4568         #  @param theShape Shape to find sub-shapes of.
4569         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4570         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4571         #                direction of the plane to find shapes on.
4572         #  @param thePnt Point specifying location of the plane to find shapes on.
4573         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4574         #  @param theName Object name; when specified, this parameter is used
4575         #         for result publication in the study. Otherwise, if automatic
4576         #         publication is switched on, default value is used for result name.
4577         #
4578         #  @return List of all found sub-shapes.
4579         #
4580         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4581         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4582             """
4583             Find in theShape all sub-shapes of type theShapeType,
4584             situated relatively the specified plane by the certain way,
4585             defined through theState parameter.
4586
4587             Parameters:
4588                 theShape Shape to find sub-shapes of.
4589                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4590                 theAx1 Vector (or line, or linear edge), specifying normal
4591                        direction and location of the plane to find shapes on.
4592                 thePnt Point specifying location of the plane to find shapes on.
4593                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4594                 theName Object name; when specified, this parameter is used
4595                         for result publication in the study. Otherwise, if automatic
4596                         publication is switched on, default value is used for result name.
4597
4598             Returns:
4599                 List of all found sub-shapes.
4600             """
4601             # Example: see GEOM_TestOthers.py
4602             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4603                                                                theAx1, thePnt, theState)
4604             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4605             self._autoPublish(aList, theName, "shapeOnPlane")
4606             return aList
4607
4608         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4609         #  situated relatively the specified plane by the certain way,
4610         #  defined through <VAR>theState</VAR> parameter.
4611         #  @param theShape Shape to find sub-shapes of.
4612         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4613         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4614         #                direction of the plane to find shapes on.
4615         #  @param thePnt Point specifying location of the plane to find shapes on.
4616         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4617         #
4618         #  @return List of all found sub-shapes indices.
4619         #
4620         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4621         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4622             """
4623             Find in theShape all sub-shapes of type theShapeType,
4624             situated relatively the specified plane by the certain way,
4625             defined through theState parameter.
4626
4627             Parameters:
4628                 theShape Shape to find sub-shapes of.
4629                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4630                 theAx1 Vector (or line, or linear edge), specifying normal
4631                        direction and location of the plane to find shapes on.
4632                 thePnt Point specifying location of the plane to find shapes on.
4633                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4634
4635             Returns:
4636                 List of all found sub-shapes indices.
4637             """
4638             # Example: see GEOM_TestOthers.py
4639             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4640                                                                   theAx1, thePnt, theState)
4641             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4642             return aList
4643
4644         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4645         #  the specified cylinder by the certain way, defined through \a theState parameter.
4646         #  @param theShape Shape to find sub-shapes of.
4647         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4648         #  @param theAxis Vector (or line, or linear edge), specifying
4649         #                 axis of the cylinder to find shapes on.
4650         #  @param theRadius Radius of the cylinder to find shapes on.
4651         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4652         #  @param theName Object name; when specified, this parameter is used
4653         #         for result publication in the study. Otherwise, if automatic
4654         #         publication is switched on, default value is used for result name.
4655         #
4656         #  @return List of all found sub-shapes.
4657         #
4658         #  @ref swig_GetShapesOnCylinder "Example"
4659         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4660             """
4661             Find in theShape all sub-shapes of type theShapeType, situated relatively
4662             the specified cylinder by the certain way, defined through theState parameter.
4663
4664             Parameters:
4665                 theShape Shape to find sub-shapes of.
4666                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4667                 theAxis Vector (or line, or linear edge), specifying
4668                         axis of the cylinder to find shapes on.
4669                 theRadius Radius of the cylinder to find shapes on.
4670                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4671                 theName Object name; when specified, this parameter is used
4672                         for result publication in the study. Otherwise, if automatic
4673                         publication is switched on, default value is used for result name.
4674
4675             Returns:
4676                 List of all found sub-shapes.
4677             """
4678             # Example: see GEOM_TestOthers.py
4679             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4680             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4681             self._autoPublish(aList, theName, "shapeOnCylinder")
4682             return aList
4683
4684         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4685         #  the specified cylinder by the certain way, defined through \a theState parameter.
4686         #  @param theShape Shape to find sub-shapes of.
4687         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4688         #  @param theAxis Vector (or line, or linear edge), specifying
4689         #                 axis of the cylinder to find shapes on.
4690         #  @param theRadius Radius of the cylinder to find shapes on.
4691         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4692         #
4693         #  @return List of all found sub-shapes indices.
4694         #
4695         #  @ref swig_GetShapesOnCylinderIDs "Example"
4696         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4697             """
4698             Find in theShape all sub-shapes of type theShapeType, situated relatively
4699             the specified cylinder by the certain way, defined through theState parameter.
4700
4701             Parameters:
4702                 theShape Shape to find sub-shapes of.
4703                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4704                 theAxis Vector (or line, or linear edge), specifying
4705                         axis of the cylinder to find shapes on.
4706                 theRadius Radius of the cylinder to find shapes on.
4707                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4708
4709             Returns:
4710                 List of all found sub-shapes indices.
4711             """
4712             # Example: see GEOM_TestOthers.py
4713             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4714             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4715             return aList
4716
4717         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4718         #  the specified cylinder by the certain way, defined through \a theState parameter.
4719         #  @param theShape Shape to find sub-shapes of.
4720         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4721         #  @param theAxis Vector (or line, or linear edge), specifying
4722         #                 axis of the cylinder to find shapes on.
4723         #  @param thePnt Point specifying location of the bottom of the cylinder.
4724         #  @param theRadius Radius of the cylinder to find shapes on.
4725         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4726         #  @param theName Object name; when specified, this parameter is used
4727         #         for result publication in the study. Otherwise, if automatic
4728         #         publication is switched on, default value is used for result name.
4729         #
4730         #  @return List of all found sub-shapes.
4731         #
4732         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4733         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4734             """
4735             Find in theShape all sub-shapes of type theShapeType, situated relatively
4736             the specified cylinder by the certain way, defined through theState parameter.
4737
4738             Parameters:
4739                 theShape Shape to find sub-shapes of.
4740                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4741                 theAxis Vector (or line, or linear edge), specifying
4742                         axis of the cylinder to find shapes on.
4743                 theRadius Radius of the cylinder to find shapes on.
4744                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4745                 theName Object name; when specified, this parameter is used
4746                         for result publication in the study. Otherwise, if automatic
4747                         publication is switched on, default value is used for result name.
4748
4749             Returns:
4750                 List of all found sub-shapes.
4751             """
4752             # Example: see GEOM_TestOthers.py
4753             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4754             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4755             self._autoPublish(aList, theName, "shapeOnCylinder")
4756             return aList
4757
4758         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4759         #  the specified cylinder by the certain way, defined through \a theState parameter.
4760         #  @param theShape Shape to find sub-shapes of.
4761         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4762         #  @param theAxis Vector (or line, or linear edge), specifying
4763         #                 axis of the cylinder to find shapes on.
4764         #  @param thePnt Point specifying location of the bottom of the cylinder.
4765         #  @param theRadius Radius of the cylinder to find shapes on.
4766         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4767         #
4768         #  @return List of all found sub-shapes indices
4769         #
4770         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4771         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4772             """
4773             Find in theShape all sub-shapes of type theShapeType, situated relatively
4774             the specified cylinder by the certain way, defined through theState parameter.
4775
4776             Parameters:
4777                 theShape Shape to find sub-shapes of.
4778                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4779                 theAxis Vector (or line, or linear edge), specifying
4780                         axis of the cylinder to find shapes on.
4781                 theRadius Radius of the cylinder to find shapes on.
4782                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4783
4784             Returns:
4785                 List of all found sub-shapes indices.            
4786             """
4787             # Example: see GEOM_TestOthers.py
4788             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4789             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4790             return aList
4791
4792         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4793         #  the specified sphere by the certain way, defined through \a theState parameter.
4794         #  @param theShape Shape to find sub-shapes of.
4795         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4796         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4797         #  @param theRadius Radius of the sphere to find shapes on.
4798         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4799         #  @param theName Object name; when specified, this parameter is used
4800         #         for result publication in the study. Otherwise, if automatic
4801         #         publication is switched on, default value is used for result name.
4802         #
4803         #  @return List of all found sub-shapes.
4804         #
4805         #  @ref swig_GetShapesOnSphere "Example"
4806         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4807             """
4808             Find in theShape all sub-shapes of type theShapeType, situated relatively
4809             the specified sphere by the certain way, defined through theState parameter.
4810
4811             Parameters:
4812                 theShape Shape to find sub-shapes of.
4813                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4814                 theCenter Point, specifying center of the sphere to find shapes on.
4815                 theRadius Radius of the sphere to find shapes on.
4816                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4817                 theName Object name; when specified, this parameter is used
4818                         for result publication in the study. Otherwise, if automatic
4819                         publication is switched on, default value is used for result name.
4820
4821             Returns:
4822                 List of all found sub-shapes.
4823             """
4824             # Example: see GEOM_TestOthers.py
4825             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4826             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4827             self._autoPublish(aList, theName, "shapeOnSphere")
4828             return aList
4829
4830         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4831         #  the specified sphere by the certain way, defined through \a theState parameter.
4832         #  @param theShape Shape to find sub-shapes of.
4833         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4834         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4835         #  @param theRadius Radius of the sphere to find shapes on.
4836         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4837         #
4838         #  @return List of all found sub-shapes indices.
4839         #
4840         #  @ref swig_GetShapesOnSphereIDs "Example"
4841         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4842             """
4843             Find in theShape all sub-shapes of type theShapeType, situated relatively
4844             the specified sphere by the certain way, defined through theState parameter.
4845
4846             Parameters:
4847                 theShape Shape to find sub-shapes of.
4848                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4849                 theCenter Point, specifying center of the sphere to find shapes on.
4850                 theRadius Radius of the sphere to find shapes on.
4851                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4852
4853             Returns:
4854                 List of all found sub-shapes indices.
4855             """
4856             # Example: see GEOM_TestOthers.py
4857             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4858             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4859             return aList
4860
4861         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4862         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4863         #  @param theShape Shape to find sub-shapes of.
4864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4865         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4866         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4867         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4868         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4869         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4870         #  @param theName Object name; when specified, this parameter is used
4871         #         for result publication in the study. Otherwise, if automatic
4872         #         publication is switched on, default value is used for result name.
4873         #
4874         #  @return List of all found sub-shapes.
4875         #
4876         #  @ref swig_GetShapesOnQuadrangle "Example"
4877         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4878                                   theTopLeftPoint, theTopRigthPoint,
4879                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4880             """
4881             Find in theShape all sub-shapes of type theShapeType, situated relatively
4882             the specified quadrangle by the certain way, defined through theState parameter.
4883
4884             Parameters:
4885                 theShape Shape to find sub-shapes of.
4886                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4887                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4888                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4889                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4890                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4891                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4892                 theName Object name; when specified, this parameter is used
4893                         for result publication in the study. Otherwise, if automatic
4894                         publication is switched on, default value is used for result name.
4895
4896             Returns:
4897                 List of all found sub-shapes.
4898             """
4899             # Example: see GEOM_TestOthers.py
4900             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4901                                                         theTopLeftPoint, theTopRigthPoint,
4902                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4903             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4904             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4905             return aList
4906
4907         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4908         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4909         #  @param theShape Shape to find sub-shapes of.
4910         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4911         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4912         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4913         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4914         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4915         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4916         #
4917         #  @return List of all found sub-shapes indices.
4918         #
4919         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4920         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4921                                      theTopLeftPoint, theTopRigthPoint,
4922                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4923             """
4924             Find in theShape all sub-shapes of type theShapeType, situated relatively
4925             the specified quadrangle by the certain way, defined through theState parameter.
4926
4927             Parameters:
4928                 theShape Shape to find sub-shapes of.
4929                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4930                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4931                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4932                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4933                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4934                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4935
4936             Returns:
4937                 List of all found sub-shapes indices.
4938             """
4939
4940             # Example: see GEOM_TestOthers.py
4941             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4942                                                            theTopLeftPoint, theTopRigthPoint,
4943                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4944             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4945             return aList
4946
4947         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4948         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4949         #  @param theBox Shape for relative comparing.
4950         #  @param theShape Shape to find sub-shapes of.
4951         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4952         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4953         #  @param theName Object name; when specified, this parameter is used
4954         #         for result publication in the study. Otherwise, if automatic
4955         #         publication is switched on, default value is used for result name.
4956         #
4957         #  @return List of all found sub-shapes.
4958         #
4959         #  @ref swig_GetShapesOnBox "Example"
4960         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4961             """
4962             Find in theShape all sub-shapes of type theShapeType, situated relatively
4963             the specified theBox by the certain way, defined through theState parameter.
4964
4965             Parameters:
4966                 theBox Shape for relative comparing.
4967                 theShape Shape to find sub-shapes of.
4968                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4969                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4970                 theName Object name; when specified, this parameter is used
4971                         for result publication in the study. Otherwise, if automatic
4972                         publication is switched on, default value is used for result name.
4973
4974             Returns:
4975                 List of all found sub-shapes.
4976             """
4977             # Example: see GEOM_TestOthers.py
4978             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4979             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4980             self._autoPublish(aList, theName, "shapeOnBox")
4981             return aList
4982
4983         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4984         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4985         #  @param theBox Shape for relative comparing.
4986         #  @param theShape Shape to find sub-shapes of.
4987         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4988         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4989         #
4990         #  @return List of all found sub-shapes indices.
4991         #
4992         #  @ref swig_GetShapesOnBoxIDs "Example"
4993         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4994             """
4995             Find in theShape all sub-shapes of type theShapeType, situated relatively
4996             the specified theBox by the certain way, defined through theState parameter.
4997
4998             Parameters:
4999                 theBox Shape for relative comparing.
5000                 theShape Shape to find sub-shapes of.
5001                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5002                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5003
5004             Returns:
5005                 List of all found sub-shapes indices.
5006             """
5007             # Example: see GEOM_TestOthers.py
5008             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5009             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5010             return aList
5011
5012         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5013         #  situated relatively the specified \a theCheckShape by the
5014         #  certain way, defined through \a theState parameter.
5015         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5016         #  @param theShape Shape to find sub-shapes of.
5017         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5018         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5019         #  @param theName Object name; when specified, this parameter is used
5020         #         for result publication in the study. Otherwise, if automatic
5021         #         publication is switched on, default value is used for result name.
5022         #
5023         #  @return List of all found sub-shapes.
5024         #
5025         #  @ref swig_GetShapesOnShape "Example"
5026         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5027             """
5028             Find in theShape all sub-shapes of type theShapeType,
5029             situated relatively the specified theCheckShape by the
5030             certain way, defined through theState parameter.
5031
5032             Parameters:
5033                 theCheckShape Shape for relative comparing. It must be a solid.
5034                 theShape Shape to find sub-shapes of.
5035                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5036                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5037                 theName Object name; when specified, this parameter is used
5038                         for result publication in the study. Otherwise, if automatic
5039                         publication is switched on, default value is used for result name.
5040
5041             Returns:
5042                 List of all found sub-shapes.
5043             """
5044             # Example: see GEOM_TestOthers.py
5045             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5046                                                    theShapeType, theState)
5047             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5048             self._autoPublish(aList, theName, "shapeOnShape")
5049             return aList
5050
5051         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5052         #  situated relatively the specified \a theCheckShape by the
5053         #  certain way, defined through \a theState parameter.
5054         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5055         #  @param theShape Shape to find sub-shapes of.
5056         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5057         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5058         #  @param theName Object name; when specified, this parameter is used
5059         #         for result publication in the study. Otherwise, if automatic
5060         #         publication is switched on, default value is used for result name.
5061         #
5062         #  @return All found sub-shapes as compound.
5063         #
5064         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5065         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5066             """
5067             Find in theShape all sub-shapes of type theShapeType,
5068             situated relatively the specified theCheckShape by the
5069             certain way, defined through theState parameter.
5070
5071             Parameters:
5072                 theCheckShape Shape for relative comparing. It must be a solid.
5073                 theShape Shape to find sub-shapes of.
5074                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5075                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5076                 theName Object name; when specified, this parameter is used
5077                         for result publication in the study. Otherwise, if automatic
5078                         publication is switched on, default value is used for result name.
5079
5080             Returns:
5081                 All found sub-shapes as compound.
5082             """
5083             # Example: see GEOM_TestOthers.py
5084             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5085                                                              theShapeType, theState)
5086             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5087             self._autoPublish(anObj, theName, "shapeOnShape")
5088             return anObj
5089
5090         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5091         #  situated relatively the specified \a theCheckShape by the
5092         #  certain way, defined through \a theState parameter.
5093         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5094         #  @param theShape Shape to find sub-shapes of.
5095         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5096         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5097         #
5098         #  @return List of all found sub-shapes indices.
5099         #
5100         #  @ref swig_GetShapesOnShapeIDs "Example"
5101         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5102             """
5103             Find in theShape all sub-shapes of type theShapeType,
5104             situated relatively the specified theCheckShape by the
5105             certain way, defined through theState parameter.
5106
5107             Parameters:
5108                 theCheckShape Shape for relative comparing. It must be a solid.
5109                 theShape Shape to find sub-shapes of.
5110                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5111                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5112
5113             Returns:
5114                 List of all found sub-shapes indices.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5118                                                       theShapeType, theState)
5119             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5120             return aList
5121
5122         ## Get sub-shape(s) of theShapeWhere, which are
5123         #  coincident with \a theShapeWhat or could be a part of it.
5124         #  @param theShapeWhere Shape to find sub-shapes of.
5125         #  @param theShapeWhat Shape, specifying what to find.
5126         #  @param isNewImplementation implementation of GetInPlace functionality
5127         #             (default = False, old alghorithm based on shape properties)
5128         #  @param theName Object name; when specified, this parameter is used
5129         #         for result publication in the study. Otherwise, if automatic
5130         #         publication is switched on, default value is used for result name.
5131         #
5132         #  @return Group of all found sub-shapes or a single found sub-shape.
5133         #
5134         #  @note This function has a restriction on argument shapes.
5135         #        If \a theShapeWhere has curved parts with significantly
5136         #        outstanding centres (i.e. the mass centre of a part is closer to
5137         #        \a theShapeWhat than to the part), such parts will not be found.
5138         #        @image html get_in_place_lost_part.png
5139         #
5140         #  @ref swig_GetInPlace "Example"
5141         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5142             """
5143             Get sub-shape(s) of theShapeWhere, which are
5144             coincident with  theShapeWhat or could be a part of it.
5145
5146             Parameters:
5147                 theShapeWhere Shape to find sub-shapes of.
5148                 theShapeWhat Shape, specifying what to find.
5149                 isNewImplementation Implementation of GetInPlace functionality
5150                                     (default = False, old alghorithm based on shape properties)
5151                 theName Object name; when specified, this parameter is used
5152                         for result publication in the study. Otherwise, if automatic
5153                         publication is switched on, default value is used for result name.
5154
5155             Returns:
5156                 Group of all found sub-shapes or a single found sub-shape.
5157
5158                 
5159             Note:
5160                 This function has a restriction on argument shapes.
5161                 If theShapeWhere has curved parts with significantly
5162                 outstanding centres (i.e. the mass centre of a part is closer to
5163                 theShapeWhat than to the part), such parts will not be found.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             anObj = None
5167             if isNewImplementation:
5168                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5169             else:
5170                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5171                 pass
5172             RaiseIfFailed("GetInPlace", self.ShapesOp)
5173             self._autoPublish(anObj, theName, "inplace")
5174             return anObj
5175
5176         ## Get sub-shape(s) of \a theShapeWhere, which are
5177         #  coincident with \a theShapeWhat or could be a part of it.
5178         #
5179         #  Implementation of this method is based on a saved history of an operation,
5180         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5181         #  arguments (an argument shape or a sub-shape of an argument shape).
5182         #  The operation could be the Partition or one of boolean operations,
5183         #  performed on simple shapes (not on compounds).
5184         #
5185         #  @param theShapeWhere Shape to find sub-shapes of.
5186         #  @param theShapeWhat Shape, specifying what to find (must be in the
5187         #                      building history of the ShapeWhere).
5188         #  @param theName Object name; when specified, this parameter is used
5189         #         for result publication in the study. Otherwise, if automatic
5190         #         publication is switched on, default value is used for result name.
5191         #
5192         #  @return Group of all found sub-shapes or a single found sub-shape.
5193         #
5194         #  @ref swig_GetInPlace "Example"
5195         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5196             """
5197             Implementation of this method is based on a saved history of an operation,
5198             produced theShapeWhere. The theShapeWhat must be among this operation's
5199             arguments (an argument shape or a sub-shape of an argument shape).
5200             The operation could be the Partition or one of boolean operations,
5201             performed on simple shapes (not on compounds).
5202
5203             Parameters:
5204                 theShapeWhere Shape to find sub-shapes of.
5205                 theShapeWhat Shape, specifying what to find (must be in the
5206                                 building history of the ShapeWhere).
5207                 theName Object name; when specified, this parameter is used
5208                         for result publication in the study. Otherwise, if automatic
5209                         publication is switched on, default value is used for result name.
5210
5211             Returns:
5212                 Group of all found sub-shapes or a single found sub-shape.
5213             """
5214             # Example: see GEOM_TestOthers.py
5215             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5216             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5217             self._autoPublish(anObj, theName, "inplace")
5218             return anObj
5219
5220         ## Get sub-shape of theShapeWhere, which is
5221         #  equal to \a theShapeWhat.
5222         #  @param theShapeWhere Shape to find sub-shape of.
5223         #  @param theShapeWhat Shape, specifying what to find.
5224         #  @param theName Object name; when specified, this parameter is used
5225         #         for result publication in the study. Otherwise, if automatic
5226         #         publication is switched on, default value is used for result name.
5227         #
5228         #  @return New GEOM.GEOM_Object for found sub-shape.
5229         #
5230         #  @ref swig_GetSame "Example"
5231         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5232             """
5233             Get sub-shape of theShapeWhere, which is
5234             equal to theShapeWhat.
5235
5236             Parameters:
5237                 theShapeWhere Shape to find sub-shape of.
5238                 theShapeWhat Shape, specifying what to find.
5239                 theName Object name; when specified, this parameter is used
5240                         for result publication in the study. Otherwise, if automatic
5241                         publication is switched on, default value is used for result name.
5242
5243             Returns:
5244                 New GEOM.GEOM_Object for found sub-shape.
5245             """
5246             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5247             RaiseIfFailed("GetSame", self.ShapesOp)
5248             self._autoPublish(anObj, theName, "sameShape")
5249             return anObj
5250
5251
5252         ## Get sub-shape indices of theShapeWhere, which is
5253         #  equal to \a theShapeWhat.
5254         #  @param theShapeWhere Shape to find sub-shape of.
5255         #  @param theShapeWhat Shape, specifying what to find.
5256         #  @return List of all found sub-shapes indices. 
5257         #
5258         #  @ref swig_GetSame "Example"
5259         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5260             """
5261             Get sub-shape indices of theShapeWhere, which is
5262             equal to theShapeWhat.
5263
5264             Parameters:
5265                 theShapeWhere Shape to find sub-shape of.
5266                 theShapeWhat Shape, specifying what to find.
5267
5268             Returns:
5269                 List of all found sub-shapes indices.
5270             """
5271             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5272             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5273             return anObj
5274
5275
5276         # end of l4_obtain
5277         ## @}
5278
5279         ## @addtogroup l4_access
5280         ## @{
5281
5282         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5283         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5284         #  @param aShape Shape to get sub-shape of.
5285         #  @param ListOfID List of sub-shapes indices.
5286         #  @param theName Object name; when specified, this parameter is used
5287         #         for result publication in the study. Otherwise, if automatic
5288         #         publication is switched on, default value is used for result name.
5289         #
5290         #  @return Found sub-shape.
5291         #
5292         #  @ref swig_all_decompose "Example"
5293         def GetSubShape(self, aShape, ListOfID, theName=None):
5294             """
5295             Obtain a composite sub-shape of aShape, composed from sub-shapes
5296             of aShape, selected by their unique IDs inside aShape
5297
5298             Parameters:
5299                 aShape Shape to get sub-shape of.
5300                 ListOfID List of sub-shapes indices.
5301                 theName Object name; when specified, this parameter is used
5302                         for result publication in the study. Otherwise, if automatic
5303                         publication is switched on, default value is used for result name.
5304
5305             Returns:
5306                 Found sub-shape.
5307             """
5308             # Example: see GEOM_TestAll.py
5309             anObj = self.AddSubShape(aShape,ListOfID)
5310             self._autoPublish(anObj, theName, "subshape")
5311             return anObj
5312
5313         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5314         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5315         #  @param aShape Shape to get sub-shape of.
5316         #  @param aSubShape Sub-shapes of aShape.
5317         #  @return ID of found sub-shape.
5318         #
5319         #  @ref swig_all_decompose "Example"
5320         def GetSubShapeID(self, aShape, aSubShape):
5321             """
5322             Obtain unique ID of sub-shape aSubShape inside aShape
5323             of aShape, selected by their unique IDs inside aShape
5324
5325             Parameters:
5326                aShape Shape to get sub-shape of.
5327                aSubShape Sub-shapes of aShape.
5328
5329             Returns:
5330                ID of found sub-shape.
5331             """
5332             # Example: see GEOM_TestAll.py
5333             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5334             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5335             return anID
5336             
5337         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5338         #  This function is provided for performance purpose. The complexity is O(n) with n
5339         #  the number of subobjects of aShape
5340         #  @param aShape Shape to get sub-shape of.
5341         #  @param aSubShapes Sub-shapes of aShape.
5342         #  @return list of IDs of found sub-shapes.
5343         #
5344         #  @ref swig_all_decompose "Example"
5345         def GetSubShapesIDs(self, aShape, aSubShapes):
5346             """
5347             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5348             This function is provided for performance purpose. The complexity is O(n) with n
5349             the number of subobjects of aShape
5350
5351             Parameters:
5352                aShape Shape to get sub-shape of.
5353                aSubShapes Sub-shapes of aShape.
5354
5355             Returns:
5356                List of IDs of found sub-shape.
5357             """
5358             # Example: see GEOM_TestAll.py
5359             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5360             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5361             return anIDs
5362
5363         # end of l4_access
5364         ## @}
5365
5366         ## @addtogroup l4_decompose
5367         ## @{
5368
5369         ## Get all sub-shapes and groups of \a theShape,
5370         #  that were created already by any other methods.
5371         #  @param theShape Any shape.
5372         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5373         #                       returned, else all found sub-shapes and groups.
5374         #  @return List of existing sub-objects of \a theShape.
5375         #
5376         #  @ref swig_all_decompose "Example"
5377         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5378             """
5379             Get all sub-shapes and groups of theShape,
5380             that were created already by any other methods.
5381
5382             Parameters:
5383                 theShape Any shape.
5384                 theGroupsOnly If this parameter is TRUE, only groups will be
5385                                  returned, else all found sub-shapes and groups.
5386
5387             Returns:
5388                 List of existing sub-objects of theShape.
5389             """
5390             # Example: see GEOM_TestAll.py
5391             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5392             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5393             return ListObj
5394
5395         ## Get all groups of \a theShape,
5396         #  that were created already by any other methods.
5397         #  @param theShape Any shape.
5398         #  @return List of existing groups of \a theShape.
5399         #
5400         #  @ref swig_all_decompose "Example"
5401         def GetGroups(self, theShape):
5402             """
5403             Get all groups of theShape,
5404             that were created already by any other methods.
5405
5406             Parameters:
5407                 theShape Any shape.
5408
5409             Returns:
5410                 List of existing groups of theShape.
5411             """
5412             # Example: see GEOM_TestAll.py
5413             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5414             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5415             return ListObj
5416
5417         ## Explode a shape on sub-shapes of a given type.
5418         #  If the shape itself matches the type, it is also returned.
5419         #  @param aShape Shape to be exploded.
5420         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5421         #  @param theName Object name; when specified, this parameter is used
5422         #         for result publication in the study. Otherwise, if automatic
5423         #         publication is switched on, default value is used for result name.
5424         #
5425         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5426         #
5427         #  @ref swig_all_decompose "Example"
5428         def SubShapeAll(self, aShape, aType, theName=None):
5429             """
5430             Explode a shape on sub-shapes of a given type.
5431             If the shape itself matches the type, it is also returned.
5432
5433             Parameters:
5434                 aShape Shape to be exploded.
5435                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5436                 theName Object name; when specified, this parameter is used
5437                         for result publication in the study. Otherwise, if automatic
5438                         publication is switched on, default value is used for result name.
5439
5440             Returns:
5441                 List of sub-shapes of type theShapeType, contained in theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5445             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5446             self._autoPublish(ListObj, theName, "subshape")
5447             return ListObj
5448
5449         ## Explode a shape on sub-shapes of a given type.
5450         #  @param aShape Shape to be exploded.
5451         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5452         #  @return List of IDs of sub-shapes.
5453         #
5454         #  @ref swig_all_decompose "Example"
5455         def SubShapeAllIDs(self, aShape, aType):
5456             """
5457             Explode a shape on sub-shapes of a given type.
5458
5459             Parameters:
5460                 aShape Shape to be exploded (see geompy.ShapeType)
5461                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5462
5463             Returns:
5464                 List of IDs of sub-shapes.
5465             """
5466             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5467             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5468             return ListObj
5469
5470         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5471         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5472         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5473         #  @param aShape Shape to get sub-shape of.
5474         #  @param ListOfInd List of sub-shapes indices.
5475         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5476         #  @param theName Object name; when specified, this parameter is used
5477         #         for result publication in the study. Otherwise, if automatic
5478         #         publication is switched on, default value is used for result name.
5479         #
5480         #  @return A compound of sub-shapes of aShape.
5481         #
5482         #  @ref swig_all_decompose "Example"
5483         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5484             """
5485             Obtain a compound of sub-shapes of aShape,
5486             selected by they indices in list of all sub-shapes of type aType.
5487             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5488             
5489             Parameters:
5490                 aShape Shape to get sub-shape of.
5491                 ListOfID List of sub-shapes indices.
5492                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5493                 theName Object name; when specified, this parameter is used
5494                         for result publication in the study. Otherwise, if automatic
5495                         publication is switched on, default value is used for result name.
5496
5497             Returns:
5498                 A compound of sub-shapes of aShape.
5499             """
5500             # Example: see GEOM_TestAll.py
5501             ListOfIDs = []
5502             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5503             for ind in ListOfInd:
5504                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5505             # note: auto-publishing is done in self.GetSubShape()
5506             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5507             return anObj
5508
5509         ## Explode a shape on sub-shapes of a given type.
5510         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5511         #  If the shape itself matches the type, it is also returned.
5512         #  @param aShape Shape to be exploded.
5513         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5514         #  @param theName Object name; when specified, this parameter is used
5515         #         for result publication in the study. Otherwise, if automatic
5516         #         publication is switched on, default value is used for result name.
5517         #
5518         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5519         #
5520         #  @ref swig_SubShapeAllSorted "Example"
5521         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5522             """
5523             Explode a shape on sub-shapes of a given type.
5524             Sub-shapes will be sorted by coordinates of their gravity centers.
5525             If the shape itself matches the type, it is also returned.
5526
5527             Parameters: 
5528                 aShape Shape to be exploded.
5529                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5530                 theName Object name; when specified, this parameter is used
5531                         for result publication in the study. Otherwise, if automatic
5532                         publication is switched on, default value is used for result name.
5533
5534             Returns: 
5535                 List of sub-shapes of type theShapeType, contained in theShape.
5536             """
5537             # Example: see GEOM_TestAll.py
5538             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5539             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5540             self._autoPublish(ListObj, theName, "subshape")
5541             return ListObj
5542
5543         ## Explode a shape on sub-shapes of a given type.
5544         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5545         #  @param aShape Shape to be exploded.
5546         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5547         #  @return List of IDs of sub-shapes.
5548         #
5549         #  @ref swig_all_decompose "Example"
5550         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5551             """
5552             Explode a shape on sub-shapes of a given type.
5553             Sub-shapes will be sorted by coordinates of their gravity centers.
5554
5555             Parameters: 
5556                 aShape Shape to be exploded.
5557                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5558
5559             Returns: 
5560                 List of IDs of sub-shapes.
5561             """
5562             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5563             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5564             return ListIDs
5565
5566         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5567         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5568         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5569         #  @param aShape Shape to get sub-shape of.
5570         #  @param ListOfInd List of sub-shapes indices.
5571         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5572         #  @param theName Object name; when specified, this parameter is used
5573         #         for result publication in the study. Otherwise, if automatic
5574         #         publication is switched on, default value is used for result name.
5575         #
5576         #  @return A compound of sub-shapes of aShape.
5577         #
5578         #  @ref swig_all_decompose "Example"
5579         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5580             """
5581             Obtain a compound of sub-shapes of aShape,
5582             selected by they indices in sorted list of all sub-shapes of type aType.
5583             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5584
5585             Parameters:
5586                 aShape Shape to get sub-shape of.
5587                 ListOfID List of sub-shapes indices.
5588                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5589                 theName Object name; when specified, this parameter is used
5590                         for result publication in the study. Otherwise, if automatic
5591                         publication is switched on, default value is used for result name.
5592
5593             Returns:
5594                 A compound of sub-shapes of aShape.
5595             """
5596             # Example: see GEOM_TestAll.py
5597             ListOfIDs = []
5598             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5599             for ind in ListOfInd:
5600                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5601             # note: auto-publishing is done in self.GetSubShape()
5602             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5603             return anObj
5604
5605         ## Extract shapes (excluding the main shape) of given type.
5606         #  @param aShape The shape.
5607         #  @param aType  The shape type (see ShapeType())
5608         #  @param isSorted Boolean flag to switch sorting on/off.
5609         #  @param theName Object name; when specified, this parameter is used
5610         #         for result publication in the study. Otherwise, if automatic
5611         #         publication is switched on, default value is used for result name.
5612         #
5613         #  @return List of sub-shapes of type aType, contained in aShape.
5614         #
5615         #  @ref swig_FilletChamfer "Example"
5616         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5617             """
5618             Extract shapes (excluding the main shape) of given type.
5619
5620             Parameters:
5621                 aShape The shape.
5622                 aType  The shape type (see geompy.ShapeType)
5623                 isSorted Boolean flag to switch sorting on/off.
5624                 theName Object name; when specified, this parameter is used
5625                         for result publication in the study. Otherwise, if automatic
5626                         publication is switched on, default value is used for result name.
5627
5628             Returns:     
5629                 List of sub-shapes of type aType, contained in aShape.
5630             """
5631             # Example: see GEOM_TestAll.py
5632             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5633             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5634             self._autoPublish(ListObj, theName, "subshape")
5635             return ListObj
5636
5637         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5638         #  @param aShape Main shape.
5639         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5640         #  @param theName Object name; when specified, this parameter is used
5641         #         for result publication in the study. Otherwise, if automatic
5642         #         publication is switched on, default value is used for result name.
5643         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5644         #
5645         #  @ref swig_all_decompose "Example"
5646         def SubShapes(self, aShape, anIDs, theName=None):
5647             """
5648             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5649
5650             Parameters:
5651                 aShape Main shape.
5652                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5653                 theName Object name; when specified, this parameter is used
5654                         for result publication in the study. Otherwise, if automatic
5655                         publication is switched on, default value is used for result name.
5656
5657             Returns:      
5658                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5659             """
5660             # Example: see GEOM_TestAll.py
5661             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5662             RaiseIfFailed("SubShapes", self.ShapesOp)
5663             self._autoPublish(ListObj, theName, "subshape")
5664             return ListObj
5665
5666         # end of l4_decompose
5667         ## @}
5668
5669         ## @addtogroup l4_decompose_d
5670         ## @{
5671
5672         ## Deprecated method
5673         #  It works like SubShapeAllSortedCentres(), but wrongly
5674         #  defines centres of faces, shells and solids.
5675         def SubShapeAllSorted(self, aShape, aType, theName=None):
5676             """
5677             Deprecated method
5678             It works like geompy.SubShapeAllSortedCentres, but wrongly
5679             defines centres of faces, shells and solids.
5680             """
5681             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5682             RaiseIfFailed("MakeExplode", self.ShapesOp)
5683             self._autoPublish(ListObj, theName, "subshape")
5684             return ListObj
5685
5686         ## Deprecated method
5687         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5688         #  defines centres of faces, shells and solids.
5689         def SubShapeAllSortedIDs(self, aShape, aType):
5690             """
5691             Deprecated method
5692             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5693             defines centres of faces, shells and solids.
5694             """
5695             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5696             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5697             return ListIDs
5698
5699         ## Deprecated method
5700         #  It works like SubShapeSortedCentres(), but has a bug
5701         #  (wrongly defines centres of faces, shells and solids).
5702         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5703             """
5704             Deprecated method
5705             It works like geompy.SubShapeSortedCentres, but has a bug
5706             (wrongly defines centres of faces, shells and solids).
5707             """
5708             ListOfIDs = []
5709             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5710             for ind in ListOfInd:
5711                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5712             # note: auto-publishing is done in self.GetSubShape()
5713             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5714             return anObj
5715
5716         # end of l4_decompose_d
5717         ## @}
5718
5719         ## @addtogroup l3_healing
5720         ## @{
5721
5722         ## Apply a sequence of Shape Healing operators to the given object.
5723         #  @param theShape Shape to be processed.
5724         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5725         #  @param theParameters List of names of parameters
5726         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5727         #  @param theValues List of values of parameters, in the same order
5728         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5729         #  @param theName Object name; when specified, this parameter is used
5730         #         for result publication in the study. Otherwise, if automatic
5731         #         publication is switched on, default value is used for result name.
5732         #
5733         #  <b> Operators and Parameters: </b> \n
5734         #
5735         #  * \b FixShape - corrects invalid shapes. \n
5736         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5737         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5738         #
5739         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5740         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5741         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5742         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5743         #
5744         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5745         #    surfaces in segments using a certain angle. \n
5746         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5747         #    if Angle=180, four if Angle=90, etc). \n
5748         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5749         #
5750         #  * \b SplitClosedFaces - splits closed faces in segments.
5751         #    The number of segments depends on the number of splitting points.\n
5752         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5753         #
5754         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5755         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5756         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5757         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5758         #   This and the previous parameters can take the following values:\n
5759         #   \b Parametric \b Continuity \n
5760         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5761         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5762         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5763         #    ruling out sharp edges).\n
5764         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5765         #       are of the same magnitude).\n
5766         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5767         #    or surfaces (d/du C(u)) are the same at junction. \n
5768         #   \b Geometric \b Continuity \n
5769         #   \b G1: first derivatives are proportional at junction.\n
5770         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5771         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5772         #   \b G2: first and second derivatives are proportional at junction.
5773         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5774         #    continuity requires that the underlying parameterization was continuous as well.
5775         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5776         #
5777         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5778         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5779         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5780         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5781         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5782         #       with the specified parameters.\n
5783         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5784         #       with the specified parameters.\n
5785         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5786         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5787         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5788         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5789         #
5790         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5791         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5792         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5793         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5794         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5795         #
5796         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5797         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5798         #
5799         #
5800         #  @return New GEOM.GEOM_Object, containing processed shape.
5801         #
5802         #  \n @ref tui_shape_processing "Example"
5803         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5804             """
5805             Apply a sequence of Shape Healing operators to the given object.
5806
5807             Parameters:
5808                 theShape Shape to be processed.
5809                 theValues List of values of parameters, in the same order
5810                           as parameters are listed in theParameters list.
5811                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5812                 theParameters List of names of parameters
5813                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5814                 theName Object name; when specified, this parameter is used
5815                         for result publication in the study. Otherwise, if automatic
5816                         publication is switched on, default value is used for result name.
5817
5818                 Operators and Parameters:
5819
5820                  * FixShape - corrects invalid shapes.
5821                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5822                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5823                  * FixFaceSize - removes small faces, such as spots and strips.
5824                      * FixFaceSize.Tolerance - defines minimum possible face size.
5825                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5826                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5827                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5828                                 in segments using a certain angle.
5829                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5830                                           if Angle=180, four if Angle=90, etc).
5831                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5832                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5833                                       splitting points.
5834                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5835                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5836                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5837                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5838                      * SplitContinuity.CurveContinuity - required continuity for curves.
5839                        This and the previous parameters can take the following values:
5840                        
5841                        Parametric Continuity:
5842                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5843                                                    coincidental. The curves or surfaces may still meet at an angle,
5844                                                    giving rise to a sharp corner or edge).
5845                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5846                                                    are parallel, ruling out sharp edges).
5847                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5848                                                   or surfaces are of the same magnitude).
5849                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5850                           curves or surfaces (d/du C(u)) are the same at junction.
5851                           
5852                        Geometric Continuity:
5853                        G1: first derivatives are proportional at junction.
5854                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5855                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5856                        G2: first and second derivatives are proportional at junction. As the names imply,
5857                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5858                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5859                            geometric continuity of order n, but not vice-versa.
5860                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5861                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5862                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5863                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5864                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5865                                                         the specified parameters.
5866                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5867                                                         the specified parameters.
5868                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5869                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5870                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5871                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5872                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5873                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5874                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5875                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5876                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5877                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5878                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5879
5880             Returns:
5881                 New GEOM.GEOM_Object, containing processed shape.
5882
5883             Note: For more information look through SALOME Geometry User's Guide->
5884                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5885             """
5886             # Example: see GEOM_TestHealing.py
5887             theValues,Parameters = ParseList(theValues)
5888             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5889             # To avoid script failure in case of good argument shape
5890             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5891                 return theShape
5892             RaiseIfFailed("ProcessShape", self.HealOp)
5893             for string in (theOperators + theParameters):
5894                 Parameters = ":" + Parameters
5895                 pass
5896             anObj.SetParameters(Parameters)
5897             self._autoPublish(anObj, theName, "healed")
5898             return anObj
5899
5900         ## Remove faces from the given object (shape).
5901         #  @param theObject Shape to be processed.
5902         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5903         #                  removes ALL faces of the given object.
5904         #  @param theName Object name; when specified, this parameter is used
5905         #         for result publication in the study. Otherwise, if automatic
5906         #         publication is switched on, default value is used for result name.
5907         #
5908         #  @return New GEOM.GEOM_Object, containing processed shape.
5909         #
5910         #  @ref tui_suppress_faces "Example"
5911         def SuppressFaces(self, theObject, theFaces, theName=None):
5912             """
5913             Remove faces from the given object (shape).
5914
5915             Parameters:
5916                 theObject Shape to be processed.
5917                 theFaces Indices of faces to be removed, if EMPTY then the method
5918                          removes ALL faces of the given object.
5919                 theName Object name; when specified, this parameter is used
5920                         for result publication in the study. Otherwise, if automatic
5921                         publication is switched on, default value is used for result name.
5922
5923             Returns:
5924                 New GEOM.GEOM_Object, containing processed shape.
5925             """
5926             # Example: see GEOM_TestHealing.py
5927             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5928             RaiseIfFailed("SuppressFaces", self.HealOp)
5929             self._autoPublish(anObj, theName, "suppressFaces")
5930             return anObj
5931
5932         ## Sewing of some shapes into single shape.
5933         #  @param ListShape Shapes to be processed.
5934         #  @param theTolerance Required tolerance value.
5935         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5936         #  @param theName Object name; when specified, this parameter is used
5937         #         for result publication in the study. Otherwise, if automatic
5938         #         publication is switched on, default value is used for result name.
5939         #
5940         #  @return New GEOM.GEOM_Object, containing processed shape.
5941         #
5942         #  @ref tui_sewing "Example"
5943         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5944             """
5945             Sewing of some shapes into single shape.
5946
5947             Parameters:
5948                 ListShape Shapes to be processed.
5949                 theTolerance Required tolerance value.
5950                 AllowNonManifold Flag that allows non-manifold sewing.
5951                 theName Object name; when specified, this parameter is used
5952                         for result publication in the study. Otherwise, if automatic
5953                         publication is switched on, default value is used for result name.
5954
5955             Returns:
5956                 New GEOM.GEOM_Object, containing processed shape.
5957             """
5958             # Example: see GEOM_TestHealing.py
5959             comp = self.MakeCompound(ListShape)
5960             # note: auto-publishing is done in self.Sew()
5961             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5962             return anObj
5963
5964         ## Sewing of the given object.
5965         #  @param theObject Shape to be processed.
5966         #  @param theTolerance Required tolerance value.
5967         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5968         #  @param theName Object name; when specified, this parameter is used
5969         #         for result publication in the study. Otherwise, if automatic
5970         #         publication is switched on, default value is used for result name.
5971         #
5972         #  @return New GEOM.GEOM_Object, containing processed shape.
5973         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
5974             """
5975             Sewing of the given object.
5976
5977             Parameters:
5978                 theObject Shape to be processed.
5979                 theTolerance Required tolerance value.
5980                 AllowNonManifold Flag that allows non-manifold sewing.
5981                 theName Object name; when specified, this parameter is used
5982                         for result publication in the study. Otherwise, if automatic
5983                         publication is switched on, default value is used for result name.
5984
5985             Returns:
5986                 New GEOM.GEOM_Object, containing processed shape.
5987             """
5988             # Example: see MakeSewing() above
5989             theTolerance,Parameters = ParseParameters(theTolerance)
5990             if AllowNonManifold:
5991                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
5992             else:
5993                 anObj = self.HealOp.Sew(theObject, theTolerance)
5994             RaiseIfFailed("Sew", self.HealOp)
5995             anObj.SetParameters(Parameters)
5996             self._autoPublish(anObj, theName, "sewed")
5997             return anObj
5998
5999         ## Rebuild the topology of theCompound of solids by removing
6000         #  of the faces that are shared by several solids.
6001         #  @param theCompound Shape to be processed.
6002         #  @param theName Object name; when specified, this parameter is used
6003         #         for result publication in the study. Otherwise, if automatic
6004         #         publication is switched on, default value is used for result name.
6005         #
6006         #  @return New GEOM.GEOM_Object, containing processed shape.
6007         #
6008         #  @ref tui_remove_webs "Example"
6009         def RemoveInternalFaces (self, theCompound, theName=None):
6010             """
6011             Rebuild the topology of theCompound of solids by removing
6012             of the faces that are shared by several solids.
6013
6014             Parameters:
6015                 theCompound Shape to be processed.
6016                 theName Object name; when specified, this parameter is used
6017                         for result publication in the study. Otherwise, if automatic
6018                         publication is switched on, default value is used for result name.
6019
6020             Returns:
6021                 New GEOM.GEOM_Object, containing processed shape.
6022             """
6023             # Example: see GEOM_TestHealing.py
6024             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6025             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6026             self._autoPublish(anObj, theName, "removeWebs")
6027             return anObj
6028
6029         ## Remove internal wires and edges from the given object (face).
6030         #  @param theObject Shape to be processed.
6031         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6032         #                  removes ALL internal wires of the given object.
6033         #  @param theName Object name; when specified, this parameter is used
6034         #         for result publication in the study. Otherwise, if automatic
6035         #         publication is switched on, default value is used for result name.
6036         #
6037         #  @return New GEOM.GEOM_Object, containing processed shape.
6038         #
6039         #  @ref tui_suppress_internal_wires "Example"
6040         def SuppressInternalWires(self, theObject, theWires, theName=None):
6041             """
6042             Remove internal wires and edges from the given object (face).
6043
6044             Parameters:
6045                 theObject Shape to be processed.
6046                 theWires Indices of wires to be removed, if EMPTY then the method
6047                          removes ALL internal wires of the given object.
6048                 theName Object name; when specified, this parameter is used
6049                         for result publication in the study. Otherwise, if automatic
6050                         publication is switched on, default value is used for result name.
6051
6052             Returns:                
6053                 New GEOM.GEOM_Object, containing processed shape.
6054             """
6055             # Example: see GEOM_TestHealing.py
6056             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6057             RaiseIfFailed("RemoveIntWires", self.HealOp)
6058             self._autoPublish(anObj, theName, "suppressWires")
6059             return anObj
6060
6061         ## Remove internal closed contours (holes) from the given object.
6062         #  @param theObject Shape to be processed.
6063         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6064         #                  removes ALL internal holes of the given object
6065         #  @param theName Object name; when specified, this parameter is used
6066         #         for result publication in the study. Otherwise, if automatic
6067         #         publication is switched on, default value is used for result name.
6068         #
6069         #  @return New GEOM.GEOM_Object, containing processed shape.
6070         #
6071         #  @ref tui_suppress_holes "Example"
6072         def SuppressHoles(self, theObject, theWires, theName=None):
6073             """
6074             Remove internal closed contours (holes) from the given object.
6075
6076             Parameters:
6077                 theObject Shape to be processed.
6078                 theWires Indices of wires to be removed, if EMPTY then the method
6079                          removes ALL internal holes of the given object
6080                 theName Object name; when specified, this parameter is used
6081                         for result publication in the study. Otherwise, if automatic
6082                         publication is switched on, default value is used for result name.
6083
6084             Returns:    
6085                 New GEOM.GEOM_Object, containing processed shape.
6086             """
6087             # Example: see GEOM_TestHealing.py
6088             anObj = self.HealOp.FillHoles(theObject, theWires)
6089             RaiseIfFailed("FillHoles", self.HealOp)
6090             self._autoPublish(anObj, theName, "suppressHoles")
6091             return anObj
6092
6093         ## Close an open wire.
6094         #  @param theObject Shape to be processed.
6095         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6096         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6097         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6098         #                        If False : closure by creation of an edge between ends.
6099         #  @param theName Object name; when specified, this parameter is used
6100         #         for result publication in the study. Otherwise, if automatic
6101         #         publication is switched on, default value is used for result name.
6102         #
6103         #  @return New GEOM.GEOM_Object, containing processed shape.
6104         #
6105         #  @ref tui_close_contour "Example"
6106         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6107             """
6108             Close an open wire.
6109
6110             Parameters: 
6111                 theObject Shape to be processed.
6112                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6113                          if [ ], then theObject itself is a wire.
6114                 isCommonVertex If True  : closure by creation of a common vertex,
6115                                If False : closure by creation of an edge between ends.
6116                 theName Object name; when specified, this parameter is used
6117                         for result publication in the study. Otherwise, if automatic
6118                         publication is switched on, default value is used for result name.
6119
6120             Returns:                      
6121                 New GEOM.GEOM_Object, containing processed shape. 
6122             """
6123             # Example: see GEOM_TestHealing.py
6124             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6125             RaiseIfFailed("CloseContour", self.HealOp)
6126             self._autoPublish(anObj, theName, "closeContour")
6127             return anObj
6128
6129         ## Addition of a point to a given edge object.
6130         #  @param theObject Shape to be processed.
6131         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6132         #                      if -1, then theObject itself is the edge.
6133         #  @param theValue Value of parameter on edge or length parameter,
6134         #                  depending on \a isByParameter.
6135         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6136         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6137         #  @param theName Object name; when specified, this parameter is used
6138         #         for result publication in the study. Otherwise, if automatic
6139         #         publication is switched on, default value is used for result name.
6140         #
6141         #  @return New GEOM.GEOM_Object, containing processed shape.
6142         #
6143         #  @ref tui_add_point_on_edge "Example"
6144         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6145             """
6146             Addition of a point to a given edge object.
6147
6148             Parameters: 
6149                 theObject Shape to be processed.
6150                 theEdgeIndex Index of edge to be divided within theObject's shape,
6151                              if -1, then theObject itself is the edge.
6152                 theValue Value of parameter on edge or length parameter,
6153                          depending on isByParameter.
6154                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6155                               if FALSE : theValue is treated as a length parameter [0..1]
6156                 theName Object name; when specified, this parameter is used
6157                         for result publication in the study. Otherwise, if automatic
6158                         publication is switched on, default value is used for result name.
6159
6160             Returns:  
6161                 New GEOM.GEOM_Object, containing processed shape.
6162             """
6163             # Example: see GEOM_TestHealing.py
6164             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6165             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6166             RaiseIfFailed("DivideEdge", self.HealOp)
6167             anObj.SetParameters(Parameters)
6168             self._autoPublish(anObj, theName, "divideEdge")
6169             return anObj
6170
6171         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6172         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6173         #  @param theVertices A list of vertices to suppress. If the list
6174         #                     is empty, all vertices in a wire will be assumed.
6175         #  @param theName Object name; when specified, this parameter is used
6176         #         for result publication in the study. Otherwise, if automatic
6177         #         publication is switched on, default value is used for result name.
6178         #
6179         #  @return New GEOM.GEOM_Object with modified wire.
6180         #
6181         #  @ref tui_fuse_collinear_edges "Example"
6182         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6183             """
6184             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6185
6186             Parameters: 
6187                 theWire Wire to minimize the number of C1 continuous edges in.
6188                 theVertices A list of vertices to suppress. If the list
6189                             is empty, all vertices in a wire will be assumed.
6190                 theName Object name; when specified, this parameter is used
6191                         for result publication in the study. Otherwise, if automatic
6192                         publication is switched on, default value is used for result name.
6193
6194             Returns:  
6195                 New GEOM.GEOM_Object with modified wire.
6196             """
6197             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6198             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6199             self._autoPublish(anObj, theName, "fuseEdges")
6200             return anObj
6201
6202         ## Change orientation of the given object. Updates given shape.
6203         #  @param theObject Shape to be processed.
6204         #  @return Updated <var>theObject</var>
6205         #
6206         #  @ref swig_todo "Example"
6207         def ChangeOrientationShell(self,theObject):
6208             """
6209             Change orientation of the given object. Updates given shape.
6210
6211             Parameters: 
6212                 theObject Shape to be processed.
6213
6214             Returns:  
6215                 Updated theObject
6216             """
6217             theObject = self.HealOp.ChangeOrientation(theObject)
6218             RaiseIfFailed("ChangeOrientation", self.HealOp)
6219             pass
6220
6221         ## Change orientation of the given object.
6222         #  @param theObject Shape to be processed.
6223         #  @param theName Object name; when specified, this parameter is used
6224         #         for result publication in the study. Otherwise, if automatic
6225         #         publication is switched on, default value is used for result name.
6226         #
6227         #  @return New GEOM.GEOM_Object, containing processed shape.
6228         #
6229         #  @ref swig_todo "Example"
6230         def ChangeOrientationShellCopy(self, theObject, theName=None):
6231             """
6232             Change orientation of the given object.
6233
6234             Parameters:
6235                 theObject Shape to be processed.
6236                 theName Object name; when specified, this parameter is used
6237                         for result publication in the study. Otherwise, if automatic
6238                         publication is switched on, default value is used for result name.
6239
6240             Returns:   
6241                 New GEOM.GEOM_Object, containing processed shape.
6242             """
6243             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6244             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6245             self._autoPublish(anObj, theName, "reversed")
6246             return anObj
6247
6248         ## Try to limit tolerance of the given object by value \a theTolerance.
6249         #  @param theObject Shape to be processed.
6250         #  @param theTolerance Required tolerance value.
6251         #  @param theName Object name; when specified, this parameter is used
6252         #         for result publication in the study. Otherwise, if automatic
6253         #         publication is switched on, default value is used for result name.
6254         #
6255         #  @return New GEOM.GEOM_Object, containing processed shape.
6256         #
6257         #  @ref tui_limit_tolerance "Example"
6258         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6259             """
6260             Try to limit tolerance of the given object by value theTolerance.
6261
6262             Parameters:
6263                 theObject Shape to be processed.
6264                 theTolerance Required tolerance value.
6265                 theName Object name; when specified, this parameter is used
6266                         for result publication in the study. Otherwise, if automatic
6267                         publication is switched on, default value is used for result name.
6268
6269             Returns:   
6270                 New GEOM.GEOM_Object, containing processed shape.
6271             """
6272             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6273             RaiseIfFailed("LimitTolerance", self.HealOp)
6274             self._autoPublish(anObj, theName, "limitTolerance")
6275             return anObj
6276
6277         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6278         #  that constitute a free boundary of the given shape.
6279         #  @param theObject Shape to get free boundary of.
6280         #  @param theName Object name; when specified, this parameter is used
6281         #         for result publication in the study. Otherwise, if automatic
6282         #         publication is switched on, default value is used for result name.
6283         #
6284         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6285         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6286         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6287         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6288         #
6289         #  @ref tui_measurement_tools_page "Example"
6290         def GetFreeBoundary(self, theObject, theName=None):
6291             """
6292             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6293             that constitute a free boundary of the given shape.
6294
6295             Parameters:
6296                 theObject Shape to get free boundary of.
6297                 theName Object name; when specified, this parameter is used
6298                         for result publication in the study. Otherwise, if automatic
6299                         publication is switched on, default value is used for result name.
6300
6301             Returns: 
6302                 [status, theClosedWires, theOpenWires]
6303                  status: FALSE, if an error(s) occured during the method execution.
6304                  theClosedWires: Closed wires on the free boundary of the given shape.
6305                  theOpenWires: Open wires on the free boundary of the given shape.
6306             """
6307             # Example: see GEOM_TestHealing.py
6308             anObj = self.HealOp.GetFreeBoundary(theObject)
6309             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6310             self._autoPublish(anObj[1], theName, "closedWire")
6311             self._autoPublish(anObj[2], theName, "openWire")
6312             return anObj
6313
6314         ## Replace coincident faces in theShape by one face.
6315         #  @param theShape Initial shape.
6316         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6317         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6318         #                         otherwise all initial shapes.
6319         #  @param theName Object name; when specified, this parameter is used
6320         #         for result publication in the study. Otherwise, if automatic
6321         #         publication is switched on, default value is used for result name.
6322         #
6323         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6324         #
6325         #  @ref tui_glue_faces "Example"
6326         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6327             """
6328             Replace coincident faces in theShape by one face.
6329
6330             Parameters:
6331                 theShape Initial shape.
6332                 theTolerance Maximum distance between faces, which can be considered as coincident.
6333                 doKeepNonSolids If FALSE, only solids will present in the result,
6334                                 otherwise all initial shapes.
6335                 theName Object name; when specified, this parameter is used
6336                         for result publication in the study. Otherwise, if automatic
6337                         publication is switched on, default value is used for result name.
6338
6339             Returns:
6340                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6341             """
6342             # Example: see GEOM_Spanner.py
6343             theTolerance,Parameters = ParseParameters(theTolerance)
6344             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6345             if anObj is None:
6346                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6347             anObj.SetParameters(Parameters)
6348             self._autoPublish(anObj, theName, "glueFaces")
6349             return anObj
6350
6351         ## Find coincident faces in theShape for possible gluing.
6352         #  @param theShape Initial shape.
6353         #  @param theTolerance Maximum distance between faces,
6354         #                      which can be considered as coincident.
6355         #  @param theName Object name; when specified, this parameter is used
6356         #         for result publication in the study. Otherwise, if automatic
6357         #         publication is switched on, default value is used for result name.
6358         #
6359         #  @return GEOM.ListOfGO
6360         #
6361         #  @ref tui_glue_faces "Example"
6362         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6363             """
6364             Find coincident faces in theShape for possible gluing.
6365
6366             Parameters:
6367                 theShape Initial shape.
6368                 theTolerance Maximum distance between faces,
6369                              which can be considered as coincident.
6370                 theName Object name; when specified, this parameter is used
6371                         for result publication in the study. Otherwise, if automatic
6372                         publication is switched on, default value is used for result name.
6373
6374             Returns:                    
6375                 GEOM.ListOfGO
6376             """
6377             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6378             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6379             self._autoPublish(anObj, theName, "facesToGlue")
6380             return anObj
6381
6382         ## Replace coincident faces in theShape by one face
6383         #  in compliance with given list of faces
6384         #  @param theShape Initial shape.
6385         #  @param theTolerance Maximum distance between faces,
6386         #                      which can be considered as coincident.
6387         #  @param theFaces List of faces for gluing.
6388         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6389         #                         otherwise all initial shapes.
6390         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6391         #                        will be glued, otherwise only the edges,
6392         #                        belonging to <VAR>theFaces</VAR>.
6393         #  @param theName Object name; when specified, this parameter is used
6394         #         for result publication in the study. Otherwise, if automatic
6395         #         publication is switched on, default value is used for result name.
6396         #
6397         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6398         #          without some faces.
6399         #
6400         #  @ref tui_glue_faces "Example"
6401         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6402                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6403             """
6404             Replace coincident faces in theShape by one face
6405             in compliance with given list of faces
6406
6407             Parameters:
6408                 theShape Initial shape.
6409                 theTolerance Maximum distance between faces,
6410                              which can be considered as coincident.
6411                 theFaces List of faces for gluing.
6412                 doKeepNonSolids If FALSE, only solids will present in the result,
6413                                 otherwise all initial shapes.
6414                 doGlueAllEdges If TRUE, all coincident edges of theShape
6415                                will be glued, otherwise only the edges,
6416                                belonging to theFaces.
6417                 theName Object name; when specified, this parameter is used
6418                         for result publication in the study. Otherwise, if automatic
6419                         publication is switched on, default value is used for result name.
6420
6421             Returns:
6422                 New GEOM.GEOM_Object, containing a copy of theShape
6423                     without some faces.
6424             """
6425             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6426                                                       doKeepNonSolids, doGlueAllEdges)
6427             if anObj is None:
6428                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6429             self._autoPublish(anObj, theName, "glueFaces")
6430             return anObj
6431
6432         ## Replace coincident edges in theShape by one edge.
6433         #  @param theShape Initial shape.
6434         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6435         #  @param theName Object name; when specified, this parameter is used
6436         #         for result publication in the study. Otherwise, if automatic
6437         #         publication is switched on, default value is used for result name.
6438         #
6439         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6440         #
6441         #  @ref tui_glue_edges "Example"
6442         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6443             """
6444             Replace coincident edges in theShape by one edge.
6445
6446             Parameters:
6447                 theShape Initial shape.
6448                 theTolerance Maximum distance between edges, which can be considered as coincident.
6449                 theName Object name; when specified, this parameter is used
6450                         for result publication in the study. Otherwise, if automatic
6451                         publication is switched on, default value is used for result name.
6452
6453             Returns:    
6454                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6455             """
6456             theTolerance,Parameters = ParseParameters(theTolerance)
6457             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6458             if anObj is None:
6459                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6460             anObj.SetParameters(Parameters)
6461             self._autoPublish(anObj, theName, "glueEdges")
6462             return anObj
6463
6464         ## Find coincident edges in theShape for possible gluing.
6465         #  @param theShape Initial shape.
6466         #  @param theTolerance Maximum distance between edges,
6467         #                      which can be considered as coincident.
6468         #  @param theName Object name; when specified, this parameter is used
6469         #         for result publication in the study. Otherwise, if automatic
6470         #         publication is switched on, default value is used for result name.
6471         #
6472         #  @return GEOM.ListOfGO
6473         #
6474         #  @ref tui_glue_edges "Example"
6475         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6476             """
6477             Find coincident edges in theShape for possible gluing.
6478
6479             Parameters:
6480                 theShape Initial shape.
6481                 theTolerance Maximum distance between edges,
6482                              which can be considered as coincident.
6483                 theName Object name; when specified, this parameter is used
6484                         for result publication in the study. Otherwise, if automatic
6485                         publication is switched on, default value is used for result name.
6486
6487             Returns:                         
6488                 GEOM.ListOfGO
6489             """
6490             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6491             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6492             self._autoPublish(anObj, theName, "edgesToGlue")
6493             return anObj
6494
6495         ## Replace coincident edges in theShape by one edge
6496         #  in compliance with given list of edges.
6497         #  @param theShape Initial shape.
6498         #  @param theTolerance Maximum distance between edges,
6499         #                      which can be considered as coincident.
6500         #  @param theEdges List of edges for gluing.
6501         #  @param theName Object name; when specified, this parameter is used
6502         #         for result publication in the study. Otherwise, if automatic
6503         #         publication is switched on, default value is used for result name.
6504         #
6505         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6506         #          without some edges.
6507         #
6508         #  @ref tui_glue_edges "Example"
6509         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6510             """
6511             Replace coincident edges in theShape by one edge
6512             in compliance with given list of edges.
6513
6514             Parameters:
6515                 theShape Initial shape.
6516                 theTolerance Maximum distance between edges,
6517                              which can be considered as coincident.
6518                 theEdges List of edges for gluing.
6519                 theName Object name; when specified, this parameter is used
6520                         for result publication in the study. Otherwise, if automatic
6521                         publication is switched on, default value is used for result name.
6522
6523             Returns:  
6524                 New GEOM.GEOM_Object, containing a copy of theShape
6525                 without some edges.
6526             """
6527             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6528             if anObj is None:
6529                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6530             self._autoPublish(anObj, theName, "glueEdges")
6531             return anObj
6532
6533         # end of l3_healing
6534         ## @}
6535
6536         ## @addtogroup l3_boolean Boolean Operations
6537         ## @{
6538
6539         # -----------------------------------------------------------------------------
6540         # Boolean (Common, Cut, Fuse, Section)
6541         # -----------------------------------------------------------------------------
6542
6543         ## Perform one of boolean operations on two given shapes.
6544         #  @param theShape1 First argument for boolean operation.
6545         #  @param theShape2 Second argument for boolean operation.
6546         #  @param theOperation Indicates the operation to be done:\n
6547         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6548         #  @param theName Object name; when specified, this parameter is used
6549         #         for result publication in the study. Otherwise, if automatic
6550         #         publication is switched on, default value is used for result name.
6551         #
6552         #  @return New GEOM.GEOM_Object, containing the result shape.
6553         #
6554         #  @ref tui_fuse "Example"
6555         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6556             """
6557             Perform one of boolean operations on two given shapes.
6558
6559             Parameters: 
6560                 theShape1 First argument for boolean operation.
6561                 theShape2 Second argument for boolean operation.
6562                 theOperation Indicates the operation to be done:
6563                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6564                 theName Object name; when specified, this parameter is used
6565                         for result publication in the study. Otherwise, if automatic
6566                         publication is switched on, default value is used for result name.
6567
6568             Returns:   
6569                 New GEOM.GEOM_Object, containing the result shape.
6570             """
6571             # Example: see GEOM_TestAll.py
6572             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6573             RaiseIfFailed("MakeBoolean", self.BoolOp)
6574             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6575             self._autoPublish(anObj, theName, def_names[theOperation])
6576             return anObj
6577
6578         ## Perform Common boolean operation on two given shapes.
6579         #  @param theShape1 First argument for boolean operation.
6580         #  @param theShape2 Second argument for boolean operation.
6581         #  @param theName Object name; when specified, this parameter is used
6582         #         for result publication in the study. Otherwise, if automatic
6583         #         publication is switched on, default value is used for result name.
6584         #
6585         #  @return New GEOM.GEOM_Object, containing the result shape.
6586         #
6587         #  @ref tui_common "Example 1"
6588         #  \n @ref swig_MakeCommon "Example 2"
6589         def MakeCommon(self, theShape1, theShape2, theName=None):
6590             """
6591             Perform Common boolean operation on two given shapes.
6592
6593             Parameters: 
6594                 theShape1 First argument for boolean operation.
6595                 theShape2 Second argument for boolean operation.
6596                 theName Object name; when specified, this parameter is used
6597                         for result publication in the study. Otherwise, if automatic
6598                         publication is switched on, default value is used for result name.
6599
6600             Returns:   
6601                 New GEOM.GEOM_Object, containing the result shape.
6602             """
6603             # Example: see GEOM_TestOthers.py
6604             # note: auto-publishing is done in self.MakeBoolean()
6605             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6606
6607         ## Perform Cut boolean operation on two given shapes.
6608         #  @param theShape1 First argument for boolean operation.
6609         #  @param theShape2 Second argument for boolean operation.
6610         #  @param theName Object name; when specified, this parameter is used
6611         #         for result publication in the study. Otherwise, if automatic
6612         #         publication is switched on, default value is used for result name.
6613         #
6614         #  @return New GEOM.GEOM_Object, containing the result shape.
6615         #
6616         #  @ref tui_cut "Example 1"
6617         #  \n @ref swig_MakeCommon "Example 2"
6618         def MakeCut(self, theShape1, theShape2, theName=None):
6619             """
6620             Perform Cut boolean operation on two given shapes.
6621
6622             Parameters: 
6623                 theShape1 First argument for boolean operation.
6624                 theShape2 Second argument for boolean operation.
6625                 theName Object name; when specified, this parameter is used
6626                         for result publication in the study. Otherwise, if automatic
6627                         publication is switched on, default value is used for result name.
6628
6629             Returns:   
6630                 New GEOM.GEOM_Object, containing the result shape.
6631             
6632             """
6633             # Example: see GEOM_TestOthers.py
6634             # note: auto-publishing is done in self.MakeBoolean()
6635             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6636
6637         ## Perform Fuse boolean operation on two given shapes.
6638         #  @param theShape1 First argument for boolean operation.
6639         #  @param theShape2 Second argument for boolean operation.
6640         #  @param theName Object name; when specified, this parameter is used
6641         #         for result publication in the study. Otherwise, if automatic
6642         #         publication is switched on, default value is used for result name.
6643         #
6644         #  @return New GEOM.GEOM_Object, containing the result shape.
6645         #
6646         #  @ref tui_fuse "Example 1"
6647         #  \n @ref swig_MakeCommon "Example 2"
6648         def MakeFuse(self, theShape1, theShape2, theName=None):
6649             """
6650             Perform Fuse boolean operation on two given shapes.
6651
6652             Parameters: 
6653                 theShape1 First argument for boolean operation.
6654                 theShape2 Second argument for boolean operation.
6655                 theName Object name; when specified, this parameter is used
6656                         for result publication in the study. Otherwise, if automatic
6657                         publication is switched on, default value is used for result name.
6658
6659             Returns:   
6660                 New GEOM.GEOM_Object, containing the result shape.
6661             
6662             """
6663             # Example: see GEOM_TestOthers.py
6664             # note: auto-publishing is done in self.MakeBoolean()
6665             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6666
6667         ## Perform Section boolean operation on two given shapes.
6668         #  @param theShape1 First argument for boolean operation.
6669         #  @param theShape2 Second argument for boolean operation.
6670         #  @param theName Object name; when specified, this parameter is used
6671         #         for result publication in the study. Otherwise, if automatic
6672         #         publication is switched on, default value is used for result name.
6673         #
6674         #  @return New GEOM.GEOM_Object, containing the result shape.
6675         #
6676         #  @ref tui_section "Example 1"
6677         #  \n @ref swig_MakeCommon "Example 2"
6678         def MakeSection(self, theShape1, theShape2, theName=None):
6679             """
6680             Perform Section boolean operation on two given shapes.
6681
6682             Parameters: 
6683                 theShape1 First argument for boolean operation.
6684                 theShape2 Second argument for boolean operation.
6685                 theName Object name; when specified, this parameter is used
6686                         for result publication in the study. Otherwise, if automatic
6687                         publication is switched on, default value is used for result name.
6688
6689             Returns:   
6690                 New GEOM.GEOM_Object, containing the result shape.
6691             
6692             """
6693             # Example: see GEOM_TestOthers.py
6694             # note: auto-publishing is done in self.MakeBoolean()
6695             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6696
6697         ## Perform Fuse boolean operation on the list of shapes.
6698         #  @param theShapesList Shapes to be fused.
6699         #  @param theName Object name; when specified, this parameter is used
6700         #         for result publication in the study. Otherwise, if automatic
6701         #         publication is switched on, default value is used for result name.
6702         #
6703         #  @return New GEOM.GEOM_Object, containing the result shape.
6704         #
6705         #  @ref tui_fuse "Example 1"
6706         #  \n @ref swig_MakeCommon "Example 2"
6707         def MakeFuseList(self, theShapesList, theName=None):
6708             """
6709             Perform Fuse boolean operation on the list of shapes.
6710
6711             Parameters: 
6712                 theShapesList Shapes to be fused.
6713                 theName Object name; when specified, this parameter is used
6714                         for result publication in the study. Otherwise, if automatic
6715                         publication is switched on, default value is used for result name.
6716
6717             Returns:   
6718                 New GEOM.GEOM_Object, containing the result shape.
6719             
6720             """
6721             # Example: see GEOM_TestOthers.py
6722             anObj = self.BoolOp.MakeFuseList(theShapesList)
6723             RaiseIfFailed("MakeFuseList", self.BoolOp)
6724             self._autoPublish(anObj, theName, "fuse")
6725             return anObj
6726
6727         ## Perform Common boolean operation on the list of shapes.
6728         #  @param theShapesList Shapes for Common operation.
6729         #  @param theName Object name; when specified, this parameter is used
6730         #         for result publication in the study. Otherwise, if automatic
6731         #         publication is switched on, default value is used for result name.
6732         #
6733         #  @return New GEOM.GEOM_Object, containing the result shape.
6734         #
6735         #  @ref tui_common "Example 1"
6736         #  \n @ref swig_MakeCommon "Example 2"
6737         def MakeCommonList(self, theShapesList, theName=None):
6738             """
6739             Perform Common boolean operation on the list of shapes.
6740
6741             Parameters: 
6742                 theShapesList Shapes for Common operation.
6743                 theName Object name; when specified, this parameter is used
6744                         for result publication in the study. Otherwise, if automatic
6745                         publication is switched on, default value is used for result name.
6746
6747             Returns:   
6748                 New GEOM.GEOM_Object, containing the result shape.
6749             
6750             """
6751             # Example: see GEOM_TestOthers.py
6752             anObj = self.BoolOp.MakeCommonList(theShapesList)
6753             RaiseIfFailed("MakeCommonList", self.BoolOp)
6754             self._autoPublish(anObj, theName, "common")
6755             return anObj
6756
6757         ## Perform Cut boolean operation on one object and the list of tools.
6758         #  @param theMainShape The object of the operation.
6759         #  @param theShapesList The list of tools of the operation.
6760         #  @param theName Object name; when specified, this parameter is used
6761         #         for result publication in the study. Otherwise, if automatic
6762         #         publication is switched on, default value is used for result name.
6763         #
6764         #  @return New GEOM.GEOM_Object, containing the result shape.
6765         #
6766         #  @ref tui_cut "Example 1"
6767         #  \n @ref swig_MakeCommon "Example 2"
6768         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6769             """
6770             Perform Cut boolean operation on one object and the list of tools.
6771
6772             Parameters: 
6773                 theMainShape The object of the operation.
6774                 theShapesList The list of tools of the operation.
6775                 theName Object name; when specified, this parameter is used
6776                         for result publication in the study. Otherwise, if automatic
6777                         publication is switched on, default value is used for result name.
6778
6779             Returns:   
6780                 New GEOM.GEOM_Object, containing the result shape.
6781             
6782             """
6783             # Example: see GEOM_TestOthers.py
6784             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6785             RaiseIfFailed("MakeCutList", self.BoolOp)
6786             self._autoPublish(anObj, theName, "cut")
6787             return anObj
6788
6789         # end of l3_boolean
6790         ## @}
6791
6792         ## @addtogroup l3_basic_op
6793         ## @{
6794
6795         ## Perform partition operation.
6796         #  @param ListShapes Shapes to be intersected.
6797         #  @param ListTools Shapes to intersect theShapes.
6798         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6799         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6800         #         type will be detected automatically.
6801         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6802         #                             target type (equal to Limit) are kept in the result,
6803         #                             else standalone shapes of lower dimension
6804         #                             are kept also (if they exist).
6805         #  @param theName Object name; when specified, this parameter is used
6806         #         for result publication in the study. Otherwise, if automatic
6807         #         publication is switched on, default value is used for result name.
6808         #
6809         #  @note Each compound from ListShapes and ListTools will be exploded
6810         #        in order to avoid possible intersection between shapes from this compound.
6811         #
6812         #  After implementation new version of PartitionAlgo (October 2006)
6813         #  other parameters are ignored by current functionality. They are kept
6814         #  in this function only for support old versions.
6815         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6816         #         Each shape from theKeepInside must belong to theShapes also.
6817         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6818         #         Each shape from theRemoveInside must belong to theShapes also.
6819         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6820         #      @param ListMaterials Material indices for each shape. Make sence,
6821         #         only if theRemoveWebs is TRUE.
6822         #
6823         #  @return New GEOM.GEOM_Object, containing the result shapes.
6824         #
6825         #  @ref tui_partition "Example"
6826         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6827                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6828                           KeepNonlimitShapes=0, theName=None):
6829             """
6830             Perform partition operation.
6831
6832             Parameters: 
6833                 ListShapes Shapes to be intersected.
6834                 ListTools Shapes to intersect theShapes.
6835                 Limit Type of resulting shapes (see geompy.ShapeType)
6836                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6837                       type will be detected automatically.
6838                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6839                                     target type (equal to Limit) are kept in the result,
6840                                     else standalone shapes of lower dimension
6841                                     are kept also (if they exist).
6842                 theName Object name; when specified, this parameter is used
6843                         for result publication in the study. Otherwise, if automatic
6844                         publication is switched on, default value is used for result name.
6845             Note:
6846                     Each compound from ListShapes and ListTools will be exploded
6847                     in order to avoid possible intersection between shapes from
6848                     this compound.
6849                     
6850             After implementation new version of PartitionAlgo (October 2006) other
6851             parameters are ignored by current functionality. They are kept in this
6852             function only for support old versions.
6853             
6854             Ignored parameters:
6855                 ListKeepInside Shapes, outside which the results will be deleted.
6856                                Each shape from theKeepInside must belong to theShapes also.
6857                 ListRemoveInside Shapes, inside which the results will be deleted.
6858                                  Each shape from theRemoveInside must belong to theShapes also.
6859                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6860                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6861
6862             Returns:   
6863                 New GEOM.GEOM_Object, containing the result shapes.
6864             """
6865             # Example: see GEOM_TestAll.py
6866             if Limit == self.ShapeType["AUTO"]:
6867                 # automatic detection of the most appropriate shape limit type
6868                 lim = GEOM.SHAPE
6869                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6870                 Limit = EnumToLong(lim)
6871                 pass
6872             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6873                                               ListKeepInside, ListRemoveInside,
6874                                               Limit, RemoveWebs, ListMaterials,
6875                                               KeepNonlimitShapes);
6876             RaiseIfFailed("MakePartition", self.BoolOp)
6877             self._autoPublish(anObj, theName, "partition")
6878             return anObj
6879
6880         ## Perform partition operation.
6881         #  This method may be useful if it is needed to make a partition for
6882         #  compound contains nonintersected shapes. Performance will be better
6883         #  since intersection between shapes from compound is not performed.
6884         #
6885         #  Description of all parameters as in previous method MakePartition()
6886         #
6887         #  @note Passed compounds (via ListShapes or via ListTools)
6888         #           have to consist of nonintersecting shapes.
6889         #
6890         #  @return New GEOM.GEOM_Object, containing the result shapes.
6891         #
6892         #  @ref swig_todo "Example"
6893         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6894                                                  ListKeepInside=[], ListRemoveInside=[],
6895                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6896                                                  ListMaterials=[], KeepNonlimitShapes=0,
6897                                                  theName=None):
6898             """
6899             Perform partition operation.
6900             This method may be useful if it is needed to make a partition for
6901             compound contains nonintersected shapes. Performance will be better
6902             since intersection between shapes from compound is not performed.
6903
6904             Parameters: 
6905                 Description of all parameters as in method geompy.MakePartition
6906         
6907             NOTE:
6908                 Passed compounds (via ListShapes or via ListTools)
6909                 have to consist of nonintersecting shapes.
6910
6911             Returns:   
6912                 New GEOM.GEOM_Object, containing the result shapes.
6913             """
6914             if Limit == self.ShapeType["AUTO"]:
6915                 # automatic detection of the most appropriate shape limit type
6916                 lim = GEOM.SHAPE
6917                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6918                 Limit = EnumToLong(lim)
6919                 pass
6920             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6921                                                                      ListKeepInside, ListRemoveInside,
6922                                                                      Limit, RemoveWebs, ListMaterials,
6923                                                                      KeepNonlimitShapes);
6924             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6925             self._autoPublish(anObj, theName, "partition")
6926             return anObj
6927
6928         ## See method MakePartition() for more information.
6929         #
6930         #  @ref tui_partition "Example 1"
6931         #  \n @ref swig_Partition "Example 2"
6932         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6933                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6934                       KeepNonlimitShapes=0, theName=None):
6935             """
6936             See method geompy.MakePartition for more information.
6937             """
6938             # Example: see GEOM_TestOthers.py
6939             # note: auto-publishing is done in self.MakePartition()
6940             anObj = self.MakePartition(ListShapes, ListTools,
6941                                        ListKeepInside, ListRemoveInside,
6942                                        Limit, RemoveWebs, ListMaterials,
6943                                        KeepNonlimitShapes, theName);
6944             return anObj
6945
6946         ## Perform partition of the Shape with the Plane
6947         #  @param theShape Shape to be intersected.
6948         #  @param thePlane Tool shape, to intersect theShape.
6949         #  @param theName Object name; when specified, this parameter is used
6950         #         for result publication in the study. Otherwise, if automatic
6951         #         publication is switched on, default value is used for result name.
6952         #
6953         #  @return New GEOM.GEOM_Object, containing the result shape.
6954         #
6955         #  @ref tui_partition "Example"
6956         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6957             """
6958             Perform partition of the Shape with the Plane
6959
6960             Parameters: 
6961                 theShape Shape to be intersected.
6962                 thePlane Tool shape, to intersect theShape.
6963                 theName Object name; when specified, this parameter is used
6964                         for result publication in the study. Otherwise, if automatic
6965                         publication is switched on, default value is used for result name.
6966
6967             Returns:  
6968                 New GEOM.GEOM_Object, containing the result shape.
6969             """
6970             # Example: see GEOM_TestAll.py
6971             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6972             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6973             self._autoPublish(anObj, theName, "partition")
6974             return anObj
6975
6976         # end of l3_basic_op
6977         ## @}
6978
6979         ## @addtogroup l3_transform
6980         ## @{
6981
6982         ## Translate the given object along the vector, specified
6983         #  by its end points.
6984         #  @param theObject The object to be translated.
6985         #  @param thePoint1 Start point of translation vector.
6986         #  @param thePoint2 End point of translation vector.
6987         #  @param theCopy Flag used to translate object itself or create a copy.
6988         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6989         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6990         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6991             """
6992             Translate the given object along the vector, specified by its end points.
6993
6994             Parameters: 
6995                 theObject The object to be translated.
6996                 thePoint1 Start point of translation vector.
6997                 thePoint2 End point of translation vector.
6998                 theCopy Flag used to translate object itself or create a copy.
6999
7000             Returns: 
7001                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7002                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7003             """
7004             if theCopy:
7005                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7006             else:
7007                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7008             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7009             return anObj
7010
7011         ## Translate the given object along the vector, specified
7012         #  by its end points, creating its copy before the translation.
7013         #  @param theObject The object to be translated.
7014         #  @param thePoint1 Start point of translation vector.
7015         #  @param thePoint2 End point of translation vector.
7016         #  @param theName Object name; when specified, this parameter is used
7017         #         for result publication in the study. Otherwise, if automatic
7018         #         publication is switched on, default value is used for result name.
7019         #
7020         #  @return New GEOM.GEOM_Object, containing the translated object.
7021         #
7022         #  @ref tui_translation "Example 1"
7023         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7024         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7025             """
7026             Translate the given object along the vector, specified
7027             by its end points, creating its copy before the translation.
7028
7029             Parameters: 
7030                 theObject The object to be translated.
7031                 thePoint1 Start point of translation vector.
7032                 thePoint2 End point of translation vector.
7033                 theName Object name; when specified, this parameter is used
7034                         for result publication in the study. Otherwise, if automatic
7035                         publication is switched on, default value is used for result name.
7036
7037             Returns:  
7038                 New GEOM.GEOM_Object, containing the translated object.
7039             """
7040             # Example: see GEOM_TestAll.py
7041             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7042             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7043             self._autoPublish(anObj, theName, "translated")
7044             return anObj
7045
7046         ## Translate the given object along the vector, specified by its components.
7047         #  @param theObject The object to be translated.
7048         #  @param theDX,theDY,theDZ Components of translation vector.
7049         #  @param theCopy Flag used to translate object itself or create a copy.
7050         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7051         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7052         #
7053         #  @ref tui_translation "Example"
7054         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7055             """
7056             Translate the given object along the vector, specified by its components.
7057
7058             Parameters: 
7059                 theObject The object to be translated.
7060                 theDX,theDY,theDZ Components of translation vector.
7061                 theCopy Flag used to translate object itself or create a copy.
7062
7063             Returns: 
7064                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7065                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7066             """
7067             # Example: see GEOM_TestAll.py
7068             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7069             if theCopy:
7070                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7071             else:
7072                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7073             anObj.SetParameters(Parameters)
7074             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7075             return anObj
7076
7077         ## Translate the given object along the vector, specified
7078         #  by its components, creating its copy before the translation.
7079         #  @param theObject The object to be translated.
7080         #  @param theDX,theDY,theDZ Components of translation vector.
7081         #  @param theName Object name; when specified, this parameter is used
7082         #         for result publication in the study. Otherwise, if automatic
7083         #         publication is switched on, default value is used for result name.
7084         #
7085         #  @return New GEOM.GEOM_Object, containing the translated object.
7086         #
7087         #  @ref tui_translation "Example"
7088         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7089             """
7090             Translate the given object along the vector, specified
7091             by its components, creating its copy before the translation.
7092
7093             Parameters: 
7094                 theObject The object to be translated.
7095                 theDX,theDY,theDZ Components of translation vector.
7096                 theName Object name; when specified, this parameter is used
7097                         for result publication in the study. Otherwise, if automatic
7098                         publication is switched on, default value is used for result name.
7099
7100             Returns: 
7101                 New GEOM.GEOM_Object, containing the translated object.
7102             """
7103             # Example: see GEOM_TestAll.py
7104             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7105             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7106             anObj.SetParameters(Parameters)
7107             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7108             self._autoPublish(anObj, theName, "translated")
7109             return anObj
7110
7111         ## Translate the given object along the given vector.
7112         #  @param theObject The object to be translated.
7113         #  @param theVector The translation vector.
7114         #  @param theCopy Flag used to translate object itself or create a copy.
7115         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7116         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7117         def TranslateVector(self, theObject, theVector, theCopy=False):
7118             """
7119             Translate the given object along the given vector.
7120
7121             Parameters: 
7122                 theObject The object to be translated.
7123                 theVector The translation vector.
7124                 theCopy Flag used to translate object itself or create a copy.
7125
7126             Returns: 
7127                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7128                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7129             """
7130             if theCopy:
7131                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7132             else:
7133                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7134             RaiseIfFailed("TranslateVector", self.TrsfOp)
7135             return anObj
7136
7137         ## Translate the given object along the given vector,
7138         #  creating its copy before the translation.
7139         #  @param theObject The object to be translated.
7140         #  @param theVector The translation vector.
7141         #  @param theName Object name; when specified, this parameter is used
7142         #         for result publication in the study. Otherwise, if automatic
7143         #         publication is switched on, default value is used for result name.
7144         #
7145         #  @return New GEOM.GEOM_Object, containing the translated object.
7146         #
7147         #  @ref tui_translation "Example"
7148         def MakeTranslationVector(self, theObject, theVector, theName=None):
7149             """
7150             Translate the given object along the given vector,
7151             creating its copy before the translation.
7152
7153             Parameters: 
7154                 theObject The object to be translated.
7155                 theVector The translation vector.
7156                 theName Object name; when specified, this parameter is used
7157                         for result publication in the study. Otherwise, if automatic
7158                         publication is switched on, default value is used for result name.
7159
7160             Returns: 
7161                 New GEOM.GEOM_Object, containing the translated object.
7162             """
7163             # Example: see GEOM_TestAll.py
7164             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7165             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7166             self._autoPublish(anObj, theName, "translated")
7167             return anObj
7168
7169         ## Translate the given object along the given vector on given distance.
7170         #  @param theObject The object to be translated.
7171         #  @param theVector The translation vector.
7172         #  @param theDistance The translation distance.
7173         #  @param theCopy Flag used to translate object itself or create a copy.
7174         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7175         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7176         #
7177         #  @ref tui_translation "Example"
7178         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7179             """
7180             Translate the given object along the given vector on given distance.
7181
7182             Parameters: 
7183                 theObject The object to be translated.
7184                 theVector The translation vector.
7185                 theDistance The translation distance.
7186                 theCopy Flag used to translate object itself or create a copy.
7187
7188             Returns: 
7189                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7190                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7191             """
7192             # Example: see GEOM_TestAll.py
7193             theDistance,Parameters = ParseParameters(theDistance)
7194             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7195             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7196             anObj.SetParameters(Parameters)
7197             return anObj
7198
7199         ## Translate the given object along the given vector on given distance,
7200         #  creating its copy before the translation.
7201         #  @param theObject The object to be translated.
7202         #  @param theVector The translation vector.
7203         #  @param theDistance The translation distance.
7204         #  @param theName Object name; when specified, this parameter is used
7205         #         for result publication in the study. Otherwise, if automatic
7206         #         publication is switched on, default value is used for result name.
7207         #
7208         #  @return New GEOM.GEOM_Object, containing the translated object.
7209         #
7210         #  @ref tui_translation "Example"
7211         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7212             """
7213             Translate the given object along the given vector on given distance,
7214             creating its copy before the translation.
7215
7216             Parameters:
7217                 theObject The object to be translated.
7218                 theVector The translation vector.
7219                 theDistance The translation distance.
7220                 theName Object name; when specified, this parameter is used
7221                         for result publication in the study. Otherwise, if automatic
7222                         publication is switched on, default value is used for result name.
7223
7224             Returns: 
7225                 New GEOM.GEOM_Object, containing the translated object.
7226             """
7227             # Example: see GEOM_TestAll.py
7228             theDistance,Parameters = ParseParameters(theDistance)
7229             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7230             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7231             anObj.SetParameters(Parameters)
7232             self._autoPublish(anObj, theName, "translated")
7233             return anObj
7234
7235         ## Rotate the given object around the given axis on the given angle.
7236         #  @param theObject The object to be rotated.
7237         #  @param theAxis Rotation axis.
7238         #  @param theAngle Rotation angle in radians.
7239         #  @param theCopy Flag used to rotate object itself or create a copy.
7240         #
7241         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7242         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7243         #
7244         #  @ref tui_rotation "Example"
7245         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7246             """
7247             Rotate the given object around the given axis on the given angle.
7248
7249             Parameters:
7250                 theObject The object to be rotated.
7251                 theAxis Rotation axis.
7252                 theAngle Rotation angle in radians.
7253                 theCopy Flag used to rotate object itself or create a copy.
7254
7255             Returns:
7256                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7257                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7258             """
7259             # Example: see GEOM_TestAll.py
7260             flag = False
7261             if isinstance(theAngle,str):
7262                 flag = True
7263             theAngle, Parameters = ParseParameters(theAngle)
7264             if flag:
7265                 theAngle = theAngle*math.pi/180.0
7266             if theCopy:
7267                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7268             else:
7269                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7270             RaiseIfFailed("Rotate", self.TrsfOp)
7271             anObj.SetParameters(Parameters)
7272             return anObj
7273
7274         ## Rotate the given object around the given axis
7275         #  on the given angle, creating its copy before the rotatation.
7276         #  @param theObject The object to be rotated.
7277         #  @param theAxis Rotation axis.
7278         #  @param theAngle Rotation angle in radians.
7279         #  @param theName Object name; when specified, this parameter is used
7280         #         for result publication in the study. Otherwise, if automatic
7281         #         publication is switched on, default value is used for result name.
7282         #
7283         #  @return New GEOM.GEOM_Object, containing the rotated object.
7284         #
7285         #  @ref tui_rotation "Example"
7286         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7287             """
7288             Rotate the given object around the given axis
7289             on the given angle, creating its copy before the rotatation.
7290
7291             Parameters:
7292                 theObject The object to be rotated.
7293                 theAxis Rotation axis.
7294                 theAngle Rotation angle in radians.
7295                 theName Object name; when specified, this parameter is used
7296                         for result publication in the study. Otherwise, if automatic
7297                         publication is switched on, default value is used for result name.
7298
7299             Returns:
7300                 New GEOM.GEOM_Object, containing the rotated object.
7301             """
7302             # Example: see GEOM_TestAll.py
7303             flag = False
7304             if isinstance(theAngle,str):
7305                 flag = True
7306             theAngle, Parameters = ParseParameters(theAngle)
7307             if flag:
7308                 theAngle = theAngle*math.pi/180.0
7309             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7310             RaiseIfFailed("RotateCopy", self.TrsfOp)
7311             anObj.SetParameters(Parameters)
7312             self._autoPublish(anObj, theName, "rotated")
7313             return anObj
7314
7315         ## Rotate given object around vector perpendicular to plane
7316         #  containing three points.
7317         #  @param theObject The object to be rotated.
7318         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7319         #  containing the three points.
7320         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7321         #  @param theCopy Flag used to rotate object itself or create a copy.
7322         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7323         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7324         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7325             """
7326             Rotate given object around vector perpendicular to plane
7327             containing three points.
7328
7329             Parameters:
7330                 theObject The object to be rotated.
7331                 theCentPoint central point  the axis is the vector perpendicular to the plane
7332                              containing the three points.
7333                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7334                 theCopy Flag used to rotate object itself or create a copy.
7335
7336             Returns:
7337                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7338                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7339             """
7340             if theCopy:
7341                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7342             else:
7343                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7344             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7345             return anObj
7346
7347         ## Rotate given object around vector perpendicular to plane
7348         #  containing three points, creating its copy before the rotatation.
7349         #  @param theObject The object to be rotated.
7350         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7351         #  containing the three points.
7352         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7353         #  @param theName Object name; when specified, this parameter is used
7354         #         for result publication in the study. Otherwise, if automatic
7355         #         publication is switched on, default value is used for result name.
7356         #
7357         #  @return New GEOM.GEOM_Object, containing the rotated object.
7358         #
7359         #  @ref tui_rotation "Example"
7360         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7361             """
7362             Rotate given object around vector perpendicular to plane
7363             containing three points, creating its copy before the rotatation.
7364
7365             Parameters:
7366                 theObject The object to be rotated.
7367                 theCentPoint central point  the axis is the vector perpendicular to the plane
7368                              containing the three points.
7369                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7370                 theName Object name; when specified, this parameter is used
7371                         for result publication in the study. Otherwise, if automatic
7372                         publication is switched on, default value is used for result name.
7373
7374             Returns:
7375                 New GEOM.GEOM_Object, containing the rotated object.
7376             """
7377             # Example: see GEOM_TestAll.py
7378             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7379             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7380             self._autoPublish(anObj, theName, "rotated")
7381             return anObj
7382
7383         ## Scale the given object by the specified factor.
7384         #  @param theObject The object to be scaled.
7385         #  @param thePoint Center point for scaling.
7386         #                  Passing None for it means scaling relatively the origin of global CS.
7387         #  @param theFactor Scaling factor value.
7388         #  @param theCopy Flag used to scale object itself or create a copy.
7389         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7390         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7391         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7392             """
7393             Scale the given object by the specified factor.
7394
7395             Parameters:
7396                 theObject The object to be scaled.
7397                 thePoint Center point for scaling.
7398                          Passing None for it means scaling relatively the origin of global CS.
7399                 theFactor Scaling factor value.
7400                 theCopy Flag used to scale object itself or create a copy.
7401
7402             Returns:    
7403                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7404                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7405             """
7406             # Example: see GEOM_TestAll.py
7407             theFactor, Parameters = ParseParameters(theFactor)
7408             if theCopy:
7409                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7410             else:
7411                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7412             RaiseIfFailed("Scale", self.TrsfOp)
7413             anObj.SetParameters(Parameters)
7414             return anObj
7415
7416         ## Scale the given object by the factor, creating its copy before the scaling.
7417         #  @param theObject The object to be scaled.
7418         #  @param thePoint Center point for scaling.
7419         #                  Passing None for it means scaling relatively the origin of global CS.
7420         #  @param theFactor Scaling factor value.
7421         #  @param theName Object name; when specified, this parameter is used
7422         #         for result publication in the study. Otherwise, if automatic
7423         #         publication is switched on, default value is used for result name.
7424         #
7425         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7426         #
7427         #  @ref tui_scale "Example"
7428         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7429             """
7430             Scale the given object by the factor, creating its copy before the scaling.
7431
7432             Parameters:
7433                 theObject The object to be scaled.
7434                 thePoint Center point for scaling.
7435                          Passing None for it means scaling relatively the origin of global CS.
7436                 theFactor Scaling factor value.
7437                 theName Object name; when specified, this parameter is used
7438                         for result publication in the study. Otherwise, if automatic
7439                         publication is switched on, default value is used for result name.
7440
7441             Returns:    
7442                 New GEOM.GEOM_Object, containing the scaled shape.
7443             """
7444             # Example: see GEOM_TestAll.py
7445             theFactor, Parameters = ParseParameters(theFactor)
7446             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7447             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7448             anObj.SetParameters(Parameters)
7449             self._autoPublish(anObj, theName, "scaled")
7450             return anObj
7451
7452         ## Scale the given object by different factors along coordinate axes.
7453         #  @param theObject The object to be scaled.
7454         #  @param thePoint Center point for scaling.
7455         #                  Passing None for it means scaling relatively the origin of global CS.
7456         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7457         #  @param theCopy Flag used to scale object itself or create a copy.
7458         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7459         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7460         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7461             """
7462             Scale the given object by different factors along coordinate axes.
7463
7464             Parameters:
7465                 theObject The object to be scaled.
7466                 thePoint Center point for scaling.
7467                             Passing None for it means scaling relatively the origin of global CS.
7468                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7469                 theCopy Flag used to scale object itself or create a copy.
7470
7471             Returns:    
7472                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7473                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7474             """
7475             # Example: see GEOM_TestAll.py
7476             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7477             if theCopy:
7478                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7479                                                             theFactorX, theFactorY, theFactorZ)
7480             else:
7481                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7482                                                         theFactorX, theFactorY, theFactorZ)
7483             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7484             anObj.SetParameters(Parameters)
7485             return anObj
7486
7487         ## Scale the given object by different factors along coordinate axes,
7488         #  creating its copy before the scaling.
7489         #  @param theObject The object to be scaled.
7490         #  @param thePoint Center point for scaling.
7491         #                  Passing None for it means scaling relatively the origin of global CS.
7492         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7493         #  @param theName Object name; when specified, this parameter is used
7494         #         for result publication in the study. Otherwise, if automatic
7495         #         publication is switched on, default value is used for result name.
7496         #
7497         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7498         #
7499         #  @ref swig_scale "Example"
7500         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7501             """
7502             Scale the given object by different factors along coordinate axes,
7503             creating its copy before the scaling.
7504
7505             Parameters:
7506                 theObject The object to be scaled.
7507                 thePoint Center point for scaling.
7508                             Passing None for it means scaling relatively the origin of global CS.
7509                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7510                 theName Object name; when specified, this parameter is used
7511                         for result publication in the study. Otherwise, if automatic
7512                         publication is switched on, default value is used for result name.
7513
7514             Returns:
7515                 New GEOM.GEOM_Object, containing the scaled shape.
7516             """
7517             # Example: see GEOM_TestAll.py
7518             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7519             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7520                                                         theFactorX, theFactorY, theFactorZ)
7521             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7522             anObj.SetParameters(Parameters)
7523             self._autoPublish(anObj, theName, "scaled")
7524             return anObj
7525
7526         ## Mirror an object relatively the given plane.
7527         #  @param theObject The object to be mirrored.
7528         #  @param thePlane Plane of symmetry.
7529         #  @param theCopy Flag used to mirror object itself or create a copy.
7530         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7531         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7532         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7533             """
7534             Mirror an object relatively the given plane.
7535
7536             Parameters:
7537                 theObject The object to be mirrored.
7538                 thePlane Plane of symmetry.
7539                 theCopy Flag used to mirror object itself or create a copy.
7540
7541             Returns:
7542                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7543                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7544             """
7545             if theCopy:
7546                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7547             else:
7548                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7549             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7550             return anObj
7551
7552         ## Create an object, symmetrical
7553         #  to the given one relatively the given plane.
7554         #  @param theObject The object to be mirrored.
7555         #  @param thePlane Plane of symmetry.
7556         #  @param theName Object name; when specified, this parameter is used
7557         #         for result publication in the study. Otherwise, if automatic
7558         #         publication is switched on, default value is used for result name.
7559         #
7560         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7561         #
7562         #  @ref tui_mirror "Example"
7563         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7564             """
7565             Create an object, symmetrical to the given one relatively the given plane.
7566
7567             Parameters:
7568                 theObject The object to be mirrored.
7569                 thePlane Plane of symmetry.
7570                 theName Object name; when specified, this parameter is used
7571                         for result publication in the study. Otherwise, if automatic
7572                         publication is switched on, default value is used for result name.
7573
7574             Returns:
7575                 New GEOM.GEOM_Object, containing the mirrored shape.
7576             """
7577             # Example: see GEOM_TestAll.py
7578             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7579             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7580             self._autoPublish(anObj, theName, "mirrored")
7581             return anObj
7582
7583         ## Mirror an object relatively the given axis.
7584         #  @param theObject The object to be mirrored.
7585         #  @param theAxis Axis of symmetry.
7586         #  @param theCopy Flag used to mirror object itself or create a copy.
7587         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7588         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7589         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7590             """
7591             Mirror an object relatively the given axis.
7592
7593             Parameters:
7594                 theObject The object to be mirrored.
7595                 theAxis Axis of symmetry.
7596                 theCopy Flag used to mirror object itself or create a copy.
7597
7598             Returns:
7599                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7600                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7601             """
7602             if theCopy:
7603                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7604             else:
7605                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7606             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7607             return anObj
7608
7609         ## Create an object, symmetrical
7610         #  to the given one relatively the given axis.
7611         #  @param theObject The object to be mirrored.
7612         #  @param theAxis Axis of symmetry.
7613         #  @param theName Object name; when specified, this parameter is used
7614         #         for result publication in the study. Otherwise, if automatic
7615         #         publication is switched on, default value is used for result name.
7616         #
7617         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7618         #
7619         #  @ref tui_mirror "Example"
7620         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7621             """
7622             Create an object, symmetrical to the given one relatively the given axis.
7623
7624             Parameters:
7625                 theObject The object to be mirrored.
7626                 theAxis Axis of symmetry.
7627                 theName Object name; when specified, this parameter is used
7628                         for result publication in the study. Otherwise, if automatic
7629                         publication is switched on, default value is used for result name.
7630
7631             Returns: 
7632                 New GEOM.GEOM_Object, containing the mirrored shape.
7633             """
7634             # Example: see GEOM_TestAll.py
7635             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7636             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7637             self._autoPublish(anObj, theName, "mirrored")
7638             return anObj
7639
7640         ## Mirror an object relatively the given point.
7641         #  @param theObject The object to be mirrored.
7642         #  @param thePoint Point of symmetry.
7643         #  @param theCopy Flag used to mirror object itself or create a copy.
7644         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7645         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7646         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7647             """
7648             Mirror an object relatively the given point.
7649
7650             Parameters:
7651                 theObject The object to be mirrored.
7652                 thePoint Point of symmetry.
7653                 theCopy Flag used to mirror object itself or create a copy.
7654
7655             Returns:
7656                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7657                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7658             """
7659             # Example: see GEOM_TestAll.py
7660             if theCopy:
7661                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7662             else:
7663                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7664             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7665             return anObj
7666
7667         ## Create an object, symmetrical
7668         #  to the given one relatively the given point.
7669         #  @param theObject The object to be mirrored.
7670         #  @param thePoint Point of symmetry.
7671         #  @param theName Object name; when specified, this parameter is used
7672         #         for result publication in the study. Otherwise, if automatic
7673         #         publication is switched on, default value is used for result name.
7674         #
7675         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7676         #
7677         #  @ref tui_mirror "Example"
7678         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7679             """
7680             Create an object, symmetrical
7681             to the given one relatively the given point.
7682
7683             Parameters:
7684                 theObject The object to be mirrored.
7685                 thePoint Point of symmetry.
7686                 theName Object name; when specified, this parameter is used
7687                         for result publication in the study. Otherwise, if automatic
7688                         publication is switched on, default value is used for result name.
7689
7690             Returns:  
7691                 New GEOM.GEOM_Object, containing the mirrored shape.
7692             """
7693             # Example: see GEOM_TestAll.py
7694             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7695             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7696             self._autoPublish(anObj, theName, "mirrored")
7697             return anObj
7698
7699         ## Modify the location of the given object.
7700         #  @param theObject The object to be displaced.
7701         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7702         #                     If \a theStartLCS is NULL, displacement
7703         #                     will be performed from global CS.\n
7704         #                     If \a theObject itself is used as \a theStartLCS,
7705         #                     its location will be changed to \a theEndLCS.
7706         #  @param theEndLCS Coordinate system to perform displacement to it.
7707         #  @param theCopy Flag used to displace object itself or create a copy.
7708         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7709         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7710         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7711             """
7712             Modify the Location of the given object by LCS, creating its copy before the setting.
7713
7714             Parameters:
7715                 theObject The object to be displaced.
7716                 theStartLCS Coordinate system to perform displacement from it.
7717                             If theStartLCS is NULL, displacement
7718                             will be performed from global CS.
7719                             If theObject itself is used as theStartLCS,
7720                             its location will be changed to theEndLCS.
7721                 theEndLCS Coordinate system to perform displacement to it.
7722                 theCopy Flag used to displace object itself or create a copy.
7723
7724             Returns:
7725                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7726                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7727             """
7728             # Example: see GEOM_TestAll.py
7729             if theCopy:
7730                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7731             else:
7732                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7733             RaiseIfFailed("Displace", self.TrsfOp)
7734             return anObj
7735
7736         ## Modify the Location of the given object by LCS,
7737         #  creating its copy before the setting.
7738         #  @param theObject The object to be displaced.
7739         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7740         #                     If \a theStartLCS is NULL, displacement
7741         #                     will be performed from global CS.\n
7742         #                     If \a theObject itself is used as \a theStartLCS,
7743         #                     its location will be changed to \a theEndLCS.
7744         #  @param theEndLCS Coordinate system to perform displacement to it.
7745         #  @param theName Object name; when specified, this parameter is used
7746         #         for result publication in the study. Otherwise, if automatic
7747         #         publication is switched on, default value is used for result name.
7748         #
7749         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7750         #
7751         #  @ref tui_modify_location "Example"
7752         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7753             """
7754             Modify the Location of the given object by LCS, creating its copy before the setting.
7755
7756             Parameters:
7757                 theObject The object to be displaced.
7758                 theStartLCS Coordinate system to perform displacement from it.
7759                             If theStartLCS is NULL, displacement
7760                             will be performed from global CS.
7761                             If theObject itself is used as theStartLCS,
7762                             its location will be changed to theEndLCS.
7763                 theEndLCS Coordinate system to perform displacement to it.
7764                 theName Object name; when specified, this parameter is used
7765                         for result publication in the study. Otherwise, if automatic
7766                         publication is switched on, default value is used for result name.
7767
7768             Returns:  
7769                 New GEOM.GEOM_Object, containing the displaced shape.
7770
7771             Example of usage:
7772                 # create local coordinate systems
7773                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7774                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7775                 # modify the location of the given object
7776                 position = geompy.MakePosition(cylinder, cs1, cs2)
7777             """
7778             # Example: see GEOM_TestAll.py
7779             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7780             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7781             self._autoPublish(anObj, theName, "displaced")
7782             return anObj
7783
7784         ## Modify the Location of the given object by Path.
7785         #  @param  theObject The object to be displaced.
7786         #  @param  thePath Wire or Edge along that the object will be translated.
7787         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7788         #  @param  theCopy is to create a copy objects if true.
7789         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7790         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7791         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7792         #
7793         #  @ref tui_modify_location "Example"
7794         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7795             """
7796             Modify the Location of the given object by Path.
7797
7798             Parameters:
7799                  theObject The object to be displaced.
7800                  thePath Wire or Edge along that the object will be translated.
7801                  theDistance progress of Path (0 = start location, 1 = end of path location).
7802                  theCopy is to create a copy objects if true.
7803                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7804
7805             Returns:  
7806                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7807                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7808
7809             Example of usage:
7810                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7811             """
7812             # Example: see GEOM_TestAll.py
7813             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7814             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7815             return anObj
7816
7817         ## Modify the Location of the given object by Path, creating its copy before the operation.
7818         #  @param theObject The object to be displaced.
7819         #  @param thePath Wire or Edge along that the object will be translated.
7820         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7821         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7822         #  @param theName Object name; when specified, this parameter is used
7823         #         for result publication in the study. Otherwise, if automatic
7824         #         publication is switched on, default value is used for result name.
7825         #
7826         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7827         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7828             """
7829             Modify the Location of the given object by Path, creating its copy before the operation.
7830
7831             Parameters:
7832                  theObject The object to be displaced.
7833                  thePath Wire or Edge along that the object will be translated.
7834                  theDistance progress of Path (0 = start location, 1 = end of path location).
7835                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7836                  theName Object name; when specified, this parameter is used
7837                          for result publication in the study. Otherwise, if automatic
7838                          publication is switched on, default value is used for result name.
7839
7840             Returns:  
7841                 New GEOM.GEOM_Object, containing the displaced shape.
7842             """
7843             # Example: see GEOM_TestAll.py
7844             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7845             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7846             self._autoPublish(anObj, theName, "displaced")
7847             return anObj
7848
7849         ## Offset given shape.
7850         #  @param theObject The base object for the offset.
7851         #  @param theOffset Offset value.
7852         #  @param theCopy Flag used to offset object itself or create a copy.
7853         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7854         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7855         def Offset(self, theObject, theOffset, theCopy=False):
7856             """
7857             Offset given shape.
7858
7859             Parameters:
7860                 theObject The base object for the offset.
7861                 theOffset Offset value.
7862                 theCopy Flag used to offset object itself or create a copy.
7863
7864             Returns: 
7865                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7866                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7867             """
7868             theOffset, Parameters = ParseParameters(theOffset)
7869             if theCopy:
7870                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7871             else:
7872                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7873             RaiseIfFailed("Offset", self.TrsfOp)
7874             anObj.SetParameters(Parameters)
7875             return anObj
7876
7877         ## Create new object as offset of the given one.
7878         #  @param theObject The base object for the offset.
7879         #  @param theOffset Offset value.
7880         #  @param theName Object name; when specified, this parameter is used
7881         #         for result publication in the study. Otherwise, if automatic
7882         #         publication is switched on, default value is used for result name.
7883         #
7884         #  @return New GEOM.GEOM_Object, containing the offset object.
7885         #
7886         #  @ref tui_offset "Example"
7887         def MakeOffset(self, theObject, theOffset, theName=None):
7888             """
7889             Create new object as offset of the given one.
7890
7891             Parameters:
7892                 theObject The base object for the offset.
7893                 theOffset Offset value.
7894                 theName Object name; when specified, this parameter is used
7895                         for result publication in the study. Otherwise, if automatic
7896                         publication is switched on, default value is used for result name.
7897
7898             Returns:  
7899                 New GEOM.GEOM_Object, containing the offset object.
7900
7901             Example of usage:
7902                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7903                  # create a new object as offset of the given object
7904                  offset = geompy.MakeOffset(box, 70.)
7905             """
7906             # Example: see GEOM_TestAll.py
7907             theOffset, Parameters = ParseParameters(theOffset)
7908             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7909             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7910             anObj.SetParameters(Parameters)
7911             self._autoPublish(anObj, theName, "offset")
7912             return anObj
7913
7914         ## Create new object as projection of the given one on a 2D surface.
7915         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7916         #  @param theTarget The target object. It can be planar or cylindrical face.
7917         #  @param theName Object name; when specified, this parameter is used
7918         #         for result publication in the study. Otherwise, if automatic
7919         #         publication is switched on, default value is used for result name.
7920         #
7921         #  @return New GEOM.GEOM_Object, containing the projection.
7922         #
7923         #  @ref tui_projection "Example"
7924         def MakeProjection(self, theSource, theTarget, theName=None):
7925             """
7926             Create new object as projection of the given one on a 2D surface.
7927
7928             Parameters:
7929                 theSource The source object for the projection. It can be a point, edge or wire.
7930                 theTarget The target object. It can be planar or cylindrical face.
7931                 theName Object name; when specified, this parameter is used
7932                         for result publication in the study. Otherwise, if automatic
7933                         publication is switched on, default value is used for result name.
7934
7935             Returns:  
7936                 New GEOM.GEOM_Object, containing the projection.
7937             """
7938             # Example: see GEOM_TestAll.py
7939             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7940             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7941             self._autoPublish(anObj, theName, "projection")
7942             return anObj
7943
7944         # -----------------------------------------------------------------------------
7945         # Patterns
7946         # -----------------------------------------------------------------------------
7947
7948         ## Translate the given object along the given vector a given number times
7949         #  @param theObject The object to be translated.
7950         #  @param theVector Direction of the translation. DX if None.
7951         #  @param theStep Distance to translate on.
7952         #  @param theNbTimes Quantity of translations to be done.
7953         #  @param theName Object name; when specified, this parameter is used
7954         #         for result publication in the study. Otherwise, if automatic
7955         #         publication is switched on, default value is used for result name.
7956         #
7957         #  @return New GEOM.GEOM_Object, containing compound of all
7958         #          the shapes, obtained after each translation.
7959         #
7960         #  @ref tui_multi_translation "Example"
7961         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7962             """
7963             Translate the given object along the given vector a given number times
7964
7965             Parameters:
7966                 theObject The object to be translated.
7967                 theVector Direction of the translation. DX if None.
7968                 theStep Distance to translate on.
7969                 theNbTimes Quantity of translations to be done.
7970                 theName Object name; when specified, this parameter is used
7971                         for result publication in the study. Otherwise, if automatic
7972                         publication is switched on, default value is used for result name.
7973
7974             Returns:     
7975                 New GEOM.GEOM_Object, containing compound of all
7976                 the shapes, obtained after each translation.
7977
7978             Example of usage:
7979                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7980             """
7981             # Example: see GEOM_TestAll.py
7982             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7983             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7984             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7985             anObj.SetParameters(Parameters)
7986             self._autoPublish(anObj, theName, "multitranslation")
7987             return anObj
7988
7989         ## Conseqently apply two specified translations to theObject specified number of times.
7990         #  @param theObject The object to be translated.
7991         #  @param theVector1 Direction of the first translation. DX if None.
7992         #  @param theStep1 Step of the first translation.
7993         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7994         #  @param theVector2 Direction of the second translation. DY if None.
7995         #  @param theStep2 Step of the second translation.
7996         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7997         #  @param theName Object name; when specified, this parameter is used
7998         #         for result publication in the study. Otherwise, if automatic
7999         #         publication is switched on, default value is used for result name.
8000         #
8001         #  @return New GEOM.GEOM_Object, containing compound of all
8002         #          the shapes, obtained after each translation.
8003         #
8004         #  @ref tui_multi_translation "Example"
8005         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8006                                    theVector2, theStep2, theNbTimes2, theName=None):
8007             """
8008             Conseqently apply two specified translations to theObject specified number of times.
8009
8010             Parameters:
8011                 theObject The object to be translated.
8012                 theVector1 Direction of the first translation. DX if None.
8013                 theStep1 Step of the first translation.
8014                 theNbTimes1 Quantity of translations to be done along theVector1.
8015                 theVector2 Direction of the second translation. DY if None.
8016                 theStep2 Step of the second translation.
8017                 theNbTimes2 Quantity of translations to be done along theVector2.
8018                 theName Object name; when specified, this parameter is used
8019                         for result publication in the study. Otherwise, if automatic
8020                         publication is switched on, default value is used for result name.
8021
8022             Returns:
8023                 New GEOM.GEOM_Object, containing compound of all
8024                 the shapes, obtained after each translation.
8025
8026             Example of usage:
8027                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8028             """
8029             # Example: see GEOM_TestAll.py
8030             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8031             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8032                                                  theVector2, theStep2, theNbTimes2)
8033             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8034             anObj.SetParameters(Parameters)
8035             self._autoPublish(anObj, theName, "multitranslation")
8036             return anObj
8037
8038         ## Rotate the given object around the given axis a given number times.
8039         #  Rotation angle will be 2*PI/theNbTimes.
8040         #  @param theObject The object to be rotated.
8041         #  @param theAxis The rotation axis. DZ if None.
8042         #  @param theNbTimes Quantity of rotations to be done.
8043         #  @param theName Object name; when specified, this parameter is used
8044         #         for result publication in the study. Otherwise, if automatic
8045         #         publication is switched on, default value is used for result name.
8046         #
8047         #  @return New GEOM.GEOM_Object, containing compound of all the
8048         #          shapes, obtained after each rotation.
8049         #
8050         #  @ref tui_multi_rotation "Example"
8051         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8052             """
8053             Rotate the given object around the given axis a given number times.
8054             Rotation angle will be 2*PI/theNbTimes.
8055
8056             Parameters:
8057                 theObject The object to be rotated.
8058                 theAxis The rotation axis. DZ if None.
8059                 theNbTimes Quantity of rotations to be done.
8060                 theName Object name; when specified, this parameter is used
8061                         for result publication in the study. Otherwise, if automatic
8062                         publication is switched on, default value is used for result name.
8063
8064             Returns:     
8065                 New GEOM.GEOM_Object, containing compound of all the
8066                 shapes, obtained after each rotation.
8067
8068             Example of usage:
8069                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8070             """
8071             # Example: see GEOM_TestAll.py
8072             theNbTimes, Parameters = ParseParameters(theNbTimes)
8073             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8074             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8075             anObj.SetParameters(Parameters)
8076             self._autoPublish(anObj, theName, "multirotation")
8077             return anObj
8078
8079         ## Rotate the given object around the given axis
8080         #  a given number times on the given angle.
8081         #  @param theObject The object to be rotated.
8082         #  @param theAxis The rotation axis. DZ if None.
8083         #  @param theAngleStep Rotation angle in radians.
8084         #  @param theNbTimes Quantity of rotations to be done.
8085         #  @param theName Object name; when specified, this parameter is used
8086         #         for result publication in the study. Otherwise, if automatic
8087         #         publication is switched on, default value is used for result name.
8088         #
8089         #  @return New GEOM.GEOM_Object, containing compound of all the
8090         #          shapes, obtained after each rotation.
8091         #
8092         #  @ref tui_multi_rotation "Example"
8093         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8094             """
8095             Rotate the given object around the given axis
8096             a given number times on the given angle.
8097
8098             Parameters:
8099                 theObject The object to be rotated.
8100                 theAxis The rotation axis. DZ if None.
8101                 theAngleStep Rotation angle in radians.
8102                 theNbTimes Quantity of rotations to be done.
8103                 theName Object name; when specified, this parameter is used
8104                         for result publication in the study. Otherwise, if automatic
8105                         publication is switched on, default value is used for result name.
8106
8107             Returns:     
8108                 New GEOM.GEOM_Object, containing compound of all the
8109                 shapes, obtained after each rotation.
8110
8111             Example of usage:
8112                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8113             """
8114             # Example: see GEOM_TestAll.py
8115             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8116             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8117             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8118             anObj.SetParameters(Parameters)
8119             self._autoPublish(anObj, theName, "multirotation")
8120             return anObj
8121
8122         ## Rotate the given object around the given axis a given
8123         #  number times and multi-translate each rotation result.
8124         #  Rotation angle will be 2*PI/theNbTimes1.
8125         #  Translation direction passes through center of gravity
8126         #  of rotated shape and its projection on the rotation axis.
8127         #  @param theObject The object to be rotated.
8128         #  @param theAxis Rotation axis. DZ if None.
8129         #  @param theNbTimes1 Quantity of rotations to be done.
8130         #  @param theRadialStep Translation distance.
8131         #  @param theNbTimes2 Quantity of translations to be done.
8132         #  @param theName Object name; when specified, this parameter is used
8133         #         for result publication in the study. Otherwise, if automatic
8134         #         publication is switched on, default value is used for result name.
8135         #
8136         #  @return New GEOM.GEOM_Object, containing compound of all the
8137         #          shapes, obtained after each transformation.
8138         #
8139         #  @ref tui_multi_rotation "Example"
8140         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8141             """
8142             Rotate the given object around the
8143             given axis on the given angle a given number
8144             times and multi-translate each rotation result.
8145             Translation direction passes through center of gravity
8146             of rotated shape and its projection on the rotation axis.
8147
8148             Parameters:
8149                 theObject The object to be rotated.
8150                 theAxis Rotation axis. DZ if None.
8151                 theNbTimes1 Quantity of rotations to be done.
8152                 theRadialStep Translation distance.
8153                 theNbTimes2 Quantity of translations to be done.
8154                 theName Object name; when specified, this parameter is used
8155                         for result publication in the study. Otherwise, if automatic
8156                         publication is switched on, default value is used for result name.
8157
8158             Returns:    
8159                 New GEOM.GEOM_Object, containing compound of all the
8160                 shapes, obtained after each transformation.
8161
8162             Example of usage:
8163                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8167             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8168             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8169             anObj.SetParameters(Parameters)
8170             self._autoPublish(anObj, theName, "multirotation")
8171             return anObj
8172
8173         ## Rotate the given object around the
8174         #  given axis on the given angle a given number
8175         #  times and multi-translate each rotation result.
8176         #  Translation direction passes through center of gravity
8177         #  of rotated shape and its projection on the rotation axis.
8178         #  @param theObject The object to be rotated.
8179         #  @param theAxis Rotation axis. DZ if None.
8180         #  @param theAngleStep Rotation angle in radians.
8181         #  @param theNbTimes1 Quantity of rotations to be done.
8182         #  @param theRadialStep Translation distance.
8183         #  @param theNbTimes2 Quantity of translations to be done.
8184         #  @param theName Object name; when specified, this parameter is used
8185         #         for result publication in the study. Otherwise, if automatic
8186         #         publication is switched on, default value is used for result name.
8187         #
8188         #  @return New GEOM.GEOM_Object, containing compound of all the
8189         #          shapes, obtained after each transformation.
8190         #
8191         #  @ref tui_multi_rotation "Example"
8192         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8193             """
8194             Rotate the given object around the
8195             given axis on the given angle a given number
8196             times and multi-translate each rotation result.
8197             Translation direction passes through center of gravity
8198             of rotated shape and its projection on the rotation axis.
8199
8200             Parameters:
8201                 theObject The object to be rotated.
8202                 theAxis Rotation axis. DZ if None.
8203                 theAngleStep Rotation angle in radians.
8204                 theNbTimes1 Quantity of rotations to be done.
8205                 theRadialStep Translation distance.
8206                 theNbTimes2 Quantity of translations to be done.
8207                 theName Object name; when specified, this parameter is used
8208                         for result publication in the study. Otherwise, if automatic
8209                         publication is switched on, default value is used for result name.
8210
8211             Returns:    
8212                 New GEOM.GEOM_Object, containing compound of all the
8213                 shapes, obtained after each transformation.
8214
8215             Example of usage:
8216                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8217             """
8218             # Example: see GEOM_TestAll.py
8219             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8220             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8221             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8222             anObj.SetParameters(Parameters)
8223             self._autoPublish(anObj, theName, "multirotation")
8224             return anObj
8225
8226         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8227         #
8228         #  @ref swig_MakeMultiRotation "Example"
8229         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8230             """
8231             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8232
8233             Example of usage:
8234                 pz = geompy.MakeVertex(0, 0, 100)
8235                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8236                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8237             """
8238             # Example: see GEOM_TestOthers.py
8239             aVec = self.MakeLine(aPoint,aDir)
8240             # note: auto-publishing is done in self.MultiRotate1D()
8241             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8242             return anObj
8243
8244         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8245         #
8246         #  @ref swig_MakeMultiRotation "Example"
8247         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8248             """
8249             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8250
8251             Example of usage:
8252                 pz = geompy.MakeVertex(0, 0, 100)
8253                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8254                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8255             """
8256             # Example: see GEOM_TestOthers.py
8257             aVec = self.MakeLine(aPoint,aDir)
8258             # note: auto-publishing is done in self.MultiRotate1D()
8259             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8260             return anObj
8261
8262         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8263         #
8264         #  @ref swig_MakeMultiRotation "Example"
8265         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8266             """
8267             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8268             
8269             Example of usage:
8270                 pz = geompy.MakeVertex(0, 0, 100)
8271                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8272                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8273             """
8274             # Example: see GEOM_TestOthers.py
8275             aVec = self.MakeLine(aPoint,aDir)
8276             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8277             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8278             return anObj
8279
8280         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8281         #
8282         #  @ref swig_MakeMultiRotation "Example"
8283         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8284             """
8285             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8286             
8287             Example of usage:
8288                 pz = geompy.MakeVertex(0, 0, 100)
8289                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8290                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8291             """
8292             # Example: see GEOM_TestOthers.py
8293             aVec = self.MakeLine(aPoint,aDir)
8294             # note: auto-publishing is done in self.MultiRotate2D()
8295             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8296             return anObj
8297
8298         # end of l3_transform
8299         ## @}
8300
8301         ## @addtogroup l3_transform_d
8302         ## @{
8303
8304         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8305         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8306             """
8307             Deprecated method. Use MultiRotate1DNbTimes instead.
8308             """
8309             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8310             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8311
8312         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8313         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8314         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8315             """
8316             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8317             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8318
8319             Example of usage:
8320                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8321             """
8322             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8323             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8324             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8325             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8326             anObj.SetParameters(Parameters)
8327             self._autoPublish(anObj, theName, "multirotation")
8328             return anObj
8329
8330         ## The same, as MultiRotate1D(), but axis is given by direction and point
8331         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8332         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8333             """
8334             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8335             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8336
8337             Example of usage:
8338                 pz = geompy.MakeVertex(0, 0, 100)
8339                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8340                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8341             """
8342             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8343             aVec = self.MakeLine(aPoint,aDir)
8344             # note: auto-publishing is done in self.MultiRotate1D()
8345             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8346             return anObj
8347
8348         ## The same, as MultiRotate2D(), but axis is given by direction and point
8349         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8350         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8351             """
8352             The same, as MultiRotate2D(), but axis is given by direction and point
8353             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8354             
8355             Example of usage:
8356                 pz = geompy.MakeVertex(0, 0, 100)
8357                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8358                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8359             """
8360             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8361             aVec = self.MakeLine(aPoint,aDir)
8362             # note: auto-publishing is done in self.MultiRotate2D()
8363             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8364             return anObj
8365
8366         # end of l3_transform_d
8367         ## @}
8368
8369         ## @addtogroup l3_local
8370         ## @{
8371
8372         ## Perform a fillet on all edges of the given shape.
8373         #  @param theShape Shape, to perform fillet on.
8374         #  @param theR Fillet radius.
8375         #  @param theName Object name; when specified, this parameter is used
8376         #         for result publication in the study. Otherwise, if automatic
8377         #         publication is switched on, default value is used for result name.
8378         #
8379         #  @return New GEOM.GEOM_Object, containing the result shape.
8380         #
8381         #  @ref tui_fillet "Example 1"
8382         #  \n @ref swig_MakeFilletAll "Example 2"
8383         def MakeFilletAll(self, theShape, theR, theName=None):
8384             """
8385             Perform a fillet on all edges of the given shape.
8386
8387             Parameters:
8388                 theShape Shape, to perform fillet on.
8389                 theR Fillet radius.
8390                 theName Object name; when specified, this parameter is used
8391                         for result publication in the study. Otherwise, if automatic
8392                         publication is switched on, default value is used for result name.
8393
8394             Returns: 
8395                 New GEOM.GEOM_Object, containing the result shape.
8396
8397             Example of usage: 
8398                filletall = geompy.MakeFilletAll(prism, 10.)
8399             """
8400             # Example: see GEOM_TestOthers.py
8401             theR,Parameters = ParseParameters(theR)
8402             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8403             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8404             anObj.SetParameters(Parameters)
8405             self._autoPublish(anObj, theName, "fillet")
8406             return anObj
8407
8408         ## Perform a fillet on the specified edges/faces of the given shape
8409         #  @param theShape Shape, to perform fillet on.
8410         #  @param theR Fillet radius.
8411         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8412         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8413         #  @param theName Object name; when specified, this parameter is used
8414         #         for result publication in the study. Otherwise, if automatic
8415         #         publication is switched on, default value is used for result name.
8416         #
8417         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8418         #
8419         #  @return New GEOM.GEOM_Object, containing the result shape.
8420         #
8421         #  @ref tui_fillet "Example"
8422         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8423             """
8424             Perform a fillet on the specified edges/faces of the given shape
8425
8426             Parameters:
8427                 theShape Shape, to perform fillet on.
8428                 theR Fillet radius.
8429                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8430                 theListShapes Global indices of edges/faces to perform fillet on.
8431                 theName Object name; when specified, this parameter is used
8432                         for result publication in the study. Otherwise, if automatic
8433                         publication is switched on, default value is used for result name.
8434
8435             Note:
8436                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8437
8438             Returns: 
8439                 New GEOM.GEOM_Object, containing the result shape.
8440
8441             Example of usage:
8442                 # get the list of IDs (IDList) for the fillet
8443                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8444                 IDlist_e = []
8445                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8446                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8447                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8448                 # make a fillet on the specified edges of the given shape
8449                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8450             """
8451             # Example: see GEOM_TestAll.py
8452             theR,Parameters = ParseParameters(theR)
8453             anObj = None
8454             if theShapeType == self.ShapeType["EDGE"]:
8455                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8456                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8457             else:
8458                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8459                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8460             anObj.SetParameters(Parameters)
8461             self._autoPublish(anObj, theName, "fillet")
8462             return anObj
8463
8464         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8465         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8466             """
8467             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8468
8469             Example of usage:
8470                 # get the list of IDs (IDList) for the fillet
8471                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8472                 IDlist_e = []
8473                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8474                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8475                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8476                 # make a fillet on the specified edges of the given shape
8477                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8478             """
8479             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8480             anObj = None
8481             if theShapeType == self.ShapeType["EDGE"]:
8482                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8483                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8484             else:
8485                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8486                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8487             anObj.SetParameters(Parameters)
8488             self._autoPublish(anObj, theName, "fillet")
8489             return anObj
8490
8491         ## Perform a fillet on the specified edges of the given shape
8492         #  @param theShape  Wire Shape to perform fillet on.
8493         #  @param theR  Fillet radius.
8494         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8495         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8496         #    \note The list of vertices could be empty,
8497         #          in this case fillet will done done at all vertices in wire
8498         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8499         #         by the length of the edges, nearest to the fillet vertex.
8500         #         But sometimes the next edge is C1 continuous with the one, nearest to
8501         #         the fillet point, and such two (or more) edges can be united to allow
8502         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8503         #         thus ignoring the secant vertex (vertices).
8504         #  @param theName Object name; when specified, this parameter is used
8505         #         for result publication in the study. Otherwise, if automatic
8506         #         publication is switched on, default value is used for result name.
8507         #
8508         #  @return New GEOM.GEOM_Object, containing the result shape.
8509         #
8510         #  @ref tui_fillet2d "Example"
8511         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8512             """
8513             Perform a fillet on the specified edges of the given shape
8514
8515             Parameters:
8516                 theShape  Wire Shape to perform fillet on.
8517                 theR  Fillet radius.
8518                 theListOfVertexes Global indices of vertexes to perform fillet on.
8519                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8520                     by the length of the edges, nearest to the fillet vertex.
8521                     But sometimes the next edge is C1 continuous with the one, nearest to
8522                     the fillet point, and such two (or more) edges can be united to allow
8523                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8524                     thus ignoring the secant vertex (vertices).
8525                 theName Object name; when specified, this parameter is used
8526                         for result publication in the study. Otherwise, if automatic
8527                         publication is switched on, default value is used for result name.
8528             Note:
8529                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8530
8531                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8532
8533             Returns: 
8534                 New GEOM.GEOM_Object, containing the result shape.
8535
8536             Example of usage:  
8537                 # create wire
8538                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8539                 # make fillet at given wire vertices with giver radius
8540                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8541             """
8542             # Example: see GEOM_TestAll.py
8543             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8544             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8545             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8546             anObj.SetParameters(Parameters)
8547             self._autoPublish(anObj, theName, "fillet")
8548             return anObj
8549
8550         ## Perform a fillet at the specified vertices of the given face/shell.
8551         #  @param theShape Face or Shell shape to perform fillet on.
8552         #  @param theR Fillet radius.
8553         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8554         #  @param theName Object name; when specified, this parameter is used
8555         #         for result publication in the study. Otherwise, if automatic
8556         #         publication is switched on, default value is used for result name.
8557         #
8558         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8559         #
8560         #  @return New GEOM.GEOM_Object, containing the result shape.
8561         #
8562         #  @ref tui_fillet2d "Example"
8563         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8564             """
8565             Perform a fillet at the specified vertices of the given face/shell.
8566
8567             Parameters:
8568                 theShape  Face or Shell shape to perform fillet on.
8569                 theR  Fillet radius.
8570                 theListOfVertexes Global indices of vertexes to perform fillet on.
8571                 theName Object name; when specified, this parameter is used
8572                         for result publication in the study. Otherwise, if automatic
8573                         publication is switched on, default value is used for result name.
8574             Note:
8575                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8576
8577             Returns: 
8578                 New GEOM.GEOM_Object, containing the result shape.
8579
8580             Example of usage:
8581                 face = geompy.MakeFaceHW(100, 100, 1)
8582                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8583             """
8584             # Example: see GEOM_TestAll.py
8585             theR,Parameters = ParseParameters(theR)
8586             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8587             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8588             anObj.SetParameters(Parameters)
8589             self._autoPublish(anObj, theName, "fillet")
8590             return anObj
8591
8592         ## Perform a symmetric chamfer on all edges of the given shape.
8593         #  @param theShape Shape, to perform chamfer on.
8594         #  @param theD Chamfer size along each face.
8595         #  @param theName Object name; when specified, this parameter is used
8596         #         for result publication in the study. Otherwise, if automatic
8597         #         publication is switched on, default value is used for result name.
8598         #
8599         #  @return New GEOM.GEOM_Object, containing the result shape.
8600         #
8601         #  @ref tui_chamfer "Example 1"
8602         #  \n @ref swig_MakeChamferAll "Example 2"
8603         def MakeChamferAll(self, theShape, theD, theName=None):
8604             """
8605             Perform a symmetric chamfer on all edges of the given shape.
8606
8607             Parameters:
8608                 theShape Shape, to perform chamfer on.
8609                 theD Chamfer size along each face.
8610                 theName Object name; when specified, this parameter is used
8611                         for result publication in the study. Otherwise, if automatic
8612                         publication is switched on, default value is used for result name.
8613
8614             Returns:     
8615                 New GEOM.GEOM_Object, containing the result shape.
8616
8617             Example of usage:
8618                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8619             """
8620             # Example: see GEOM_TestOthers.py
8621             theD,Parameters = ParseParameters(theD)
8622             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8623             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8624             anObj.SetParameters(Parameters)
8625             self._autoPublish(anObj, theName, "chamfer")
8626             return anObj
8627
8628         ## Perform a chamfer on edges, common to the specified faces,
8629         #  with distance D1 on the Face1
8630         #  @param theShape Shape, to perform chamfer on.
8631         #  @param theD1 Chamfer size along \a theFace1.
8632         #  @param theD2 Chamfer size along \a theFace2.
8633         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8634         #  @param theName Object name; when specified, this parameter is used
8635         #         for result publication in the study. Otherwise, if automatic
8636         #         publication is switched on, default value is used for result name.
8637         #
8638         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8639         #
8640         #  @return New GEOM.GEOM_Object, containing the result shape.
8641         #
8642         #  @ref tui_chamfer "Example"
8643         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8644             """
8645             Perform a chamfer on edges, common to the specified faces,
8646             with distance D1 on the Face1
8647
8648             Parameters:
8649                 theShape Shape, to perform chamfer on.
8650                 theD1 Chamfer size along theFace1.
8651                 theD2 Chamfer size along theFace2.
8652                 theFace1,theFace2 Global indices of two faces of theShape.
8653                 theName Object name; when specified, this parameter is used
8654                         for result publication in the study. Otherwise, if automatic
8655                         publication is switched on, default value is used for result name.
8656
8657             Note:
8658                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8659
8660             Returns:      
8661                 New GEOM.GEOM_Object, containing the result shape.
8662
8663             Example of usage:
8664                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8665                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8666                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8667                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8668             """
8669             # Example: see GEOM_TestAll.py
8670             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8671             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8672             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8673             anObj.SetParameters(Parameters)
8674             self._autoPublish(anObj, theName, "chamfer")
8675             return anObj
8676
8677         ## Perform a chamfer on edges
8678         #  @param theShape Shape, to perform chamfer on.
8679         #  @param theD Chamfer length
8680         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8681         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8682         #  @param theName Object name; when specified, this parameter is used
8683         #         for result publication in the study. Otherwise, if automatic
8684         #         publication is switched on, default value is used for result name.
8685         #
8686         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8687         #
8688         #  @return New GEOM.GEOM_Object, containing the result shape.
8689         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8690             """
8691             Perform a chamfer on edges
8692
8693             Parameters:
8694                 theShape Shape, to perform chamfer on.
8695                 theD1 Chamfer size along theFace1.
8696                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8697                 theFace1,theFace2 Global indices of two faces of theShape.
8698                 theName Object name; when specified, this parameter is used
8699                         for result publication in the study. Otherwise, if automatic
8700                         publication is switched on, default value is used for result name.
8701
8702             Note:
8703                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8704
8705             Returns:      
8706                 New GEOM.GEOM_Object, containing the result shape.
8707
8708             Example of usage:
8709                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8710                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8711                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8712                 ang = 30
8713                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8714             """
8715             flag = False
8716             if isinstance(theAngle,str):
8717                 flag = True
8718             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8719             if flag:
8720                 theAngle = theAngle*math.pi/180.0
8721             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8722             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8723             anObj.SetParameters(Parameters)
8724             self._autoPublish(anObj, theName, "chamfer")
8725             return anObj
8726
8727         ## Perform a chamfer on all edges of the specified faces,
8728         #  with distance D1 on the first specified face (if several for one edge)
8729         #  @param theShape Shape, to perform chamfer on.
8730         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8731         #               connected to the edge, are in \a theFaces, \a theD1
8732         #               will be get along face, which is nearer to \a theFaces beginning.
8733         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8734         #  @param theFaces Sequence of global indices of faces of \a theShape.
8735         #  @param theName Object name; when specified, this parameter is used
8736         #         for result publication in the study. Otherwise, if automatic
8737         #         publication is switched on, default value is used for result name.
8738         #
8739         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8740         #
8741         #  @return New GEOM.GEOM_Object, containing the result shape.
8742         #
8743         #  @ref tui_chamfer "Example"
8744         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8745             """
8746             Perform a chamfer on all edges of the specified faces,
8747             with distance D1 on the first specified face (if several for one edge)
8748
8749             Parameters:
8750                 theShape Shape, to perform chamfer on.
8751                 theD1 Chamfer size along face from  theFaces. If both faces,
8752                       connected to the edge, are in theFaces, theD1
8753                       will be get along face, which is nearer to theFaces beginning.
8754                 theD2 Chamfer size along another of two faces, connected to the edge.
8755                 theFaces Sequence of global indices of faces of theShape.
8756                 theName Object name; when specified, this parameter is used
8757                         for result publication in the study. Otherwise, if automatic
8758                         publication is switched on, default value is used for result name.
8759                 
8760             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8761
8762             Returns:  
8763                 New GEOM.GEOM_Object, containing the result shape.
8764             """
8765             # Example: see GEOM_TestAll.py
8766             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8767             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8768             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8769             anObj.SetParameters(Parameters)
8770             self._autoPublish(anObj, theName, "chamfer")
8771             return anObj
8772
8773         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8774         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8775         #
8776         #  @ref swig_FilletChamfer "Example"
8777         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8778             """
8779             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8780             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8781             """
8782             flag = False
8783             if isinstance(theAngle,str):
8784                 flag = True
8785             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8786             if flag:
8787                 theAngle = theAngle*math.pi/180.0
8788             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8789             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8790             anObj.SetParameters(Parameters)
8791             self._autoPublish(anObj, theName, "chamfer")
8792             return anObj
8793
8794         ## Perform a chamfer on edges,
8795         #  with distance D1 on the first specified face (if several for one edge)
8796         #  @param theShape Shape, to perform chamfer on.
8797         #  @param theD1,theD2 Chamfer size
8798         #  @param theEdges Sequence of edges of \a theShape.
8799         #  @param theName Object name; when specified, this parameter is used
8800         #         for result publication in the study. Otherwise, if automatic
8801         #         publication is switched on, default value is used for result name.
8802         #
8803         #  @return New GEOM.GEOM_Object, containing the result shape.
8804         #
8805         #  @ref swig_FilletChamfer "Example"
8806         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8807             """
8808             Perform a chamfer on edges,
8809             with distance D1 on the first specified face (if several for one edge)
8810             
8811             Parameters:
8812                 theShape Shape, to perform chamfer on.
8813                 theD1,theD2 Chamfer size
8814                 theEdges Sequence of edges of theShape.
8815                 theName Object name; when specified, this parameter is used
8816                         for result publication in the study. Otherwise, if automatic
8817                         publication is switched on, default value is used for result name.
8818
8819             Returns:
8820                 New GEOM.GEOM_Object, containing the result shape.
8821             """
8822             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8823             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8824             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8825             anObj.SetParameters(Parameters)
8826             self._autoPublish(anObj, theName, "chamfer")
8827             return anObj
8828
8829         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8830         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8831         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8832             """
8833             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8834             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8835             """
8836             flag = False
8837             if isinstance(theAngle,str):
8838                 flag = True
8839             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8840             if flag:
8841                 theAngle = theAngle*math.pi/180.0
8842             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8843             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8844             anObj.SetParameters(Parameters)
8845             self._autoPublish(anObj, theName, "chamfer")
8846             return anObj
8847
8848         ## @sa MakeChamferEdge(), MakeChamferFaces()
8849         #
8850         #  @ref swig_MakeChamfer "Example"
8851         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8852             """
8853             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8854             """
8855             # Example: see GEOM_TestOthers.py
8856             anObj = None
8857             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8858             if aShapeType == self.ShapeType["EDGE"]:
8859                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8860             else:
8861                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8862             return anObj
8863             
8864         ## Remove material from a solid by extrusion of the base shape on the given distance.
8865         #  @param theInit Shape to remove material from. It must be a solid or 
8866         #  a compound made of a single solid.
8867         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8868         #  @param theH Prism dimension along the normal to theBase
8869         #  @param theAngle Draft angle in degrees.
8870         #  @param theName Object name; when specified, this parameter is used
8871         #         for result publication in the study. Otherwise, if automatic
8872         #         publication is switched on, default value is used for result name.
8873         #
8874         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8875         #
8876         #  @ref tui_creation_prism "Example"
8877         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8878             """
8879             Add material to a solid by extrusion of the base shape on the given distance.
8880
8881             Parameters:
8882                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8883                 theBase Closed edge or wire defining the base shape to be extruded.
8884                 theH Prism dimension along the normal  to theBase
8885                 theAngle Draft angle in degrees.
8886                 theName Object name; when specified, this parameter is used
8887                         for result publication in the study. Otherwise, if automatic
8888                         publication is switched on, default value is used for result name.
8889
8890             Returns:
8891                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8892             """
8893             # Example: see GEOM_TestAll.py
8894             #theH,Parameters = ParseParameters(theH)
8895             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8896             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8897             #anObj.SetParameters(Parameters)
8898             self._autoPublish(anObj, theName, "extrudedCut")
8899             return anObj   
8900             
8901         ## Add material to a solid by extrusion of the base shape on the given distance.
8902         #  @param theInit Shape to add material to. It must be a solid or 
8903         #  a compound made of a single solid.
8904         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8905         #  @param theH Prism dimension along the normal to theBase
8906         #  @param theAngle Draft angle in degrees.
8907         #  @param theName Object name; when specified, this parameter is used
8908         #         for result publication in the study. Otherwise, if automatic
8909         #         publication is switched on, default value is used for result name.
8910         #
8911         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8912         #
8913         #  @ref tui_creation_prism "Example"
8914         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8915             """
8916             Add material to a solid by extrusion of the base shape on the given distance.
8917
8918             Parameters:
8919                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8920                 theBase Closed edge or wire defining the base shape to be extruded.
8921                 theH Prism dimension along the normal  to theBase
8922                 theAngle Draft angle in degrees.
8923                 theName Object name; when specified, this parameter is used
8924                         for result publication in the study. Otherwise, if automatic
8925                         publication is switched on, default value is used for result name.
8926
8927             Returns:
8928                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8929             """
8930             # Example: see GEOM_TestAll.py
8931             #theH,Parameters = ParseParameters(theH)
8932             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8933             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8934             #anObj.SetParameters(Parameters)
8935             self._autoPublish(anObj, theName, "extrudedBoss")
8936             return anObj   
8937
8938         # end of l3_local
8939         ## @}
8940
8941         ## @addtogroup l3_basic_op
8942         ## @{
8943
8944         ## Perform an Archimde operation on the given shape with given parameters.
8945         #  The object presenting the resulting face is returned.
8946         #  @param theShape Shape to be put in water.
8947         #  @param theWeight Weight og the shape.
8948         #  @param theWaterDensity Density of the water.
8949         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8950         #  @param theName Object name; when specified, this parameter is used
8951         #         for result publication in the study. Otherwise, if automatic
8952         #         publication is switched on, default value is used for result name.
8953         #
8954         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8955         #          by a plane, corresponding to water level.
8956         #
8957         #  @ref tui_archimede "Example"
8958         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8959             """
8960             Perform an Archimde operation on the given shape with given parameters.
8961             The object presenting the resulting face is returned.
8962
8963             Parameters: 
8964                 theShape Shape to be put in water.
8965                 theWeight Weight og the shape.
8966                 theWaterDensity Density of the water.
8967                 theMeshDeflection Deflection of the mesh, using to compute the section.
8968                 theName Object name; when specified, this parameter is used
8969                         for result publication in the study. Otherwise, if automatic
8970                         publication is switched on, default value is used for result name.
8971
8972             Returns: 
8973                 New GEOM.GEOM_Object, containing a section of theShape
8974                 by a plane, corresponding to water level.
8975             """
8976             # Example: see GEOM_TestAll.py
8977             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8978               theWeight,theWaterDensity,theMeshDeflection)
8979             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8980             RaiseIfFailed("MakeArchimede", self.LocalOp)
8981             anObj.SetParameters(Parameters)
8982             self._autoPublish(anObj, theName, "archimede")
8983             return anObj
8984
8985         # end of l3_basic_op
8986         ## @}
8987
8988         ## @addtogroup l2_measure
8989         ## @{
8990
8991         ## Get point coordinates
8992         #  @return [x, y, z]
8993         #
8994         #  @ref tui_measurement_tools_page "Example"
8995         def PointCoordinates(self,Point):
8996             """
8997             Get point coordinates
8998
8999             Returns:
9000                 [x, y, z]
9001             """
9002             # Example: see GEOM_TestMeasures.py
9003             aTuple = self.MeasuOp.PointCoordinates(Point)
9004             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9005             return aTuple 
9006         
9007         ## Get vector coordinates
9008         #  @return [x, y, z]
9009         #
9010         #  @ref tui_measurement_tools_page "Example"
9011         def VectorCoordinates(self,Vector):
9012             """
9013             Get vector coordinates
9014
9015             Returns:
9016                 [x, y, z]
9017             """
9018
9019             p1=self.GetFirstVertex(Vector)
9020             p2=self.GetLastVertex(Vector)
9021             
9022             X1=self.PointCoordinates(p1)
9023             X2=self.PointCoordinates(p2)
9024
9025             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9026
9027
9028         ## Compute cross product
9029         #  @return vector w=u^v
9030         #
9031         #  @ref tui_measurement_tools_page "Example"
9032         def CrossProduct(self, Vector1, Vector2):
9033             """ 
9034             Compute cross product
9035             
9036             Returns: vector w=u^v
9037             """
9038             u=self.VectorCoordinates(Vector1)
9039             v=self.VectorCoordinates(Vector2)
9040             w=self.MakeVectorDXDYDZ(u[1]*v[2]-u[2]*v[1], u[2]*v[0]-u[0]*v[2], u[0]*v[1]-u[1]*v[0])
9041             
9042             return w
9043         
9044         ## Compute cross product
9045         #  @return dot product  p=u.v
9046         #
9047         #  @ref tui_measurement_tools_page "Example"
9048         def DotProduct(self, Vector1, Vector2):
9049             """ 
9050             Compute cross product
9051             
9052             Returns: dot product  p=u.v
9053             """
9054             u=self.VectorCoordinates(Vector1)
9055             v=self.VectorCoordinates(Vector2)
9056             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9057             
9058             return p
9059
9060
9061         ## Get summarized length of all wires,
9062         #  area of surface and volume of the given shape.
9063         #  @param theShape Shape to define properties of.
9064         #  @return [theLength, theSurfArea, theVolume]\n
9065         #  theLength:   Summarized length of all wires of the given shape.\n
9066         #  theSurfArea: Area of surface of the given shape.\n
9067         #  theVolume:   Volume of the given shape.
9068         #
9069         #  @ref tui_measurement_tools_page "Example"
9070         def BasicProperties(self,theShape):
9071             """
9072             Get summarized length of all wires,
9073             area of surface and volume of the given shape.
9074
9075             Parameters: 
9076                 theShape Shape to define properties of.
9077
9078             Returns:
9079                 [theLength, theSurfArea, theVolume]
9080                  theLength:   Summarized length of all wires of the given shape.
9081                  theSurfArea: Area of surface of the given shape.
9082                  theVolume:   Volume of the given shape.
9083             """
9084             # Example: see GEOM_TestMeasures.py
9085             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9086             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9087             return aTuple
9088
9089         ## Get parameters of bounding box of the given shape
9090         #  @param theShape Shape to obtain bounding box of.
9091         #  @param precise TRUE for precise computation; FALSE for fast one.
9092         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9093         #  Xmin,Xmax: Limits of shape along OX axis.
9094         #  Ymin,Ymax: Limits of shape along OY axis.
9095         #  Zmin,Zmax: Limits of shape along OZ axis.
9096         #
9097         #  @ref tui_measurement_tools_page "Example"
9098         def BoundingBox (self, theShape, precise=False):
9099             """
9100             Get parameters of bounding box of the given shape
9101
9102             Parameters: 
9103                 theShape Shape to obtain bounding box of.
9104                 precise TRUE for precise computation; FALSE for fast one.
9105
9106             Returns:
9107                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9108                  Xmin,Xmax: Limits of shape along OX axis.
9109                  Ymin,Ymax: Limits of shape along OY axis.
9110                  Zmin,Zmax: Limits of shape along OZ axis.
9111             """
9112             # Example: see GEOM_TestMeasures.py
9113             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9114             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9115             return aTuple
9116
9117         ## Get bounding box of the given shape
9118         #  @param theShape Shape to obtain bounding box of.
9119         #  @param precise TRUE for precise computation; FALSE for fast one.
9120         #  @param theName Object name; when specified, this parameter is used
9121         #         for result publication in the study. Otherwise, if automatic
9122         #         publication is switched on, default value is used for result name.
9123         #
9124         #  @return New GEOM.GEOM_Object, containing the created box.
9125         #
9126         #  @ref tui_measurement_tools_page "Example"
9127         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9128             """
9129             Get bounding box of the given shape
9130
9131             Parameters: 
9132                 theShape Shape to obtain bounding box of.
9133                 precise TRUE for precise computation; FALSE for fast one.
9134                 theName Object name; when specified, this parameter is used
9135                         for result publication in the study. Otherwise, if automatic
9136                         publication is switched on, default value is used for result name.
9137
9138             Returns:
9139                 New GEOM.GEOM_Object, containing the created box.
9140             """
9141             # Example: see GEOM_TestMeasures.py
9142             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9143             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9144             self._autoPublish(anObj, theName, "bndbox")
9145             return anObj
9146
9147         ## Get inertia matrix and moments of inertia of theShape.
9148         #  @param theShape Shape to calculate inertia of.
9149         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9150         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9151         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9152         #
9153         #  @ref tui_measurement_tools_page "Example"
9154         def Inertia(self,theShape):
9155             """
9156             Get inertia matrix and moments of inertia of theShape.
9157
9158             Parameters: 
9159                 theShape Shape to calculate inertia of.
9160
9161             Returns:
9162                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9163                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9164                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9165             """
9166             # Example: see GEOM_TestMeasures.py
9167             aTuple = self.MeasuOp.GetInertia(theShape)
9168             RaiseIfFailed("GetInertia", self.MeasuOp)
9169             return aTuple
9170
9171         ## Get if coords are included in the shape (ST_IN or ST_ON)
9172         #  @param theShape Shape
9173         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9174         #  @param tolerance to be used (default is 1.0e-7)
9175         #  @return list_of_boolean = [res1, res2, ...]
9176         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9177             """
9178             Get if coords are included in the shape (ST_IN or ST_ON)
9179             
9180             Parameters: 
9181                 theShape Shape
9182                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9183                 tolerance to be used (default is 1.0e-7)
9184
9185             Returns:
9186                 list_of_boolean = [res1, res2, ...]
9187             """
9188             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9189
9190         ## Get minimal distance between the given shapes.
9191         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9192         #  @return Value of the minimal distance between the given shapes.
9193         #
9194         #  @ref tui_measurement_tools_page "Example"
9195         def MinDistance(self, theShape1, theShape2):
9196             """
9197             Get minimal distance between the given shapes.
9198             
9199             Parameters: 
9200                 theShape1,theShape2 Shapes to find minimal distance between.
9201
9202             Returns:    
9203                 Value of the minimal distance between the given shapes.
9204             """
9205             # Example: see GEOM_TestMeasures.py
9206             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9207             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9208             return aTuple[0]
9209
9210         ## Get minimal distance between the given shapes.
9211         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9212         #  @return Value of the minimal distance between the given shapes, in form of list
9213         #          [Distance, DX, DY, DZ].
9214         #
9215         #  @ref swig_all_measure "Example"
9216         def MinDistanceComponents(self, theShape1, theShape2):
9217             """
9218             Get minimal distance between the given shapes.
9219
9220             Parameters: 
9221                 theShape1,theShape2 Shapes to find minimal distance between.
9222
9223             Returns:  
9224                 Value of the minimal distance between the given shapes, in form of list
9225                 [Distance, DX, DY, DZ]
9226             """
9227             # Example: see GEOM_TestMeasures.py
9228             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9229             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9230             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9231             return aRes
9232
9233         ## Get closest points of the given shapes.
9234         #  @param theShape1,theShape2 Shapes to find closest points of.
9235         #  @return The number of found solutions (-1 in case of infinite number of
9236         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9237         #
9238         #  @ref tui_measurement_tools_page "Example"
9239         def ClosestPoints (self, theShape1, theShape2):
9240             """
9241             Get closest points of the given shapes.
9242
9243             Parameters: 
9244                 theShape1,theShape2 Shapes to find closest points of.
9245
9246             Returns:    
9247                 The number of found solutions (-1 in case of infinite number of
9248                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9249             """
9250             # Example: see GEOM_TestMeasures.py
9251             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9252             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9253             return aTuple
9254
9255         ## Get angle between the given shapes in degrees.
9256         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9257         #  @note If both arguments are vectors, the angle is computed in accordance
9258         #        with their orientations, otherwise the minimum angle is computed.
9259         #  @return Value of the angle between the given shapes in degrees.
9260         #
9261         #  @ref tui_measurement_tools_page "Example"
9262         def GetAngle(self, theShape1, theShape2):
9263             """
9264             Get angle between the given shapes in degrees.
9265
9266             Parameters: 
9267                 theShape1,theShape2 Lines or linear edges to find angle between.
9268
9269             Note:
9270                 If both arguments are vectors, the angle is computed in accordance
9271                 with their orientations, otherwise the minimum angle is computed.
9272
9273             Returns:  
9274                 Value of the angle between the given shapes in degrees.
9275             """
9276             # Example: see GEOM_TestMeasures.py
9277             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9278             RaiseIfFailed("GetAngle", self.MeasuOp)
9279             return anAngle
9280
9281         ## Get angle between the given shapes in radians.
9282         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9283         #  @note If both arguments are vectors, the angle is computed in accordance
9284         #        with their orientations, otherwise the minimum angle is computed.
9285         #  @return Value of the angle between the given shapes in radians.
9286         #
9287         #  @ref tui_measurement_tools_page "Example"
9288         def GetAngleRadians(self, theShape1, theShape2):
9289             """
9290             Get angle between the given shapes in radians.
9291
9292             Parameters: 
9293                 theShape1,theShape2 Lines or linear edges to find angle between.
9294
9295                 
9296             Note:
9297                 If both arguments are vectors, the angle is computed in accordance
9298                 with their orientations, otherwise the minimum angle is computed.
9299
9300             Returns:  
9301                 Value of the angle between the given shapes in radians.
9302             """
9303             # Example: see GEOM_TestMeasures.py
9304             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9305             RaiseIfFailed("GetAngle", self.MeasuOp)
9306             return anAngle
9307
9308         ## Get angle between the given vectors in degrees.
9309         #  @param theShape1,theShape2 Vectors to find angle between.
9310         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9311         #                 if False, the opposite vector to the normal vector is used.
9312         #  @return Value of the angle between the given vectors in degrees.
9313         #
9314         #  @ref tui_measurement_tools_page "Example"
9315         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9316             """
9317             Get angle between the given vectors in degrees.
9318
9319             Parameters: 
9320                 theShape1,theShape2 Vectors to find angle between.
9321                 theFlag If True, the normal vector is defined by the two vectors cross,
9322                         if False, the opposite vector to the normal vector is used.
9323
9324             Returns:  
9325                 Value of the angle between the given vectors in degrees.
9326             """
9327             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9328             if not theFlag:
9329                 anAngle = 360. - anAngle
9330             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9331             return anAngle
9332
9333         ## The same as GetAngleVectors, but the result is in radians.
9334         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9335             """
9336             Get angle between the given vectors in radians.
9337
9338             Parameters: 
9339                 theShape1,theShape2 Vectors to find angle between.
9340                 theFlag If True, the normal vector is defined by the two vectors cross,
9341                         if False, the opposite vector to the normal vector is used.
9342
9343             Returns:  
9344                 Value of the angle between the given vectors in radians.
9345             """
9346             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9347             return anAngle
9348
9349         ## @name Curve Curvature Measurement
9350         #  Methods for receiving radius of curvature of curves
9351         #  in the given point
9352         ## @{
9353
9354         ## Measure curvature of a curve at a point, set by parameter.
9355         #  @param theCurve a curve.
9356         #  @param theParam parameter.
9357         #  @return radius of curvature of \a theCurve.
9358         #
9359         #  @ref swig_todo "Example"
9360         def CurveCurvatureByParam(self, theCurve, theParam):
9361             """
9362             Measure curvature of a curve at a point, set by parameter.
9363
9364             Parameters: 
9365                 theCurve a curve.
9366                 theParam parameter.
9367
9368             Returns: 
9369                 radius of curvature of theCurve.
9370             """
9371             # Example: see GEOM_TestMeasures.py
9372             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9373             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9374             return aCurv
9375
9376         ## Measure curvature of a curve at a point.
9377         #  @param theCurve a curve.
9378         #  @param thePoint given point.
9379         #  @return radius of curvature of \a theCurve.
9380         #
9381         #  @ref swig_todo "Example"
9382         def CurveCurvatureByPoint(self, theCurve, thePoint):
9383             """
9384             Measure curvature of a curve at a point.
9385
9386             Parameters: 
9387                 theCurve a curve.
9388                 thePoint given point.
9389
9390             Returns: 
9391                 radius of curvature of theCurve.           
9392             """
9393             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9394             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9395             return aCurv
9396         ## @}
9397
9398         ## @name Surface Curvature Measurement
9399         #  Methods for receiving max and min radius of curvature of surfaces
9400         #  in the given point
9401         ## @{
9402
9403         ## Measure max radius of curvature of surface.
9404         #  @param theSurf the given surface.
9405         #  @param theUParam Value of U-parameter on the referenced surface.
9406         #  @param theVParam Value of V-parameter on the referenced surface.
9407         #  @return max radius of curvature of theSurf.
9408         #
9409         ## @ref swig_todo "Example"
9410         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9411             """
9412             Measure max radius of curvature of surface.
9413
9414             Parameters: 
9415                 theSurf the given surface.
9416                 theUParam Value of U-parameter on the referenced surface.
9417                 theVParam Value of V-parameter on the referenced surface.
9418                 
9419             Returns:     
9420                 max radius of curvature of theSurf.
9421             """
9422             # Example: see GEOM_TestMeasures.py
9423             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9424             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9425             return aSurf
9426
9427         ## Measure max radius of curvature of surface in the given point
9428         #  @param theSurf the given surface.
9429         #  @param thePoint given point.
9430         #  @return max radius of curvature of theSurf.
9431         #
9432         ## @ref swig_todo "Example"
9433         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9434             """
9435             Measure max radius of curvature of surface in the given point.
9436
9437             Parameters: 
9438                 theSurf the given surface.
9439                 thePoint given point.
9440                 
9441             Returns:     
9442                 max radius of curvature of theSurf.          
9443             """
9444             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9445             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9446             return aSurf
9447
9448         ## Measure min radius of curvature of surface.
9449         #  @param theSurf the given surface.
9450         #  @param theUParam Value of U-parameter on the referenced surface.
9451         #  @param theVParam Value of V-parameter on the referenced surface.
9452         #  @return min radius of curvature of theSurf.
9453         #   
9454         ## @ref swig_todo "Example"
9455         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9456             """
9457             Measure min radius of curvature of surface.
9458
9459             Parameters: 
9460                 theSurf the given surface.
9461                 theUParam Value of U-parameter on the referenced surface.
9462                 theVParam Value of V-parameter on the referenced surface.
9463                 
9464             Returns:     
9465                 Min radius of curvature of theSurf.
9466             """
9467             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9468             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9469             return aSurf
9470
9471         ## Measure min radius of curvature of surface in the given point
9472         #  @param theSurf the given surface.
9473         #  @param thePoint given point.
9474         #  @return min radius of curvature of theSurf.
9475         #
9476         ## @ref swig_todo "Example"
9477         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9478             """
9479             Measure min radius of curvature of surface in the given point.
9480
9481             Parameters: 
9482                 theSurf the given surface.
9483                 thePoint given point.
9484                 
9485             Returns:     
9486                 Min radius of curvature of theSurf.          
9487             """
9488             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9489             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9490             return aSurf
9491         ## @}
9492
9493         ## Get min and max tolerances of sub-shapes of theShape
9494         #  @param theShape Shape, to get tolerances of.
9495         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9496         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9497         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9498         #  VertMin,VertMax: Min and max tolerances of the vertices.
9499         #
9500         #  @ref tui_measurement_tools_page "Example"
9501         def Tolerance(self,theShape):
9502             """
9503             Get min and max tolerances of sub-shapes of theShape
9504
9505             Parameters: 
9506                 theShape Shape, to get tolerances of.
9507
9508             Returns:    
9509                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9510                  FaceMin,FaceMax: Min and max tolerances of the faces.
9511                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9512                  VertMin,VertMax: Min and max tolerances of the vertices.
9513             """
9514             # Example: see GEOM_TestMeasures.py
9515             aTuple = self.MeasuOp.GetTolerance(theShape)
9516             RaiseIfFailed("GetTolerance", self.MeasuOp)
9517             return aTuple
9518
9519         ## Obtain description of the given shape (number of sub-shapes of each type)
9520         #  @param theShape Shape to be described.
9521         #  @return Description of the given shape.
9522         #
9523         #  @ref tui_measurement_tools_page "Example"
9524         def WhatIs(self,theShape):
9525             """
9526             Obtain description of the given shape (number of sub-shapes of each type)
9527
9528             Parameters:
9529                 theShape Shape to be described.
9530
9531             Returns:
9532                 Description of the given shape.
9533             """
9534             # Example: see GEOM_TestMeasures.py
9535             aDescr = self.MeasuOp.WhatIs(theShape)
9536             RaiseIfFailed("WhatIs", self.MeasuOp)
9537             return aDescr
9538
9539         ## Obtain quantity of shapes of the given type in \a theShape.
9540         #  If \a theShape is of type \a theType, it is also counted.
9541         #  @param theShape Shape to be described.
9542         #  @param theType the given ShapeType().
9543         #  @return Quantity of shapes of type \a theType in \a theShape.
9544         #
9545         #  @ref tui_measurement_tools_page "Example"
9546         def NbShapes (self, theShape, theType):
9547             """
9548             Obtain quantity of shapes of the given type in theShape.
9549             If theShape is of type theType, it is also counted.
9550
9551             Parameters:
9552                 theShape Shape to be described.
9553                 theType the given geompy.ShapeType
9554
9555             Returns:
9556                 Quantity of shapes of type theType in theShape.
9557             """
9558             # Example: see GEOM_TestMeasures.py
9559             listSh = self.SubShapeAllIDs(theShape, theType)
9560             Nb = len(listSh)
9561             t       = EnumToLong(theShape.GetShapeType())
9562             theType = EnumToLong(theType)
9563             if t == theType:
9564                 Nb = Nb + 1
9565                 pass
9566             return Nb
9567
9568         ## Obtain quantity of shapes of each type in \a theShape.
9569         #  The \a theShape is also counted.
9570         #  @param theShape Shape to be described.
9571         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9572         #
9573         #  @ref tui_measurement_tools_page "Example"
9574         def ShapeInfo (self, theShape):
9575             """
9576             Obtain quantity of shapes of each type in theShape.
9577             The theShape is also counted.
9578
9579             Parameters:
9580                 theShape Shape to be described.
9581
9582             Returns:
9583                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9584             """
9585             # Example: see GEOM_TestMeasures.py
9586             aDict = {}
9587             for typeSh in self.ShapeType:
9588                 if typeSh in ( "AUTO", "SHAPE" ): continue
9589                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9590                 Nb = len(listSh)
9591                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9592                     Nb = Nb + 1
9593                     pass
9594                 aDict[typeSh] = Nb
9595                 pass
9596             return aDict
9597
9598         def GetCreationInformation(self, theShape):
9599             info = theShape.GetCreationInformation()
9600             # operationName
9601             opName = info.operationName
9602             if not opName: opName = "no info available"
9603             res = "Operation: " + opName
9604             # parameters
9605             for parVal in info.params:
9606                 res += " \n %s = %s" % ( parVal.name, parVal.value )
9607             return res
9608
9609         ## Get a point, situated at the centre of mass of theShape.
9610         #  @param theShape Shape to define centre of mass of.
9611         #  @param theName Object name; when specified, this parameter is used
9612         #         for result publication in the study. Otherwise, if automatic
9613         #         publication is switched on, default value is used for result name.
9614         #
9615         #  @return New GEOM.GEOM_Object, containing the created point.
9616         #
9617         #  @ref tui_measurement_tools_page "Example"
9618         def MakeCDG(self, theShape, theName=None):
9619             """
9620             Get a point, situated at the centre of mass of theShape.
9621
9622             Parameters:
9623                 theShape Shape to define centre of mass of.
9624                 theName Object name; when specified, this parameter is used
9625                         for result publication in the study. Otherwise, if automatic
9626                         publication is switched on, default value is used for result name.
9627
9628             Returns:
9629                 New GEOM.GEOM_Object, containing the created point.
9630             """
9631             # Example: see GEOM_TestMeasures.py
9632             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9633             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9634             self._autoPublish(anObj, theName, "centerOfMass")
9635             return anObj
9636
9637         ## Get a vertex sub-shape by index depended with orientation.
9638         #  @param theShape Shape to find sub-shape.
9639         #  @param theIndex Index to find vertex by this index (starting from zero)
9640         #  @param theName Object name; when specified, this parameter is used
9641         #         for result publication in the study. Otherwise, if automatic
9642         #         publication is switched on, default value is used for result name.
9643         #
9644         #  @return New GEOM.GEOM_Object, containing the created vertex.
9645         #
9646         #  @ref tui_measurement_tools_page "Example"
9647         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9648             """
9649             Get a vertex sub-shape by index depended with orientation.
9650
9651             Parameters:
9652                 theShape Shape to find sub-shape.
9653                 theIndex Index to find vertex by this index (starting from zero)
9654                 theName Object name; when specified, this parameter is used
9655                         for result publication in the study. Otherwise, if automatic
9656                         publication is switched on, default value is used for result name.
9657
9658             Returns:
9659                 New GEOM.GEOM_Object, containing the created vertex.
9660             """
9661             # Example: see GEOM_TestMeasures.py
9662             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9663             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9664             self._autoPublish(anObj, theName, "vertex")
9665             return anObj
9666
9667         ## Get the first vertex of wire/edge depended orientation.
9668         #  @param theShape Shape to find first vertex.
9669         #  @param theName Object name; when specified, this parameter is used
9670         #         for result publication in the study. Otherwise, if automatic
9671         #         publication is switched on, default value is used for result name.
9672         #
9673         #  @return New GEOM.GEOM_Object, containing the created vertex.
9674         #
9675         #  @ref tui_measurement_tools_page "Example"
9676         def GetFirstVertex(self, theShape, theName=None):
9677             """
9678             Get the first vertex of wire/edge depended orientation.
9679
9680             Parameters:
9681                 theShape Shape to find first vertex.
9682                 theName Object name; when specified, this parameter is used
9683                         for result publication in the study. Otherwise, if automatic
9684                         publication is switched on, default value is used for result name.
9685
9686             Returns:    
9687                 New GEOM.GEOM_Object, containing the created vertex.
9688             """
9689             # Example: see GEOM_TestMeasures.py
9690             # note: auto-publishing is done in self.GetVertexByIndex()
9691             anObj = self.GetVertexByIndex(theShape, 0, theName)
9692             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9693             return anObj
9694
9695         ## Get the last vertex of wire/edge depended orientation.
9696         #  @param theShape Shape to find last vertex.
9697         #  @param theName Object name; when specified, this parameter is used
9698         #         for result publication in the study. Otherwise, if automatic
9699         #         publication is switched on, default value is used for result name.
9700         #
9701         #  @return New GEOM.GEOM_Object, containing the created vertex.
9702         #
9703         #  @ref tui_measurement_tools_page "Example"
9704         def GetLastVertex(self, theShape, theName=None):
9705             """
9706             Get the last vertex of wire/edge depended orientation.
9707
9708             Parameters: 
9709                 theShape Shape to find last vertex.
9710                 theName Object name; when specified, this parameter is used
9711                         for result publication in the study. Otherwise, if automatic
9712                         publication is switched on, default value is used for result name.
9713
9714             Returns:   
9715                 New GEOM.GEOM_Object, containing the created vertex.
9716             """
9717             # Example: see GEOM_TestMeasures.py
9718             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9719             # note: auto-publishing is done in self.GetVertexByIndex()
9720             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9721             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9722             return anObj
9723
9724         ## Get a normale to the given face. If the point is not given,
9725         #  the normale is calculated at the center of mass.
9726         #  @param theFace Face to define normale of.
9727         #  @param theOptionalPoint Point to compute the normale at.
9728         #  @param theName Object name; when specified, this parameter is used
9729         #         for result publication in the study. Otherwise, if automatic
9730         #         publication is switched on, default value is used for result name.
9731         #
9732         #  @return New GEOM.GEOM_Object, containing the created vector.
9733         #
9734         #  @ref swig_todo "Example"
9735         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9736             """
9737             Get a normale to the given face. If the point is not given,
9738             the normale is calculated at the center of mass.
9739             
9740             Parameters: 
9741                 theFace Face to define normale of.
9742                 theOptionalPoint Point to compute the normale at.
9743                 theName Object name; when specified, this parameter is used
9744                         for result publication in the study. Otherwise, if automatic
9745                         publication is switched on, default value is used for result name.
9746
9747             Returns:   
9748                 New GEOM.GEOM_Object, containing the created vector.
9749             """
9750             # Example: see GEOM_TestMeasures.py
9751             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9752             RaiseIfFailed("GetNormal", self.MeasuOp)
9753             self._autoPublish(anObj, theName, "normal")
9754             return anObj
9755
9756         ## Check a topology of the given shape.
9757         #  @param theShape Shape to check validity of.
9758         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9759         #                        if TRUE, the shape's geometry will be checked also.
9760         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9761         #                        of problem is printed.
9762         #                        if TRUE and if theShape is invalid, the description 
9763         #                        of problem is also returned.
9764         #  @return TRUE, if the shape "seems to be valid".
9765         #
9766         #  @ref tui_measurement_tools_page "Example"
9767         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9768             """
9769             Check a topology of the given shape.
9770
9771             Parameters: 
9772                 theShape Shape to check validity of.
9773                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9774                                if TRUE, the shape's geometry will be checked also.
9775                 theReturnStatus If FALSE and if theShape is invalid, a description
9776                                 of problem is printed.
9777                                 if TRUE and if theShape is invalid, the description 
9778                                 of problem is returned.
9779
9780             Returns:   
9781                 TRUE, if the shape "seems to be valid".
9782                 If theShape is invalid, prints a description of problem.
9783                 This description can also be returned.
9784             """
9785             # Example: see GEOM_TestMeasures.py
9786             if theIsCheckGeom:
9787                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9788                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9789             else:
9790                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9791                 RaiseIfFailed("CheckShape", self.MeasuOp)
9792             if IsValid == 0:
9793                 if theReturnStatus == 0:
9794                     print Status
9795             if theReturnStatus == 1:
9796               return (IsValid, Status)
9797             return IsValid
9798
9799         ## Detect self-intersections in the given shape.
9800         #  @param theShape Shape to check.
9801         #  @return TRUE, if the shape contains no self-intersections.
9802         #
9803         #  @ref tui_measurement_tools_page "Example"
9804         def CheckSelfIntersections(self, theShape):
9805             """
9806             Detect self-intersections in the given shape.
9807
9808             Parameters: 
9809                 theShape Shape to check.
9810
9811             Returns:   
9812                 TRUE, if the shape contains no self-intersections.
9813             """
9814             # Example: see GEOM_TestMeasures.py
9815             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9816             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9817             return IsValid
9818
9819         ## Get position (LCS) of theShape.
9820         #
9821         #  Origin of the LCS is situated at the shape's center of mass.
9822         #  Axes of the LCS are obtained from shape's location or,
9823         #  if the shape is a planar face, from position of its plane.
9824         #
9825         #  @param theShape Shape to calculate position of.
9826         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9827         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9828         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9829         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9830         #
9831         #  @ref swig_todo "Example"
9832         def GetPosition(self,theShape):
9833             """
9834             Get position (LCS) of theShape.
9835             Origin of the LCS is situated at the shape's center of mass.
9836             Axes of the LCS are obtained from shape's location or,
9837             if the shape is a planar face, from position of its plane.
9838
9839             Parameters: 
9840                 theShape Shape to calculate position of.
9841
9842             Returns:  
9843                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9844                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9845                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9846                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9847             """
9848             # Example: see GEOM_TestMeasures.py
9849             aTuple = self.MeasuOp.GetPosition(theShape)
9850             RaiseIfFailed("GetPosition", self.MeasuOp)
9851             return aTuple
9852
9853         ## Get kind of theShape.
9854         #
9855         #  @param theShape Shape to get a kind of.
9856         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9857         #          and a list of parameters, describing the shape.
9858         #  @note  Concrete meaning of each value, returned via \a theIntegers
9859         #         or \a theDoubles list depends on the kind() of the shape.
9860         #
9861         #  @ref swig_todo "Example"
9862         def KindOfShape(self,theShape):
9863             """
9864             Get kind of theShape.
9865          
9866             Parameters: 
9867                 theShape Shape to get a kind of.
9868
9869             Returns:
9870                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9871                     and a list of parameters, describing the shape.
9872             Note:
9873                 Concrete meaning of each value, returned via theIntegers
9874                 or theDoubles list depends on the geompy.kind of the shape
9875             """
9876             # Example: see GEOM_TestMeasures.py
9877             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9878             RaiseIfFailed("KindOfShape", self.MeasuOp)
9879
9880             aKind  = aRoughTuple[0]
9881             anInts = aRoughTuple[1]
9882             aDbls  = aRoughTuple[2]
9883
9884             # Now there is no exception from this rule:
9885             aKindTuple = [aKind] + aDbls + anInts
9886
9887             # If they are we will regroup parameters for such kind of shape.
9888             # For example:
9889             #if aKind == kind.SOME_KIND:
9890             #    #  SOME_KIND     int int double int double double
9891             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9892
9893             return aKindTuple
9894
9895         # end of l2_measure
9896         ## @}
9897
9898         ## @addtogroup l2_import_export
9899         ## @{
9900
9901         ## Import a shape from the BREP or IGES or STEP file
9902         #  (depends on given format) with given name.
9903         #  @param theFileName The file, containing the shape.
9904         #  @param theFormatName Specify format for the file reading.
9905         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9906         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9907         #            format 'STEP_SCALE' is used instead of 'STEP',
9908         #            length unit will be set to 'meter' and result model will be scaled.
9909         #  @param theName Object name; when specified, this parameter is used
9910         #         for result publication in the study. Otherwise, if automatic
9911         #         publication is switched on, default value is used for result name.
9912         #
9913         #  @return New GEOM.GEOM_Object, containing the imported shape.
9914         #
9915         #  @ref swig_Import_Export "Example"
9916         def ImportFile(self, theFileName, theFormatName, theName=None):
9917             """
9918             Import a shape from the BREP or IGES or STEP file
9919             (depends on given format) with given name.
9920
9921             Parameters: 
9922                 theFileName The file, containing the shape.
9923                 theFormatName Specify format for the file reading.
9924                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9925                     If format 'IGES_SCALE' is used instead of 'IGES' or
9926                        format 'STEP_SCALE' is used instead of 'STEP',
9927                        length unit will be set to 'meter' and result model will be scaled.
9928                 theName Object name; when specified, this parameter is used
9929                         for result publication in the study. Otherwise, if automatic
9930                         publication is switched on, default value is used for result name.
9931
9932             Returns:
9933                 New GEOM.GEOM_Object, containing the imported shape.
9934             """
9935             # Example: see GEOM_TestOthers.py
9936             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9937             RaiseIfFailed("ImportFile", self.InsertOp)
9938             self._autoPublish(anObj, theName, "imported")
9939             return anObj
9940
9941         ## Deprecated analog of ImportFile()
9942         def Import(self, theFileName, theFormatName, theName=None):
9943             """
9944             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9945             """
9946             print "WARNING: Function Import is deprecated, use ImportFile instead"
9947             # note: auto-publishing is done in self.ImportFile()
9948             return self.ImportFile(theFileName, theFormatName, theName)
9949
9950         ## Shortcut to ImportFile() for BREP format.
9951         #  Import a shape from the BREP file with given name.
9952         #  @param theFileName The file, containing the shape.
9953         #  @param theName Object name; when specified, this parameter is used
9954         #         for result publication in the study. Otherwise, if automatic
9955         #         publication is switched on, default value is used for result name.
9956         #
9957         #  @return New GEOM.GEOM_Object, containing the imported shape.
9958         #
9959         #  @ref swig_Import_Export "Example"
9960         def ImportBREP(self, theFileName, theName=None):
9961             """
9962             geompy.ImportFile(...) function for BREP format
9963             Import a shape from the BREP file with given name.
9964
9965             Parameters: 
9966                 theFileName The file, containing the shape.
9967                 theName Object name; when specified, this parameter is used
9968                         for result publication in the study. Otherwise, if automatic
9969                         publication is switched on, default value is used for result name.
9970
9971             Returns:
9972                 New GEOM.GEOM_Object, containing the imported shape.
9973             """
9974             # Example: see GEOM_TestOthers.py
9975             # note: auto-publishing is done in self.ImportFile()
9976             return self.ImportFile(theFileName, "BREP", theName)
9977
9978         ## Shortcut to ImportFile() for IGES format
9979         #  Import a shape from the IGES file with given name.
9980         #  @param theFileName The file, containing the shape.
9981         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9982         #                     and result model will be scaled, if its units are not meters.
9983         #                     If False (default), file length units will be taken into account.
9984         #  @param theName Object name; when specified, this parameter is used
9985         #         for result publication in the study. Otherwise, if automatic
9986         #         publication is switched on, default value is used for result name.
9987         #
9988         #  @return New GEOM.GEOM_Object, containing the imported shape.
9989         #
9990         #  @ref swig_Import_Export "Example"
9991         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9992             """
9993             geompy.ImportFile(...) function for IGES format
9994
9995             Parameters:
9996                 theFileName The file, containing the shape.
9997                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9998                             and result model will be scaled, if its units are not meters.
9999                             If False (default), file length units will be taken into account.
10000                 theName Object name; when specified, this parameter is used
10001                         for result publication in the study. Otherwise, if automatic
10002                         publication is switched on, default value is used for result name.
10003
10004             Returns:
10005                 New GEOM.GEOM_Object, containing the imported shape.
10006             """
10007             # Example: see GEOM_TestOthers.py
10008             # note: auto-publishing is done in self.ImportFile()
10009             if ignoreUnits:
10010                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10011             return self.ImportFile(theFileName, "IGES", theName)
10012
10013         ## Return length unit from given IGES file
10014         #  @param theFileName The file, containing the shape.
10015         #  @return String, containing the units name.
10016         #
10017         #  @ref swig_Import_Export "Example"
10018         def GetIGESUnit(self, theFileName):
10019             """
10020             Return length units from given IGES file
10021
10022             Parameters:
10023                 theFileName The file, containing the shape.
10024
10025             Returns:
10026                 String, containing the units name.
10027             """
10028             # Example: see GEOM_TestOthers.py
10029             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10030             return aUnitName
10031
10032         ## Shortcut to ImportFile() for STEP format
10033         #  Import a shape from the STEP file with given name.
10034         #  @param theFileName The file, containing the shape.
10035         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10036         #                     and result model will be scaled, if its units are not meters.
10037         #                     If False (default), file length units will be taken into account.
10038         #  @param theName Object name; when specified, this parameter is used
10039         #         for result publication in the study. Otherwise, if automatic
10040         #         publication is switched on, default value is used for result name.
10041         #
10042         #  @return New GEOM.GEOM_Object, containing the imported shape.
10043         #
10044         #  @ref swig_Import_Export "Example"
10045         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10046             """
10047             geompy.ImportFile(...) function for STEP format
10048
10049             Parameters:
10050                 theFileName The file, containing the shape.
10051                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10052                             and result model will be scaled, if its units are not meters.
10053                             If False (default), file length units will be taken into account.
10054                 theName Object name; when specified, this parameter is used
10055                         for result publication in the study. Otherwise, if automatic
10056                         publication is switched on, default value is used for result name.
10057
10058             Returns:
10059                 New GEOM.GEOM_Object, containing the imported shape.
10060             """
10061             # Example: see GEOM_TestOthers.py
10062             # note: auto-publishing is done in self.ImportFile()
10063             if ignoreUnits:
10064                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10065             return self.ImportFile(theFileName, "STEP", theName)
10066
10067         ## Return length unit from given IGES or STEP file
10068         #  @param theFileName The file, containing the shape.
10069         #  @return String, containing the units name.
10070         #
10071         #  @ref swig_Import_Export "Example"
10072         def GetSTEPUnit(self, theFileName):
10073             """
10074             Return length units from given STEP file
10075
10076             Parameters:
10077                 theFileName The file, containing the shape.
10078
10079             Returns:
10080                 String, containing the units name.
10081             """
10082             # Example: see GEOM_TestOthers.py
10083             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10084             return aUnitName
10085
10086         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10087         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10088         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10089         #  @param theStream The BRep binary stream.
10090         #  @param theName Object name; when specified, this parameter is used
10091         #         for result publication in the study. Otherwise, if automatic
10092         #         publication is switched on, default value is used for result name.
10093         #
10094         #  @return New GEOM_Object, containing the shape, read from theStream.
10095         #
10096         #  @ref swig_Import_Export "Example"
10097         def RestoreShape (self, theStream, theName=None):
10098             """
10099             Read a shape from the binary stream, containing its bounding representation (BRep).
10100
10101             Note:
10102                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10103
10104             Parameters: 
10105                 theStream The BRep binary stream.
10106                 theName Object name; when specified, this parameter is used
10107                         for result publication in the study. Otherwise, if automatic
10108                         publication is switched on, default value is used for result name.
10109
10110             Returns:
10111                 New GEOM_Object, containing the shape, read from theStream.
10112             """
10113             # Example: see GEOM_TestOthers.py
10114             anObj = self.InsertOp.RestoreShape(theStream)
10115             RaiseIfFailed("RestoreShape", self.InsertOp)
10116             self._autoPublish(anObj, theName, "restored")
10117             return anObj
10118
10119         ## Export the given shape into a file with given name.
10120         #  @param theObject Shape to be stored in the file.
10121         #  @param theFileName Name of the file to store the given shape in.
10122         #  @param theFormatName Specify format for the shape storage.
10123         #         Available formats can be obtained with
10124         #         geompy.InsertOp.ExportTranslators()[0] method.
10125         #
10126         #  @ref swig_Import_Export "Example"
10127         def Export(self, theObject, theFileName, theFormatName):
10128             """
10129             Export the given shape into a file with given name.
10130
10131             Parameters: 
10132                 theObject Shape to be stored in the file.
10133                 theFileName Name of the file to store the given shape in.
10134                 theFormatName Specify format for the shape storage.
10135                               Available formats can be obtained with
10136                               geompy.InsertOp.ExportTranslators()[0] method.
10137             """
10138             # Example: see GEOM_TestOthers.py
10139             self.InsertOp.Export(theObject, theFileName, theFormatName)
10140             if self.InsertOp.IsDone() == 0:
10141                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10142                 pass
10143             pass
10144
10145         ## Shortcut to Export() for BREP format
10146         #
10147         #  @ref swig_Import_Export "Example"
10148         def ExportBREP(self,theObject, theFileName):
10149             """
10150             geompy.Export(...) function for BREP format
10151             """
10152             # Example: see GEOM_TestOthers.py
10153             return self.Export(theObject, theFileName, "BREP")
10154
10155         ## Shortcut to Export() for IGES format
10156         #
10157         #  @ref swig_Import_Export "Example"
10158         def ExportIGES(self,theObject, theFileName):
10159             """
10160             geompy.Export(...) function for IGES format
10161             """
10162             # Example: see GEOM_TestOthers.py
10163             return self.Export(theObject, theFileName, "IGES")
10164
10165         ## Shortcut to Export() for STEP format
10166         #
10167         #  @ref swig_Import_Export "Example"
10168         def ExportSTEP(self,theObject, theFileName):
10169             """
10170             geompy.Export(...) function for STEP format
10171             """
10172             # Example: see GEOM_TestOthers.py
10173             return self.Export(theObject, theFileName, "STEP")
10174
10175         # end of l2_import_export
10176         ## @}
10177
10178         ## @addtogroup l3_blocks
10179         ## @{
10180
10181         ## Create a quadrangle face from four edges. Order of Edges is not
10182         #  important. It is  not necessary that edges share the same vertex.
10183         #  @param E1,E2,E3,E4 Edges for the face bound.
10184         #  @param theName Object name; when specified, this parameter is used
10185         #         for result publication in the study. Otherwise, if automatic
10186         #         publication is switched on, default value is used for result name.
10187         #
10188         #  @return New GEOM.GEOM_Object, containing the created face.
10189         #
10190         #  @ref tui_building_by_blocks_page "Example"
10191         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10192             """
10193             Create a quadrangle face from four edges. Order of Edges is not
10194             important. It is  not necessary that edges share the same vertex.
10195
10196             Parameters: 
10197                 E1,E2,E3,E4 Edges for the face bound.
10198                 theName Object name; when specified, this parameter is used
10199                         for result publication in the study. Otherwise, if automatic
10200                         publication is switched on, default value is used for result name.
10201
10202             Returns: 
10203                 New GEOM.GEOM_Object, containing the created face.
10204
10205             Example of usage:               
10206                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10207             """
10208             # Example: see GEOM_Spanner.py
10209             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10210             RaiseIfFailed("MakeQuad", self.BlocksOp)
10211             self._autoPublish(anObj, theName, "quad")
10212             return anObj
10213
10214         ## Create a quadrangle face on two edges.
10215         #  The missing edges will be built by creating the shortest ones.
10216         #  @param E1,E2 Two opposite edges for the face.
10217         #  @param theName Object name; when specified, this parameter is used
10218         #         for result publication in the study. Otherwise, if automatic
10219         #         publication is switched on, default value is used for result name.
10220         #
10221         #  @return New GEOM.GEOM_Object, containing the created face.
10222         #
10223         #  @ref tui_building_by_blocks_page "Example"
10224         def MakeQuad2Edges(self, E1, E2, theName=None):
10225             """
10226             Create a quadrangle face on two edges.
10227             The missing edges will be built by creating the shortest ones.
10228
10229             Parameters: 
10230                 E1,E2 Two opposite edges for the face.
10231                 theName Object name; when specified, this parameter is used
10232                         for result publication in the study. Otherwise, if automatic
10233                         publication is switched on, default value is used for result name.
10234
10235             Returns: 
10236                 New GEOM.GEOM_Object, containing the created face.
10237             
10238             Example of usage:
10239                 # create vertices
10240                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10241                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10242                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10243                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10244                 # create edges
10245                 edge1 = geompy.MakeEdge(p1, p2)
10246                 edge2 = geompy.MakeEdge(p3, p4)
10247                 # create a quadrangle face from two edges
10248                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10249             """
10250             # Example: see GEOM_Spanner.py
10251             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10252             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10253             self._autoPublish(anObj, theName, "quad")
10254             return anObj
10255
10256         ## Create a quadrangle face with specified corners.
10257         #  The missing edges will be built by creating the shortest ones.
10258         #  @param V1,V2,V3,V4 Corner vertices for the face.
10259         #  @param theName Object name; when specified, this parameter is used
10260         #         for result publication in the study. Otherwise, if automatic
10261         #         publication is switched on, default value is used for result name.
10262         #
10263         #  @return New GEOM.GEOM_Object, containing the created face.
10264         #
10265         #  @ref tui_building_by_blocks_page "Example 1"
10266         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10267         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10268             """
10269             Create a quadrangle face with specified corners.
10270             The missing edges will be built by creating the shortest ones.
10271
10272             Parameters: 
10273                 V1,V2,V3,V4 Corner vertices for the face.
10274                 theName Object name; when specified, this parameter is used
10275                         for result publication in the study. Otherwise, if automatic
10276                         publication is switched on, default value is used for result name.
10277
10278             Returns: 
10279                 New GEOM.GEOM_Object, containing the created face.
10280
10281             Example of usage:
10282                 # create vertices
10283                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10284                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10285                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10286                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10287                 # create a quadrangle from four points in its corners
10288                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10289             """
10290             # Example: see GEOM_Spanner.py
10291             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10292             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10293             self._autoPublish(anObj, theName, "quad")
10294             return anObj
10295
10296         ## Create a hexahedral solid, bounded by the six given faces. Order of
10297         #  faces is not important. It is  not necessary that Faces share the same edge.
10298         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10299         #  @param theName Object name; when specified, this parameter is used
10300         #         for result publication in the study. Otherwise, if automatic
10301         #         publication is switched on, default value is used for result name.
10302         #
10303         #  @return New GEOM.GEOM_Object, containing the created solid.
10304         #
10305         #  @ref tui_building_by_blocks_page "Example 1"
10306         #  \n @ref swig_MakeHexa "Example 2"
10307         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10308             """
10309             Create a hexahedral solid, bounded by the six given faces. Order of
10310             faces is not important. It is  not necessary that Faces share the same edge.
10311
10312             Parameters: 
10313                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10314                 theName Object name; when specified, this parameter is used
10315                         for result publication in the study. Otherwise, if automatic
10316                         publication is switched on, default value is used for result name.
10317
10318             Returns:    
10319                 New GEOM.GEOM_Object, containing the created solid.
10320
10321             Example of usage:
10322                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10323             """
10324             # Example: see GEOM_Spanner.py
10325             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10326             RaiseIfFailed("MakeHexa", self.BlocksOp)
10327             self._autoPublish(anObj, theName, "hexa")
10328             return anObj
10329
10330         ## Create a hexahedral solid between two given faces.
10331         #  The missing faces will be built by creating the smallest ones.
10332         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10333         #  @param theName Object name; when specified, this parameter is used
10334         #         for result publication in the study. Otherwise, if automatic
10335         #         publication is switched on, default value is used for result name.
10336         #
10337         #  @return New GEOM.GEOM_Object, containing the created solid.
10338         #
10339         #  @ref tui_building_by_blocks_page "Example 1"
10340         #  \n @ref swig_MakeHexa2Faces "Example 2"
10341         def MakeHexa2Faces(self, F1, F2, theName=None):
10342             """
10343             Create a hexahedral solid between two given faces.
10344             The missing faces will be built by creating the smallest ones.
10345
10346             Parameters: 
10347                 F1,F2 Two opposite faces for the hexahedral solid.
10348                 theName Object name; when specified, this parameter is used
10349                         for result publication in the study. Otherwise, if automatic
10350                         publication is switched on, default value is used for result name.
10351
10352             Returns:
10353                 New GEOM.GEOM_Object, containing the created solid.
10354
10355             Example of usage:
10356                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10357             """
10358             # Example: see GEOM_Spanner.py
10359             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10360             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10361             self._autoPublish(anObj, theName, "hexa")
10362             return anObj
10363
10364         # end of l3_blocks
10365         ## @}
10366
10367         ## @addtogroup l3_blocks_op
10368         ## @{
10369
10370         ## Get a vertex, found in the given shape by its coordinates.
10371         #  @param theShape Block or a compound of blocks.
10372         #  @param theX,theY,theZ Coordinates of the sought vertex.
10373         #  @param theEpsilon Maximum allowed distance between the resulting
10374         #                    vertex and point with the given coordinates.
10375         #  @param theName Object name; when specified, this parameter is used
10376         #         for result publication in the study. Otherwise, if automatic
10377         #         publication is switched on, default value is used for result name.
10378         #
10379         #  @return New GEOM.GEOM_Object, containing the found vertex.
10380         #
10381         #  @ref swig_GetPoint "Example"
10382         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10383             """
10384             Get a vertex, found in the given shape by its coordinates.
10385
10386             Parameters: 
10387                 theShape Block or a compound of blocks.
10388                 theX,theY,theZ Coordinates of the sought vertex.
10389                 theEpsilon Maximum allowed distance between the resulting
10390                            vertex and point with the given coordinates.
10391                 theName Object name; when specified, this parameter is used
10392                         for result publication in the study. Otherwise, if automatic
10393                         publication is switched on, default value is used for result name.
10394
10395             Returns:                  
10396                 New GEOM.GEOM_Object, containing the found vertex.
10397
10398             Example of usage:
10399                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10400             """
10401             # Example: see GEOM_TestOthers.py
10402             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10403             RaiseIfFailed("GetPoint", self.BlocksOp)
10404             self._autoPublish(anObj, theName, "vertex")
10405             return anObj
10406
10407         ## Find a vertex of the given shape, which has minimal distance to the given point.
10408         #  @param theShape Any shape.
10409         #  @param thePoint Point, close to the desired vertex.
10410         #  @param theName Object name; when specified, this parameter is used
10411         #         for result publication in the study. Otherwise, if automatic
10412         #         publication is switched on, default value is used for result name.
10413         #
10414         #  @return New GEOM.GEOM_Object, containing the found vertex.
10415         #
10416         #  @ref swig_GetVertexNearPoint "Example"
10417         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10418             """
10419             Find a vertex of the given shape, which has minimal distance to the given point.
10420
10421             Parameters: 
10422                 theShape Any shape.
10423                 thePoint Point, close to the desired vertex.
10424                 theName Object name; when specified, this parameter is used
10425                         for result publication in the study. Otherwise, if automatic
10426                         publication is switched on, default value is used for result name.
10427
10428             Returns:
10429                 New GEOM.GEOM_Object, containing the found vertex.
10430
10431             Example of usage:
10432                 pmidle = geompy.MakeVertex(50, 0, 50)
10433                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10434             """
10435             # Example: see GEOM_TestOthers.py
10436             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10437             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10438             self._autoPublish(anObj, theName, "vertex")
10439             return anObj
10440
10441         ## Get an edge, found in the given shape by two given vertices.
10442         #  @param theShape Block or a compound of blocks.
10443         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10444         #  @param theName Object name; when specified, this parameter is used
10445         #         for result publication in the study. Otherwise, if automatic
10446         #         publication is switched on, default value is used for result name.
10447         #
10448         #  @return New GEOM.GEOM_Object, containing the found edge.
10449         #
10450         #  @ref swig_GetEdge "Example"
10451         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10452             """
10453             Get an edge, found in the given shape by two given vertices.
10454
10455             Parameters: 
10456                 theShape Block or a compound of blocks.
10457                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10458                 theName Object name; when specified, this parameter is used
10459                         for result publication in the study. Otherwise, if automatic
10460                         publication is switched on, default value is used for result name.
10461
10462             Returns:
10463                 New GEOM.GEOM_Object, containing the found edge.
10464             """
10465             # Example: see GEOM_Spanner.py
10466             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10467             RaiseIfFailed("GetEdge", self.BlocksOp)
10468             self._autoPublish(anObj, theName, "edge")
10469             return anObj
10470
10471         ## Find an edge of the given shape, which has minimal distance to the given point.
10472         #  @param theShape Block or a compound of blocks.
10473         #  @param thePoint Point, close to the desired edge.
10474         #  @param theName Object name; when specified, this parameter is used
10475         #         for result publication in the study. Otherwise, if automatic
10476         #         publication is switched on, default value is used for result name.
10477         #
10478         #  @return New GEOM.GEOM_Object, containing the found edge.
10479         #
10480         #  @ref swig_GetEdgeNearPoint "Example"
10481         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10482             """
10483             Find an edge of the given shape, which has minimal distance to the given point.
10484
10485             Parameters: 
10486                 theShape Block or a compound of blocks.
10487                 thePoint Point, close to the desired edge.
10488                 theName Object name; when specified, this parameter is used
10489                         for result publication in the study. Otherwise, if automatic
10490                         publication is switched on, default value is used for result name.
10491
10492             Returns:
10493                 New GEOM.GEOM_Object, containing the found edge.
10494             """
10495             # Example: see GEOM_TestOthers.py
10496             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10497             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10498             self._autoPublish(anObj, theName, "edge")
10499             return anObj
10500
10501         ## Returns a face, found in the given shape by four given corner vertices.
10502         #  @param theShape Block or a compound of blocks.
10503         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10504         #  @param theName Object name; when specified, this parameter is used
10505         #         for result publication in the study. Otherwise, if automatic
10506         #         publication is switched on, default value is used for result name.
10507         #
10508         #  @return New GEOM.GEOM_Object, containing the found face.
10509         #
10510         #  @ref swig_todo "Example"
10511         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10512             """
10513             Returns a face, found in the given shape by four given corner vertices.
10514
10515             Parameters:
10516                 theShape Block or a compound of blocks.
10517                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10518                 theName Object name; when specified, this parameter is used
10519                         for result publication in the study. Otherwise, if automatic
10520                         publication is switched on, default value is used for result name.
10521
10522             Returns:
10523                 New GEOM.GEOM_Object, containing the found face.
10524             """
10525             # Example: see GEOM_Spanner.py
10526             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10527             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10528             self._autoPublish(anObj, theName, "face")
10529             return anObj
10530
10531         ## Get a face of block, found in the given shape by two given edges.
10532         #  @param theShape Block or a compound of blocks.
10533         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10534         #  @param theName Object name; when specified, this parameter is used
10535         #         for result publication in the study. Otherwise, if automatic
10536         #         publication is switched on, default value is used for result name.
10537         #
10538         #  @return New GEOM.GEOM_Object, containing the found face.
10539         #
10540         #  @ref swig_todo "Example"
10541         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10542             """
10543             Get a face of block, found in the given shape by two given edges.
10544
10545             Parameters:
10546                 theShape Block or a compound of blocks.
10547                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10548                 theName Object name; when specified, this parameter is used
10549                         for result publication in the study. Otherwise, if automatic
10550                         publication is switched on, default value is used for result name.
10551
10552             Returns:
10553                 New GEOM.GEOM_Object, containing the found face.
10554             """
10555             # Example: see GEOM_Spanner.py
10556             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10557             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10558             self._autoPublish(anObj, theName, "face")
10559             return anObj
10560
10561         ## Find a face, opposite to the given one in the given block.
10562         #  @param theBlock Must be a hexahedral solid.
10563         #  @param theFace Face of \a theBlock, opposite to the desired face.
10564         #  @param theName Object name; when specified, this parameter is used
10565         #         for result publication in the study. Otherwise, if automatic
10566         #         publication is switched on, default value is used for result name.
10567         #
10568         #  @return New GEOM.GEOM_Object, containing the found face.
10569         #
10570         #  @ref swig_GetOppositeFace "Example"
10571         def GetOppositeFace(self, theBlock, theFace, theName=None):
10572             """
10573             Find a face, opposite to the given one in the given block.
10574
10575             Parameters:
10576                 theBlock Must be a hexahedral solid.
10577                 theFace Face of theBlock, opposite to the desired face.
10578                 theName Object name; when specified, this parameter is used
10579                         for result publication in the study. Otherwise, if automatic
10580                         publication is switched on, default value is used for result name.
10581
10582             Returns: 
10583                 New GEOM.GEOM_Object, containing the found face.
10584             """
10585             # Example: see GEOM_Spanner.py
10586             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10587             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10588             self._autoPublish(anObj, theName, "face")
10589             return anObj
10590
10591         ## Find a face of the given shape, which has minimal distance to the given point.
10592         #  @param theShape Block or a compound of blocks.
10593         #  @param thePoint Point, close to the desired face.
10594         #  @param theName Object name; when specified, this parameter is used
10595         #         for result publication in the study. Otherwise, if automatic
10596         #         publication is switched on, default value is used for result name.
10597         #
10598         #  @return New GEOM.GEOM_Object, containing the found face.
10599         #
10600         #  @ref swig_GetFaceNearPoint "Example"
10601         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10602             """
10603             Find a face of the given shape, which has minimal distance to the given point.
10604
10605             Parameters:
10606                 theShape Block or a compound of blocks.
10607                 thePoint Point, close to the desired face.
10608                 theName Object name; when specified, this parameter is used
10609                         for result publication in the study. Otherwise, if automatic
10610                         publication is switched on, default value is used for result name.
10611
10612             Returns:
10613                 New GEOM.GEOM_Object, containing the found face.
10614             """
10615             # Example: see GEOM_Spanner.py
10616             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10617             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10618             self._autoPublish(anObj, theName, "face")
10619             return anObj
10620
10621         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10622         #  @param theBlock Block or a compound of blocks.
10623         #  @param theVector Vector, close to the normale of the desired face.
10624         #  @param theName Object name; when specified, this parameter is used
10625         #         for result publication in the study. Otherwise, if automatic
10626         #         publication is switched on, default value is used for result name.
10627         #
10628         #  @return New GEOM.GEOM_Object, containing the found face.
10629         #
10630         #  @ref swig_todo "Example"
10631         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10632             """
10633             Find a face of block, whose outside normale has minimal angle with the given vector.
10634
10635             Parameters:
10636                 theBlock Block or a compound of blocks.
10637                 theVector Vector, close to the normale of the desired face.
10638                 theName Object name; when specified, this parameter is used
10639                         for result publication in the study. Otherwise, if automatic
10640                         publication is switched on, default value is used for result name.
10641
10642             Returns:
10643                 New GEOM.GEOM_Object, containing the found face.
10644             """
10645             # Example: see GEOM_Spanner.py
10646             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10647             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10648             self._autoPublish(anObj, theName, "face")
10649             return anObj
10650
10651         ## Find all sub-shapes of type \a theShapeType of the given shape,
10652         #  which have minimal distance to the given point.
10653         #  @param theShape Any shape.
10654         #  @param thePoint Point, close to the desired shape.
10655         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10656         #  @param theTolerance The tolerance for distances comparison. All shapes
10657         #                      with distances to the given point in interval
10658         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10659         #  @param theName Object name; when specified, this parameter is used
10660         #         for result publication in the study. Otherwise, if automatic
10661         #         publication is switched on, default value is used for result name.
10662         #
10663         #  @return New GEOM_Object, containing a group of all found shapes.
10664         #
10665         #  @ref swig_GetShapesNearPoint "Example"
10666         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10667             """
10668             Find all sub-shapes of type theShapeType of the given shape,
10669             which have minimal distance to the given point.
10670
10671             Parameters:
10672                 theShape Any shape.
10673                 thePoint Point, close to the desired shape.
10674                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10675                 theTolerance The tolerance for distances comparison. All shapes
10676                                 with distances to the given point in interval
10677                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10678                 theName Object name; when specified, this parameter is used
10679                         for result publication in the study. Otherwise, if automatic
10680                         publication is switched on, default value is used for result name.
10681
10682             Returns:
10683                 New GEOM_Object, containing a group of all found shapes.
10684             """
10685             # Example: see GEOM_TestOthers.py
10686             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10687             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10688             self._autoPublish(anObj, theName, "group")
10689             return anObj
10690
10691         # end of l3_blocks_op
10692         ## @}
10693
10694         ## @addtogroup l4_blocks_measure
10695         ## @{
10696
10697         ## Check, if the compound of blocks is given.
10698         #  To be considered as a compound of blocks, the
10699         #  given shape must satisfy the following conditions:
10700         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10701         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10702         #  - The compound should be connexe.
10703         #  - The glue between two quadrangle faces should be applied.
10704         #  @param theCompound The compound to check.
10705         #  @return TRUE, if the given shape is a compound of blocks.
10706         #  If theCompound is not valid, prints all discovered errors.
10707         #
10708         #  @ref tui_measurement_tools_page "Example 1"
10709         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10710         def CheckCompoundOfBlocks(self,theCompound):
10711             """
10712             Check, if the compound of blocks is given.
10713             To be considered as a compound of blocks, the
10714             given shape must satisfy the following conditions:
10715             - Each element of the compound should be a Block (6 faces and 12 edges).
10716             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10717             - The compound should be connexe.
10718             - The glue between two quadrangle faces should be applied.
10719
10720             Parameters:
10721                 theCompound The compound to check.
10722
10723             Returns:
10724                 TRUE, if the given shape is a compound of blocks.
10725                 If theCompound is not valid, prints all discovered errors.            
10726             """
10727             # Example: see GEOM_Spanner.py
10728             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10729             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10730             if IsValid == 0:
10731                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10732                 print Descr
10733             return IsValid
10734
10735         ## Retrieve all non blocks solids and faces from \a theShape.
10736         #  @param theShape The shape to explore.
10737         #  @param theName Object name; when specified, this parameter is used
10738         #         for result publication in the study. Otherwise, if automatic
10739         #         publication is switched on, default value is used for result name.
10740         #
10741         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10742         #          non block solids (= not 6 faces, or with 6 faces, but with the
10743         #          presence of non-quadrangular faces). The second object is a
10744         #          group of all non quadrangular faces.
10745         #
10746         #  @ref tui_measurement_tools_page "Example 1"
10747         #  \n @ref swig_GetNonBlocks "Example 2"
10748         def GetNonBlocks (self, theShape, theName=None):
10749             """
10750             Retrieve all non blocks solids and faces from theShape.
10751
10752             Parameters:
10753                 theShape The shape to explore.
10754                 theName Object name; when specified, this parameter is used
10755                         for result publication in the study. Otherwise, if automatic
10756                         publication is switched on, default value is used for result name.
10757
10758             Returns:
10759                 A tuple of two GEOM_Objects. The first object is a group of all
10760                 non block solids (= not 6 faces, or with 6 faces, but with the
10761                 presence of non-quadrangular faces). The second object is a
10762                 group of all non quadrangular faces.
10763
10764             Usage:
10765                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10766             """
10767             # Example: see GEOM_Spanner.py
10768             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10769             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10770             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10771             return aTuple
10772
10773         ## Remove all seam and degenerated edges from \a theShape.
10774         #  Unite faces and edges, sharing one surface. It means that
10775         #  this faces must have references to one C++ surface object (handle).
10776         #  @param theShape The compound or single solid to remove irregular edges from.
10777         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10778         #         do not unite faces.
10779         #  @param theName Object name; when specified, this parameter is used
10780         #         for result publication in the study. Otherwise, if automatic
10781         #         publication is switched on, default value is used for result name.
10782         #
10783         #  @return Improved shape.
10784         #
10785         #  @ref swig_RemoveExtraEdges "Example"
10786         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10787             """
10788             Remove all seam and degenerated edges from theShape.
10789             Unite faces and edges, sharing one surface. It means that
10790             this faces must have references to one C++ surface object (handle).
10791
10792             Parameters:
10793                 theShape The compound or single solid to remove irregular edges from.
10794                 doUnionFaces If True, then unite faces. If False (the default value),
10795                              do not unite faces.
10796                 theName Object name; when specified, this parameter is used
10797                         for result publication in the study. Otherwise, if automatic
10798                         publication is switched on, default value is used for result name.
10799
10800             Returns: 
10801                 Improved shape.
10802             """
10803             # Example: see GEOM_TestOthers.py
10804             nbFacesOptimum = -1 # -1 means do not unite faces
10805             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10806             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10807             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10808             self._autoPublish(anObj, theName, "removeExtraEdges")
10809             return anObj
10810
10811         ## Performs union faces of \a theShape
10812         #  Unite faces sharing one surface. It means that
10813         #  these faces must have references to one C++ surface object (handle).
10814         #  @param theShape The compound or single solid that contains faces
10815         #         to perform union.
10816         #  @param theName Object name; when specified, this parameter is used
10817         #         for result publication in the study. Otherwise, if automatic
10818         #         publication is switched on, default value is used for result name.
10819         #
10820         #  @return Improved shape.
10821         #
10822         #  @ref swig_UnionFaces "Example"
10823         def UnionFaces(self, theShape, theName=None):
10824             """
10825             Performs union faces of theShape.
10826             Unite faces sharing one surface. It means that
10827             these faces must have references to one C++ surface object (handle).
10828
10829             Parameters:
10830                 theShape The compound or single solid that contains faces
10831                          to perform union.
10832                 theName Object name; when specified, this parameter is used
10833                         for result publication in the study. Otherwise, if automatic
10834                         publication is switched on, default value is used for result name.
10835
10836             Returns: 
10837                 Improved shape.
10838             """
10839             # Example: see GEOM_TestOthers.py
10840             anObj = self.BlocksOp.UnionFaces(theShape)
10841             RaiseIfFailed("UnionFaces", self.BlocksOp)
10842             self._autoPublish(anObj, theName, "unionFaces")
10843             return anObj
10844
10845         ## Check, if the given shape is a blocks compound.
10846         #  Fix all detected errors.
10847         #    \note Single block can be also fixed by this method.
10848         #  @param theShape The compound to check and improve.
10849         #  @param theName Object name; when specified, this parameter is used
10850         #         for result publication in the study. Otherwise, if automatic
10851         #         publication is switched on, default value is used for result name.
10852         #
10853         #  @return Improved compound.
10854         #
10855         #  @ref swig_CheckAndImprove "Example"
10856         def CheckAndImprove(self, theShape, theName=None):
10857             """
10858             Check, if the given shape is a blocks compound.
10859             Fix all detected errors.
10860
10861             Note:
10862                 Single block can be also fixed by this method.
10863
10864             Parameters:
10865                 theShape The compound to check and improve.
10866                 theName Object name; when specified, this parameter is used
10867                         for result publication in the study. Otherwise, if automatic
10868                         publication is switched on, default value is used for result name.
10869
10870             Returns: 
10871                 Improved compound.
10872             """
10873             # Example: see GEOM_TestOthers.py
10874             anObj = self.BlocksOp.CheckAndImprove(theShape)
10875             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10876             self._autoPublish(anObj, theName, "improved")
10877             return anObj
10878
10879         # end of l4_blocks_measure
10880         ## @}
10881
10882         ## @addtogroup l3_blocks_op
10883         ## @{
10884
10885         ## Get all the blocks, contained in the given compound.
10886         #  @param theCompound The compound to explode.
10887         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10888         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10889         #  @param theName Object name; when specified, this parameter is used
10890         #         for result publication in the study. Otherwise, if automatic
10891         #         publication is switched on, default value is used for result name.
10892         #
10893         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10894         #
10895         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10896         #
10897         #  @ref tui_explode_on_blocks "Example 1"
10898         #  \n @ref swig_MakeBlockExplode "Example 2"
10899         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10900             """
10901             Get all the blocks, contained in the given compound.
10902
10903             Parameters:
10904                 theCompound The compound to explode.
10905                 theMinNbFaces If solid has lower number of faces, it is not a block.
10906                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10907                 theName Object name; when specified, this parameter is used
10908                         for result publication in the study. Otherwise, if automatic
10909                         publication is switched on, default value is used for result name.
10910
10911             Note:
10912                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10913
10914             Returns:  
10915                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10916             """
10917             # Example: see GEOM_TestOthers.py
10918             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10919             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10920             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10921             for anObj in aList:
10922                 anObj.SetParameters(Parameters)
10923                 pass
10924             self._autoPublish(aList, theName, "block")
10925             return aList
10926
10927         ## Find block, containing the given point inside its volume or on boundary.
10928         #  @param theCompound Compound, to find block in.
10929         #  @param thePoint Point, close to the desired block. If the point lays on
10930         #         boundary between some blocks, we return block with nearest center.
10931         #  @param theName Object name; when specified, this parameter is used
10932         #         for result publication in the study. Otherwise, if automatic
10933         #         publication is switched on, default value is used for result name.
10934         #
10935         #  @return New GEOM.GEOM_Object, containing the found block.
10936         #
10937         #  @ref swig_todo "Example"
10938         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10939             """
10940             Find block, containing the given point inside its volume or on boundary.
10941
10942             Parameters:
10943                 theCompound Compound, to find block in.
10944                 thePoint Point, close to the desired block. If the point lays on
10945                          boundary between some blocks, we return block with nearest center.
10946                 theName Object name; when specified, this parameter is used
10947                         for result publication in the study. Otherwise, if automatic
10948                         publication is switched on, default value is used for result name.
10949
10950             Returns:
10951                 New GEOM.GEOM_Object, containing the found block.
10952             """
10953             # Example: see GEOM_Spanner.py
10954             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10955             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10956             self._autoPublish(anObj, theName, "block")
10957             return anObj
10958
10959         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10960         #  @param theCompound Compound, to find block in.
10961         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10962         #  @param theName Object name; when specified, this parameter is used
10963         #         for result publication in the study. Otherwise, if automatic
10964         #         publication is switched on, default value is used for result name.
10965         #
10966         #  @return New GEOM.GEOM_Object, containing the found block.
10967         #
10968         #  @ref swig_GetBlockByParts "Example"
10969         def GetBlockByParts(self, theCompound, theParts, theName=None):
10970             """
10971              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10972
10973              Parameters:
10974                 theCompound Compound, to find block in.
10975                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10976                 theName Object name; when specified, this parameter is used
10977                         for result publication in the study. Otherwise, if automatic
10978                         publication is switched on, default value is used for result name.
10979
10980             Returns: 
10981                 New GEOM_Object, containing the found block.
10982             """
10983             # Example: see GEOM_TestOthers.py
10984             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10985             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10986             self._autoPublish(anObj, theName, "block")
10987             return anObj
10988
10989         ## Return all blocks, containing all the elements, passed as the parts.
10990         #  @param theCompound Compound, to find blocks in.
10991         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10992         #  @param theName Object name; when specified, this parameter is used
10993         #         for result publication in the study. Otherwise, if automatic
10994         #         publication is switched on, default value is used for result name.
10995         #
10996         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10997         #
10998         #  @ref swig_todo "Example"
10999         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11000             """
11001             Return all blocks, containing all the elements, passed as the parts.
11002
11003             Parameters:
11004                 theCompound Compound, to find blocks in.
11005                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11006                 theName Object name; when specified, this parameter is used
11007                         for result publication in the study. Otherwise, if automatic
11008                         publication is switched on, default value is used for result name.
11009
11010             Returns:
11011                 List of GEOM.GEOM_Object, containing the found blocks.
11012             """
11013             # Example: see GEOM_Spanner.py
11014             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11015             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11016             self._autoPublish(aList, theName, "block")
11017             return aList
11018
11019         ## Multi-transformate block and glue the result.
11020         #  Transformation is defined so, as to superpose direction faces.
11021         #  @param Block Hexahedral solid to be multi-transformed.
11022         #  @param DirFace1 ID of First direction face.
11023         #  @param DirFace2 ID of Second direction face.
11024         #  @param NbTimes Quantity of transformations to be done.
11025         #  @param theName Object name; when specified, this parameter is used
11026         #         for result publication in the study. Otherwise, if automatic
11027         #         publication is switched on, default value is used for result name.
11028         #
11029         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11030         #
11031         #  @return New GEOM.GEOM_Object, containing the result shape.
11032         #
11033         #  @ref tui_multi_transformation "Example"
11034         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11035             """
11036             Multi-transformate block and glue the result.
11037             Transformation is defined so, as to superpose direction faces.
11038
11039             Parameters:
11040                 Block Hexahedral solid to be multi-transformed.
11041                 DirFace1 ID of First direction face.
11042                 DirFace2 ID of Second direction face.
11043                 NbTimes Quantity of transformations to be done.
11044                 theName Object name; when specified, this parameter is used
11045                         for result publication in the study. Otherwise, if automatic
11046                         publication is switched on, default value is used for result name.
11047
11048             Note:
11049                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11050
11051             Returns:
11052                 New GEOM.GEOM_Object, containing the result shape.
11053             """
11054             # Example: see GEOM_Spanner.py
11055             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11056             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11057             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11058             anObj.SetParameters(Parameters)
11059             self._autoPublish(anObj, theName, "transformed")
11060             return anObj
11061
11062         ## Multi-transformate block and glue the result.
11063         #  @param Block Hexahedral solid to be multi-transformed.
11064         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11065         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11066         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11067         #  @param theName Object name; when specified, this parameter is used
11068         #         for result publication in the study. Otherwise, if automatic
11069         #         publication is switched on, default value is used for result name.
11070         #
11071         #  @return New GEOM.GEOM_Object, containing the result shape.
11072         #
11073         #  @ref tui_multi_transformation "Example"
11074         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11075                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11076             """
11077             Multi-transformate block and glue the result.
11078
11079             Parameters:
11080                 Block Hexahedral solid to be multi-transformed.
11081                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11082                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11083                 NbTimesU,NbTimesV Quantity of transformations to be done.
11084                 theName Object name; when specified, this parameter is used
11085                         for result publication in the study. Otherwise, if automatic
11086                         publication is switched on, default value is used for result name.
11087
11088             Returns:
11089                 New GEOM.GEOM_Object, containing the result shape.
11090             """
11091             # Example: see GEOM_Spanner.py
11092             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11093               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11094             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11095                                                             DirFace1V, DirFace2V, NbTimesV)
11096             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11097             anObj.SetParameters(Parameters)
11098             self._autoPublish(anObj, theName, "transformed")
11099             return anObj
11100
11101         ## Build all possible propagation groups.
11102         #  Propagation group is a set of all edges, opposite to one (main)
11103         #  edge of this group directly or through other opposite edges.
11104         #  Notion of Opposite Edge make sence only on quadrangle face.
11105         #  @param theShape Shape to build propagation groups on.
11106         #  @param theName Object name; when specified, this parameter is used
11107         #         for result publication in the study. Otherwise, if automatic
11108         #         publication is switched on, default value is used for result name.
11109         #
11110         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11111         #
11112         #  @ref swig_Propagate "Example"
11113         def Propagate(self, theShape, theName=None):
11114             """
11115             Build all possible propagation groups.
11116             Propagation group is a set of all edges, opposite to one (main)
11117             edge of this group directly or through other opposite edges.
11118             Notion of Opposite Edge make sence only on quadrangle face.
11119
11120             Parameters:
11121                 theShape Shape to build propagation groups on.
11122                 theName Object name; when specified, this parameter is used
11123                         for result publication in the study. Otherwise, if automatic
11124                         publication is switched on, default value is used for result name.
11125
11126             Returns:
11127                 List of GEOM.GEOM_Object, each of them is a propagation group.
11128             """
11129             # Example: see GEOM_TestOthers.py
11130             listChains = self.BlocksOp.Propagate(theShape)
11131             RaiseIfFailed("Propagate", self.BlocksOp)
11132             self._autoPublish(listChains, theName, "propagate")
11133             return listChains
11134
11135         # end of l3_blocks_op
11136         ## @}
11137
11138         ## @addtogroup l3_groups
11139         ## @{
11140
11141         ## Creates a new group which will store sub-shapes of theMainShape
11142         #  @param theMainShape is a GEOM object on which the group is selected
11143         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11144         #  @param theName Object name; when specified, this parameter is used
11145         #         for result publication in the study. Otherwise, if automatic
11146         #         publication is switched on, default value is used for result name.
11147         #
11148         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11149         #
11150         #  @ref tui_working_with_groups_page "Example 1"
11151         #  \n @ref swig_CreateGroup "Example 2"
11152         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11153             """
11154             Creates a new group which will store sub-shapes of theMainShape
11155
11156             Parameters:
11157                theMainShape is a GEOM object on which the group is selected
11158                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11159                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11160                 theName Object name; when specified, this parameter is used
11161                         for result publication in the study. Otherwise, if automatic
11162                         publication is switched on, default value is used for result name.
11163
11164             Returns:
11165                a newly created GEOM group
11166
11167             Example of usage:
11168                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11169                 
11170             """
11171             # Example: see GEOM_TestOthers.py
11172             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11173             RaiseIfFailed("CreateGroup", self.GroupOp)
11174             self._autoPublish(anObj, theName, "group")
11175             return anObj
11176
11177         ## Adds a sub-object with ID theSubShapeId to the group
11178         #  @param theGroup is a GEOM group to which the new sub-shape is added
11179         #  @param theSubShapeID is a sub-shape ID in the main object.
11180         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11181         #
11182         #  @ref tui_working_with_groups_page "Example"
11183         def AddObject(self,theGroup, theSubShapeID):
11184             """
11185             Adds a sub-object with ID theSubShapeId to the group
11186
11187             Parameters:
11188                 theGroup       is a GEOM group to which the new sub-shape is added
11189                 theSubShapeID  is a sub-shape ID in the main object.
11190
11191             Note:
11192                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11193             """
11194             # Example: see GEOM_TestOthers.py
11195             self.GroupOp.AddObject(theGroup, theSubShapeID)
11196             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11197                 RaiseIfFailed("AddObject", self.GroupOp)
11198                 pass
11199             pass
11200
11201         ## Removes a sub-object with ID \a theSubShapeId from the group
11202         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11203         #  @param theSubShapeID is a sub-shape ID in the main object.
11204         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11205         #
11206         #  @ref tui_working_with_groups_page "Example"
11207         def RemoveObject(self,theGroup, theSubShapeID):
11208             """
11209             Removes a sub-object with ID theSubShapeId from the group
11210
11211             Parameters:
11212                 theGroup is a GEOM group from which the new sub-shape is removed
11213                 theSubShapeID is a sub-shape ID in the main object.
11214
11215             Note:
11216                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11217             """
11218             # Example: see GEOM_TestOthers.py
11219             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11220             RaiseIfFailed("RemoveObject", self.GroupOp)
11221             pass
11222
11223         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11224         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11225         #  @param theSubShapes is a list of sub-shapes to be added.
11226         #
11227         #  @ref tui_working_with_groups_page "Example"
11228         def UnionList (self,theGroup, theSubShapes):
11229             """
11230             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11231
11232             Parameters:
11233                 theGroup is a GEOM group to which the new sub-shapes are added.
11234                 theSubShapes is a list of sub-shapes to be added.
11235             """
11236             # Example: see GEOM_TestOthers.py
11237             self.GroupOp.UnionList(theGroup, theSubShapes)
11238             RaiseIfFailed("UnionList", self.GroupOp)
11239             pass
11240
11241         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11242         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11243         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11244         #
11245         #  @ref swig_UnionIDs "Example"
11246         def UnionIDs(self,theGroup, theSubShapes):
11247             """
11248             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11249
11250             Parameters:
11251                 theGroup is a GEOM group to which the new sub-shapes are added.
11252                 theSubShapes is a list of indices of sub-shapes to be added.
11253             """
11254             # Example: see GEOM_TestOthers.py
11255             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11256             RaiseIfFailed("UnionIDs", self.GroupOp)
11257             pass
11258
11259         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11260         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11261         #  @param theSubShapes is a list of sub-shapes to be removed.
11262         #
11263         #  @ref tui_working_with_groups_page "Example"
11264         def DifferenceList (self,theGroup, theSubShapes):
11265             """
11266             Removes from the group all the given shapes. No errors, if some shapes are not included.
11267
11268             Parameters:
11269                 theGroup is a GEOM group from which the sub-shapes are removed.
11270                 theSubShapes is a list of sub-shapes to be removed.
11271             """
11272             # Example: see GEOM_TestOthers.py
11273             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11274             RaiseIfFailed("DifferenceList", self.GroupOp)
11275             pass
11276
11277         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11278         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11279         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11280         #
11281         #  @ref swig_DifferenceIDs "Example"
11282         def DifferenceIDs(self,theGroup, theSubShapes):
11283             """
11284             Removes from the group all the given shapes. No errors, if some shapes are not included.
11285
11286             Parameters:
11287                 theGroup is a GEOM group from which the sub-shapes are removed.
11288                 theSubShapes is a list of indices of sub-shapes to be removed.
11289             """            
11290             # Example: see GEOM_TestOthers.py
11291             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11292             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11293             pass
11294
11295         ## Union of two groups.
11296         #  New group is created. It will contain all entities
11297         #  which are present in groups theGroup1 and theGroup2.
11298         #  @param theGroup1, theGroup2 are the initial GEOM groups
11299         #                              to create the united group from.
11300         #  @param theName Object name; when specified, this parameter is used
11301         #         for result publication in the study. Otherwise, if automatic
11302         #         publication is switched on, default value is used for result name.
11303         #
11304         #  @return a newly created GEOM group.
11305         #
11306         #  @ref tui_union_groups_anchor "Example"
11307         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11308             """
11309             Union of two groups.
11310             New group is created. It will contain all entities
11311             which are present in groups theGroup1 and theGroup2.
11312
11313             Parameters:
11314                 theGroup1, theGroup2 are the initial GEOM groups
11315                                      to create the united group from.
11316                 theName Object name; when specified, this parameter is used
11317                         for result publication in the study. Otherwise, if automatic
11318                         publication is switched on, default value is used for result name.
11319
11320             Returns:
11321                 a newly created GEOM group.
11322             """
11323             # Example: see GEOM_TestOthers.py
11324             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11325             RaiseIfFailed("UnionGroups", self.GroupOp)
11326             self._autoPublish(aGroup, theName, "group")
11327             return aGroup
11328
11329         ## Intersection of two groups.
11330         #  New group is created. It will contain only those entities
11331         #  which are present in both groups theGroup1 and theGroup2.
11332         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11333         #  @param theName Object name; when specified, this parameter is used
11334         #         for result publication in the study. Otherwise, if automatic
11335         #         publication is switched on, default value is used for result name.
11336         #
11337         #  @return a newly created GEOM group.
11338         #
11339         #  @ref tui_intersect_groups_anchor "Example"
11340         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11341             """
11342             Intersection of two groups.
11343             New group is created. It will contain only those entities
11344             which are present in both groups theGroup1 and theGroup2.
11345
11346             Parameters:
11347                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11348                 theName Object name; when specified, this parameter is used
11349                         for result publication in the study. Otherwise, if automatic
11350                         publication is switched on, default value is used for result name.
11351
11352             Returns:
11353                 a newly created GEOM group.
11354             """
11355             # Example: see GEOM_TestOthers.py
11356             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11357             RaiseIfFailed("IntersectGroups", self.GroupOp)
11358             self._autoPublish(aGroup, theName, "group")
11359             return aGroup
11360
11361         ## Cut of two groups.
11362         #  New group is created. It will contain entities which are
11363         #  present in group theGroup1 but are not present in group theGroup2.
11364         #  @param theGroup1 is a GEOM group to include elements of.
11365         #  @param theGroup2 is a GEOM group to exclude elements of.
11366         #  @param theName Object name; when specified, this parameter is used
11367         #         for result publication in the study. Otherwise, if automatic
11368         #         publication is switched on, default value is used for result name.
11369         #
11370         #  @return a newly created GEOM group.
11371         #
11372         #  @ref tui_cut_groups_anchor "Example"
11373         def CutGroups (self, theGroup1, theGroup2, theName=None):
11374             """
11375             Cut of two groups.
11376             New group is created. It will contain entities which are
11377             present in group theGroup1 but are not present in group theGroup2.
11378
11379             Parameters:
11380                 theGroup1 is a GEOM group to include elements of.
11381                 theGroup2 is a GEOM group to exclude elements of.
11382                 theName Object name; when specified, this parameter is used
11383                         for result publication in the study. Otherwise, if automatic
11384                         publication is switched on, default value is used for result name.
11385
11386             Returns:
11387                 a newly created GEOM group.
11388             """
11389             # Example: see GEOM_TestOthers.py
11390             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11391             RaiseIfFailed("CutGroups", self.GroupOp)
11392             self._autoPublish(aGroup, theName, "group")
11393             return aGroup
11394
11395         ## Union of list of groups.
11396         #  New group is created. It will contain all entities that are
11397         #  present in groups listed in theGList.
11398         #  @param theGList is a list of GEOM groups to create the united group from.
11399         #  @param theName Object name; when specified, this parameter is used
11400         #         for result publication in the study. Otherwise, if automatic
11401         #         publication is switched on, default value is used for result name.
11402         #
11403         #  @return a newly created GEOM group.
11404         #
11405         #  @ref tui_union_groups_anchor "Example"
11406         def UnionListOfGroups (self, theGList, theName=None):
11407             """
11408             Union of list of groups.
11409             New group is created. It will contain all entities that are
11410             present in groups listed in theGList.
11411
11412             Parameters:
11413                 theGList is a list of GEOM groups to create the united group from.
11414                 theName Object name; when specified, this parameter is used
11415                         for result publication in the study. Otherwise, if automatic
11416                         publication is switched on, default value is used for result name.
11417
11418             Returns:
11419                 a newly created GEOM group.
11420             """
11421             # Example: see GEOM_TestOthers.py
11422             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11423             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11424             self._autoPublish(aGroup, theName, "group")
11425             return aGroup
11426
11427         ## Cut of lists of groups.
11428         #  New group is created. It will contain only entities
11429         #  which are present in groups listed in theGList.
11430         #  @param theGList is a list of GEOM groups to include elements of.
11431         #  @param theName Object name; when specified, this parameter is used
11432         #         for result publication in the study. Otherwise, if automatic
11433         #         publication is switched on, default value is used for result name.
11434         #
11435         #  @return a newly created GEOM group.
11436         #
11437         #  @ref tui_intersect_groups_anchor "Example"
11438         def IntersectListOfGroups (self, theGList, theName=None):
11439             """
11440             Cut of lists of groups.
11441             New group is created. It will contain only entities
11442             which are present in groups listed in theGList.
11443
11444             Parameters:
11445                 theGList is a list of GEOM groups to include elements of.
11446                 theName Object name; when specified, this parameter is used
11447                         for result publication in the study. Otherwise, if automatic
11448                         publication is switched on, default value is used for result name.
11449
11450             Returns:
11451                 a newly created GEOM group.
11452             """
11453             # Example: see GEOM_TestOthers.py
11454             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11455             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11456             self._autoPublish(aGroup, theName, "group")
11457             return aGroup
11458
11459         ## Cut of lists of groups.
11460         #  New group is created. It will contain only entities
11461         #  which are present in groups listed in theGList1 but 
11462         #  are not present in groups from theGList2.
11463         #  @param theGList1 is a list of GEOM groups to include elements of.
11464         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11465         #  @param theName Object name; when specified, this parameter is used
11466         #         for result publication in the study. Otherwise, if automatic
11467         #         publication is switched on, default value is used for result name.
11468         #
11469         #  @return a newly created GEOM group.
11470         #
11471         #  @ref tui_cut_groups_anchor "Example"
11472         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11473             """
11474             Cut of lists of groups.
11475             New group is created. It will contain only entities
11476             which are present in groups listed in theGList1 but 
11477             are not present in groups from theGList2.
11478
11479             Parameters:
11480                 theGList1 is a list of GEOM groups to include elements of.
11481                 theGList2 is a list of GEOM groups to exclude elements of.
11482                 theName Object name; when specified, this parameter is used
11483                         for result publication in the study. Otherwise, if automatic
11484                         publication is switched on, default value is used for result name.
11485
11486             Returns:
11487                 a newly created GEOM group.
11488             """
11489             # Example: see GEOM_TestOthers.py
11490             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11491             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11492             self._autoPublish(aGroup, theName, "group")
11493             return aGroup
11494
11495         ## Returns a list of sub-objects ID stored in the group
11496         #  @param theGroup is a GEOM group for which a list of IDs is requested
11497         #
11498         #  @ref swig_GetObjectIDs "Example"
11499         def GetObjectIDs(self,theGroup):
11500             """
11501             Returns a list of sub-objects ID stored in the group
11502
11503             Parameters:
11504                 theGroup is a GEOM group for which a list of IDs is requested
11505             """
11506             # Example: see GEOM_TestOthers.py
11507             ListIDs = self.GroupOp.GetObjects(theGroup)
11508             RaiseIfFailed("GetObjects", self.GroupOp)
11509             return ListIDs
11510
11511         ## Returns a type of sub-objects stored in the group
11512         #  @param theGroup is a GEOM group which type is returned.
11513         #
11514         #  @ref swig_GetType "Example"
11515         def GetType(self,theGroup):
11516             """
11517             Returns a type of sub-objects stored in the group
11518
11519             Parameters:
11520                 theGroup is a GEOM group which type is returned.
11521             """
11522             # Example: see GEOM_TestOthers.py
11523             aType = self.GroupOp.GetType(theGroup)
11524             RaiseIfFailed("GetType", self.GroupOp)
11525             return aType
11526
11527         ## Convert a type of geom object from id to string value
11528         #  @param theId is a GEOM obect type id.
11529         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11530         #  @ref swig_GetType "Example"
11531         def ShapeIdToType(self, theId):
11532             """
11533             Convert a type of geom object from id to string value
11534
11535             Parameters:
11536                 theId is a GEOM obect type id.
11537                 
11538             Returns:
11539                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11540             """
11541             if theId == 0:
11542                 return "COPY"
11543             if theId == 1:
11544                 return "IMPORT"
11545             if theId == 2:
11546                 return "POINT"
11547             if theId == 3:
11548                 return "VECTOR"
11549             if theId == 4:
11550                 return "PLANE"
11551             if theId == 5:
11552                 return "LINE"
11553             if theId == 6:
11554                 return "TORUS"
11555             if theId == 7:
11556                 return "BOX"
11557             if theId == 8:
11558                 return "CYLINDER"
11559             if theId == 9:
11560                 return "CONE"
11561             if theId == 10:
11562                 return "SPHERE"
11563             if theId == 11:
11564                 return "PRISM"
11565             if theId == 12:
11566                 return "REVOLUTION"
11567             if theId == 13:
11568                 return "BOOLEAN"
11569             if theId == 14:
11570                 return "PARTITION"
11571             if theId == 15:
11572                 return "POLYLINE"
11573             if theId == 16:
11574                 return "CIRCLE"
11575             if theId == 17:
11576                 return "SPLINE"
11577             if theId == 18:
11578                 return "ELLIPSE"
11579             if theId == 19:
11580                 return "CIRC_ARC"
11581             if theId == 20:
11582                 return "FILLET"
11583             if theId == 21:
11584                 return "CHAMFER"
11585             if theId == 22:
11586                 return "EDGE"
11587             if theId == 23:
11588                 return "WIRE"
11589             if theId == 24:
11590                 return "FACE"
11591             if theId == 25:
11592                 return "SHELL"
11593             if theId == 26:
11594                 return "SOLID"
11595             if theId == 27:
11596                 return "COMPOUND"
11597             if theId == 28:
11598                 return "SUBSHAPE"
11599             if theId == 29:
11600                 return "PIPE"
11601             if theId == 30:
11602                 return "ARCHIMEDE"
11603             if theId == 31:
11604                 return "FILLING"
11605             if theId == 32:
11606                 return "EXPLODE"
11607             if theId == 33:
11608                 return "GLUED"
11609             if theId == 34:
11610                 return "SKETCHER"
11611             if theId == 35:
11612                 return "CDG"
11613             if theId == 36:
11614                 return "FREE_BOUNDS"
11615             if theId == 37:
11616                 return "GROUP"
11617             if theId == 38:
11618                 return "BLOCK"
11619             if theId == 39:
11620                 return "MARKER"
11621             if theId == 40:
11622                 return "THRUSECTIONS"
11623             if theId == 41:
11624                 return "COMPOUNDFILTER"
11625             if theId == 42:
11626                 return "SHAPES_ON_SHAPE"
11627             if theId == 43:
11628                 return "ELLIPSE_ARC"
11629             if theId == 44:
11630                 return "3DSKETCHER"
11631             if theId == 45:
11632                 return "FILLET_2D"
11633             if theId == 46:
11634                 return "FILLET_1D"
11635             if theId == 201:
11636                 return "PIPETSHAPE"
11637             return "Shape Id not exist."
11638
11639         ## Returns a main shape associated with the group
11640         #  @param theGroup is a GEOM group for which a main shape object is requested
11641         #  @return a GEOM object which is a main shape for theGroup
11642         #
11643         #  @ref swig_GetMainShape "Example"
11644         def GetMainShape(self,theGroup):
11645             """
11646             Returns a main shape associated with the group
11647
11648             Parameters:
11649                 theGroup is a GEOM group for which a main shape object is requested
11650
11651             Returns:
11652                 a GEOM object which is a main shape for theGroup
11653
11654             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11655             """
11656             # Example: see GEOM_TestOthers.py
11657             anObj = self.GroupOp.GetMainShape(theGroup)
11658             RaiseIfFailed("GetMainShape", self.GroupOp)
11659             return anObj
11660
11661         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11662         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11663         #  @param theShape given shape (see GEOM.GEOM_Object)
11664         #  @param min_length minimum length of edges of theShape
11665         #  @param max_length maximum length of edges of theShape
11666         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11667         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11668         #  @param theName Object name; when specified, this parameter is used
11669         #         for result publication in the study. Otherwise, if automatic
11670         #         publication is switched on, default value is used for result name.
11671         #
11672         #  @return a newly created GEOM group of edges
11673         #
11674         #  @@ref swig_todo "Example"
11675         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11676             """
11677             Create group of edges of theShape, whose length is in range [min_length, max_length].
11678             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11679
11680             Parameters:
11681                 theShape given shape
11682                 min_length minimum length of edges of theShape
11683                 max_length maximum length of edges of theShape
11684                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11685                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11686                 theName Object name; when specified, this parameter is used
11687                         for result publication in the study. Otherwise, if automatic
11688                         publication is switched on, default value is used for result name.
11689
11690              Returns:
11691                 a newly created GEOM group of edges.
11692             """
11693             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11694             edges_in_range = []
11695             for edge in edges:
11696                 Props = self.BasicProperties(edge)
11697                 if min_length <= Props[0] and Props[0] <= max_length:
11698                     if (not include_min) and (min_length == Props[0]):
11699                         skip = 1
11700                     else:
11701                         if (not include_max) and (Props[0] == max_length):
11702                             skip = 1
11703                         else:
11704                             edges_in_range.append(edge)
11705
11706             if len(edges_in_range) <= 0:
11707                 print "No edges found by given criteria"
11708                 return None
11709
11710             # note: auto-publishing is done in self.CreateGroup()
11711             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11712             self.UnionList(group_edges, edges_in_range)
11713
11714             return group_edges
11715
11716         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11717         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11718         #  @param min_length minimum length of edges of selected shape
11719         #  @param max_length maximum length of edges of selected shape
11720         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11721         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11722         #  @return a newly created GEOM group of edges
11723         #  @ref swig_todo "Example"
11724         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11725             """
11726             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11727             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11728
11729             Parameters:
11730                 min_length minimum length of edges of selected shape
11731                 max_length maximum length of edges of selected shape
11732                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11733                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11734
11735              Returns:
11736                 a newly created GEOM group of edges.
11737             """
11738             nb_selected = sg.SelectedCount()
11739             if nb_selected < 1:
11740                 print "Select a shape before calling this function, please."
11741                 return 0
11742             if nb_selected > 1:
11743                 print "Only one shape must be selected"
11744                 return 0
11745
11746             id_shape = sg.getSelected(0)
11747             shape = IDToObject( id_shape )
11748
11749             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11750
11751             left_str  = " < "
11752             right_str = " < "
11753             if include_min: left_str  = " <= "
11754             if include_max: right_str  = " <= "
11755
11756             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11757                                     + left_str + "length" + right_str + `max_length`)
11758
11759             sg.updateObjBrowser(1)
11760
11761             return group_edges
11762
11763         # end of l3_groups
11764         ## @}
11765
11766         ## @addtogroup l4_advanced
11767         ## @{
11768
11769         ## Create a T-shape object with specified caracteristics for the main
11770         #  and the incident pipes (radius, width, half-length).
11771         #  The extremities of the main pipe are located on junctions points P1 and P2.
11772         #  The extremity of the incident pipe is located on junction point P3.
11773         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11774         #  the main plane of the T-shape is XOY.
11775         #
11776         #  @param theR1 Internal radius of main pipe
11777         #  @param theW1 Width of main pipe
11778         #  @param theL1 Half-length of main pipe
11779         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11780         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11781         #  @param theL2 Half-length of incident pipe
11782         #
11783         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11784         #  @param theP1 1st junction point of main pipe
11785         #  @param theP2 2nd junction point of main pipe
11786         #  @param theP3 Junction point of incident pipe
11787         #
11788         #  @param theRL Internal radius of left thickness reduction
11789         #  @param theWL Width of left thickness reduction
11790         #  @param theLtransL Length of left transition part
11791         #  @param theLthinL Length of left thin part
11792         #
11793         #  @param theRR Internal radius of right thickness reduction
11794         #  @param theWR Width of right thickness reduction
11795         #  @param theLtransR Length of right transition part
11796         #  @param theLthinR Length of right thin part
11797         #
11798         #  @param theRI Internal radius of incident thickness reduction
11799         #  @param theWI Width of incident thickness reduction
11800         #  @param theLtransI Length of incident transition part
11801         #  @param theLthinI Length of incident thin part
11802         #
11803         #  @param theName Object name; when specified, this parameter is used
11804         #         for result publication in the study. Otherwise, if automatic
11805         #         publication is switched on, default value is used for result name.
11806         #
11807         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11808         #
11809         #  @ref tui_creation_pipetshape "Example"
11810         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11811                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11812                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11813                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11814                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11815                             theName=None):
11816             """
11817             Create a T-shape object with specified caracteristics for the main
11818             and the incident pipes (radius, width, half-length).
11819             The extremities of the main pipe are located on junctions points P1 and P2.
11820             The extremity of the incident pipe is located on junction point P3.
11821             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11822             the main plane of the T-shape is XOY.
11823
11824             Parameters:
11825                 theR1 Internal radius of main pipe
11826                 theW1 Width of main pipe
11827                 theL1 Half-length of main pipe
11828                 theR2 Internal radius of incident pipe (R2 < R1)
11829                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11830                 theL2 Half-length of incident pipe
11831                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11832                 theP1 1st junction point of main pipe
11833                 theP2 2nd junction point of main pipe
11834                 theP3 Junction point of incident pipe
11835
11836                 theRL Internal radius of left thickness reduction
11837                 theWL Width of left thickness reduction
11838                 theLtransL Length of left transition part
11839                 theLthinL Length of left thin part
11840
11841                 theRR Internal radius of right thickness reduction
11842                 theWR Width of right thickness reduction
11843                 theLtransR Length of right transition part
11844                 theLthinR Length of right thin part
11845
11846                 theRI Internal radius of incident thickness reduction
11847                 theWI Width of incident thickness reduction
11848                 theLtransI Length of incident transition part
11849                 theLthinI Length of incident thin part
11850
11851                 theName Object name; when specified, this parameter is used
11852                         for result publication in the study. Otherwise, if automatic
11853                         publication is switched on, default value is used for result name.
11854
11855             Returns:
11856                 List of GEOM_Object, containing the created shape and propagation groups.
11857
11858             Example of usage:
11859                 # create PipeTShape object
11860                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11861                 # create PipeTShape object with position
11862                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11863                 # create PipeTShape object with left thickness reduction
11864                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11865             """
11866             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11867             if (theP1 and theP2 and theP3):
11868                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11869                                                                 theRL, theWL, theLtransL, theLthinL,
11870                                                                 theRR, theWR, theLtransR, theLthinR,
11871                                                                 theRI, theWI, theLtransI, theLthinI,
11872                                                                 theHexMesh, theP1, theP2, theP3)
11873             else:
11874                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11875                                                     theRL, theWL, theLtransL, theLthinL,
11876                                                     theRR, theWR, theLtransR, theLthinR,
11877                                                     theRI, theWI, theLtransI, theLthinI,
11878                                                     theHexMesh)
11879             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11880             if Parameters: anObj[0].SetParameters(Parameters)
11881             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11882             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11883             return anObj
11884
11885         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11886         #  and the incident pipes (radius, width, half-length). The chamfer is
11887         #  created on the junction of the pipes.
11888         #  The extremities of the main pipe are located on junctions points P1 and P2.
11889         #  The extremity of the incident pipe is located on junction point P3.
11890         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11891         #  the main plane of the T-shape is XOY.
11892         #  @param theR1 Internal radius of main pipe
11893         #  @param theW1 Width of main pipe
11894         #  @param theL1 Half-length of main pipe
11895         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11896         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11897         #  @param theL2 Half-length of incident pipe
11898         #  @param theH Height of the chamfer.
11899         #  @param theW Width of the chamfer.
11900         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11901         #  @param theP1 1st junction point of main pipe
11902         #  @param theP2 2nd junction point of main pipe
11903         #  @param theP3 Junction point of incident pipe
11904         #
11905         #  @param theRL Internal radius of left thickness reduction
11906         #  @param theWL Width of left thickness reduction
11907         #  @param theLtransL Length of left transition part
11908         #  @param theLthinL Length of left thin part
11909         #
11910         #  @param theRR Internal radius of right thickness reduction
11911         #  @param theWR Width of right thickness reduction
11912         #  @param theLtransR Length of right transition part
11913         #  @param theLthinR Length of right thin part
11914         #
11915         #  @param theRI Internal radius of incident thickness reduction
11916         #  @param theWI Width of incident thickness reduction
11917         #  @param theLtransI Length of incident transition part
11918         #  @param theLthinI Length of incident thin part
11919         #
11920         #  @param theName Object name; when specified, this parameter is used
11921         #         for result publication in the study. Otherwise, if automatic
11922         #         publication is switched on, default value is used for result name.
11923         #
11924         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11925         #
11926         #  @ref tui_creation_pipetshape "Example"
11927         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11928                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11929                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11930                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11931                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11932                                    theName=None):
11933             """
11934             Create a T-shape object with chamfer and with specified caracteristics for the main
11935             and the incident pipes (radius, width, half-length). The chamfer is
11936             created on the junction of the pipes.
11937             The extremities of the main pipe are located on junctions points P1 and P2.
11938             The extremity of the incident pipe is located on junction point P3.
11939             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11940             the main plane of the T-shape is XOY.
11941
11942             Parameters:
11943                 theR1 Internal radius of main pipe
11944                 theW1 Width of main pipe
11945                 theL1 Half-length of main pipe
11946                 theR2 Internal radius of incident pipe (R2 < R1)
11947                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11948                 theL2 Half-length of incident pipe
11949                 theH Height of the chamfer.
11950                 theW Width of the chamfer.
11951                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11952                 theP1 1st junction point of main pipe
11953                 theP2 2nd junction point of main pipe
11954                 theP3 Junction point of incident pipe
11955
11956                 theRL Internal radius of left thickness reduction
11957                 theWL Width of left thickness reduction
11958                 theLtransL Length of left transition part
11959                 theLthinL Length of left thin part
11960
11961                 theRR Internal radius of right thickness reduction
11962                 theWR Width of right thickness reduction
11963                 theLtransR Length of right transition part
11964                 theLthinR Length of right thin part
11965
11966                 theRI Internal radius of incident thickness reduction
11967                 theWI Width of incident thickness reduction
11968                 theLtransI Length of incident transition part
11969                 theLthinI Length of incident thin part
11970
11971                 theName Object name; when specified, this parameter is used
11972                         for result publication in the study. Otherwise, if automatic
11973                         publication is switched on, default value is used for result name.
11974
11975             Returns:
11976                 List of GEOM_Object, containing the created shape and propagation groups.
11977
11978             Example of usage:
11979                 # create PipeTShape with chamfer object
11980                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11981                 # create PipeTShape with chamfer object with position
11982                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11983                 # create PipeTShape with chamfer object with left thickness reduction
11984                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11985             """
11986             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11987             if (theP1 and theP2 and theP3):
11988               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11989                                                                      theRL, theWL, theLtransL, theLthinL,
11990                                                                      theRR, theWR, theLtransR, theLthinR,
11991                                                                      theRI, theWI, theLtransI, theLthinI,
11992                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11993             else:
11994               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11995                                                          theRL, theWL, theLtransL, theLthinL,
11996                                                          theRR, theWR, theLtransR, theLthinR,
11997                                                          theRI, theWI, theLtransI, theLthinI,
11998                                                          theH, theW, theHexMesh)
11999             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12000             if Parameters: anObj[0].SetParameters(Parameters)
12001             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12002             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12003             return anObj
12004
12005         ## Create a T-shape object with fillet and with specified caracteristics for the main
12006         #  and the incident pipes (radius, width, half-length). The fillet is
12007         #  created on the junction of the pipes.
12008         #  The extremities of the main pipe are located on junctions points P1 and P2.
12009         #  The extremity of the incident pipe is located on junction point P3.
12010         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12011         #  the main plane of the T-shape is XOY.
12012         #  @param theR1 Internal radius of main pipe
12013         #  @param theW1 Width of main pipe
12014         #  @param theL1 Half-length of main pipe
12015         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12016         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12017         #  @param theL2 Half-length of incident pipe
12018         #  @param theRF Radius of curvature of fillet.
12019         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12020         #  @param theP1 1st junction point of main pipe
12021         #  @param theP2 2nd junction point of main pipe
12022         #  @param theP3 Junction point of incident pipe
12023         #
12024         #  @param theRL Internal radius of left thickness reduction
12025         #  @param theWL Width of left thickness reduction
12026         #  @param theLtransL Length of left transition part
12027         #  @param theLthinL Length of left thin part
12028         #
12029         #  @param theRR Internal radius of right thickness reduction
12030         #  @param theWR Width of right thickness reduction
12031         #  @param theLtransR Length of right transition part
12032         #  @param theLthinR Length of right thin part
12033         #
12034         #  @param theRI Internal radius of incident thickness reduction
12035         #  @param theWI Width of incident thickness reduction
12036         #  @param theLtransI Length of incident transition part
12037         #  @param theLthinI Length of incident thin part
12038         #
12039         #  @param theName Object name; when specified, this parameter is used
12040         #         for result publication in the study. Otherwise, if automatic
12041         #         publication is switched on, default value is used for result name.
12042         #
12043         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12044         #
12045         #  @ref tui_creation_pipetshape "Example"
12046         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12047                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12048                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12049                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12050                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12051                                   theName=None):
12052             """
12053             Create a T-shape object with fillet and with specified caracteristics for the main
12054             and the incident pipes (radius, width, half-length). The fillet is
12055             created on the junction of the pipes.
12056             The extremities of the main pipe are located on junctions points P1 and P2.
12057             The extremity of the incident pipe is located on junction point P3.
12058
12059             Parameters:
12060                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12061                 the main plane of the T-shape is XOY.
12062                 theR1 Internal radius of main pipe
12063                 theW1 Width of main pipe
12064                 heL1 Half-length of main pipe
12065                 theR2 Internal radius of incident pipe (R2 < R1)
12066                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12067                 theL2 Half-length of incident pipe
12068                 theRF Radius of curvature of fillet.
12069                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12070                 theP1 1st junction point of main pipe
12071                 theP2 2nd junction point of main pipe
12072                 theP3 Junction point of incident pipe
12073
12074                 theRL Internal radius of left thickness reduction
12075                 theWL Width of left thickness reduction
12076                 theLtransL Length of left transition part
12077                 theLthinL Length of left thin part
12078
12079                 theRR Internal radius of right thickness reduction
12080                 theWR Width of right thickness reduction
12081                 theLtransR Length of right transition part
12082                 theLthinR Length of right thin part
12083
12084                 theRI Internal radius of incident thickness reduction
12085                 theWI Width of incident thickness reduction
12086                 theLtransI Length of incident transition part
12087                 theLthinI Length of incident thin part
12088
12089                 theName Object name; when specified, this parameter is used
12090                         for result publication in the study. Otherwise, if automatic
12091                         publication is switched on, default value is used for result name.
12092                 
12093             Returns:
12094                 List of GEOM_Object, containing the created shape and propagation groups.
12095                 
12096             Example of usage:
12097                 # create PipeTShape with fillet object
12098                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12099                 # create PipeTShape with fillet object with position
12100                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12101                 # create PipeTShape with fillet object with left thickness reduction
12102                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12103             """
12104             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12105             if (theP1 and theP2 and theP3):
12106               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12107                                                                     theRL, theWL, theLtransL, theLthinL,
12108                                                                     theRR, theWR, theLtransR, theLthinR,
12109                                                                     theRI, theWI, theLtransI, theLthinI,
12110                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12111             else:
12112               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12113                                                         theRL, theWL, theLtransL, theLthinL,
12114                                                         theRR, theWR, theLtransR, theLthinR,
12115                                                         theRI, theWI, theLtransI, theLthinI,
12116                                                         theRF, theHexMesh)
12117             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12118             if Parameters: anObj[0].SetParameters(Parameters)
12119             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12120             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12121             return anObj
12122
12123         ## This function allows creating a disk already divided into blocks. It
12124         #  can be used to create divided pipes for later meshing in hexaedra.
12125         #  @param theR Radius of the disk
12126         #  @param theOrientation Orientation of the plane on which the disk will be built
12127         #         1 = XOY, 2 = OYZ, 3 = OZX
12128         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12129         #  @param theName Object name; when specified, this parameter is used
12130         #         for result publication in the study. Otherwise, if automatic
12131         #         publication is switched on, default value is used for result name.
12132         #
12133         #  @return New GEOM_Object, containing the created shape.
12134         #
12135         #  @ref tui_creation_divideddisk "Example"
12136         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12137             """
12138             Creates a disk, divided into blocks. It can be used to create divided pipes
12139             for later meshing in hexaedra.
12140
12141             Parameters:
12142                 theR Radius of the disk
12143                 theOrientation Orientation of the plane on which the disk will be built:
12144                                1 = XOY, 2 = OYZ, 3 = OZX
12145                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12146                 theName Object name; when specified, this parameter is used
12147                         for result publication in the study. Otherwise, if automatic
12148                         publication is switched on, default value is used for result name.
12149
12150             Returns:
12151                 New GEOM_Object, containing the created shape.
12152             """
12153             theR, Parameters = ParseParameters(theR)
12154             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12155             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12156             if Parameters: anObj.SetParameters(Parameters)
12157             self._autoPublish(anObj, theName, "dividedDisk")
12158             return anObj
12159             
12160         ## This function allows creating a disk already divided into blocks. It
12161         #  can be used to create divided pipes for later meshing in hexaedra.
12162         #  @param theCenter Center of the disk
12163         #  @param theVector Normal vector to the plane of the created disk
12164         #  @param theRadius Radius of the disk
12165         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12166         #  @param theName Object name; when specified, this parameter is used
12167         #         for result publication in the study. Otherwise, if automatic
12168         #         publication is switched on, default value is used for result name.
12169         #
12170         #  @return New GEOM_Object, containing the created shape.
12171         #
12172         #  @ref tui_creation_divideddisk "Example"
12173         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12174             """
12175             Creates a disk already divided into blocks. It can be used to create divided pipes
12176             for later meshing in hexaedra.
12177
12178             Parameters:
12179                 theCenter Center of the disk
12180                 theVector Normal vector to the plane of the created disk
12181                 theRadius Radius of the disk
12182                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12183                 theName Object name; when specified, this parameter is used
12184                         for result publication in the study. Otherwise, if automatic
12185                         publication is switched on, default value is used for result name.
12186
12187             Returns:
12188                 New GEOM_Object, containing the created shape.
12189             """
12190             theRadius, Parameters = ParseParameters(theRadius)
12191             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12192             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12193             if Parameters: anObj.SetParameters(Parameters)
12194             self._autoPublish(anObj, theName, "dividedDisk")
12195             return anObj
12196
12197         ## Builds a cylinder prepared for hexa meshes
12198         #  @param theR Radius of the cylinder
12199         #  @param theH Height of the cylinder
12200         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12201         #  @param theName Object name; when specified, this parameter is used
12202         #         for result publication in the study. Otherwise, if automatic
12203         #         publication is switched on, default value is used for result name.
12204         #
12205         #  @return New GEOM_Object, containing the created shape.
12206         #
12207         #  @ref tui_creation_dividedcylinder "Example"
12208         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12209             """
12210             Builds a cylinder prepared for hexa meshes
12211
12212             Parameters:
12213                 theR Radius of the cylinder
12214                 theH Height of the cylinder
12215                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12216                 theName Object name; when specified, this parameter is used
12217                         for result publication in the study. Otherwise, if automatic
12218                         publication is switched on, default value is used for result name.
12219
12220             Returns:
12221                 New GEOM_Object, containing the created shape.
12222             """
12223             theR, theH, Parameters = ParseParameters(theR, theH)
12224             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12225             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12226             if Parameters: anObj.SetParameters(Parameters)
12227             self._autoPublish(anObj, theName, "dividedCylinder")
12228             return anObj
12229
12230         #@@ insert new functions before this line @@ do not remove this line @@#
12231
12232         # end of l4_advanced
12233         ## @}
12234
12235         ## Create a copy of the given object
12236         #
12237         #  @param theOriginal geometry object for copy
12238         #  @param theName Object name; when specified, this parameter is used
12239         #         for result publication in the study. Otherwise, if automatic
12240         #         publication is switched on, default value is used for result name.
12241         #
12242         #  @return New GEOM_Object, containing the copied shape.
12243         #
12244         #  @ingroup l1_geomBuilder_auxiliary
12245         #  @ref swig_MakeCopy "Example"
12246         def MakeCopy(self, theOriginal, theName=None):
12247             """
12248             Create a copy of the given object
12249
12250             Parameters:
12251                 theOriginal geometry object for copy
12252                 theName Object name; when specified, this parameter is used
12253                         for result publication in the study. Otherwise, if automatic
12254                         publication is switched on, default value is used for result name.
12255
12256             Returns:
12257                 New GEOM_Object, containing the copied shape.
12258
12259             Example of usage: Copy = geompy.MakeCopy(Box)
12260             """
12261             # Example: see GEOM_TestAll.py
12262             anObj = self.InsertOp.MakeCopy(theOriginal)
12263             RaiseIfFailed("MakeCopy", self.InsertOp)
12264             self._autoPublish(anObj, theName, "copy")
12265             return anObj
12266
12267         ## Add Path to load python scripts from
12268         #  @param Path a path to load python scripts from
12269         #  @ingroup l1_geomBuilder_auxiliary
12270         def addPath(self,Path):
12271             """
12272             Add Path to load python scripts from
12273
12274             Parameters:
12275                 Path a path to load python scripts from
12276             """
12277             if (sys.path.count(Path) < 1):
12278                 sys.path.append(Path)
12279                 pass
12280             pass
12281
12282         ## Load marker texture from the file
12283         #  @param Path a path to the texture file
12284         #  @return unique texture identifier
12285         #  @ingroup l1_geomBuilder_auxiliary
12286         def LoadTexture(self, Path):
12287             """
12288             Load marker texture from the file
12289             
12290             Parameters:
12291                 Path a path to the texture file
12292                 
12293             Returns:
12294                 unique texture identifier
12295             """
12296             # Example: see GEOM_TestAll.py
12297             ID = self.InsertOp.LoadTexture(Path)
12298             RaiseIfFailed("LoadTexture", self.InsertOp)
12299             return ID
12300
12301         ## Get internal name of the object based on its study entry
12302         #  @note This method does not provide an unique identifier of the geometry object.
12303         #  @note This is internal function of GEOM component, though it can be used outside it for 
12304         #  appropriate reason (e.g. for identification of geometry object).
12305         #  @param obj geometry object
12306         #  @return unique object identifier
12307         #  @ingroup l1_geomBuilder_auxiliary
12308         def getObjectID(self, obj):
12309             """
12310             Get internal name of the object based on its study entry.
12311             Note: this method does not provide an unique identifier of the geometry object.
12312             It is an internal function of GEOM component, though it can be used outside GEOM for 
12313             appropriate reason (e.g. for identification of geometry object).
12314
12315             Parameters:
12316                 obj geometry object
12317
12318             Returns:
12319                 unique object identifier
12320             """
12321             ID = ""
12322             entry = salome.ObjectToID(obj)
12323             if entry is not None:
12324                 lst = entry.split(":")
12325                 if len(lst) > 0:
12326                     ID = lst[-1] # -1 means last item in the list            
12327                     return "GEOM_" + ID
12328             return ID
12329                 
12330             
12331
12332         ## Add marker texture. @a Width and @a Height parameters
12333         #  specify width and height of the texture in pixels.
12334         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12335         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12336         #  parameter should be unpacked string, in which '1' symbols represent opaque
12337         #  pixels and '0' represent transparent pixels of the texture bitmap.
12338         #
12339         #  @param Width texture width in pixels
12340         #  @param Height texture height in pixels
12341         #  @param Texture texture data
12342         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12343         #  @return unique texture identifier
12344         #  @ingroup l1_geomBuilder_auxiliary
12345         def AddTexture(self, Width, Height, Texture, RowData=False):
12346             """
12347             Add marker texture. Width and Height parameters
12348             specify width and height of the texture in pixels.
12349             If RowData is True, Texture parameter should represent texture data
12350             packed into the byte array. If RowData is False (default), Texture
12351             parameter should be unpacked string, in which '1' symbols represent opaque
12352             pixels and '0' represent transparent pixels of the texture bitmap.
12353
12354             Parameters:
12355                 Width texture width in pixels
12356                 Height texture height in pixels
12357                 Texture texture data
12358                 RowData if True, Texture data are packed in the byte stream
12359
12360             Returns:
12361                 return unique texture identifier
12362             """
12363             if not RowData: Texture = PackData(Texture)
12364             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12365             RaiseIfFailed("AddTexture", self.InsertOp)
12366             return ID
12367
12368 import omniORB
12369 # Register the new proxy for GEOM_Gen
12370 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12371
12372 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12373 #  interface to GEOM operations.
12374 #
12375 #  Typical use is:
12376 #  \code
12377 #    import salome
12378 #    salome.salome_init()
12379 #    from salome.geom import geomBuilder
12380 #    geompy = geomBuilder.New(salome.myStudy)
12381 #  \endcode
12382 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12383 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12384 #  @return geomBuilder instance
12385 def New( study, instance=None):
12386     """
12387     Create a new geomBuilder instance.The geomBuilder class provides the Python
12388     interface to GEOM operations.
12389
12390     Typical use is:
12391         import salome
12392         salome.salome_init()
12393         from salome.geom import geomBuilder
12394         geompy = geomBuilder.New(salome.myStudy)
12395
12396     Parameters:
12397         study     SALOME study, generally obtained by salome.myStudy.
12398         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12399     Returns:
12400         geomBuilder instance
12401     """
12402     #print "New geomBuilder ", study, instance
12403     global engine
12404     global geom
12405     global doLcc
12406     engine = instance
12407     if engine is None:
12408       doLcc = True
12409     geom = geomBuilder()
12410     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12411     geom.init_geom(study)
12412     return geom